mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-11 13:21:10 +01:00
PopupMenu Fix hover stylebox overflowing horizontally
This commit is contained in:
parent
3f432af82b
commit
3dbf7c3d52
@ -519,7 +519,7 @@ void PopupMenu::_notification(int p_what) {
|
||||
Ref<StyleBox> labeled_separator_left = get_stylebox("labeled_separator_left");
|
||||
Ref<StyleBox> labeled_separator_right = get_stylebox("labeled_separator_right");
|
||||
|
||||
style->draw(ci, Rect2(Point2(), get_size()));
|
||||
style->draw(ci, Rect2(Point2(), size));
|
||||
Point2 ofs = style->get_offset();
|
||||
int vseparation = get_constant("vseparation");
|
||||
int hseparation = get_constant("hseparation");
|
||||
@ -572,6 +572,7 @@ 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)));
|
||||
}
|
||||
|
||||
item_ofs.x += items[i].h_ofs;
|
||||
|
Loading…
Reference in New Issue
Block a user