Fix Text for the floating stacks hint is gone #387

This commit is contained in:
Victoria Brekenfeld 2024-03-27 18:10:33 +01:00
parent 5449858e70
commit daf669e656

View file

@ -5,10 +5,13 @@ use crate::{
use calloop::LoopHandle;
use cosmic::{
iced::widget::{container, row},
iced::{
widget::{container, row},
Alignment,
},
iced_core::{Background, Border, Color, Length},
theme,
widget::{icon::from_name, text},
widget::{horizontal_space, icon::from_name, text},
Apply,
};
use smithay::utils::{Logical, Size};
@ -31,49 +34,40 @@ impl Program for StackHoverInternal {
fn view(&self) -> cosmic::Element<'_, Self::Message> {
row(vec![
from_name("window-stack-symbolic")
.size(24)
.size(32)
.prefer_svg(true)
.icon()
.apply(container)
.padding([0, 8, 0, 0])
.width(Length::Shrink)
.apply(container)
.center_y()
.height(Length::Fill)
.into(),
horizontal_space(16).into(),
text(fl!("stack-windows"))
.font(cosmic::font::FONT)
.size(24)
.line_height(1.3)
.apply(container)
.width(Length::Shrink)
.apply(container)
.center_y()
.height(Length::Fill)
.into(),
])
.width(Length::Shrink)
.height(Length::Shrink)
.align_items(Alignment::Center)
.apply(container)
.center_x()
.center_y()
.padding(16)
.apply(container)
.padding([8, 16])
.style(theme::Container::custom(|theme| container::Appearance {
icon_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())),
border: Border {
radius: 24.0.into(),
radius: 18.0.into(),
width: 0.0,
color: Color::TRANSPARENT,
},
shadow: Default::default(),
}))
.width(Length::Shrink)
.height(Length::Fixed(48.))
.height(Length::Shrink)
.apply(container)
.center_x()
.center_y()
.width(Length::Fill)
.height(Length::Fill)
.center_x()
.center_y()
.into()
}
}