@@ -21,7 +21,7 @@ use crate::{
2121} ;
2222pub use cosmic_panel_config;
2323use cosmic_panel_config:: { CosmicPanelBackground , PanelAnchor , PanelSize } ;
24- use iced_core:: { Layout , Padding , Shadow } ;
24+ use iced_core:: { Padding , Shadow } ;
2525use iced_widget:: runtime:: platform_specific:: wayland:: popup:: { SctkPopupSettings , SctkPositioner } ;
2626use sctk:: reexports:: protocols:: xdg:: shell:: client:: xdg_positioner:: { Anchor , Gravity } ;
2727use std:: { borrow:: Cow , num:: NonZeroU32 , rc:: Rc , sync:: LazyLock , time:: Duration } ;
@@ -39,6 +39,7 @@ static TOOLTIP_WINDOW_ID: LazyLock<window::Id> = LazyLock::new(window::Id::uniqu
3939pub struct Context {
4040 pub size : Size ,
4141 pub anchor : PanelAnchor ,
42+ pub spacing : u32 ,
4243 pub background : CosmicPanelBackground ,
4344 pub output_name : String ,
4445 pub panel_type : PanelType ,
@@ -93,6 +94,10 @@ impl Default for Context {
9394 . ok ( )
9495 . and_then ( |size| ron:: from_str ( size. as_str ( ) ) . ok ( ) )
9596 . unwrap_or ( PanelAnchor :: Top ) ,
97+ spacing : std:: env:: var ( "COSMIC_PANEL_SPACING" )
98+ . ok ( )
99+ . and_then ( |size| ron:: from_str ( size. as_str ( ) ) . ok ( ) )
100+ . unwrap_or ( 4 ) ,
96101 background : std:: env:: var ( "COSMIC_PANEL_BACKGROUND" )
97102 . ok ( )
98103 . and_then ( |size| ron:: from_str ( size. as_str ( ) ) . ok ( ) )
0 commit comments