Hello,
I am new to the concept of mailing lists so please bear with me.
I'm a JS developer. I love Git GUI for its minimalism in both size and
layout. I have been using Git and Git GUI on Windows for a long time.
I think the only thing missing from the "Official" Git GUI is dark
mode.
I use dark mode on almost all places. Firefox, Discord, GitHub,
Outlook, Notepad++, VS Code and even Reddit too. The only place that
is missing dark mode in my workflow is Git GUI.
Is there any way I can make Git GUI dark mode ?
I don't know a lot of Tcl/Tk but I am currently trying to learn it. I
did a few edits and made the About page in dark mode.
You can look at it here:
https://user-images.githubusercontent.com/76554862/134190271-d861407a-31be-436d-aac4-9ea3d72f0fb0.png
.
I have found two threads in the mailing list but those are just dead
ends for me. Hence I reached this mailing list.
Hello,
I am new to the concept of mailing lists so please bear with me.
I'm a JS developer. I love Git GUI for its minimalism in both size and
layout. I have been using Git and Git GUI on Windows for a long time.
I think the only thing missing from the "Official" Git GUI is dark
mode.
I use dark mode on almost all places. Firefox, Discord, GitHub,
Outlook, Notepad++, VS Code and even Reddit too. The only place that
is missing dark mode in my workflow is Git GUI.
Is there any way I can make Git GUI dark mode ?
I don't know a lot of Tcl/Tk but I am currently trying to learn it. I
did a few edits and made the About page in dark mode.
You can look at it here:
https://user-images.githubusercontent.com/76554862/134190271-d861407a-31be-436d-aac4-9ea3d72f0fb0.png
.
I have found two threads in the mailing list but those are just dead
ends for me. Hence I reached this mailing list.
I would rather like to see yourself posted PR to the dedicated subsytem
at [1].
I think you want to implement tri-state `Dark mode` option. When it is
set to `Yes`, always use dark theme regardless of system settings; when
it is `No` the opposite; and `Auto` use dark theme when it is enabled in
system settings, normal the opposite.
[1]: https://github.com/prati0100/git-gui.git
--
An old man doll... just what I always wanted! - Clara
On Mon, Sep 27, 2021 at 12:02 PM Bagas Sanjaya [off-list ref] wrote:
On 26/09/21 22.09, Sashank Bandi wrote:
quoted
Hello,
I am new to the concept of mailing lists so please bear with me.
I'm a JS developer. I love Git GUI for its minimalism in both size and
layout. I have been using Git and Git GUI on Windows for a long time.
I think the only thing missing from the "Official" Git GUI is dark
mode.
I use dark mode on almost all places. Firefox, Discord, GitHub,
Outlook, Notepad++, VS Code and even Reddit too. The only place that
is missing dark mode in my workflow is Git GUI.
Is there any way I can make Git GUI dark mode ?
I don't know a lot of Tcl/Tk but I am currently trying to learn it. I
did a few edits and made the About page in dark mode.
You can look at it here:
https://user-images.githubusercontent.com/76554862/134190271-d861407a-31be-436d-aac4-9ea3d72f0fb0.png
.
I have found two threads in the mailing list but those are just dead
ends for me. Hence I reached this mailing list.
I would rather like to see yourself posted PR to the dedicated subsytem
at [1].
Nice to hear that you like my design.
I think this confirms my suspicion that there is no "Official" Git GUI Dark
Mode on Windows 10.
I think you want to implement tri-state `Dark mode` option. When it is
set to `Yes`, always use dark theme regardless of system settings; when
it is `No` the opposite; and `Auto` use dark theme when it is enabled in
system settings, normal the opposite.
Our interests conflict here.
I think we should rather provide 3 different options here.
1. System Default
2. Light Mode
3. Dark Mode
I find these options easy rather than the "Yes" or "No" options.
I'm currently planning to convert this into a C++ program as there is no
way from the Tcl itself to change the color and background color of the title
bar or menu of the Git GUI window.
I also CCed Pratyush Yadav as he is the official maintainer of the project.
I'm currently planning to convert this into a C++ program as there is no
way from the Tcl itself to change the color and background color of the title
bar or menu of the Git GUI window.
I also CCed Pratyush Yadav as he is the official maintainer of the project.
Regarding GUI toolkit, you should pick the replacement carefully -
tooling used in Git for Windows will need to be adapted in order to
compile your chosen toolkit (whether it is Qt, GTK, or wxWidgets) for
Windows.
CC also Johannes Schindelin for comments.
--
An old man doll... just what I always wanted! - Clara
I forgot to mention that we also have an alternative.
We can completely ditch C++ idea here and instead remove the native
title bar or border that the Window Manager gives and instead draw our
own title bar in Tcl/Tk. But that means rewriting the menu system.
So, I'm waiting for the decision of Pratyush Yadav here.
Regarding GUI toolkit, you should pick the replacement carefully -
tooling used in Git for Windows will need to be adapted in order to
compile your chosen toolkit (whether it is Qt, GTK, or wxWidgets) for
Windows.
No, I'm not choosing a toolkit. Whatever I will do, it will be in
native C++ without any other toolkit. It might be a little hard, but
it is better than including another whole library in here. Lightweight
is a reason I chose Git GUI and I will make sure that my contribution
does not make that go.
CC also Johannes Schindelin for comments.
--
An old man doll... just what I always wanted! - Clara
From: David Aguilar <hidden> Date: 2021-09-27 18:09:04
On Mon, Sep 27, 2021 at 3:41 AM Bagas Sanjaya [off-list ref] wrote:
On 27/09/21 17.19, Sashank Bandi wrote:
quoted
I'm currently planning to convert this into a C++ program as there is no
way from the Tcl itself to change the color and background color of the title
bar or menu of the Git GUI window.
I also CCed Pratyush Yadav as he is the official maintainer of the project.
Regarding GUI toolkit, you should pick the replacement carefully -
tooling used in Git for Windows will need to be adapted in order to
compile your chosen toolkit (whether it is Qt, GTK, or wxWidgets) for
Windows.
Have you tried git cola? [1]
It uses Qt. It's cross-platform and written in Python.
Git GUI is useful because it's built in, but from a usability
perspective cola has many advantages.
It has a dark mode that works more or less how you described:
- system default
- user-specified theme (dark/light with a few color variations)
.. and beyond these rather small differences, git cola even has image
diffs[2]. That alone is a killer feature.
[1] https://github.com/git-cola/git-cola/
[2] http://git-cola.github.io/screenshots.html
--
David
On Mon, Sep 27, 2021 at 11:39 PM David Aguilar [off-list ref] wrote:
Have you tried git cola? [1]
Yes, I did try it.
Git GUI is useful because it's built in, but from a usability
perspective cola has many advantages.
But it is just too much for my very light usage. I want something
light and embedded in Git for Windows itself.
.. and beyond these rather small differences, git cola even has image
diffs[2]. That alone is a killer feature.
It is a really great feature. But it isn't useful for me in my projects.
I have looked at tortoise Git, Git Cola, lazygit and some others too
but Git GUI seems perfect for my usage, except dark mode.
Hey!
Is there any way to reach Pratyush Yadav ?
This thread has been stale for days.
On Tue, Sep 28, 2021 at 8:51 AM Sashank Bandi [off-list ref] wrote:
On Mon, Sep 27, 2021 at 11:39 PM David Aguilar [off-list ref] wrote:
quoted
Have you tried git cola? [1]
Yes, I did try it.
quoted
Git GUI is useful because it's built in, but from a usability
perspective cola has many advantages.
But it is just too much for my very light usage. I want something
light and embedded in Git for Windows itself.
quoted
.. and beyond these rather small differences, git cola even has image
diffs[2]. That alone is a killer feature.
It is a really great feature. But it isn't useful for me in my projects.
I have looked at tortoise Git, Git Cola, lazygit and some others too
but Git GUI seems perfect for my usage, except dark mode.
Hi Sashank,
On 03/10/21 08:03PM, Sashank Bandi wrote:
Hey!
Is there any way to reach Pratyush Yadav ?
This thread has been stale for days.
Sorry, I couldn't find time to catch up on this because its been busy at
$DAYJOB.
Anyway, git-gui does have some basic dark mode support, though I have
seen reports that it does not work very well. You can change the Tk
theme and it should enable dark mode on git-gui as well. See [0] for
some more info. I am not very familiar with how Tk theming would work on
Windows.
I think it would be nice if we can have a theme picker in the options
menu though, so that is something you might want to look into.
[0] https://lore.kernel.org/all/20201008082004.5643-1-serg.partizan@gmail.com/
On Tue, Sep 28, 2021 at 8:51 AM Sashank Bandi [off-list ref] wrote:
quoted
On Mon, Sep 27, 2021 at 11:39 PM David Aguilar [off-list ref] wrote:
quoted
Have you tried git cola? [1]
Yes, I did try it.
quoted
Git GUI is useful because it's built in, but from a usability
perspective cola has many advantages.
But it is just too much for my very light usage. I want something
light and embedded in Git for Windows itself.
quoted
.. and beyond these rather small differences, git cola even has image
diffs[2]. That alone is a killer feature.
It is a really great feature. But it isn't useful for me in my projects.
I have looked at tortoise Git, Git Cola, lazygit and some others too
but Git GUI seems perfect for my usage, except dark mode.
On Mon, Oct 4, 2021 at 1:26 PM Pratyush Yadav [off-list ref] wrote:
Sorry, I couldn't find time to catch up on this because its been busy at
$DAYJOB.
Well, I hope you got a little time for this thread.
Anyway, git-gui does have some basic dark mode support, though I have
seen reports that it does not work very well. You can change the Tk
theme and it should enable dark mode on git-gui as well. See [0] for
some more info. I am not very familiar with how Tk theming would work on
Windows.
I am not even familiar with Tcl/Tk language itself. But from what I
have found, the Tk uses "vista" theme which is Windows-only default
theme.
I think it would be nice if we can have a theme picker in the options
menu though, so that is something you might want to look into.
Yes, I thought of adding a menu between "Tools" and "Help". It will
contain 3 options(system, light, dark) as I said before.
On Mon, Oct 4, 2021 at 1:26 PM Pratyush Yadav [off-list ref] wrote:
quoted
Sorry, I couldn't find time to catch up on this because its been busy at
$DAYJOB.
Well, I hope you got a little time for this thread.
quoted
Anyway, git-gui does have some basic dark mode support, though I have
seen reports that it does not work very well. You can change the Tk
theme and it should enable dark mode on git-gui as well. See [0] for
some more info. I am not very familiar with how Tk theming would work on
Windows.
I am not even familiar with Tcl/Tk language itself. But from what I
have found, the Tk uses "vista" theme which is Windows-only default
theme.
Does the Windows installation come with any other themes? You can use
`ttk::style theme names` to list all available themes.
quoted
I think it would be nice if we can have a theme picker in the options
menu though, so that is something you might want to look into.
Yes, I thought of adding a menu between "Tools" and "Help". It will
contain 3 options(system, light, dark) as I said before.
I think it would be better to put it in the "options" dialog.
Well, this works only for Linux as Windows doesn't use X Server. But
we can use `ttk::style theme use` for it all over the application.
Right.
My plan is to use a new theme, that is based on default, but can
imitate the look of [0].
I don't mind carrying themes in the git-gui repo since Tk theming
support is not very well documented or standardized. But please do be
careful of licence compatibility when porting code.
Does the Windows installation come with any other themes? You can use
`ttk::style theme names` to list all available themes.
It contains all these themes in Windows 10 x64.
"winnative clam alt default classic vista xpnative"
Based of [0] (the best source I could find),
"winnative", "vista", "xpnative" are Windows-only but built-in themes and
"clam", "alt", "default", "classic" are built-in themes for all OSes.
And this is part of the reason I am considering "default" to be the
base of the new theme that I want to create instead of "vista".
quoted
quoted
I think it would be nice if we can have a theme picker in the options
menu though, so that is something you might want to look into.
Yes, I thought of adding a menu between "Tools" and "Help". It will
contain 3 options(system, light, dark) as I said before.
I think it would be better to put it in the "options" dialog.
Ok.
I don't mind carrying themes in the git-gui repo since Tk theming
support is not very well documented or standardized. But please do be
careful of licence compatibility when porting code.
No, I want to imitate the look. And I don't actually know much about
the license or legal side of the software so I try to avoid it at all
costs and start from scratch.
Kinda like "Linux is Unix-like, but it doesn't contain Unix's code" -
The great Linus Torvalds.
The "equilux" theme is GPLv3, but I didn't find a license file in the
repo. In the "Help > About" part of Git GUI, you mentioned it being
GPL(I think v1). Please include it in the repo too.
[0]: https://wiki.tcl-lang.org/page/List+of+ttk+Themes
Does the Windows installation come with any other themes? You can use
`ttk::style theme names` to list all available themes.
It contains all these themes in Windows 10 x64.
"winnative clam alt default classic vista xpnative"
Based of [0] (the best source I could find),
"winnative", "vista", "xpnative" are Windows-only but built-in themes and
"clam", "alt", "default", "classic" are built-in themes for all OSes.
And this is part of the reason I am considering "default" to be the
base of the new theme that I want to create instead of "vista".
You are of course free to design your own theme, but I would suggest you
try all these themes already available first and see if any of them fit
your needs.
quoted
quoted
quoted
I think it would be nice if we can have a theme picker in the options
menu though, so that is something you might want to look into.
Yes, I thought of adding a menu between "Tools" and "Help". It will
contain 3 options(system, light, dark) as I said before.
I think it would be better to put it in the "options" dialog.
Ok.
quoted
I don't mind carrying themes in the git-gui repo since Tk theming
support is not very well documented or standardized. But please do be
careful of licence compatibility when porting code.
No, I want to imitate the look. And I don't actually know much about
the license or legal side of the software so I try to avoid it at all
costs and start from scratch.
Kinda like "Linux is Unix-like, but it doesn't contain Unix's code" -
The great Linus Torvalds.
Well, I am not expert on software licenses either. Though using a quick
Google search for license compatibility generally does the trick for me.
The "equilux" theme is GPLv3, but I didn't find a license file in the
repo. In the "Help > About" part of Git GUI, you mentioned it being
GPL(I think v1). Please include it in the repo too.
git-gui is GPL v2 or later. So I would assume it is compatible with GPL
v3 but I am not entirely sure.
Anyway, I came up with a quick proof of concept for a theme selector. It
has many limitations and is not fit to apply just yet, but it should
help you get started.
-- 8< --
Subject: [PATCH] git-gui: Add a very crude theme selector
Tk themeing is not very well documented and is not easy to get right.
Ideally one would want to set the theme for a toolkit in one standard,
but it is hard to find that standard config for Tk and even harder to
get it to work consistently.
Add a theme selection menu to make the lives of the user easier. Those
who would wish to use the Tk provided theme should be able to do so.
This is a very crude patch and it does not really ensure that. This is
more of a proof of concept.
Signed-off-by: Pratyush Yadav <redacted>
---
git-gui.sh | 4 ++++
lib/option.tcl | 1 +
2 files changed, 5 insertions(+)
@@ -895,6 +898,7 @@ set default_config(gui.fontdiff) [font configure font_diff]# TODO: this option should be added to the git-config documentationsetdefault_config(gui.maxfilesdisplayed)5000setdefault_config(gui.usettk)1+setdefault_config(gui.theme)"default"setdefault_config(gui.warndetachedcommit)1setdefault_config(gui.tabsize)8setfont_descs{
You are of course free to design your own theme, but I would suggest you
try all these themes already available first and see if any of them fit
your needs.
I have tried all of these themes. "default" seems like it will fit. I
have some color changes and a preview linked at the bottom. If you
agree with that, I will work on other pages/sections too.
quoted hunk
Anyway, I came up with a quick proof of concept for a theme selector. It
has many limitations and is not fit to apply just yet, but it should
help you get started.
-- 8< --
Subject: [PATCH] git-gui: Add a very crude theme selector
Tk themeing is not very well documented and is not easy to get right.
Ideally one would want to set the theme for a toolkit in one standard,
but it is hard to find that standard config for Tk and even harder to
get it to work consistently.
Add a theme selection menu to make the lives of the user easier. Those
who would wish to use the Tk provided theme should be able to do so.
This is a very crude patch and it does not really ensure that. This is
more of a proof of concept.
Signed-off-by: Pratyush Yadav <redacted>
---
git-gui.sh | 4 ++++
lib/option.tcl | 1 +
2 files changed, 5 insertions(+)
@@ -895,6 +898,7 @@ set default_config(gui.fontdiff) [font configure font_diff]# TODO: this option should be added to the git-config documentationsetdefault_config(gui.maxfilesdisplayed)5000setdefault_config(gui.usettk)1+setdefault_config(gui.theme)"default"setdefault_config(gui.warndetachedcommit)1setdefault_config(gui.tabsize)8setfont_descs{
@@ -160,6 +160,7 @@ proc do_options {} {{cgui.encoding{mc"Default File Contents Encoding"}}{bgui.warndetachedcommit{mc"Warn before committing to a detached head"}}{sgui.stageuntracked{mc"Staging of untracked files"}{list"yes""no""ask"}}+{sgui.theme{mc"GUI theme"}{ttk::stylethemenames}}{bgui.displayuntracked{mc"Show untracked files"}}{i-1..99gui.tabsize{mc"Tab spacing"}}}{--
Thank you. This helps me find the location of the options. I will
further improve this.
Here is the preview I said: https://pasteboard.co/rwUBvWbX6m66.png .
The checkbox needs some tinkering.
Looking forward to any suggestions.