feat(theme): fix table row backgrounds and hub text contrast
This commit is contained in:
@@ -139,6 +139,11 @@ def set_child_transparency(val: float) -> None:
|
||||
_child_transparency = val
|
||||
apply(_current_palette)
|
||||
|
||||
def get_table_color(is_alt: bool = False, alpha: float = 1.0) -> imgui.ImVec4:
|
||||
"""Returns a tone-mapped table row background color."""
|
||||
key = "table_row_bg_alt" if is_alt else "table_row_bg"
|
||||
return get_color(key, alpha=alpha)
|
||||
|
||||
def get_color(name: str, alpha: float = 1.0) -> imgui.ImVec4:
|
||||
"""Return a tone-mapped semantic color from the current palette."""
|
||||
palette_name = _current_palette
|
||||
@@ -165,6 +170,7 @@ def get_color(name: str, alpha: float = 1.0) -> imgui.ImVec4:
|
||||
"diff_added": (51, 230, 51),
|
||||
"diff_removed": (230, 51, 51),
|
||||
"diff_header": (77, 178, 255),
|
||||
"table_header_text": (255, 255, 255),
|
||||
}
|
||||
if name in fallbacks:
|
||||
rgb = fallbacks[name]
|
||||
|
||||
Reference in New Issue
Block a user