On 24/08/20 06:48PM, Serg Tereshchenko wrote: > Hi all. > > I want to use dark themes with git citool, and here is my first attempt > to do so. > > I am new to tcl, so i happily accept any tips on how to improve code. > > First things first: to properly support colors, would be nice to have > them separated from app code, so i created new file lib/colored.tcl. Name > is selected to be consistent with "lib/themed.tcl". > > Then, i extract hardcoded colors from git-gui.sh into namespace Color. > Then, if option use_ttk is true, i update default colors for > background/foreground from current theme. > > How it was looking before: > - Dark theme (awdark): https://i.imgur.com/0lrfHyq.png > - Light theme (clam): https://i.imgur.com/1fsfayJ.png > > Now looks like this: > - Dark theme (awdark): https://i.imgur.com/BISllEH.png > - Light theme (clam): https://i.imgur.com/WclSTa4.png How do you tell git-gui which theme to use? I had some trouble setting the theme and ended up adding code to source the theme files and then set the theme via `ttk::style theme use`. I hope there is a better way than that. -- Regards, Pratyush Yadav