@@ -18,7 +18,7 @@ use cosmic_settings_page::{self as page, Section};
18
18
use slab:: Slab ;
19
19
use std:: collections:: HashMap ;
20
20
21
- pub struct PageInner {
21
+ pub struct Page {
22
22
pub ( crate ) config_helper : Option < cosmic_config:: Config > ,
23
23
pub ( crate ) panel_config : Option < CosmicPanelConfig > ,
24
24
pub outputs : Vec < String > ,
@@ -31,7 +31,7 @@ pub struct PageInner {
31
31
pub ( crate ) system_container : Option < CosmicPanelContainerConfig > ,
32
32
}
33
33
34
- impl Default for PageInner {
34
+ impl Default for Page {
35
35
fn default ( ) -> Self {
36
36
Self {
37
37
config_helper : Option :: default ( ) ,
@@ -72,9 +72,9 @@ impl Default for PageInner {
72
72
}
73
73
74
74
pub trait PanelPage {
75
- fn inner ( & self ) -> & PageInner ;
75
+ fn inner ( & self ) -> & Page ;
76
76
77
- fn inner_mut ( & mut self ) -> & mut PageInner ;
77
+ fn inner_mut ( & mut self ) -> & mut Page ;
78
78
79
79
fn autohide_label ( & self ) -> String ;
80
80
@@ -336,14 +336,14 @@ pub fn reset_button<
336
336
#[ derive( Debug , Copy , Clone , PartialEq , Eq ) ]
337
337
pub struct Anchor ( PanelAnchor ) ;
338
338
339
- impl ToString for Anchor {
340
- fn to_string ( & self ) -> String {
341
- match self . 0 {
339
+ impl std :: fmt :: Display for Anchor {
340
+ fn fmt ( & self , f : & mut std :: fmt :: Formatter < ' _ > ) -> std :: fmt :: Result {
341
+ f . write_str ( & match self . 0 {
342
342
PanelAnchor :: Top => fl ! ( "panel-top" ) ,
343
343
PanelAnchor :: Bottom => fl ! ( "panel-bottom" ) ,
344
344
PanelAnchor :: Left => fl ! ( "panel-left" ) ,
345
345
PanelAnchor :: Right => fl ! ( "panel-right" ) ,
346
- }
346
+ } )
347
347
}
348
348
}
349
349
@@ -354,13 +354,13 @@ pub enum Appearance {
354
354
Dark ,
355
355
}
356
356
357
- impl ToString for Appearance {
358
- fn to_string ( & self ) -> String {
359
- match self {
357
+ impl std :: fmt :: Display for Appearance {
358
+ fn fmt ( & self , f : & mut std :: fmt :: Formatter < ' _ > ) -> std :: fmt :: Result {
359
+ f . write_str ( & match self {
360
360
Appearance :: Match => fl ! ( "panel-appearance" , "match" ) ,
361
361
Appearance :: Light => fl ! ( "panel-appearance" , "light" ) ,
362
362
Appearance :: Dark => fl ! ( "panel-appearance" , "dark" ) ,
363
- }
363
+ } )
364
364
}
365
365
}
366
366
@@ -404,7 +404,7 @@ pub enum Message {
404
404
FullReset ,
405
405
}
406
406
407
- impl PageInner {
407
+ impl Page {
408
408
#[ allow( clippy:: too_many_lines) ]
409
409
pub fn update ( & mut self , message : Message ) {
410
410
let Some ( helper) = self . config_helper . as_ref ( ) else {
0 commit comments