mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
update tooltip ui responsibility
This commit is contained in:
parent
4b33ba874a
commit
900ff36227
1 changed files with 23 additions and 3 deletions
|
|
@ -148,10 +148,30 @@ void Label::update(
|
|||
void Label::update(
|
||||
const Glib::ustring & TITLE
|
||||
) {
|
||||
// Update tooltip
|
||||
const auto PARENT = get_parent(); // Parent GtkNotebook widget contain default CSS paddings,
|
||||
// update tooltip text at one level up instead of this widget, for better UI responsibility on mouse hover.
|
||||
// @TODO solution does not follow common encapsulation principles, alternative implementation wanted!
|
||||
|
||||
if (PARENT != NULL)
|
||||
{
|
||||
set_tooltip_text(
|
||||
Glib::ustring()
|
||||
);
|
||||
|
||||
PARENT->set_tooltip_text(
|
||||
TITLE
|
||||
);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
set_tooltip_text(
|
||||
TITLE
|
||||
);
|
||||
}
|
||||
|
||||
// Update children components
|
||||
labelTitle->update(
|
||||
TITLE
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue