Merge remote-tracking branch 'origin/mig-F' into refactor/generic-tooltip
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())};
|
||||
|
||||
@@ -187,7 +187,7 @@ auto waybar::modules::Custom::update() -> void {
|
||||
if ((config_["hide-empty-text"].asBool() && text_.empty()) || str.empty()) {
|
||||
event_box_.hide();
|
||||
} else {
|
||||
label_.set_markup(str);
|
||||
setLabelMarkup(str);
|
||||
if (tooltipEnabled()) {
|
||||
std::string tooltip_markup;
|
||||
if (tooltip_format_enabled_) {
|
||||
@@ -202,10 +202,7 @@ auto waybar::modules::Custom::update() -> void {
|
||||
tooltip_markup = tooltip_;
|
||||
}
|
||||
|
||||
if (last_tooltip_markup_ != tooltip_markup) {
|
||||
label_.set_tooltip_markup(tooltip_markup);
|
||||
last_tooltip_markup_ = std::move(tooltip_markup);
|
||||
}
|
||||
setTooltipMarkup(tooltip_markup);
|
||||
}
|
||||
auto style = label_.get_style_context();
|
||||
auto classes = style->list_classes();
|
||||
|
||||
@@ -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