diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-12-07 07:04:43 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-12-07 07:04:43 -0500 |
commit | 88c4d06973ee2b2ad5b702925473b989eb46e55b (patch) | |
tree | 0cbc8ee8caa3629d66dc199332ef97d640bd50aa | |
parent | 05dd21be88b65fa3012b38e2ed5873272ab90742 (diff) | |
download | gtk+-88c4d06973ee2b2ad5b702925473b989eb46e55b.tar.gz |
accel cellrenderer: Fix rendering
We were getting the "New Accelerator" text mixed with the
content of the underlying cell, since plain labels don't
have a background. Go back to putting the label in selected
state, and fix the theme to render that white-on-blue. This
was lost when we switched to using a selection sub-node.
-rw-r--r-- | gtk/gtkcellrendereraccel.c | 2 | ||||
-rw-r--r-- | gtk/theme/Adwaita/_common.scss | 1 | ||||
-rw-r--r-- | gtk/theme/Adwaita/gtk-contained-dark.css | 8 | ||||
-rw-r--r-- | gtk/theme/Adwaita/gtk-contained.css | 8 |
4 files changed, 10 insertions, 9 deletions
diff --git a/gtk/gtkcellrendereraccel.c b/gtk/gtkcellrendereraccel.c index 7d814aeec4..7ab8ff4b63 100644 --- a/gtk/gtkcellrendereraccel.c +++ b/gtk/gtkcellrendereraccel.c @@ -501,7 +501,7 @@ gtk_cell_renderer_accel_start_editing (GtkCellRenderer *cell, gtk_widget_set_halign (label, GTK_ALIGN_START); gtk_widget_set_valign (label, GTK_ALIGN_CENTER); - gtk_widget_set_state_flags (label, GTK_STATE_FLAG_SELECTED, FALSE); + gtk_widget_set_state_flags (label, GTK_STATE_FLAG_SELECTED, TRUE); /* This label is displayed in a treeview cell displaying an accelerator * when the cell is clicked to change the acelerator. diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index ce70a87ac5..ba3cf9a3f1 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -147,6 +147,7 @@ label { @extend .dim-label; &:backdrop { color: $backdrop_fg_color; } } + &:selected, & selection, & selection:focus, & selection:hover { diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index d2ad788361..a2eb50a551 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -4442,20 +4442,20 @@ headerbar.selection-mode button.titlebutton, textview text selection, textview text selection:focus, .view selection, -.view selection:focus, iconview:selected, iconview:selected:focus, flowbox flowboxchild:selected, label selection, label selection:focus, label selection:hover, entry selection, spinbutton selection, entry selection:focus, spinbutton selection:focus, modelbutton.flat:selected, +.view selection:focus, iconview:selected, iconview:selected:focus, flowbox flowboxchild:selected, label:selected, label selection, label selection:focus, label selection:hover, entry selection, spinbutton selection, entry selection:focus, spinbutton selection:focus, modelbutton.flat:selected, .menuitem.button.flat:selected, treeview.view:selected, row:selected, .sidebar :selected { background-color: #215d9c; color: #ffffff; } textview text selection:insensitive, - .view selection:insensitive, iconview:insensitive:selected, flowbox flowboxchild:insensitive:selected, label selection:insensitive, entry selection:insensitive, spinbutton selection:insensitive, modelbutton.flat:insensitive:selected, + .view selection:insensitive, iconview:insensitive:selected, flowbox flowboxchild:insensitive:selected, label:insensitive:selected, label selection:insensitive, entry selection:insensitive, spinbutton selection:insensitive, modelbutton.flat:insensitive:selected, .menuitem.button.flat:insensitive:selected, treeview.view:insensitive:selected, row:insensitive:selected, .sidebar :insensitive:selected, placessidebar row:selected:insensitive label { color: #90aece; } textview text selection:backdrop, - .view selection:backdrop, iconview:backdrop:selected, flowbox flowboxchild:backdrop:selected, label selection:backdrop, entry selection:backdrop, spinbutton selection:backdrop, modelbutton.flat:backdrop:selected, + .view selection:backdrop, iconview:backdrop:selected, flowbox flowboxchild:backdrop:selected, label:backdrop:selected, label selection:backdrop, entry selection:backdrop, spinbutton selection:backdrop, modelbutton.flat:backdrop:selected, .menuitem.button.flat:backdrop:selected, treeview.view:backdrop:selected, row:backdrop:selected, .sidebar :backdrop:selected { color: #ffffff; } textview text selection:backdrop:insensitive, - .view selection:backdrop:insensitive, iconview:backdrop:insensitive:selected, flowbox flowboxchild:backdrop:insensitive:selected, label selection:backdrop:insensitive, entry selection:backdrop:insensitive, spinbutton selection:backdrop:insensitive, modelbutton.flat:backdrop:insensitive:selected, + .view selection:backdrop:insensitive, iconview:backdrop:insensitive:selected, flowbox flowboxchild:backdrop:insensitive:selected, label:backdrop:insensitive:selected, label selection:backdrop:insensitive, entry selection:backdrop:insensitive, spinbutton selection:backdrop:insensitive, modelbutton.flat:backdrop:insensitive:selected, .menuitem.button.flat:backdrop:insensitive:selected, treeview.view:backdrop:insensitive:selected, row:backdrop:insensitive:selected, .sidebar :backdrop:insensitive:selected, placessidebar row:selected:insensitive label:backdrop, placessidebar row:selected:backdrop:insensitive label { color: #648eba; } diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index 4116c170b4..ce5083a82e 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -4614,21 +4614,21 @@ headerbar.selection-mode button.titlebutton, textview text selection, textview text selection:focus, .view selection, -.view selection:focus, iconview:selected, iconview:selected:focus, flowbox flowboxchild:selected, label selection, label selection:focus, label selection:hover, entry selection, spinbutton selection, entry selection:focus, spinbutton selection:focus, modelbutton.flat:selected, +.view selection:focus, iconview:selected, iconview:selected:focus, flowbox flowboxchild:selected, label:selected, label selection, label selection:focus, label selection:hover, entry selection, spinbutton selection, entry selection:focus, spinbutton selection:focus, modelbutton.flat:selected, .menuitem.button.flat:selected, treeview.view:selected, row:selected, .sidebar :selected { background-color: #4a90d9; color: #ffffff; outline-color: rgba(255, 255, 255, 0.3); } textview text selection:insensitive, - .view selection:insensitive, iconview:insensitive:selected, flowbox flowboxchild:insensitive:selected, label selection:insensitive, entry selection:insensitive, spinbutton selection:insensitive, modelbutton.flat:insensitive:selected, + .view selection:insensitive, iconview:insensitive:selected, flowbox flowboxchild:insensitive:selected, label:insensitive:selected, label selection:insensitive, entry selection:insensitive, spinbutton selection:insensitive, modelbutton.flat:insensitive:selected, .menuitem.button.flat:insensitive:selected, treeview.view:insensitive:selected, row:insensitive:selected, .sidebar :insensitive:selected, placessidebar row:selected:insensitive label { color: #a5c8ec; } textview text selection:backdrop, - .view selection:backdrop, iconview:backdrop:selected, flowbox flowboxchild:backdrop:selected, label selection:backdrop, entry selection:backdrop, spinbutton selection:backdrop, modelbutton.flat:backdrop:selected, + .view selection:backdrop, iconview:backdrop:selected, flowbox flowboxchild:backdrop:selected, label:backdrop:selected, label selection:backdrop, entry selection:backdrop, spinbutton selection:backdrop, modelbutton.flat:backdrop:selected, .menuitem.button.flat:backdrop:selected, treeview.view:backdrop:selected, row:backdrop:selected, .sidebar :backdrop:selected { color: #ffffff; } textview text selection:backdrop:insensitive, - .view selection:backdrop:insensitive, iconview:backdrop:insensitive:selected, flowbox flowboxchild:backdrop:insensitive:selected, label selection:backdrop:insensitive, entry selection:backdrop:insensitive, spinbutton selection:backdrop:insensitive, modelbutton.flat:backdrop:insensitive:selected, + .view selection:backdrop:insensitive, iconview:backdrop:insensitive:selected, flowbox flowboxchild:backdrop:insensitive:selected, label:backdrop:insensitive:selected, label selection:backdrop:insensitive, entry selection:backdrop:insensitive, spinbutton selection:backdrop:insensitive, modelbutton.flat:backdrop:insensitive:selected, .menuitem.button.flat:backdrop:insensitive:selected, treeview.view:backdrop:insensitive:selected, row:backdrop:insensitive:selected, .sidebar :backdrop:insensitive:selected, placessidebar row:selected:insensitive label:backdrop, placessidebar row:selected:backdrop:insensitive label { color: #80b1e4; } |