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))
|
if (auto p = self(*it))
|
||||||
return p;
|
return p;
|
||||||
|
|
||||||
if (elem->enabled() && elem->hint() && elem->shape().contains(m))
|
if (elem->enabled() && elem->shape().contains(m) && !elem->transparent())
|
||||||
return elem;
|
return elem;
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (root)
|
if (root)
|
||||||
return visitor(root.get());
|
if (auto result = visitor(root.get()); result && result->hint())
|
||||||
|
return result;
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue