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

Allow customizing scrollbar color and size for full screen mode #751

Open
PetarKirov opened this issue Mar 11, 2018 · 11 comments
Open

Allow customizing scrollbar color and size for full screen mode #751

PetarKirov opened this issue Mar 11, 2018 · 11 comments

Comments

@PetarKirov
Copy link

Also, on Windows 10, the window border and scrollbar do not take the AppsUseLightTheme DWORD in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize into account, so there is no way to visually match the selected theme in the Options/Looks menu.

For me personally, customizing the scrollbar size is not as high priority as customizing its color, though it would be nice if I could make it look like the one on recent versions of Gnome Terminal:
image

@mintty
Copy link
Owner

mintty commented Mar 11, 2018

Unfortunately, MS makes it really cumbersome to get such adaption accomplished. Rather than adjust GUI elements automatically to themes, they require programmers to do complex and unintuitive extra work to enable this kind of behaviour. If you provide some guidance how to achieve it at the Windows API, I'll gladly tweak that.

@mintty
Copy link
Owner

mintty commented Apr 28, 2018

As documented, the windows message WM_CTLCOLORSCROLLBAR should facilitate setting the scrollbar look by returning a "brush". However, mintty does not receive this message...

@BrianInglis
Copy link

FYI:
https://msdn.microsoft.com/en-us/library/windows/desktop/bb787573(v=vs.85).aspx
"The WM_CTLCOLORSCROLLBAR message is never sent between threads; it is only sent within the same thread."
and:
"The WM_CTLCOLORSCROLLBAR message is used only by child scroll bar controls.
Scrollbars attached to a window (WS_SCROLL and WS_VSCROLL) do not generate this message.
To customize the appearance of scrollbars attached to a window, use the flat scroll bar functions."

@mintty
Copy link
Owner

mintty commented Apr 29, 2018

Thanks, Brian, for reading that description more carefully than I did...
This makes me wonder once more why this Windows API is so incredibly insane.
So the task for someone feeling enthusiastic about this feature would be to find out what a "flat scroll bar" is and how to incorporate it in mintty.

@BrianInglis
Copy link

From other info I read, ignore the "flat" as those functions are no longer supported, just setup or modify the properties of your window scroll bars using the regular scroll bar functions.

@mintty
Copy link
Owner

mintty commented Apr 30, 2018

Which scroll bar functions? Right now, mintty only enables a scroll bar with the WS_VSCROLL "style" and listens to some scrollbar events ("messages").

@mintty
Copy link
Owner

mintty commented May 11, 2018

How is this actually related to full-screen mode (issue title)?

@BrianInglis
Copy link

Sorry I thought I had already replied to comment .-2 - see Windows Scroll Bar Functions at https://msdn.microsoft.com/en-us/library/windows/desktop/ff486021(v=vs.85).aspx
On the previous comment, from the original issue and screenshot, full screen mode seems irrelevant, unless applying the scrollbar properties to be consistent with the Windows theme has a more significant visual impact in full screen mode?

@mintty
Copy link
Owner

mintty commented May 11, 2018

OK, but those functions do not offer any way to customize the scrollbar appearance.

@BrianInglis
Copy link

So mintty would have to add support for either desktop themes, or DIY user-draw control?

@mintty
Copy link
Owner

mintty commented May 12, 2018

"Would" - if you consider it worth the effort.
It is insane that desktop applications need to actively "add support for desktop themes" in the first place, rather than getting them automatically applied to any window decoration that is set up with the basic Windows API functions. I am not motivated to investigate for a workaround for such serious Windows design errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants