{"thread":{"id":"57073","subject":"Re: [INFO] Does Git GUI support Dark Mode on Windows 10 ?","startedAt":"2021-12-13T08:03:35Z","lastAt":"2022-01-17T14:40:36Z","messageCount":4,"participants":["Birger Skogeng Pedersen","Sashank Bandi"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"443962","messageId":"CAGr--=JiCv3XTrxP=foy+FrxbiYeMf=11eG_6kGBFmBr+P-=Jw@mail.gmail.com","threadId":"57073","inReplyTo":null,"subject":"Re: [INFO] Does Git GUI support Dark Mode on Windows 10 ?","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2021-12-13T08:03:27Z","receivedAt":"2021-12-13T08:03:35Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"Hi,\n\n\nFirst of all just a BIG +1 to this issue. I'm on windows and opening\ngit-gui sometimes literally hurts my eyes. I even noticed I've started\nsquinting a little before opening it, then I move it to my side\nmonitor and open my IDE (which ofc is dark theme) on my main.\n\n> Here is the preview I said: https://pasteboard.co/rwUBvWbX6m66.png .\n> The checkbox needs some tinkering.\n> Looking forward to any suggestions.\n\nI would really appreciate it if you could help me make my git-gui look\nlike this. What do I need to do, exactly?\n\n\nBest regards,\nBirger\n"},{"id":"444626","messageId":"CABkJDHF6gS+j6LmT0hr2Z23izb0uBj7cs+XU_14O8wB8yTEpZw@mail.gmail.com","threadId":"57073","inReplyTo":"CAGr--=JiCv3XTrxP=foy+FrxbiYeMf=11eG_6kGBFmBr+P-=Jw@mail.gmail.com","subject":"Re: [INFO] Does Git GUI support Dark Mode on Windows 10 ?","fromName":"Sashank Bandi","fromEmail":"bandi.rao999@gmail.com","sentAt":"2021-12-21T16:14:39Z","receivedAt":"2021-12-21T16:14:45Z","isPatch":false,"sender":{"key":"bandi.rao999@gmail.com","avatar":null},"body":"> > Here is the preview I said: https://pasteboard.co/rwUBvWbX6m66.png .\n> > The checkbox needs some tinkering.\n> > Looking forward to any suggestions.\n>\n> I would really appreciate it if you could help me make my git-gui look\n> like this. What do I need to do, exactly?\n\nIt's really good to know that there are people interested in this.\nBut I am sorry to say that my work on it is temporarily stopped as I\ncannot figure out a way to make the top caption bar of a window black\non Windows.\nI am trying workarounds in C++ by disabling DWM, but they don't seem to work.\nThere is a hidden unpublished API in Windows 10 and 11. But I would\nlike to instead make it work for all OSes starting from Windows 7 at\nleast.\n\nBut, I have the code that will make the screenshot possible.\nSimply put:\n1. Press Win + R\n2. Enter \"git-gui.exe --trace\" and press Enter\n3. Paste the following code(indented for clarity) in the console\nwindow(a white window with red and black text) that appears.\n    ttk::style theme use default\n    ttk::style configure TFrame -background #333\n    ttk::style configure TLabelframe -background #333\n    ttk::style configure TLabelframe.Label -background #333 -foreground #fff\n    ttk::style configure TPanedwindow  -background #333\n    ttk::style configure EntryFrame -background #333\n    ttk::style configure TScrollbar -background #666 -troughcolor #444\n-arrowcolor #fff -arrowsize 15\n    ttk::style map TScrollbar -background \\\n        [list active #333 disabled #000]\n    ttk::style configure TLabel -background #333 -foreground #fff\n    ttk::style configure TButton -background #333 -foreground #fff\n-borderwidth 2 -bordercolor #fff\n    ttk::style map TButton -background \\\n        [list active #555 disabled #111 readonly #000]\n    ttk::style configure TCheckbutton -background #333 -foreground\n#fff -indicatorbackground #666 -indicatorcolor #fff\n    ttk::style map TCheckbutton -background \\\n        [list active #555 disabled #111 readonly #000]\n    ttk::style configure TEntry -fieldbackground #333 -background #333\n-foreground #fff -insertcolor #fff\n    ttk::style configure TRadiobutton -background #333 -foreground #fff\n    ttk::style map TRadiobutton -background \\\n        [list active #555 disabled #111 readonly #000]\n    option add *TCombobox*Listbox.background #333 interactive\n    option add *TCombobox*Listbox.foreground #fff interactive\n    option add *TCombobox*Listbox.selectBackground blue interactive\n    option add *TCombobox*Listbox.selectForeground #fff interactive\n    option add *Listbox.Background #333 interactive\n    option add *Listbox.Foreground #fff interactive\n    option add *Text.Background #333 interactive\n    option add *Text.Foreground #fff interactive\n    ttk::style configure TSpinbox -fieldbackground #333 -background\n#333 -foreground #fff -insertcolor #fff -arrowcolor #fff\n    .vpane.lower.commarea.buffer.frame.t configure -background #0d1117\n-foreground #fff -insertbackground #fff\n    .vpane.lower.diff.body.t configure -background #0d1117 -foreground #fff\n    .vpane.files.workdir.list configure -background #0d1117 -foreground #fff\n    .vpane.files.index.list configure -background #0d1117 -foreground #fff\n    .about_dialog.git_logo configure -background #333\n4. Enjoy Git GUI.\n\nIf you get \"git-gui.exe: command not found\", it implies that the exe\nfor Git GUI isn't installed in your path. Then you should manually\nfind the path to the exe(mostly will be in \"C:\\Program Files\\Git\\cmd\")\nand execute it in Win + R prompt as \"C:\\Program\nFiles\\Git\\cmd\\git-gui.exe --trace\" and then press Enter. Then enter\nthe code.\n\nThe code I provided also changes some of the Tcl/Tk core defaults for\nmaximum dark mode effect. So, it isn't possible to revert to light\nmode on the run. Closing and reopening all the Git GUI windows will\nrevert it back.\nI did not test a location for the persistence of dark mode, I will dig\ndeeper into the TCL soon.\nYou should execute the code at the start of the Git GUI for it to work\nperfectly.\n\nPreview for\n\"Create Branch\": [0]\n\"Checkout Branch\": [1]\n\"Options\": [2]\n\n[0]: https://pasteboard.co/PVXqzigC1Hvs.png\n[1]: https://pasteboard.co/MRjlQ23ldVKO.png\n[2]: https://pasteboard.co/HalaJ8Rw1BDU.png\n"},{"id":"446358","messageId":"CAGr--=+_MvsbGYMzufhSDTpc1YMvfbOSDTArMbuGZ1rnxy2otg@mail.gmail.com","threadId":"57073","inReplyTo":"CABkJDHF6gS+j6LmT0hr2Z23izb0uBj7cs+XU_14O8wB8yTEpZw@mail.gmail.com","subject":"Re: [INFO] Does Git GUI support Dark Mode on Windows 10 ?","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2022-01-17T14:33:46Z","receivedAt":"2022-01-17T14:33:58Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"Thanks a lot for trying to help me, Sashank. There seems to be an\nissue with the code. I had to take a little guess at where the actual\nline breaks should be, maybe I messed up?\n\nI pasted the code here: https://github.com/prati0100/git-gui/issues/64\n\nCan you take a look?\n\nBest regards,\nBirger\n"},{"id":"446359","messageId":"CAGr--=LVPcJfdKQ-fP-e0EXwyJ=m37Xkcn139G8J_fWNkFi-Tg@mail.gmail.com","threadId":"57073","inReplyTo":"CAGr--=+_MvsbGYMzufhSDTpc1YMvfbOSDTArMbuGZ1rnxy2otg@mail.gmail.com","subject":"Re: [INFO] Does Git GUI support Dark Mode on Windows 10 ?","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2022-01-17T14:40:24Z","receivedAt":"2022-01-17T14:40:36Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"Hi again,\n\nI think I found the problem. Should be okay now.\n\nThanks, again\n\nOn Mon, Jan 17, 2022 at 3:33 PM Birger Skogeng Pedersen\n<birger.sp@gmail.com> wrote:\n>\n> Thanks a lot for trying to help me, Sashank. There seems to be an\n> issue with the code. I had to take a little guess at where the actual\n> line breaks should be, maybe I messed up?\n>\n> I pasted the code here: https://github.com/prati0100/git-gui/issues/64\n>\n> Can you take a look?\n>\n> Best regards,\n> Birger\n"}]}