diff options
Diffstat (limited to 'scene/gui/progress_bar.cpp')
-rw-r--r-- | scene/gui/progress_bar.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/scene/gui/progress_bar.cpp b/scene/gui/progress_bar.cpp index 6e8dfd5994..2cfaaa2fde 100644 --- a/scene/gui/progress_bar.cpp +++ b/scene/gui/progress_bar.cpp @@ -32,10 +32,10 @@ #include "scene/resources/text_line.h" Size2 ProgressBar::get_minimum_size() const { - Ref<StyleBox> bg = get_theme_stylebox("bg"); - Ref<StyleBox> fg = get_theme_stylebox("fg"); - Ref<Font> font = get_theme_font("font"); - int font_size = get_theme_font_size("font_size"); + Ref<StyleBox> bg = get_theme_stylebox(SNAME("bg")); + Ref<StyleBox> fg = get_theme_stylebox(SNAME("fg")); + Ref<Font> font = get_theme_font(SNAME("font")); + int font_size = get_theme_font_size(SNAME("font_size")); Size2 minimum_size = bg->get_minimum_size(); minimum_size.height = MAX(minimum_size.height, fg->get_minimum_size().height); @@ -53,11 +53,11 @@ Size2 ProgressBar::get_minimum_size() const { void ProgressBar::_notification(int p_what) { if (p_what == NOTIFICATION_DRAW) { - Ref<StyleBox> bg = get_theme_stylebox("bg"); - Ref<StyleBox> fg = get_theme_stylebox("fg"); - Ref<Font> font = get_theme_font("font"); - int font_size = get_theme_font_size("font_size"); - Color font_color = get_theme_color("font_color"); + Ref<StyleBox> bg = get_theme_stylebox(SNAME("bg")); + Ref<StyleBox> fg = get_theme_stylebox(SNAME("fg")); + Ref<Font> font = get_theme_font(SNAME("font")); + int font_size = get_theme_font_size(SNAME("font_size")); + Color font_color = get_theme_color(SNAME("font_color")); draw_style_box(bg, Rect2(Point2(), get_size())); float r = get_as_ratio(); @@ -75,8 +75,8 @@ void ProgressBar::_notification(int p_what) { String txt = TS->format_number(itos(int(get_as_ratio() * 100))) + TS->percent_sign(); TextLine tl = TextLine(txt, font, font_size); Vector2 text_pos = (Point2(get_size().width - tl.get_size().x, get_size().height - tl.get_size().y) / 2).round(); - Color font_outline_color = get_theme_color("font_outline_color"); - int outline_size = get_theme_constant("outline_size"); + Color font_outline_color = get_theme_color(SNAME("font_outline_color")); + int outline_size = get_theme_constant(SNAME("outline_size")); if (outline_size > 0 && font_outline_color.a > 0) { tl.draw_outline(get_canvas_item(), text_pos, outline_size, font_outline_color); } |