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:
@@ -735,7 +735,7 @@ auto Mpris::update() -> void {
|
||||
if (label_format.empty()) {
|
||||
label_.hide();
|
||||
} else {
|
||||
label_.set_markup(label_format);
|
||||
setLabelMarkup(label_format);
|
||||
label_.show();
|
||||
}
|
||||
} catch (fmt::format_error const& e) {
|
||||
@@ -758,7 +758,7 @@ auto Mpris::update() -> void {
|
||||
fmt::arg("player_icon", getIconFromJson(config_["player-icons"], info.name)),
|
||||
fmt::arg("status_icon", getIconFromJson(config_["status-icons"], info.status_string)));
|
||||
|
||||
label_.set_tooltip_markup(tooltip_text);
|
||||
setTooltipMarkup(tooltip_text);
|
||||
} catch (fmt::format_error const& e) {
|
||||
spdlog::warn("mpris: format error (tooltip): {}", e.what());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user