mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
hide widget on empty value
This commit is contained in:
parent
9be94979b9
commit
cc15498f7a
2 changed files with 9 additions and 0 deletions
|
|
@ -27,6 +27,8 @@ Title::Title()
|
|||
set_text(
|
||||
DEFAULT_TEXT
|
||||
);
|
||||
|
||||
hide();
|
||||
}
|
||||
|
||||
Title::~Title() = default;
|
||||
|
|
@ -37,4 +39,6 @@ void Title::set(
|
|||
set_text(
|
||||
TEXT.empty() ? DEFAULT_TEXT : TEXT + " - " + DEFAULT_TEXT
|
||||
);
|
||||
|
||||
if (get_text().empty()) hide(); else show();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue