feat: Tooltips and Better Surface Management
This commit is contained in:
parent
c7edd37b03
commit
337b80d4ca
90 changed files with 3651 additions and 977 deletions
31
src/theme/style/tooltip.rs
Normal file
31
src/theme/style/tooltip.rs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
use iced::Color;
|
||||
|
||||
use crate::widget::wayland::tooltip::Catalog;
|
||||
|
||||
#[derive(Default)]
|
||||
pub enum Tooltip {
|
||||
#[default]
|
||||
Default,
|
||||
}
|
||||
|
||||
impl Catalog for crate::Theme {
|
||||
type Class = Tooltip;
|
||||
|
||||
fn style(&self, style: &Self::Class) -> crate::widget::wayland::tooltip::Style {
|
||||
let cosmic = self.cosmic();
|
||||
|
||||
match style {
|
||||
Tooltip::Default => crate::widget::wayland::tooltip::Style {
|
||||
text_color: cosmic.on_bg_color().into(),
|
||||
background: None,
|
||||
border_width: 0.0,
|
||||
border_radius: cosmic.corner_radii.radius_0.into(),
|
||||
border_color: Color::TRANSPARENT,
|
||||
shadow_offset: iced::Vector::default(),
|
||||
outline_width: Default::default(),
|
||||
outline_color: Color::TRANSPARENT,
|
||||
icon_color: None,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue