Re: [PATCH] git-gui: Fix selected text colors
- From
serg.partizan@gmail.com <serg.partizan@gmail.com>
- Date
- Nov 23, 2020, 20:50 UTC
- Message-ID
- <NKO9KQ.ECZZ8I6WPK063@gmail.com>
- In-Reply-To
- <b4571217-ea98-a282-48d3-e9679c600f4c@haller-berlin.de>
On Mon, Nov 23, 2020 at 20:03, Stefan Haller <stefan@haller-berlin.de> wrote:
Show 5 quoted lines
> The problem is that it needs to be recalculated when the > theme changes, and I have trouble testing that because the > <<ThemeChanged>> event doesn't appear to be sent on Mac, as far as I > can > see.
How are you testing this?
If I put `puts "InitTheme"` into InitTheme which is called on ThemeChanged, i can see it being called multiple times after git-gui starts, but when I change theme using "echo '*TkTheme: awdark' | xrdb -merge -", it is not called.
I suppose that signal is called only when theme is changed inside app. Yes, i just tested this, and that event is sent when you change theme from the app.
So you can safely put your code inside "color::sync_with_theme".
And We should move call to sync_with_theme from git-gui.sh into InitTheme. I don't know why I have not put it there before.