mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
modules: Revert button to label
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
using waybar::waybar_time;
|
||||
|
||||
waybar::modules::Clock::Clock(const std::string& id, const Json::Value& config)
|
||||
: AButton(config, "clock", id, "{:%H:%M}", 60, false, false, true),
|
||||
: ALabel(config, "clock", id, "{:%H:%M}", 60, false, false, true),
|
||||
current_time_zone_idx_(0),
|
||||
is_calendar_in_tooltip_(false),
|
||||
is_timezoned_list_in_tooltip_(false) {
|
||||
@ -107,7 +107,7 @@ auto waybar::modules::Clock::update() -> void {
|
||||
} else {
|
||||
text = fmt::format(format_, wtime);
|
||||
}
|
||||
label_->set_markup(text);
|
||||
label_.set_markup(text);
|
||||
|
||||
if (tooltipEnabled()) {
|
||||
if (config_["tooltip-format"].isString()) {
|
||||
@ -119,12 +119,12 @@ auto waybar::modules::Clock::update() -> void {
|
||||
text =
|
||||
fmt::format(tooltip_format, wtime, fmt::arg(kCalendarPlaceholder.c_str(), calendar_lines),
|
||||
fmt::arg(KTimezonedTimeListPlaceholder.c_str(), timezoned_time_lines));
|
||||
button_.set_tooltip_markup(text);
|
||||
label_.set_tooltip_markup(text);
|
||||
}
|
||||
}
|
||||
|
||||
// Call parent update
|
||||
AButton::update();
|
||||
ALabel::update();
|
||||
}
|
||||
|
||||
bool waybar::modules::Clock::handleScroll(GdkEventScroll* e) {
|
||||
|
Reference in New Issue
Block a user