Skip to content

Commit f9481b1

Browse files
stefanhallerprati0100
authored andcommitted
git-gui: fix colored label backgrounds when using themed widgets
The aqua theme on Mac doesn't support changing the background color for labels and frames [1]. Since the red, green, and yellow backgrounds of the labels for unstaged and staged files and the diff pane are so important design elements of git gui's main window, it's not acceptable for them to have grey backgrounds on Mac. To work around this, simply use non-themed widgets for all labels on Mac. This is not a big problem because labels don't look extremely different between the themed and non-themed versions. There are subtle differences, but they are not as bad as having the wrong background color. [1] https://stackoverflow.com/a/6723911 Signed-off-by: Stefan Haller <[email protected]> Signed-off-by: Pratyush Yadav <[email protected]>
1 parent 3e5c911 commit f9481b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/themed.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ proc InitEntryFrame {} {
174174

175175
proc gold_frame {w args} {
176176
global use_ttk
177-
if {$use_ttk} {
177+
if {$use_ttk && ![is_MacOSX]} {
178178
eval [linsert $args 0 ttk::frame $w -style Gold.TFrame]
179179
} else {
180180
eval [linsert $args 0 frame $w -background gold]
@@ -183,7 +183,7 @@ proc gold_frame {w args} {
183183

184184
proc tlabel {w args} {
185185
global use_ttk
186-
if {$use_ttk} {
186+
if {$use_ttk && ![is_MacOSX]} {
187187
set cmd [list ttk::label $w -style Color.TLabel]
188188
foreach {k v} $args {
189189
switch -glob -- $k {

0 commit comments

Comments
 (0)