Fix ThemeTypeEditor tabbar background

pull/39/head 2.3.2
passivestar 2025-07-27 16:23:36 +07:00
parent 2dfe16953f
commit 7467f50ef4
1 changed files with 18 additions and 0 deletions

@ -948,6 +948,24 @@ func _init() -> void:
var game_view_toolbar_margin_container : Control = game_view.find_children('', 'MarginContainer', true, false)[0]
game_view_toolbar_margin_container.add_theme_constant_override('margin_top', int(base_margin * 0.5 * scale))
game_view_toolbar_margin_container.add_theme_constant_override('margin_bottom', int(base_margin * 0.5 * scale))
# ThemeTypeEditor TabContainer
# Tabs of ThemeTypeEditor need to be custom because of lighter background of
# the bottom panel
var theme_type_editor : Control = EditorInterface.get_base_control().find_children('', 'ThemeTypeEditor', true, false)[0]
var theme_type_editor_tab_container : TabContainer = theme_type_editor.find_children('', 'TabContainer', true, false)[0]
var theme_type_editor_tab_container_sb : StyleBoxFlat = base_sb.duplicate()
theme_type_editor_tab_container_sb.bg_color = _get_base_color(-1.1)
theme_type_editor_tab_container_sb.set_content_margin_all(0)
theme_type_editor_tab_container_sb.content_margin_top = int(base_margin * scale)
theme_type_editor_tab_container_sb.corner_radius_bottom_left = 0
theme_type_editor_tab_container_sb.corner_radius_bottom_right = 0
theme_type_editor_tab_container.add_theme_stylebox_override('tabbar_background', theme_type_editor_tab_container_sb)
).call_deferred()
# Lighten base color in dark theme, darken in light theme, clamp