Skip to content

Changes for titlebar #1015

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

Closed
wants to merge 1 commit into from
Closed

Conversation

lkebin
Copy link

@lkebin lkebin commented Mar 4, 2020

  • When MMTitlebarAppearsTransparent is enabled, using window appearance (NSAppearanceNameDarkAqua, 10.10 and higher version is required) to avoid title bar font color fusion with background.
  • Add MMTitlebarDisableDocumentIconKey to disable file icon from titlebar

image

- When MMTitlebarAppearsTransparent is enabled, using window appearance (NSAppearanceNameDarkAqua, 10.10 and higher version is required) to avoid title bar font color fusion with background.
- Add MMTitlebarDisableDocumentIconKey to disable file icon from titlebar
@eirnym
Copy link
Contributor

eirnym commented Mar 4, 2020

What issue does this PR solves? My guess is you have black font in titlebar which looks out-of-place.

I have following window with transparent tittle bar. I'm happy with font color and icon. I use the icon often to drag files into between applications.

MacVim build 162 from Github, macOS 10.15.4

Zrzut ekranu 2020-03-4 o 20 50 09

@lkebin
Copy link
Author

lkebin commented Mar 4, 2020

I guess you are using system dark mode. Could you switch system appearance to light mode ?

@ychin
Copy link
Member

ychin commented Mar 5, 2020

Auto-picking dark aqua color scheme: I don't think this is a good idea. What if someone has a colorscheme with a light background (e.g. delek)? Now the title text will be all white and blown out for them. This also overrides the system default of picking aqua (for light mode) vs dark aqua (for dark mode). Setting this appearance also affects things like how scrollbars look.

One option is to auto-pick light/dark theme based on the background setting (which corresponds to which colorscheme you have). I think that setting would have value beyond just transparent titlebar, however, and probably should be its own toggle. In particular, I would imagine we would want 4 possible values for that setting: 1 – default / obey OS scheme, 2 – force light mode / aqua, 3 – force dark mode / dark aqua, 4 – auto-detect based on colorscheme's background. I think this would work but would require a little bit more work to implement.

MMTitlebarDisableDocumentIconKey: I'm ok with this part, but we should probably add a line to the documentation (runtime/doc/gui_mac.txt) under the macvim-user-defaults part.

@ychin ychin added the UI Issues related to UI elements, tabs, scrollbars, window resizing, etc. label Mar 5, 2020
@lkebin
Copy link
Author

lkebin commented Mar 6, 2020

Auto-picking dark aqua color scheme: I don't think this is a good idea. What if someone has a colorscheme with a light background (e.g. delek)? Now the title text will be all white and blown out for them. This also overrides the system default of picking aqua (for light mode) vs dark aqua (for dark mode). Setting this appearance also affects things like how scrollbars look.

I missed that problem 🤦‍♂️

@lkebin lkebin closed this Mar 6, 2020
@ychin
Copy link
Member

ychin commented Mar 9, 2020

If you want this feature I may add something like what I mentioned above with the four options. I may take your MMTitlebarDisableDocumentIconKey to go along with it.

@lkebin
Copy link
Author

lkebin commented Mar 9, 2020

If you want this feature I may add something like what I mentioned above with the four options. I may take your MMTitlebarDisableDocumentIconKey to go along with it.

That will be great. I'm not familiar for macOS app develop. Thank you !

ychin pushed a commit to ychin/macvim that referenced this pull request Apr 11, 2020
- Preference panel. Auto-refresh after setting option. New appearance
  page.
- Background callback

Original from (macvim-dev#1015):

Changes for titlebar

- When MMTitlebarAppearsTransparent is enabled, using window appearance (NSAppearanceNameDarkAqua, 10.10 and higher version is required) to avoid title bar font color fusion with background.
- Add MMTitlebarDisableDocumentIconKey to disable file icon from titlebar
ychin added a commit to ychin/macvim that referenced this pull request Apr 13, 2020
Add new preference that allows specifying how MacVim will use dark mode:
use systems preference (default), force light mode, force dark mode, or
use Vim's 'background' option to decide. Preference will be stored in
defaults as 'MMAppearanceModeSelection'. Add docs for that as well.

Also, add a new preferences panel called "Appearance" to allow setting
the dark mode setting, and transparent titlebar as well. Setting it will
refresh all Vim windows immediately for feedback.

Also, when setting titlebars to transparent, also hide the file icon as
it's distracting in what's a more minimalistic display. Don't use
another preference for that for now to avoid having too many options.

Minor: Remove preference panel's cross-fade effect as it's more
distracting than useful.

Fix macvim-dev#912

Also:
- See macvim-dev#1015 for part of the contribution.
- Close macvim-dev#266
- Close macvim-dev#933
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI Issues related to UI elements, tabs, scrollbars, window resizing, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants