From e204460e590fb9b41fa9106f31e7c2e67c4c87a1 Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 27 Aug 2024 14:56:20 +0300 Subject: [PATCH] use custom text setter on widget init --- src/app/browser/header/main/title.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/browser/header/main/title.cpp b/src/app/browser/header/main/title.cpp index 02e202f9..b6195146 100644 --- a/src/app/browser/header/main/title.cpp +++ b/src/app/browser/header/main/title.cpp @@ -24,11 +24,9 @@ Title::Title() WIDTH_CHARS ); - set_text( + set( DEFAULT_TEXT ); - - hide(); } Title::~Title() = default; @@ -37,7 +35,7 @@ void Title::set( const Glib::ustring & 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();