Fix Text for the floating stacks hint is gone #387
This commit is contained in:
parent
5449858e70
commit
daf669e656
1 changed files with 16 additions and 22 deletions
|
|
@ -5,10 +5,13 @@ use crate::{
|
||||||
|
|
||||||
use calloop::LoopHandle;
|
use calloop::LoopHandle;
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
iced::widget::{container, row},
|
iced::{
|
||||||
|
widget::{container, row},
|
||||||
|
Alignment,
|
||||||
|
},
|
||||||
iced_core::{Background, Border, Color, Length},
|
iced_core::{Background, Border, Color, Length},
|
||||||
theme,
|
theme,
|
||||||
widget::{icon::from_name, text},
|
widget::{horizontal_space, icon::from_name, text},
|
||||||
Apply,
|
Apply,
|
||||||
};
|
};
|
||||||
use smithay::utils::{Logical, Size};
|
use smithay::utils::{Logical, Size};
|
||||||
|
|
@ -31,49 +34,40 @@ impl Program for StackHoverInternal {
|
||||||
fn view(&self) -> cosmic::Element<'_, Self::Message> {
|
fn view(&self) -> cosmic::Element<'_, Self::Message> {
|
||||||
row(vec![
|
row(vec![
|
||||||
from_name("window-stack-symbolic")
|
from_name("window-stack-symbolic")
|
||||||
.size(24)
|
.size(32)
|
||||||
.prefer_svg(true)
|
.prefer_svg(true)
|
||||||
.icon()
|
.icon()
|
||||||
.apply(container)
|
|
||||||
.padding([0, 8, 0, 0])
|
|
||||||
.width(Length::Shrink)
|
|
||||||
.apply(container)
|
|
||||||
.center_y()
|
|
||||||
.height(Length::Fill)
|
|
||||||
.into(),
|
.into(),
|
||||||
|
horizontal_space(16).into(),
|
||||||
text(fl!("stack-windows"))
|
text(fl!("stack-windows"))
|
||||||
.font(cosmic::font::FONT)
|
.font(cosmic::font::FONT)
|
||||||
.size(24)
|
.size(24)
|
||||||
.line_height(1.3)
|
|
||||||
.apply(container)
|
|
||||||
.width(Length::Shrink)
|
|
||||||
.apply(container)
|
|
||||||
.center_y()
|
|
||||||
.height(Length::Fill)
|
|
||||||
.into(),
|
.into(),
|
||||||
])
|
])
|
||||||
.width(Length::Shrink)
|
.align_items(Alignment::Center)
|
||||||
.height(Length::Shrink)
|
.apply(container)
|
||||||
|
.center_x()
|
||||||
|
.center_y()
|
||||||
|
.padding(16)
|
||||||
.apply(container)
|
.apply(container)
|
||||||
.padding([8, 16])
|
|
||||||
.style(theme::Container::custom(|theme| container::Appearance {
|
.style(theme::Container::custom(|theme| container::Appearance {
|
||||||
icon_color: Some(Color::from(theme.cosmic().accent.on)),
|
icon_color: Some(Color::from(theme.cosmic().accent.on)),
|
||||||
text_color: Some(Color::from(theme.cosmic().accent.on)),
|
text_color: Some(Color::from(theme.cosmic().accent.on)),
|
||||||
background: Some(Background::Color(theme.cosmic().accent_color().into())),
|
background: Some(Background::Color(theme.cosmic().accent_color().into())),
|
||||||
border: Border {
|
border: Border {
|
||||||
radius: 24.0.into(),
|
radius: 18.0.into(),
|
||||||
width: 0.0,
|
width: 0.0,
|
||||||
color: Color::TRANSPARENT,
|
color: Color::TRANSPARENT,
|
||||||
},
|
},
|
||||||
shadow: Default::default(),
|
shadow: Default::default(),
|
||||||
}))
|
}))
|
||||||
.width(Length::Shrink)
|
.width(Length::Shrink)
|
||||||
.height(Length::Fixed(48.))
|
.height(Length::Shrink)
|
||||||
.apply(container)
|
.apply(container)
|
||||||
.center_x()
|
|
||||||
.center_y()
|
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
.height(Length::Fill)
|
.height(Length::Fill)
|
||||||
|
.center_x()
|
||||||
|
.center_y()
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue