feat: harmonize Prop and Stickman editor UI
This commit is contained in:
@@ -13,6 +13,7 @@ const DEFAULT_CONFIG: Dictionary = {
|
||||
"background": "#171B24F2",
|
||||
"surface": "#252B38FA",
|
||||
"surface_hover": "#30394A",
|
||||
"selected_surface": "#103B4D",
|
||||
"text": "#F5F7FA",
|
||||
"text_muted": "#AAB2C0",
|
||||
"edit": "#22C6FF",
|
||||
@@ -32,6 +33,8 @@ const DEFAULT_CONFIG: Dictionary = {
|
||||
"section": 22,
|
||||
"title": 26,
|
||||
"menu": 20,
|
||||
"menu_bar": 22,
|
||||
"menu_popup": 26,
|
||||
"status": 16,
|
||||
"mode": 24,
|
||||
"prop_name": 20,
|
||||
@@ -40,7 +43,13 @@ const DEFAULT_CONFIG: Dictionary = {
|
||||
"spacing": {"small": 8, "medium": 12, "large": 16},
|
||||
"radii": {"control": 8, "panel": 10},
|
||||
"borders": {"normal": 1, "focus": 2},
|
||||
"targets": {"button_min_height": 44, "row_min_height": 44, "mode_button_min_height": 56},
|
||||
"targets": {
|
||||
"button_min_height": 44,
|
||||
"row_min_height": 44,
|
||||
"mode_button_min_height": 56,
|
||||
"context_menu_row_height": 48,
|
||||
"context_menu_min_width": 208,
|
||||
},
|
||||
},
|
||||
"editors": {"prop": {}, "stickman": {}},
|
||||
"stickman_canvas": {
|
||||
@@ -54,6 +63,7 @@ const COLOR_ROLE_SECTIONS: Dictionary = {
|
||||
"background": "colors",
|
||||
"surface": "colors",
|
||||
"surface_hover": "colors",
|
||||
"selected_surface": "colors",
|
||||
"text": "colors",
|
||||
"text_muted": "colors",
|
||||
"edit": "colors",
|
||||
@@ -73,6 +83,8 @@ const SIZE_ROLE_SECTIONS: Dictionary = {
|
||||
"section": "fonts",
|
||||
"title": "fonts",
|
||||
"menu": "fonts",
|
||||
"menu_bar": "fonts",
|
||||
"menu_popup": "fonts",
|
||||
"status": "fonts",
|
||||
"mode": "fonts",
|
||||
"prop_name": "fonts",
|
||||
@@ -87,6 +99,8 @@ const SIZE_ROLE_SECTIONS: Dictionary = {
|
||||
"button_min_height": "targets",
|
||||
"row_min_height": "targets",
|
||||
"mode_button_min_height": "targets",
|
||||
"context_menu_row_height": "targets",
|
||||
"context_menu_min_width": "targets",
|
||||
}
|
||||
const CONFIG_SIZE_KEYS: Dictionary = {
|
||||
"normal_border": "normal",
|
||||
@@ -208,13 +222,12 @@ func control_theme(editor: StringName) -> Theme:
|
||||
theme.set_font_size("font_size", type_name, chrome_px(&"body", editor))
|
||||
var panel_box: StyleBoxFlat = _make_box(surface, border, chrome_px(&"panel", editor), normal_width)
|
||||
theme.set_stylebox("panel", "PanelContainer", panel_box)
|
||||
theme.set_stylebox("normal", "PopupMenu", panel_box.duplicate())
|
||||
theme.set_stylebox("panel", "MenuBar", panel_box.duplicate())
|
||||
theme.set_font_size("font_size", "Label", chrome_px(&"body", editor))
|
||||
theme.set_color("font_color", "Label", text)
|
||||
theme.set_color("font_hover_color", "Label", text)
|
||||
theme.set_font_size("font_size", "PopupMenu", chrome_px(&"menu", editor))
|
||||
theme.set_font_size("font_size", "MenuBar", chrome_px(&"menu", editor))
|
||||
theme.set_font_size("font_size", "PopupMenu", chrome_px(&"menu_popup", editor))
|
||||
theme.set_font_size("font_size", "MenuBar", chrome_px(&"menu_bar", editor))
|
||||
theme.set_color("font_color", "MenuBar", text)
|
||||
return theme
|
||||
|
||||
|
||||
Reference in New Issue
Block a user