feat(ui): Implement Subtle Rounding professional theme
This commit is contained in:
@@ -204,18 +204,39 @@ def get_current_scale() -> float:
|
||||
|
||||
def apply(palette_name: str) -> None:
|
||||
"""
|
||||
Apply a named palette by setting all ImGui style colors.
|
||||
Apply a named palette by setting all ImGui style colors and applying global professional styling.
|
||||
Call this once per frame if you want dynamic switching, or once at startup.
|
||||
In practice we call it once when the user picks a palette, and imgui retains the style.
|
||||
"""
|
||||
global _current_palette
|
||||
_current_palette = palette_name
|
||||
colours = _PALETTES.get(palette_name, {})
|
||||
style = imgui.get_style()
|
||||
|
||||
# Subtle Rounding Professional Theme
|
||||
style.window_rounding = 6.0
|
||||
style.child_rounding = 4.0
|
||||
style.frame_rounding = 4.0
|
||||
style.popup_rounding = 4.0
|
||||
style.scrollbar_rounding = 12.0
|
||||
style.grab_rounding = 4.0
|
||||
style.tab_rounding = 4.0
|
||||
style.window_border_size = 1.0
|
||||
style.frame_border_size = 1.0
|
||||
style.popup_border_size = 1.0
|
||||
|
||||
# Spacing & Padding
|
||||
style.window_padding = imgui.ImVec2(8.0, 8.0)
|
||||
style.frame_padding = imgui.ImVec2(8.0, 4.0)
|
||||
style.item_spacing = imgui.ImVec2(8.0, 4.0)
|
||||
style.item_inner_spacing = imgui.ImVec2(4.0, 4.0)
|
||||
style.scrollbar_size = 14.0
|
||||
|
||||
if not colours:
|
||||
# Reset to imgui dark defaults
|
||||
# Reset to imgui dark defaults
|
||||
imgui.style_colors_dark()
|
||||
return
|
||||
style = imgui.get_style()
|
||||
|
||||
# Start from dark defaults so unlisted keys have sensible values
|
||||
imgui.style_colors_dark()
|
||||
for col_enum, rgba in colours.items():
|
||||
|
||||
Reference in New Issue
Block a user