mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
use custom text setter on widget init
This commit is contained in:
parent
cc15498f7a
commit
e204460e59
1 changed files with 2 additions and 4 deletions
|
|
@ -24,11 +24,9 @@ Title::Title()
|
||||||
WIDTH_CHARS
|
WIDTH_CHARS
|
||||||
);
|
);
|
||||||
|
|
||||||
set_text(
|
set(
|
||||||
DEFAULT_TEXT
|
DEFAULT_TEXT
|
||||||
);
|
);
|
||||||
|
|
||||||
hide();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Title::~Title() = default;
|
Title::~Title() = default;
|
||||||
|
|
@ -37,7 +35,7 @@ void Title::set(
|
||||||
const Glib::ustring & TEXT
|
const Glib::ustring & TEXT
|
||||||
) {
|
) {
|
||||||
set_text(
|
set_text(
|
||||||
TEXT.empty() ? DEFAULT_TEXT : TEXT + " - " + DEFAULT_TEXT
|
TEXT.empty() || TEXT == DEFAULT_TEXT ? DEFAULT_TEXT : TEXT + " - " + DEFAULT_TEXT
|
||||||
);
|
);
|
||||||
|
|
||||||
if (get_text().empty()) hide(); else show();
|
if (get_text().empty()) hide(); else show();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue