2424 "border" : (57 , 80 , 108 , 255 ),
2525 "text" : (234 , 240 , 248 , 255 ),
2626 "text_muted" : (134 , 151 , 174 , 255 ),
27+ "button_text" : (255 , 255 , 255 , 255 ),
2728 "accent" : (43 , 112 , 246 , 255 ),
2829 "accent_hover" : (63 , 128 , 255 , 255 ),
2930 "accent_active" : (29 , 89 , 215 , 255 ),
3031 "accent_soft" : (31 , 56 , 92 , 255 ),
32+ "control_button" : (43 , 112 , 246 , 255 ),
33+ "control_button_hover" : (63 , 128 , 255 , 255 ),
34+ "control_button_active" : (29 , 89 , 215 , 255 ),
3135 "separator" : (73 , 95 , 121 , 255 ),
3236 "grid" : (96 , 114 , 136 , 180 ),
37+ "tab_active" : (43 , 112 , 246 , 255 ),
38+ "tab_unfocused_active" : (24 , 37 , 54 , 255 ),
3339 },
3440 "light" : {
3541 "background" : (242 , 246 , 251 , 255 ),
3945 "border" : (188 , 201 , 219 , 255 ),
4046 "text" : (24 , 34 , 49 , 255 ),
4147 "text_muted" : (100 , 116 , 137 , 255 ),
48+ "button_text" : (255 , 255 , 255 , 255 ),
4249 "accent" : (24 , 99 , 224 , 255 ),
4350 "accent_hover" : (14 , 112 , 249 , 255 ),
4451 "accent_active" : (18 , 77 , 184 , 255 ),
4552 "accent_soft" : (214 , 229 , 248 , 255 ),
53+ "control_button" : (255 , 255 , 255 , 255 ),
54+ "control_button_hover" : (214 , 229 , 248 , 255 ),
55+ "control_button_active" : (229 , 237 , 246 , 255 ),
4656 "separator" : (202 , 213 , 227 , 255 ),
4757 "grid" : (140 , 154 , 171 , 175 ),
58+ "tab_active" : (255 , 255 , 255 , 255 ),
59+ "tab_unfocused_active" : (255 , 255 , 255 , 255 ),
4860 },
4961}
5062
@@ -122,15 +134,19 @@ def _build_global_theme(theme_name: str):
122134 dpg .add_theme_color (dpg .mvThemeCol_HeaderActive , colors ["accent_active" ])
123135 dpg .add_theme_color (dpg .mvThemeCol_Tab , colors ["surface_alt" ])
124136 dpg .add_theme_color (dpg .mvThemeCol_TabHovered , colors ["accent_soft" ])
125- dpg .add_theme_color (dpg .mvThemeCol_TabActive , colors ["accent " ])
137+ dpg .add_theme_color (dpg .mvThemeCol_TabActive , colors ["tab_active " ])
126138 dpg .add_theme_color (dpg .mvThemeCol_TabUnfocused , colors ["surface" ])
127- dpg .add_theme_color (dpg .mvThemeCol_TabUnfocusedActive , colors ["surface_alt " ])
139+ dpg .add_theme_color (dpg .mvThemeCol_TabUnfocusedActive , colors ["tab_unfocused_active " ])
128140 dpg .add_theme_color (dpg .mvThemeCol_TitleBg , colors ["surface" ])
129141 dpg .add_theme_color (dpg .mvThemeCol_TitleBgActive , colors ["surface_alt" ])
130142 dpg .add_theme_color (dpg .mvThemeCol_MenuBarBg , colors ["surface" ])
131143 dpg .add_theme_color (dpg .mvThemeCol_CheckMark , colors ["accent" ])
132144 dpg .add_theme_color (dpg .mvThemeCol_SliderGrab , colors ["accent" ])
133145 dpg .add_theme_color (dpg .mvThemeCol_SliderGrabActive , colors ["accent_hover" ])
146+ dpg .add_theme_color (dpg .mvThemeCol_ScrollbarBg , colors ["surface_alt" ])
147+ dpg .add_theme_color (dpg .mvThemeCol_ScrollbarGrab , colors ["border" ])
148+ dpg .add_theme_color (dpg .mvThemeCol_ScrollbarGrabHovered , colors ["text_muted" ])
149+ dpg .add_theme_color (dpg .mvThemeCol_ScrollbarGrabActive , colors ["accent" ])
134150
135151 dpg .add_theme_color (dpg .mvPlotCol_FrameBg , colors ["surface" ], category = dpg .mvThemeCat_Plots )
136152 dpg .add_theme_color (dpg .mvPlotCol_PlotBg , colors ["surface" ], category = dpg .mvThemeCat_Plots )
@@ -142,6 +158,15 @@ def _build_global_theme(theme_name: str):
142158 dpg .add_theme_color (dpg .mvPlotCol_AxisGrid , colors ["grid" ], category = dpg .mvThemeCat_Plots )
143159 dpg .add_theme_color (dpg .mvPlotCol_TitleText , colors ["text" ], category = dpg .mvThemeCat_Plots )
144160
161+ with dpg .theme_component (dpg .mvButton ):
162+ dpg .add_theme_color (dpg .mvThemeCol_Text , colors ["button_text" ])
163+
164+ for item_type in (dpg .mvCombo , dpg .mvInputInt , dpg .mvInputFloat , dpg .mvInputDouble ):
165+ with dpg .theme_component (item_type ):
166+ dpg .add_theme_color (dpg .mvThemeCol_Button , colors ["control_button" ])
167+ dpg .add_theme_color (dpg .mvThemeCol_ButtonHovered , colors ["control_button_hover" ])
168+ dpg .add_theme_color (dpg .mvThemeCol_ButtonActive , colors ["control_button_active" ])
169+
145170
146171def _build_startup_card_theme (theme_name : str ):
147172 colors = _palette (theme_name )
@@ -162,6 +187,7 @@ def _build_accent_button_theme(theme_name: str):
162187
163188 with dpg .theme (tag = ACCENT_BUTTON_THEME_TAG ):
164189 with dpg .theme_component (dpg .mvButton ):
190+ dpg .add_theme_color (dpg .mvThemeCol_Text , colors ["button_text" ])
165191 dpg .add_theme_color (dpg .mvThemeCol_Button , colors ["accent" ])
166192 dpg .add_theme_color (dpg .mvThemeCol_ButtonHovered , colors ["accent_hover" ])
167193 dpg .add_theme_color (dpg .mvThemeCol_ButtonActive , colors ["accent_active" ])
0 commit comments