diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-12-10 11:13:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-10 11:13:07 +0100 |
commit | 67259d07db3c502f5e2cbe02e869b565e2d0471f (patch) | |
tree | 76a9ff4322fcf51f04b5765f19c26a87467e671e /scene/gui | |
parent | bc9b54d6ab1572898085a59cd30ace18e1515bf6 (diff) | |
parent | 383e8919e0187d87a303818e59982bc25edb99ea (diff) |
Merge pull request #44070 from YeldhamDev/popupmenu_separator_font_color
Add "font_color_separator" theme property to 'PopupMenu'
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/popup_menu.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index 6dbf005f73..5b076649b0 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -446,6 +446,7 @@ void PopupMenu::_draw_items() { Color font_color_disabled = get_theme_color("font_color_disabled"); Color font_color_accel = get_theme_color("font_color_accel"); Color font_color_hover = get_theme_color("font_color_hover"); + Color font_color_separator = get_theme_color("font_color_separator"); float scroll_width = scroll_container->get_v_scrollbar()->is_visible_in_tree() ? scroll_container->get_v_scrollbar()->get_size().width : 0; float display_width = control->get_size().width - scroll_width; @@ -548,7 +549,7 @@ void PopupMenu::_draw_items() { if (items[i].separator) { if (text != String()) { int center = (display_width - items[i].text_buf->get_size().width) / 2; - items[i].text_buf->draw(ci, Point2(center, item_ofs.y + Math::floor((h - items[i].text_buf->get_size().y) / 2.0)), font_color_disabled); + items[i].text_buf->draw(ci, Point2(center, item_ofs.y + Math::floor((h - items[i].text_buf->get_size().y) / 2.0)), font_color_separator); } } else { item_ofs.x += icon_ofs + check_ofs; |