@@ -5,8 +5,7 @@ use iced::keyboard::Modifiers;
55use iced:: keyboard:: key:: Named ;
66use iced:: widget:: { Column , Row , button, text} ;
77use iced:: { Element , Length , Subscription , Task , Theme , event} ;
8- use oxiced:: theme:: get_theme;
9- use oxiced:: widgets:: common:: { darken_color, lighten_color} ;
8+ use oxiced:: theme:: theme:: { get_derived_iced_theme, OXITHEME } ;
109use oxiced:: widgets:: oxi_button:: { self , ButtonVariant } ;
1110use oxiced:: widgets:: oxi_text_input:: text_input;
1211
@@ -57,7 +56,7 @@ struct OxiRun {
5756impl Default for OxiRun {
5857 fn default ( ) -> Self {
5958 Self {
60- theme : get_theme ( ) ,
59+ theme : get_derived_iced_theme ( ) ,
6160 filter_text : "" . into ( ) ,
6261 plugins : HashMap :: new ( ) ,
6362 current_focus : 0 ,
@@ -136,14 +135,14 @@ fn content_button(
136135 . on_press ( Message :: LaunchEntry ( current_index) )
137136 . style ( move |theme, status| {
138137 let is_focused = current_index == focused_index;
139- let palette = theme . extended_palette ( ) . primary ;
140- let default_style = oxi_button:: primary_button ( theme, status) ;
138+ let palette = OXITHEME ;
139+ let default_style = oxi_button:: row_entry ( theme, status) ;
141140 let background = if status == button:: Status :: Hovered {
142- Some ( iced:: Background :: Color ( darken_color ( palette. base . color ) ) )
141+ Some ( iced:: Background :: Color ( palette. secondary_bg_active ) )
143142 } else if is_focused {
144- default_style . background
143+ Some ( iced :: Background :: Color ( palette . secondary_bg_hover ) )
145144 } else {
146- Some ( iced:: Background :: Color ( lighten_color ( palette. base . color ) ) )
145+ Some ( iced:: Background :: Color ( palette. secondary_bg ) )
147146 } ;
148147 iced:: widget:: button:: Style {
149148 background,
@@ -351,11 +350,11 @@ impl Application for OxiRun {
351350 }
352351
353352 // remove the annoying background color
354- fn style ( & self , theme : & Self :: Theme ) -> iced_layershell:: Appearance {
355- let palette = theme . extended_palette ( ) ;
353+ fn style ( & self , _ : & Self :: Theme ) -> iced_layershell:: Appearance {
354+ let palette = OXITHEME ;
356355 iced_layershell:: Appearance {
357356 background_color : iced:: Color :: TRANSPARENT ,
358- text_color : palette. background . base . text ,
357+ text_color : palette. text
359358 }
360359 }
361360
0 commit comments