From af0dd6591bd861e33fb2a54d72136dd52ff8ef88 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Sat, 8 Apr 2023 09:16:21 -0300 Subject: Remove unnecessary zero multiplications (cherry picked from commit f057d755abdb0328113ab9472c243b94694a8b04) --- scene/resources/default_theme/default_theme.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'scene') diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 11373c430c..35c81ea91b 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, const Ref &default_font, const theme->set_font("font", "Button", Ref()); 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); @@ -190,7 +190,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_font("font", "MenuBar", Ref()); 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); @@ -315,7 +315,7 @@ void fill_default_theme(Ref &theme, const Ref &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 @@ -352,7 +352,7 @@ void fill_default_theme(Ref &theme, const Ref &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 @@ -1034,7 +1034,7 @@ void fill_default_theme(Ref &theme, const Ref &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); @@ -1057,10 +1057,10 @@ void fill_default_theme(Ref &theme, const Ref &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); -- cgit v1.2.3