mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Merge pull request #1841 from encbar5/inverted-date-scroll
This commit is contained in:
commit
da3d9533d1
@ -136,7 +136,7 @@ bool waybar::modules::Clock::handleScroll(GdkEventScroll* e) {
|
|||||||
auto dir = AModule::getScrollDir(e);
|
auto dir = AModule::getScrollDir(e);
|
||||||
|
|
||||||
// Shift calendar date
|
// Shift calendar date
|
||||||
if (calendar_shift_init_.count() > 0) {
|
if (calendar_shift_init_.count() != 0) {
|
||||||
if (dir == SCROLL_DIR::UP)
|
if (dir == SCROLL_DIR::UP)
|
||||||
calendar_shift_ += calendar_shift_init_;
|
calendar_shift_ += calendar_shift_init_;
|
||||||
else
|
else
|
||||||
@ -170,7 +170,7 @@ auto waybar::modules::Clock::calendar_text(const waybar_time& wtime) -> std::str
|
|||||||
|
|
||||||
if (calendar_cached_ymd_ == ymd) return calendar_cached_text_;
|
if (calendar_cached_ymd_ == ymd) return calendar_cached_text_;
|
||||||
|
|
||||||
const auto curr_day{(calendar_shift_init_.count() > 0 && calendar_shift_.count() != 0)
|
const auto curr_day{(calendar_shift_init_.count() != 0 && calendar_shift_.count() != 0)
|
||||||
? date::day{0}
|
? date::day{0}
|
||||||
: ymd.day()};
|
: ymd.day()};
|
||||||
const date::year_month ym{ymd.year(), ymd.month()};
|
const date::year_month ym{ymd.year(), ymd.month()};
|
||||||
|
Loading…
Reference in New Issue
Block a user