-
-
Notifications
You must be signed in to change notification settings - Fork 457
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
DisplayOptions: "Inc"/"Dec" operations in the function bar #1610
Conversation
I don't quite like the extra cleanup code needed for this version. Cf. #772 for a different approach to this. |
Ah, I didn't see there was already a PR for this. Feel free to discard this one. (You still might want to take note of b2e86aa.) It honestly took me a few seconds until I remembered that the "-" key decremented the value (at first I tried pressing space multiple times assuming the value would wraparound or something). Since the original point of the function bar at the bottom was to make the UI naturally discoverable, I thought that the operations applicable to the selected item should appear there, like it happens in the Meters screen. If that's already being taken care of, all the better! Cheers! |
Happens. I had to look it up too.
I already cherry-picked that commit onto main.
Yes. And for some other screens the keys already were noted so this is somewhat for consistency.
All mentioned PRs are somewhat incomplete for various details. In #745 there was some memory leak which I tried to fix with #772, but that PR hit a NULL deref on the way. What bugs me with this PR is the global state introduced by the ctor logic; I'd somewhat prefer if the function bar had a somewhat more specific lifetime than "well, when the program closes". |
I copied this straight from the MetersPanel.c logic, as you can imagine! :) I don't remember why that one is static (because it is shared by multiple panels, perhaps?). I guess for DisplayOptions the FunctionBar could be just owned by the Panel itself. Yeah, I like that, it's way less code. |
cherry on top: as per @Explorer09's suggestion in #745 I flipped the button order. Also makes it consistent with "- Nice" and "+ Nice" in the main function bar! |
ffff5d2
to
4c6011c
Compare
For numeric entries in Display Options, this gives users a hint of which keys operate on the value, and allows the value to be decreasable/increasable using the mouse as well.
4c6011c
to
3b7aa07
Compare
Thanks, folks! <3 |
For numeric entries in Display Options, this gives users a hint of which keys operate on the value, and allows the value to be increasable/decreasable using the mouse as well.