@@ -14,6 +14,8 @@ use crate::gui::panel::{
1414
1515impl Render for RopyBoard {
1616 fn render ( & mut self , window : & mut Window , cx : & mut Context < ' _ , Self > ) -> impl IntoElement {
17+ let surface_bg = self . main_panel_surface ( cx. theme ( ) . background ) ;
18+
1719 let base = v_flex ( )
1820 . id ( "ropy-board" )
1921 . track_focus ( & self . focus_handle )
@@ -22,31 +24,23 @@ impl Render for RopyBoard {
2224 . on_action ( cx. listener ( Self :: on_active_action) )
2325 . size_full ( )
2426 . px_4 ( )
25- . pb_4 ( ) ;
27+ . pb_4 ( )
28+ . bg ( surface_bg) ;
2629
2730 if !self . activated {
28- return gpui:: div ( )
29- . size_full ( )
30- . child ( base. bg ( self . main_panel_surface ( cx. theme ( ) . background ) ) )
31- . into_any_element ( ) ;
31+ return gpui:: div ( ) . size_full ( ) . child ( base) . into_any_element ( ) ;
3232 }
3333
3434 let body: AnyElement = match self . active_panel {
3535 ActivePanel :: Settings => base
36- . bg ( self . main_panel_surface ( cx. theme ( ) . background ) )
3736 . on_key_down ( cx. listener ( Self :: on_settings_key_down) )
3837 . child ( render_settings_content ( self , cx) )
3938 . into_any_element ( ) ,
4039 ActivePanel :: About => base
41- . bg ( self . main_panel_surface ( cx. theme ( ) . background ) )
4240 . child ( render_about_content ( self , cx) )
4341 . into_any_element ( ) ,
44- ActivePanel :: Help => base
45- . bg ( self . main_panel_surface ( cx. theme ( ) . background ) )
46- . child ( render_help_content ( self , cx) )
47- . into_any_element ( ) ,
42+ ActivePanel :: Help => base. child ( render_help_content ( self , cx) ) . into_any_element ( ) ,
4843 ActivePanel :: ClipboardList => base
49- . bg ( self . main_panel_surface ( cx. theme ( ) . background ) )
5044 . on_action ( cx. listener ( Self :: on_select_left) )
5145 . on_action ( cx. listener ( Self :: on_select_right) )
5246 . on_action ( cx. listener ( Self :: on_select_prev) )
0 commit comments