mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 04:16:50 +01:00
Fix hover being drawn twice inside PopupMenu
s
This commit is contained in:
parent
a8a140af27
commit
2ebc4905fc
@ -571,7 +571,6 @@ void PopupMenu::_notification(int p_what) {
|
||||
}
|
||||
|
||||
if (i == mouse_over) {
|
||||
hover->draw(ci, Rect2(item_ofs + Point2(-hseparation, -vseparation / 2), Size2(get_size().width - style->get_minimum_size().width + hseparation * 2, h + vseparation)));
|
||||
hover->draw(ci, Rect2(item_ofs + Point2(0, -vseparation / 2), Size2(size.width - style->get_minimum_size().width, h + vseparation)));
|
||||
}
|
||||
|
||||
|
@ -569,9 +569,10 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
|
||||
Ref<StyleBoxTexture> style_pp = sb_expand(make_stylebox(popup_bg_png, 5, 5, 5, 5, 4, 4, 4, 4), 2, 2, 2, 2);
|
||||
|
||||
Ref<StyleBoxTexture> selected = make_stylebox(selection_png, 6, 6, 6, 6);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
selected->set_expand_margin_size(Margin(i), 2 * scale);
|
||||
}
|
||||
selected->set_expand_margin_size(MARGIN_TOP, 2 * scale);
|
||||
selected->set_expand_margin_size(MARGIN_BOTTOM, 2 * scale);
|
||||
selected->set_expand_margin_size(MARGIN_LEFT, 6 * scale);
|
||||
selected->set_expand_margin_size(MARGIN_RIGHT, 6 * scale);
|
||||
|
||||
theme->set_stylebox("panel", "PopupPanel", style_pp);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user