Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit 5532ea2

Browse files
authored
Merge pull request #9300 from mono/backport-pr-9286-to-release-8.4
[release-8.4] [Ide][Mac] Fix several focus contrast issues with Gtk
2 parents 91d8ecf + da827e9 commit 5532ea2

File tree

2 files changed

+41
-12
lines changed

2 files changed

+41
-12
lines changed

main/src/core/MonoDevelop.Ide/gtkrc.mac

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ selected_bg_color: #2862d9
1919
selected_fg_color: #fff
2020
tooltip_bg_color: #f2f2f2
2121
tooltip_fg_color: #272727
22-
tooltip_border_color: #b2b2b2"
22+
tooltip_border_color: #b2b2b2
23+
focus_ring_color: #8eaff0"
2324

2425
gtk-button-images = 0
2526
gtk-menu-images = 0
@@ -136,7 +137,7 @@ style "wider" = "default" {
136137
}
137138

138139
style "button" = "default" {
139-
xthickness = 2
140+
xthickness = 4
140141
ythickness = 4
141142

142143
font_name = "-apple-system-font 12"
@@ -145,13 +146,14 @@ style "button" = "default" {
145146
bg[PRELIGHT] = @base_color # Mac buttons have no hover state
146147

147148
GtkWidget::focus-padding = 0
148-
GtkWidget::focus-line-width = 1
149+
GtkWidget::focus-line-width = 2
149150

150151
engine "xamarin" {
151152
border_shades = {1.4, 1.3}
152153
rgba = FALSE
153154
contrast = 1.0
154-
focus_color = shade(0.6, @bg_color)
155+
focus_color = @focus_ring_color
156+
focusstyle = 3
155157
textstyle = 0
156158
highlight_shade = 1.0
157159
lightborder_shade = 1.0
@@ -161,8 +163,14 @@ style "button" = "default" {
161163
style "dialog-button" = "button" {
162164
GtkButton::inner-border = { 7, 7, 3, 4 }
163165

166+
text[NORMAL] = @selected_fg_color
167+
text[PRELIGHT] = @selected_fg_color
168+
text[SELECTED] = @selected_fg_color
169+
text[INSENSITIVE] = @dim_color
170+
text[ACTIVE] = @selected_fg_color
171+
164172
engine "xamarin" {
165-
default_button_color = "#51ADF3"
173+
default_button_color = "#508AF5"
166174
}
167175
}
168176

@@ -172,7 +180,6 @@ style "toggle-button" = "button" {
172180
engine "xamarin" {
173181
rgba = FALSE
174182
contrast = 1.0
175-
focus_color = shade(0.6, @bg_color)
176183
textstyle = 1
177184
}
178185
}
@@ -458,6 +465,14 @@ style "spin-button" = "wider"
458465
style "link-label-fix"
459466
{
460467
base[PRELIGHT] = @bg_color # disable link hover background
468+
GtkWidget::focus-padding = 0
469+
470+
engine "xamarin" {
471+
rgba = TRUE
472+
roundness = 0
473+
focusstyle = 2
474+
focus_color = @focus_ring_color
475+
}
461476
}
462477

463478

main/src/core/MonoDevelop.Ide/gtkrc.mac-dark

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ selected_bg_color: #2257c9
1919
selected_fg_color: #fff
2020
tooltip_bg_color: #5a5a5a
2121
tooltip_fg_color: #d2d5cd
22-
tooltip_border_color: #b2b2b2"
22+
tooltip_border_color: #b2b2b2
23+
focus_ring_color: #45739e"
2324

2425
gtk-button-images = 0
2526
gtk-menu-images = 0
@@ -137,7 +138,7 @@ style "wider" = "default" {
137138
}
138139

139140
style "button" = "default" {
140-
xthickness = 2
141+
xthickness = 4
141142
ythickness = 4
142143

143144
font_name = "-apple-system-font 12"
@@ -154,12 +155,12 @@ style "button" = "default" {
154155

155156
GtkWidget::draw-border = { 1, 1, 1, 1 }
156157
GtkWidget::focus-padding = 0
157-
GtkWidget::focus-line-width = 1
158+
GtkWidget::focus-line-width = 2
158159

159160
engine "xamarin" {
160161
rgba = FALSE
161162
contrast = 1.0
162-
focus_color = shade(1.4, @bg_color)
163+
focus_color = @focus_ring_color
163164
focusstyle = 3
164165
textstyle = 0
165166
highlight_shade = 1.0
@@ -171,8 +172,14 @@ style "button" = "default" {
171172
style "dialog-button" = "button" {
172173
GtkButton::inner-border = { 7, 7, 3, 4 }
173174

175+
text[NORMAL] = @selected_fg_color
176+
text[PRELIGHT] = @selected_fg_color
177+
text[SELECTED] = @selected_fg_color
178+
text[INSENSITIVE] = @dim_color
179+
text[ACTIVE] = @selected_fg_color
180+
174181
engine "xamarin" {
175-
default_button_color = "#397cae"
182+
default_button_color = "#2d65d3"
176183
}
177184
}
178185

@@ -185,7 +192,6 @@ style "toggle-button" = "button" {
185192
rgba = FALSE
186193
contrast = 1.0
187194
gradient_shades = {0.96, 0.918, 0.926, 0.858}
188-
focus_color = shade(0.6, @bg_color)
189195
textstyle = 1
190196
}
191197
}
@@ -426,6 +432,14 @@ style "spin-button" = "wider"
426432
style "link-label-fix"
427433
{
428434
base[PRELIGHT] = @bg_color # disable link hover background
435+
GtkWidget::focus-padding = 0
436+
437+
engine "xamarin" {
438+
rgba = TRUE
439+
roundness = 0
440+
focusstyle = 2
441+
focus_color = @focus_ring_color
442+
}
429443
}
430444

431445

0 commit comments

Comments
 (0)