Issue#1545. Calendar scrolling opportunity
This commit is contained in:
Alex
2022-09-07 09:16:59 +02:00
committed by GitHub
3 changed files with 49 additions and 35 deletions

View File

@ -48,10 +48,10 @@ class AModule : public IModule {
{std::make_pair(3, GdkEventType::GDK_3BUTTON_PRESS), "on-triple-click-right"},
{std::make_pair(8, GdkEventType::GDK_BUTTON_PRESS), "on-click-backward"},
{std::make_pair(8, GdkEventType::GDK_2BUTTON_PRESS), "on-double-click-backward"},
{std::make_pair(8, GdkEventType::GDK_2BUTTON_PRESS), "on-triple-click-backward"},
{std::make_pair(8, GdkEventType::GDK_3BUTTON_PRESS), "on-triple-click-backward"},
{std::make_pair(9, GdkEventType::GDK_BUTTON_PRESS), "on-click-forward"},
{std::make_pair(9, GdkEventType::GDK_2BUTTON_PRESS), "on-double-click-forward"},
{std::make_pair(9, GdkEventType::GDK_2BUTTON_PRESS), "on-triple-click-forward"}};
{std::make_pair(9, GdkEventType::GDK_3BUTTON_PRESS), "on-triple-click-forward"}};
};
} // namespace waybar

View File

@ -25,8 +25,9 @@ class Clock : public ALabel {
std::locale locale_;
std::vector<const date::time_zone*> time_zones_;
int current_time_zone_idx_;
date::year_month_day cached_calendar_ymd_ = date::January / 1 / 0;
std::string cached_calendar_text_;
date::year_month_day calendar_cached_ymd_{date::January / 1 / 0};
date::months calendar_shift_{0}, calendar_shift_init_{0};
std::string calendar_cached_text_;
bool is_calendar_in_tooltip_;
bool is_timezoned_list_in_tooltip_;
@ -39,6 +40,5 @@ class Clock : public ALabel {
bool is_timezone_fixed();
auto timezones_text(std::chrono::system_clock::time_point* now) -> std::string;
};
} // namespace modules
} // namespace waybar