@@ -156,8 +156,8 @@ impl Button {
156156 Self :: Positive => & cosmic. success_button ,
157157 Self :: Destructive => & cosmic. destructive_button ,
158158 Self :: Text => & cosmic. text_button ,
159- Self :: Link => & cosmic. accent_button ,
160- Self :: LinkActive => & cosmic. accent_button ,
159+ Self :: Link => & cosmic. link_button ,
160+ Self :: LinkActive => & cosmic. link_button ,
161161 Self :: Transparent => & TRANSPARENT_COMPONENT ,
162162 Self :: Deactivated => & theme. current_container ( ) . component ,
163163 Self :: Card => & theme. current_container ( ) . component ,
@@ -190,6 +190,7 @@ impl iced_checkbox::Catalog for Theme {
190190 Checkbox :: default ( )
191191 }
192192
193+ #[ allow( clippy:: too_many_lines) ]
193194 fn style (
194195 & self ,
195196 class : & Self :: Class < ' _ > ,
@@ -208,7 +209,7 @@ impl iced_checkbox::Catalog for Theme {
208209 background : Background :: Color ( if is_checked {
209210 cosmic. accent . base . into ( )
210211 } else {
211- cosmic. button . base . into ( )
212+ cosmic. background . small_widget . into ( )
212213 } ) ,
213214 icon_color : cosmic. accent . on . into ( ) ,
214215 border : Border {
@@ -217,7 +218,7 @@ impl iced_checkbox::Catalog for Theme {
217218 color : if is_checked {
218219 cosmic. accent . base
219220 } else {
220- cosmic. button . border
221+ cosmic. palette . neutral_8
221222 }
222223 . into ( ) ,
223224 } ,
@@ -251,7 +252,7 @@ impl iced_checkbox::Catalog for Theme {
251252 color : if is_checked {
252253 cosmic. success . base
253254 } else {
254- cosmic. button . border
255+ cosmic. palette . neutral_8
255256 }
256257 . into ( ) ,
257258 } ,
@@ -504,7 +505,7 @@ impl iced_container::Catalog for Theme {
504505 Container :: HeaderBar { focused } => {
505506 let ( icon_color, text_color) = if * focused {
506507 (
507- Color :: from ( cosmic. accent . base ) ,
508+ Color :: from ( cosmic. accent_text_color ( ) ) ,
508509 Color :: from ( cosmic. background . on ) ,
509510 )
510511 } else {
@@ -667,9 +668,9 @@ impl slider::Catalog for Theme {
667668 (
668669 cosmic. accent_text_color ( ) ,
669670 if is_dark {
670- cosmic. palette . neutral_6
671+ cosmic. palette . neutral_5
671672 } else {
672- cosmic. palette . neutral_4
673+ cosmic. palette . neutral_3
673674 } ,
674675 )
675676 } else {
@@ -828,24 +829,22 @@ impl radio::Catalog for Theme {
828829 Color :: from ( theme. accent . base ) . into ( )
829830 } else {
830831 // TODO: this seems to be defined weirdly in FIGMA
831- Color :: from ( theme. background . base ) . into ( )
832+ Color :: from ( theme. background . small_widget ) . into ( )
832833 } ,
833834 dot_color : theme. accent . on . into ( ) ,
834835 border_width : 1.0 ,
835836 border_color : if is_selected {
836837 Color :: from ( theme. accent . base )
837838 } else {
838- // TODO: this seems to be defined weirdly in FIGMA
839- Color :: from ( theme. palette . neutral_7 )
839+ Color :: from ( theme. palette . neutral_8 )
840840 } ,
841841 text_color : None ,
842842 } ,
843843 radio:: Status :: Hovered { is_selected } => radio:: Style {
844844 background : if is_selected {
845845 Color :: from ( theme. accent . base ) . into ( )
846846 } else {
847- // TODO: this seems to be defined weirdly in FIGMA
848- Color :: from ( theme. palette . neutral_10 . with_alpha ( 0.1 ) ) . into ( )
847+ Color :: from ( theme. background . small_widget . with_alpha ( 0.2 ) ) . into ( )
849848 } ,
850849 dot_color : theme. accent . on . into ( ) ,
851850 border_width : 1.0 ,
@@ -878,7 +877,11 @@ impl toggler::Catalog for Theme {
878877 background : if matches ! ( status, toggler:: Status :: Active { is_toggled: true } ) {
879878 cosmic. accent . base . into ( )
880879 } else {
881- cosmic. palette . neutral_5 . into ( )
880+ if cosmic. is_dark {
881+ cosmic. palette . neutral_6 . into ( )
882+ } else {
883+ cosmic. palette . neutral_5 . into ( )
884+ }
882885 } ,
883886 foreground : cosmic. palette . neutral_2 . into ( ) ,
884887 border_radius : cosmic. radius_xl ( ) . into ( ) ,
@@ -900,7 +903,14 @@ impl toggler::Catalog for Theme {
900903 background : if is_active {
901904 over ( neutral_10, cosmic. accent_color ( ) )
902905 } else {
903- over ( neutral_10, cosmic. palette . neutral_5 )
906+ over (
907+ neutral_10,
908+ if cosmic. is_dark {
909+ cosmic. palette . neutral_6
910+ } else {
911+ cosmic. palette . neutral_5
912+ } ,
913+ )
904914 }
905915 . into ( ) ,
906916 ..active
@@ -1092,7 +1102,8 @@ impl scrollable::Catalog for Theme {
10921102 match status {
10931103 scrollable:: Status :: Active => {
10941104 let cosmic = self . cosmic ( ) ;
1095- let neutral_5 = cosmic. palette . neutral_5 . with_alpha ( 0.7 ) ;
1105+ let mut neutral_5 = cosmic. palette . neutral_5 . with_alpha ( 0.7 ) ;
1106+ let mut neutral_6 = cosmic. palette . neutral_6 . with_alpha ( 0.7 ) ;
10961107 let mut a = scrollable:: Style {
10971108 container : iced_container:: transparent ( self ) ,
10981109 vertical_rail : scrollable:: Rail {
@@ -1102,7 +1113,11 @@ impl scrollable::Catalog for Theme {
11021113 } ,
11031114 background : None ,
11041115 scroller : scrollable:: Scroller {
1105- color : neutral_5. into ( ) ,
1116+ color : if cosmic. is_dark {
1117+ neutral_6. into ( )
1118+ } else {
1119+ neutral_5. into ( )
1120+ } ,
11061121 border : Border {
11071122 radius : cosmic. corner_radii . radius_s . into ( ) ,
11081123 ..Default :: default ( )
@@ -1116,7 +1131,11 @@ impl scrollable::Catalog for Theme {
11161131 } ,
11171132 background : None ,
11181133 scroller : scrollable:: Scroller {
1119- color : neutral_5. into ( ) ,
1134+ color : if cosmic. is_dark {
1135+ neutral_6. into ( )
1136+ } else {
1137+ neutral_5. into ( )
1138+ } ,
11201139 border : Border {
11211140 radius : cosmic. corner_radii . radius_s . into ( ) ,
11221141 ..Default :: default ( )
@@ -1137,9 +1156,9 @@ impl scrollable::Catalog for Theme {
11371156 // TODO handle vertical / horizontal
11381157 scrollable:: Status :: Hovered { .. } | scrollable:: Status :: Dragged { .. } => {
11391158 let cosmic = self . cosmic ( ) ;
1140- let neutral_5 = cosmic. palette . neutral_5 . with_alpha ( 0.7 ) ;
1141-
1142- // TODO hover
1159+ let mut neutral_5 = cosmic. palette . neutral_5 . with_alpha ( 0.7 ) ;
1160+ let mut neutral_6 = cosmic . palette . neutral_6 . with_alpha ( 0.7 ) ;
1161+ let mut neutral_3 = cosmic . palette . neutral_3 ;
11431162
11441163 // if is_mouse_over_scrollbar {
11451164 // let hover_overlay = cosmic.palette.neutral_0.with_alpha(0.2);
@@ -1154,7 +1173,11 @@ impl scrollable::Catalog for Theme {
11541173 } ,
11551174 background : None ,
11561175 scroller : scrollable:: Scroller {
1157- color : neutral_5. into ( ) ,
1176+ color : if cosmic. is_dark {
1177+ neutral_6. into ( )
1178+ } else {
1179+ neutral_5. into ( )
1180+ } ,
11581181 border : Border {
11591182 radius : cosmic. corner_radii . radius_s . into ( ) ,
11601183 ..Default :: default ( )
@@ -1168,7 +1191,11 @@ impl scrollable::Catalog for Theme {
11681191 } ,
11691192 background : None ,
11701193 scroller : scrollable:: Scroller {
1171- color : neutral_5. into ( ) ,
1194+ color : if cosmic. is_dark {
1195+ neutral_6. into ( )
1196+ } else {
1197+ neutral_5. into ( )
1198+ } ,
11721199 border : Border {
11731200 radius : cosmic. corner_radii . radius_s . into ( ) ,
11741201 ..Default :: default ( )
@@ -1179,9 +1206,13 @@ impl scrollable::Catalog for Theme {
11791206 } ;
11801207
11811208 if matches ! ( class, Scrollable :: Permanent ) {
1182- let neutral_3 = cosmic. palette . neutral_3 . with_alpha ( 0.7 ) ;
1183- a. horizontal_rail . background = Some ( Background :: Color ( neutral_3. into ( ) ) ) ;
1184- a. vertical_rail . background = Some ( Background :: Color ( neutral_3. into ( ) ) ) ;
1209+ let small_widget_container =
1210+ cosmic. background . small_widget . clone ( ) . with_alpha ( 0.7 ) ;
1211+
1212+ a. horizontal_rail . background =
1213+ Some ( Background :: Color ( small_widget_container. into ( ) ) ) ;
1214+ a. vertical_rail . background =
1215+ Some ( Background :: Color ( small_widget_container. into ( ) ) ) ;
11851216 }
11861217
11871218 a
@@ -1250,7 +1281,7 @@ impl iced_widget::text::Catalog for Theme {
12501281 fn style ( & self , class : & Self :: Class < ' _ > ) -> iced_widget:: text:: Style {
12511282 match class {
12521283 Text :: Accent => iced_widget:: text:: Style {
1253- color : Some ( self . cosmic ( ) . accent . base . into ( ) ) ,
1284+ color : Some ( self . cosmic ( ) . accent_text_color ( ) . into ( ) ) ,
12541285 } ,
12551286 Text :: Default => iced_widget:: text:: Style { color : None } ,
12561287 Text :: Color ( c) => iced_widget:: text:: Style { color : Some ( * c) } ,
@@ -1278,7 +1309,7 @@ impl text_input::Catalog for Theme {
12781309
12791310 fn style ( & self , class : & Self :: Class < ' _ > , status : text_input:: Status ) -> text_input:: Style {
12801311 let palette = self . cosmic ( ) ;
1281- let bg = palette. palette . neutral_7 . with_alpha ( 0.25 ) ;
1312+ let mut bg = palette. background . small_widget . with_alpha ( 0.25 ) ;
12821313
12831314 let neutral_9 = palette. palette . neutral_9 ;
12841315 let value = neutral_9. into ( ) ;
@@ -1314,7 +1345,7 @@ impl text_input::Catalog for Theme {
13141345 match status {
13151346 text_input:: Status :: Active => appearance,
13161347 text_input:: Status :: Hovered => {
1317- let bg = palette. palette . neutral_7 . with_alpha ( 0.25 ) ;
1348+ let mut bg = palette. background . small_widget . with_alpha ( 0.25 ) ;
13181349
13191350 match class {
13201351 TextInput :: Default => text_input:: Style {
@@ -1343,7 +1374,7 @@ impl text_input::Catalog for Theme {
13431374 }
13441375 }
13451376 text_input:: Status :: Focused => {
1346- let bg = palette. palette . neutral_7 . with_alpha ( 0.25 ) ;
1377+ let mut bg = palette. background . small_widget . with_alpha ( 0.25 ) ;
13471378
13481379 match class {
13491380 TextInput :: Default => text_input:: Style {
0 commit comments