Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clock on-scroll value not being used for calendar #3067

Merged
merged 1 commit into from
Mar 24, 2024

Conversation

encbar5
Copy link
Contributor

@encbar5 encbar5 commented Mar 23, 2024

The functionality of being able to invert the month scrolling in the calendar by setting "on-scroll" to -1 appears to have been broken in 86a3898.

This restores the ability to set the number of months that the scroll wheel scrolls, including negative numbers, as documented in the wiki https://github.com/Alexays/Waybar/wiki/Module:-Clock

@@ -41,6 +41,7 @@ class Clock final : public ALabel {
const int cldMonColLen_{20}; // calendar month column length
WS cldWPos_{WS::HIDDEN}; // calendar week side to print
months cldCurrShift_{0}; // calendar months shift
int cldShift_{0}; // calendar months shift factor
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be set to 1 by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look at the commit I listed, the code used to initialize this to 0, so I guess I just copied that.
The Wiki does say the default is 1, and that makes sense, so I can update that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I don't think this matters much, because given the structure of the code right now, this functionality isn't enabled unless the user explicitly puts a value into their config file. So really this "default" is never used.

@encbar5 encbar5 force-pushed the restore_intertible_month_scroll branch from 09c0960 to abd7ca2 Compare March 24, 2024 15:37
@Alexays
Copy link
Owner

Alexays commented Mar 24, 2024

LGTM, thx

@Alexays Alexays merged commit c6cbf57 into Alexays:master Mar 24, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants