mirror of
https://github.com/MonitorControl/MonitorControl.git
synced 2026-05-15 14:15:55 -06:00
[GH-ISSUE #258] Redesign sliders to reflect Big Sur Control Center's brightness and volume sliders #200
Labels
No labels
Status: Abandoned
arm64
beta
beta
bug
done
duplicate
enhancement
feedback needed from reporter
in progress
invalid
investigating
known Issue
monitor Issue
pull-request
translation
unable to reproduce
unreleased
x86
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/MonitorControl#200
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @waydabber on GitHub (Jul 11, 2020).
Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/258
Originally assigned to: @waydabber on GitHub.
Big Sur has a new Control Center with a dedicated brightness slider which is always present even when the display does not support brightness control and cannot be removed.
The brightness control can also be added as a stand alone taskbar item:
If hooking up MonitorControl with this slider is not possible it'd be nice for MonitorControl to mimic the design of the standalone display control as close as allowed for a more organic, "integrated" feel.
@extric99 commented on GitHub (Aug 19, 2020):
@waydabber Does brightness control work for you on BigSur? On my Dell U2720Q only contrast slider is working while under Catalina both work fine..
@waydabber commented on GitHub (Aug 19, 2020):
@extric99 Yes, it is working. I am using an eGPU though, the issue might be adapter specific.
@kevinjohncutler commented on GitHub (Sep 23, 2020):
+1, this would be excellent. Also should implement the volume control slider at the same time!
@jtbandes commented on GitHub (Feb 22, 2021):
I found some private APIs that work for adjusting brightness on Big Sur — though I only tested for my M1 MacBook Air's built-in display. But maybe it will help for MonitorControl as well. I wrote more about it here: https://github.com/Hammerspoon/hammerspoon/issues/2668#issuecomment-782905780.
@gferreroferri commented on GitHub (Mar 15, 2021):
I vote for this!
@waydabber commented on GitHub (Aug 19, 2021):
Well since now I am a developer of monitorControl now, I'll addign this to myself. Would have to build a custom slider for that though so this will not happen any time soon. :)
@JoniVR commented on GitHub (Sep 7, 2021):
I can take a go at this when I get the time, I tried recreating it with SwiftUI a few days ago but SwiftUI doesn't seem very usable with build scripts or generally in the project. Shame though as it seems like an ideal use-case for this.
@waydabber commented on GitHub (Sep 7, 2021):
I was looking into it myself as well but was quickly discouraged lol. :)
@JoniVR commented on GitHub (Sep 7, 2021):
I was getting fairly close manipulating the default slider but I couldn't get it stable so seems like it'll probably be a custom AppKit component.
@waydabber commented on GitHub (Sep 15, 2021):
Part of redesigning the slider could be adding scroll wheel (magic mouse swipe) support to the slider:
https://github.com/MonitorControl/MonitorControl/discussions/592
It indeed works in Control Center but it is not a standard thing for NSSlider.
@waydabber commented on GitHub (Sep 19, 2021):
Scrolling/swiping now works on sliders - see https://github.com/MonitorControl/MonitorControl/issues/601.
@waydabber commented on GitHub (Sep 22, 2021):
This seems to be harder than I thought. I can customize NSSlider to look like we want but I can't get around the fact that during mouse tracking the slider wants to redraw only the part that is near the knob and the original slider bar area only (dirtyRect). This is problematic because we want the full background to redraw because of the filled white bar left of the knob. If one moves the mouse too fast, then artifacts happen and don't go away until mouse release when the entire control is redrawn.
@JoniVR commented on GitHub (Sep 22, 2021):
I had crossed the same problem using NSSlider customisation, I think an approach that might work is using SwiftUI without preview (basically just building like we do now) since preview doesn't work properly, or just building it fully custom in AppKit, though I think that's probably harder than SwiftUI.
@waydabber commented on GitHub (Sep 22, 2021):
I think we should just leave this as it is. I created a custom slider to fix the tick mark issue in dark mode and also to have the ability to show more than one display on a single slider in combined slider mode when keyboard and apple brightness syncing is not enabled (in this case multiple displays can have different brightnesses but there is one slider). It looks kinda funny but I like it:
Here is with the tick mark style:
When apple brightness syncing is active (ambient light sensor or touch bar is used), the various knobs can move in unison while keeping their distance which looks cool.
@waydabber commented on GitHub (Sep 23, 2021):
All right we should not abandon it. I was just angry at this thing yesterday. :)
@waydabber commented on GitHub (Sep 23, 2021):
Ok, it seems like I found an easy solution to the artifact problem. Why did I spend so much wasted time on this yesterday and did not find the solution is beyond me... :/
@waydabber commented on GitHub (Sep 23, 2021):
(the solution is that you can simply override the function that defines the bar rectangle and if you do that then dirtyRect will honor this apparently and will redraw everything as intended. It should have been obvious from the start but I somehow missed it.)
@waydabber commented on GitHub (Sep 23, 2021):
😎
I even replicated the shadow and the way the knob slowly fades away as it is getting closer to the icon.
@waydabber commented on GitHub (Sep 23, 2021):
The control can also display a range (if there are multiple displays combined into a single slider and syncing stuff is disabled). If there are more than 2 displays then small dots will signify each display's location on the slider.