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

Unusable interface with Macos and dark theme #48

Open
k4rl85 opened this issue Dec 21, 2020 · 6 comments
Open

Unusable interface with Macos and dark theme #48

k4rl85 opened this issue Dec 21, 2020 · 6 comments

Comments

@k4rl85
Copy link

k4rl85 commented Dec 21, 2020

After the release of macOS Big Sur i had to update git and git gui to the last release.
To be more precise git (2.29.2) and git gui (0.21.0.78.g38c2a)

Unfortunely this broke git gui with the dark mode of macos.

For what i understand now git gui retrieve the color for the interface directly from the OS theme but the result is this.

Screenshot 2020-12-21 at 12 13 37

Screenshot 2020-12-21 at 12 31 55

From this issue i have executed following command

git config --global gui.usettk 0

and it does help a bit with the background color of the input box

Screenshot 2020-12-21 at 12 14 03

Do you have some suggestion to how i can change the colors of the buttons?

It would be nice to allow to use the default theme (the white one) until this is fixed

@prati0100
Copy link
Owner

Thanks for reporting. I don't think it is easy to simply allow the default colors. I need to take a closer look at the issue and figure out why colors are so bad on MacOS. But the problem is that I don't have access to a Mac so I can't really test anything out.

In the meantime, you can either build an older version of git-gui on your system, or try changing the Tk theme on your system to see if using any other theme helps.

@prof7bit
Copy link

prof7bit commented Sep 7, 2021

This problem also affects Linux desktops, and it is becoming progressively worse as more an more incomplete and untested coloring experiments are introduced. Gitk (which is also using Tk) has been left alone and is still using the old light gray default theme. I remember a time when it all used to work. It was ugly but at least it worked and was consistent in itself.

A colleague of mine has a Manjaro KDE with dark theme and on his git-gui (probably one of the very recent, because this is a bleeding edge rolling release) the text box has readable text but the cursor is blinking with the same color as the background.

I still have an older version (0.21.0.53.g0d211) and colors are all from a light gray theme (although my KDE is also dark) but the menu bar of git gui is already dark while the rest of the UI is light, it is still usable.

gitk is fully light and has a light menu bar.

If you cannot properly implement the usage of theme colors then PLEASE don't commit half finished "fixes". I would rather have a fully light themed application on my dark themed desktop that is at least usable (I can always invert the colors on a per app basis in the compositor) than having an app that ls half light and half dark!

Please revert all these half finished theme experiments to the state they were before and leave it at the light gray Tk default theme and only commit a fix once it is complete and has been TESTED! Please!

--

attached is a screenshot of git-gui where I replicated the above problem with a fresh install of version 0.21.0.93.g7b0cfe1 on a fresh install of Kubuntu 21.04 (current release) with breeze-dark (built in standard theme). The blinking cursor is almost invisible.
git-gui-dark

@prof7bit
Copy link

prof7bit commented Sep 7, 2021

or try changing the Tk theme on your system to see if using any other theme helps.

Where is the system Tk theme (does such a thing even exist?) and how can it be changed? Google does not return any useful information about this stuff. Maybe these apps should be ported to something less ancient, something that was used at a time when the internet already existed so people left useful information about it online.

I would not complain so much if there were any alternatives to git-gui and gitk but there are NONE, not even remotely :-(

@prati0100
Copy link
Owner

This problem also affects Linux desktops, and it is becoming progressively worse as more an more incomplete and untested coloring experiments are introduced. Gitk (which is also using Tk) has been left alone and is still using the old light gray default theme. I remember a time when it all used to work. It was ugly but at least it worked and was consistent in itself.

Interesting. I don't see this on my setup. Dark theme looks good to me. Can you give me some more info on how you are setting the dark theme?

A colleague of mine has a Manjaro KDE with dark theme and on his git-gui (probably one of the very recent, because this is a bleeding edge rolling release) the text box has readable text but the cursor is blinking with the same color as the background.

I still have an older version (0.21.0.53.g0d211) and colors are all from a light gray theme (although my KDE is also dark) but the menu bar of git gui is already dark while the rest of the UI is light, it is still usable.

gitk is fully light and has a light menu bar.

Have you enabled the "Use themed widgets" option in gitk?

If you cannot properly implement the usage of theme colors then PLEASE don't commit half finished "fixes". I would rather have a fully light themed application on my dark themed desktop that is at least usable (I can always invert the colors on a per app basis in the compositor) than having an app that ls half light and half dark!

Please revert all these half finished theme experiments to the state they were before and leave it at the light gray Tk default theme and only commit a fix once it is complete and has been TESTED! Please!

The patches were posted on the mailing list, and I tested them along with the patch author. Things worked fine for us both. No one is intentionally introducing breaking changes just to mess with you. If you care enough about this software you apparently use every day, I suggest you help with its upkeep by testing patches to make sure they don't break anything. We are all volunteers here who are putting in unpaid work to improve the software we like. You are more than welcome to improve it with us. But please don't bring in this snarky tone demanding fixes when you yourself bring no value to the table.

Putting your tone aside, have you tried setting gui.usettk to 0? That should disable theming and should give you the default look you want.

Help me with fixing this issue. Either tell me how I can reproduce this problem or figure out a fix yourself. I can help you with that, and I am more than happy to review patches. You can start by looking at sync_with_theme in lib/themed.tcl. It pulls the theme colors from the system and sets them for the widgets. See if you can find out what is going wrong there.

Where is the system Tk theme (does such a thing even exist?) and how can it be changed? Google does not return any useful information about this stuff.

Unfortunately this is not very easy to do. See this. I have been thinking about adding a theme selector in the options menu but I just never got around to it.

Maybe these apps should be ported to something less ancient, something that was used at a time when the internet already existed so people left useful information about it online.

That would be nice. Patches welcome!

@prof7bit
Copy link

prof7bit commented Sep 7, 2021

Sorry if my tone was too aggressive, normally I am much more calm, I will try to keep it under control now.

The way I reprodued the problem with the invisible cursor was this:

  • Downloaded current Kubuntu 21.04 iso
  • installed this in VirtualBox
  • went into the appearance settings and set the color theme to breeze-dark (one of the bundled color schemes).
  • logged off and on again, just for good measure because there was a bug recently that GTK did not automatically pick up changed Qt colors unless restarted, but I don't know where Tk gets its colors from (from Qt or from GTK), but it had no effect anyways. The entire Desktop was dark, including GTK3 apps (GTK2 would need additional tweaking but I did not do this).
  • installed git, git-gui and gitk
  • initialized an empty repository
  • started git gui
  • took screensot

I have tried all combinations of gui.usettk and the theme toggle in gitkm none of them made the cursor visible.

gui.usettk = 0 will result in a relatively ugly widget style that has correct dark theme colors but still has black blinking cursor (default is 1):

grafik

gitk

gitk's use theme button only affects minor parts of the UI, if I disable it the draggable splitters between the panels become dark, otherwise not much change:
grafik

With this box checked (the default) it looks uniformly light:

grafik

@prati0100
Copy link
Owner

Thanks, this is good. Let me try to reproduce this.

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

No branches or pull requests

3 participants