feat: applet button theme helper
This commit is contained in:
parent
a36552cba8
commit
dc4edb2a4d
3 changed files with 17 additions and 5 deletions
|
|
@ -1,23 +1,35 @@
|
|||
use cosmic_panel_config::{PanelAnchor, PanelSize};
|
||||
use iced::{
|
||||
alignment::{Horizontal, Vertical},
|
||||
sctk_settings::InitialSurface,
|
||||
wayland::InitialSurface,
|
||||
widget::{self, Container},
|
||||
Color, Element, Length, Rectangle, Settings,
|
||||
};
|
||||
use iced_core::BorderRadius;
|
||||
use iced_native::command::platform_specific::wayland::{
|
||||
popup::{SctkPopupSettings, SctkPositioner},
|
||||
window::SctkWindowSettings,
|
||||
};
|
||||
use iced_style::container::Appearance;
|
||||
use iced_style::{button::StyleSheet, container::Appearance};
|
||||
use sctk::reexports::protocols::xdg::shell::client::xdg_positioner::{Anchor, Gravity};
|
||||
|
||||
use crate::Renderer;
|
||||
use crate::{theme::Button, Renderer};
|
||||
|
||||
pub use cosmic_panel_config;
|
||||
|
||||
const APPLET_PADDING: u32 = 8;
|
||||
|
||||
pub const APPLET_BUTTON_THEME: Button = Button::Custom {
|
||||
active: |t| iced_style::button::Appearance {
|
||||
border_radius: BorderRadius::from(0.0),
|
||||
..t.active(&Button::Text)
|
||||
},
|
||||
hover: |t| iced_style::button::Appearance {
|
||||
border_radius: BorderRadius::from(0.0),
|
||||
..t.hovered(&Button::Text)
|
||||
},
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct CosmicAppletHelper {
|
||||
pub size: Size,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue