mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-29 15:44:02 +00:00
sculpt: anchor popup position at '+' button
This patch restores the anchoring of the popup menu to the original behavior, placing the popup to the right of the '+' button. The anchoring got lost due to the recent structural changes of the GUI, which affect the hover XML structure.
This commit is contained in:
parent
c856ba2a49
commit
e54e4dd532
@ -282,7 +282,9 @@ Dialog::Hover_result Graph::hover(Xml_node hover)
|
||||
if (_add_button_item.hovered("global+")) {
|
||||
|
||||
/* update anchor geometry of popup menu */
|
||||
auto hovered_rect = [] (Xml_node const hover) {
|
||||
auto hovered_rect = [] (Xml_node const dialog)
|
||||
{
|
||||
if (!dialog.has_type("dialog")) return Rect();
|
||||
|
||||
auto point_from_xml = [] (Xml_node node) {
|
||||
return Point(node.attribute_value("xpos", 0L),
|
||||
@ -292,9 +294,6 @@ Dialog::Hover_result Graph::hover(Xml_node hover)
|
||||
return Area(node.attribute_value("width", 0UL),
|
||||
node.attribute_value("height", 0UL)); };
|
||||
|
||||
if (!hover.has_sub_node("dialog")) return Rect();
|
||||
Xml_node const dialog = hover.sub_node("dialog");
|
||||
|
||||
if (!dialog.has_sub_node("depgraph")) return Rect();
|
||||
Xml_node const depgraph = dialog.sub_node("depgraph");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user