Fix choosing hinted ui element if it is hidden by a non-transparent element
This commit is contained in:
parent
cabe5721aa
commit
ecab744dfd
1 changed files with 4 additions and 2 deletions
|
|
@ -145,14 +145,16 @@ namespace psemek::ui
|
|||
if (auto p = self(*it))
|
||||
return p;
|
||||
|
||||
if (elem->enabled() && elem->hint() && elem->shape().contains(m))
|
||||
if (elem->enabled() && elem->shape().contains(m) && !elem->transparent())
|
||||
return elem;
|
||||
|
||||
return nullptr;
|
||||
});
|
||||
|
||||
if (root)
|
||||
return visitor(root.get());
|
||||
if (auto result = visitor(root.get()); result && result->hint())
|
||||
return result;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue