mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-30 13:04:13 +00:00
use custom text setter on widget init
This commit is contained in:
parent
cc15498f7a
commit
e204460e59
@ -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…
x
Reference in New Issue
Block a user