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

Title bar background color and text color follow windows settings when not customized #2505

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

lededev
Copy link
Contributor

@lededev lededev commented Oct 28, 2024

When not check on this option
image
Run WinMerge without command line params, focus and no focus, enable tabs on title bar, title bar bgcolor will follow windows settings COLOR_ACTIVECAPTION and COLOR_INACTIVECAPTION, title text wll follow windows settings COLOR_CAPTIONTEXT and COLOR_INACTIVECAPTIONTEXT
f20241028T230641
WinMerge with tabs focus and no focus
f20241028T230830

@sdottaka
Copy link
Member

Thank you for your PR.

The background color of the title bar is a slightly bluish color of COLOR_3DFACE, and the text color is the color of COLOR_WINDOWTEXT, so I think you can customize the title bar color by changing these colors.

(However, COLOR_3DFACE is also used for the status bar, etc., so changing it will also affect the status bar, etc.)

However, since you submitted this PR, does that mean you want to change the title bar color separately from the status bar, etc.?

If so, you can generally set the title bar color to the accent color by turning on Show accent color on the title bars and window borders in Settings → Personalization → Colors, so it may be a good idea to load this setting and use the accent color in WinMerge as well.

@lededev
Copy link
Contributor Author

lededev commented Oct 29, 2024

Unless Checkbox "&Use custom system colors (Some UI elements may not apply)" is checked, the user-defined title and text color of this PR will take effect, otherwise it is still the original theme color, I think this is also the meaning of this option, user custom, let it be used to determine the title color, some users with weak colors have such a need.

@lededev
Copy link
Contributor Author

lededev commented Oct 29, 2024

I just set WinMerge's title color the same as my windows system settings as a demo. It's user custom, that means other user can set it to any other color, when the title bar got focus or lost focus.
image

@lededev
Copy link
Contributor Author

lededev commented Oct 29, 2024

However, since you submitted this PR, does that mean you want to change the title bar color separately from the status bar, etc.?

If so, you can generally set the title bar color to the accent color by turning on Show accent color on the title bars and window borders in Settings → Personalization → Colors, so it may be a good idea to load this setting and use the accent color in WinMerge as well.

When enable tabs on titlebar, the title bar is draw by app not the OS, without this PR, title color will not follow system COLOR_ACTIVECAPTION settings, it always COLOR_3DFACE, becasue it is hard-coded in COLORREF CMyTabCtrl::GetBackColor() const. If disable tabs on titlebar, windows OS can draw the title bar using system settings color.

@lededev
Copy link
Contributor Author

lededev commented Oct 29, 2024

Microsoft Edge's title bar follow windows settings, not using COLOR_3DFACE but COLOR_ACTIVECAPTION
image

@lededev lededev changed the title Title bar background color and text color can be customized Title bar background color and text color follow windows settings when not customized Oct 30, 2024
@lededev
Copy link
Contributor Author

lededev commented Oct 30, 2024

@sdottaka I reversed the rule, in the case of non-customization, the color is displayed by Windows settings, and the customization remains the same as before.

@lededev
Copy link
Contributor Author

lededev commented Oct 31, 2024

Since Tabs on title bar is a new feature, it's not perfect, and it breaks the habits of some old users, so much so that some users ask for it to be changed back to the original feature. My view is to try to improve it rather than go back. For large monitor users who are used to multi-instances rather than multi-tabs, quickly positioning to the currently active window from multiple windows is a basic need, not just making it look cool.

@lededev
Copy link
Contributor Author

lededev commented Nov 4, 2024

All using windows settings
image

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.

2 participants