summaryrefslogtreecommitdiffstats
path: root/scene/resources/default_theme/default_theme.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-04-11 19:40:40 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-04-11 19:40:40 +0200
commitfff0ee0fc40646012294889e032183ab53d72fa9 (patch)
treeb7b1a7ac0d9eaec7420597e01e2a30500f7ce2d6 /scene/resources/default_theme/default_theme.cpp
parentef17794d1736a361cba1fcbebca6b82df695b50d (diff)
parentf057d755abdb0328113ab9472c243b94694a8b04 (diff)
downloadredot-engine-fff0ee0fc40646012294889e032183ab53d72fa9.tar.gz
Merge pull request #75822 from YeldhamDev/no_multi_zero
Remove unnecessary zero multiplications
Diffstat (limited to 'scene/resources/default_theme/default_theme.cpp')
-rw-r--r--scene/resources/default_theme/default_theme.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 16b1ed0703..8addcea215 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -162,7 +162,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font("font", "Button", Ref<Font>());
theme->set_font_size("font_size", "Button", -1);
- theme->set_constant("outline_size", "Button", 0 * scale);
+ theme->set_constant("outline_size", "Button", 0);
theme->set_color("font_color", "Button", control_font_color);
theme->set_color("font_pressed_color", "Button", control_font_pressed_color);
@@ -191,7 +191,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font("font", "MenuBar", Ref<Font>());
theme->set_font_size("font_size", "MenuBar", -1);
- theme->set_constant("outline_size", "MenuBar", 0 * scale);
+ theme->set_constant("outline_size", "MenuBar", 0);
theme->set_color("font_color", "MenuBar", control_font_color);
theme->set_color("font_pressed_color", "MenuBar", control_font_pressed_color);
@@ -316,7 +316,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_outline_color", "CheckBox", Color(1, 1, 1));
theme->set_constant("h_separation", "CheckBox", 4 * scale);
- theme->set_constant("check_v_offset", "CheckBox", 0 * scale);
+ theme->set_constant("check_v_offset", "CheckBox", 0);
theme->set_constant("outline_size", "CheckBox", 0);
// CheckButton
@@ -353,7 +353,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_outline_color", "CheckButton", Color(1, 1, 1));
theme->set_constant("h_separation", "CheckButton", 4 * scale);
- theme->set_constant("check_v_offset", "CheckButton", 0 * scale);
+ theme->set_constant("check_v_offset", "CheckButton", 0);
theme->set_constant("outline_size", "CheckButton", 0);
// Label
@@ -1045,7 +1045,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("shadow_offset_y", "RichTextLabel", 1 * scale);
theme->set_constant("shadow_outline_size", "RichTextLabel", 1 * scale);
- theme->set_constant("line_separation", "RichTextLabel", 0 * scale);
+ theme->set_constant("line_separation", "RichTextLabel", 0);
theme->set_constant("table_h_separation", "RichTextLabel", 3 * scale);
theme->set_constant("table_v_separation", "RichTextLabel", 3 * scale);
@@ -1068,10 +1068,10 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("separation", "BoxContainer", 4 * scale);
theme->set_constant("separation", "HBoxContainer", 4 * scale);
theme->set_constant("separation", "VBoxContainer", 4 * scale);
- theme->set_constant("margin_left", "MarginContainer", 0 * scale);
- theme->set_constant("margin_top", "MarginContainer", 0 * scale);
- theme->set_constant("margin_right", "MarginContainer", 0 * scale);
- theme->set_constant("margin_bottom", "MarginContainer", 0 * scale);
+ theme->set_constant("margin_left", "MarginContainer", 0);
+ theme->set_constant("margin_top", "MarginContainer", 0);
+ theme->set_constant("margin_right", "MarginContainer", 0);
+ theme->set_constant("margin_bottom", "MarginContainer", 0);
theme->set_constant("h_separation", "GridContainer", 4 * scale);
theme->set_constant("v_separation", "GridContainer", 4 * scale);
theme->set_constant("separation", "SplitContainer", 12 * scale);