summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-06-26 22:56:38 +0200
committerGitHub <noreply@github.com>2017-06-26 22:56:38 +0200
commite65f44472644babe00c35b677b55480c6d2e1119 (patch)
tree0b13783f8922411b23034727450b8c01e33568a5
parentf2bc0cc96663bbdde872c2a4d9a29f2218ff7d22 (diff)
parent5374145afa140b06269d0f05e000b9a730b42539 (diff)
Merge pull request #9385 from toger5/theme_item_list
margins for item list
-rw-r--r--editor/editor_themes.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index c855f43f44..7e453a01c6 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -257,10 +257,10 @@ Ref<Theme> create_editor_theme() {
Ref<StyleBox> style_tree_btn = make_flat_stylebox(light_color_1, 2, 4, 2, 4);
theme->set_stylebox("button_pressed", "Tree", style_tree_btn);
- Ref<StyleBoxFlat> style_tree_focus = make_flat_stylebox(HIGHLIGHT_COLOR_DARK, 4, 4, 4, 4);
+ Ref<StyleBoxFlat> style_tree_focus = make_flat_stylebox(HIGHLIGHT_COLOR_DARK, 2, 2, 2, 2);
theme->set_stylebox("selected_focus", "Tree", style_tree_focus);
- Ref<StyleBoxFlat> style_tree_selected = make_flat_stylebox(light_color_1, 4, 4, 4, 4);
+ Ref<StyleBoxFlat> style_tree_selected = make_flat_stylebox(light_color_1, 2, 2, 2, 2);
theme->set_stylebox("selected", "Tree", style_tree_selected);
Ref<StyleBoxFlat> style_tree_cursor = make_flat_stylebox(HIGHLIGHT_COLOR_DARK, 4, 4, 4, 4);
@@ -283,17 +283,18 @@ Ref<Theme> create_editor_theme() {
theme->set_color("drop_position_color", "Tree", highlight_color);
// ItemList
- Ref<StyleBoxFlat> style_itemlist_cursor = make_flat_stylebox(highlight_color, 4, 4, 4, 4);
+ Ref<StyleBoxFlat> style_itemlist_bg = make_flat_stylebox(dark_color_1, 4, 4, 4, 4);
+ Ref<StyleBoxFlat> style_itemlist_cursor = make_flat_stylebox(highlight_color, 0, 0, 0, 0);
style_itemlist_cursor->set_draw_center(false);
style_itemlist_cursor->set_border_size(1 * EDSCALE);
- style_itemlist_cursor->set_light_color(light_color_1);
- style_itemlist_cursor->set_dark_color(light_color_1);
+ style_itemlist_cursor->set_light_color(HIGHLIGHT_COLOR_DARK);
+ style_itemlist_cursor->set_dark_color(HIGHLIGHT_COLOR_DARK);
theme->set_stylebox("cursor", "ItemList", style_itemlist_cursor);
theme->set_stylebox("cursor_unfocused", "ItemList", style_itemlist_cursor);
theme->set_stylebox("selected_focus", "ItemList", style_tree_focus);
theme->set_stylebox("selected", "ItemList", style_tree_selected);
theme->set_stylebox("bg_focus", "ItemList", focus_sbt);
- theme->set_stylebox("bg", "ItemList", style_tree_bg);
+ theme->set_stylebox("bg", "ItemList", style_itemlist_bg);
theme->set_constant("vseparation", "ItemList", 5 * EDSCALE);
Ref<StyleBoxFlat> style_tab_fg = make_flat_stylebox(base_color, 15, 5, 15, 5);