refactor: migrate complex-tooltip modules to ALabel dedup setters
Switch direct label_.set_markup/set_tooltip_markup calls to the deduplicating setLabelMarkup/setTooltipMarkup helpers in clock, custom and mpris, keeping their custom tooltip construction logic intact. taskbar is left untouched: its tooltip lives on per-task Gtk::Button, not on an ALabel label_.
This commit is contained in:
@@ -162,7 +162,7 @@ auto waybar::modules::Clock::update() -> void {
|
||||
const auto* tz = tzList_[tzCurrIdx_] != nullptr ? tzList_[tzCurrIdx_] : local_zone();
|
||||
const zoned_time now{tz, floor<seconds>(system_clock::now())};
|
||||
|
||||
label_.set_markup(fmt_lib::vformat(m_locale_, format_, fmt_lib::make_format_args(now)));
|
||||
setLabelMarkup(fmt_lib::vformat(m_locale_, format_, fmt_lib::make_format_args(now)));
|
||||
|
||||
if (tooltipEnabled()) {
|
||||
const year_month_day today{floor<days>(now.get_local_time())};
|
||||
|
||||
Reference in New Issue
Block a user