@@ -1603,7 +1603,7 @@ pub fn mode_and_colors() -> Section<crate::pages::Message> {
16031603 cosmic:: iced:: widget:: column![
16041604 button:: custom(
16051605 icon( dark_mode_illustration. clone( ) )
1606- . width( Length :: Fill )
1606+ . width( Length :: Fixed ( 191.0 ) )
16071607 . height( Length :: Fixed ( 100.0 ) )
16081608 )
16091609 . class( button:: ButtonClass :: Image )
@@ -1612,13 +1612,13 @@ pub fn mode_and_colors() -> Section<crate::pages::Message> {
16121612 . on_press( Message :: DarkMode ( true ) ) ,
16131613 text:: body( & descriptions[ dark] )
16141614 ]
1615- . spacing( space_xxs )
1615+ . spacing( 8 )
16161616 . width( Length :: FillPortion ( 1 ) )
16171617 . align_x( Alignment :: Center ) ,
16181618 cosmic:: iced:: widget:: column![
16191619 button:: custom(
16201620 icon( light_mode_illustration. clone( ) , )
1621- . width( Length :: Fill )
1621+ . width( Length :: Fixed ( 191.0 ) )
16221622 . height( Length :: Fixed ( 100.0 ) )
16231623 )
16241624 . class( button:: ButtonClass :: Image )
@@ -1627,13 +1627,13 @@ pub fn mode_and_colors() -> Section<crate::pages::Message> {
16271627 . on_press( Message :: DarkMode ( false ) ) ,
16281628 text:: body( & descriptions[ light] )
16291629 ]
1630- . spacing( space_xxs )
1630+ . spacing( 8 )
16311631 . width( Length :: FillPortion ( 1 ) )
16321632 . align_x( Alignment :: Center )
16331633 ]
1634- . spacing ( 48 )
1635- . align_y ( Alignment :: Center )
1636- . width ( Length :: Fixed ( 424.0 ) ) ,
1634+ . spacing ( 8 )
1635+ . width ( Length :: Fixed ( 478.0 ) )
1636+ . align_y ( Alignment :: Center ) ,
16371637 )
16381638 . center_x ( Length :: Fill ) ,
16391639 )
@@ -1836,6 +1836,21 @@ pub fn style() -> Section<crate::pages::Message> {
18361836 let dark_square_style = from_name ( "illustration-appearance-dark-style-square" ) . handle ( ) ;
18371837 let light_square_style = from_name ( "illustration-appearance-light-style-square" ) . handle ( ) ;
18381838
1839+ fn style_container ( ) -> cosmic:: theme:: Container < ' static > {
1840+ cosmic:: theme:: Container :: custom ( |theme| {
1841+ let mut background = theme. cosmic ( ) . palette . neutral_9 ;
1842+ background. alpha = 0.1 ;
1843+ container:: Style {
1844+ background : Some ( cosmic:: iced:: Background :: Color ( background. into ( ) ) ) ,
1845+ border : cosmic:: iced:: Border {
1846+ radius : theme. cosmic ( ) . radius_s ( ) . into ( ) ,
1847+ ..Default :: default ( )
1848+ } ,
1849+ ..Default :: default ( )
1850+ }
1851+ } )
1852+ }
1853+
18391854 Section :: default ( )
18401855 . title ( fl ! ( "style" ) )
18411856 . descriptions ( descriptions)
@@ -1862,8 +1877,11 @@ pub fn style() -> Section<crate::pages::Message> {
18621877 )
18631878 . selected( matches!( page. roundness, Roundness :: Round ) )
18641879 . class( button:: ButtonClass :: Image )
1865- . padding( 8 )
1866- . on_press( Message :: Roundness ( Roundness :: Round ) ) ,
1880+ . padding( 0 )
1881+ . on_press( Message :: Roundness ( Roundness :: Round ) )
1882+ . apply( container)
1883+ . width( Length :: Fixed ( 191.0 ) )
1884+ . class( style_container( ) ) ,
18671885 text:: body( & descriptions[ round] )
18681886 ]
18691887 . spacing( 8 )
@@ -1884,8 +1902,11 @@ pub fn style() -> Section<crate::pages::Message> {
18841902 )
18851903 . selected( matches!( page. roundness, Roundness :: SlightlyRound ) )
18861904 . class( button:: ButtonClass :: Image )
1887- . padding( 8 )
1888- . on_press( Message :: Roundness ( Roundness :: SlightlyRound ) ) ,
1905+ . padding( 0 )
1906+ . on_press( Message :: Roundness ( Roundness :: SlightlyRound ) )
1907+ . apply( container)
1908+ . width( Length :: Fixed ( 191.0 ) )
1909+ . class( style_container( ) ) ,
18891910 text:: body( & descriptions[ slightly_round] )
18901911 ]
18911912 . spacing( 8 )
@@ -1907,16 +1928,18 @@ pub fn style() -> Section<crate::pages::Message> {
19071928 . width( Length :: FillPortion ( 1 ) )
19081929 . selected( matches!( page. roundness, Roundness :: Square ) )
19091930 . class( button:: ButtonClass :: Image )
1910- . padding( 8 )
1911- . on_press( Message :: Roundness ( Roundness :: Square ) ) ,
1931+ . padding( 0 )
1932+ . on_press( Message :: Roundness ( Roundness :: Square ) )
1933+ . apply( container)
1934+ . width( Length :: Fixed ( 191.0 ) )
1935+ . class( style_container( ) ) ,
19121936 text:: body( & descriptions[ square] )
19131937 ]
19141938 . spacing( 8 )
19151939 . align_x( Alignment :: Center )
19161940 . width( Length :: FillPortion ( 1 ) )
19171941 ]
1918- . spacing ( 12 )
1919- . width ( Length :: Fixed ( 628.0 ) )
1942+ . spacing ( 8 )
19201943 . align_y ( Alignment :: Center ) ,
19211944 )
19221945 . center_x ( Length :: Fill ) ,
0 commit comments