gtk3/gtk3-stable-adwaita-fixes.patch

573 lines
22 KiB
Diff

From 8d402589cfeab084224596e4127d75c8f5dbef11 Mon Sep 17 00:00:00 2001
From: Lapo Calamandrei <calamandrei@gmail.com>
Date: Fri, 1 Apr 2016 16:42:40 +0200
Subject: Adwaita: set secondary caret color to selection blue
see https://bugzilla.gnome.org/show_bug.cgi?id=764204
---
gtk/theme/Adwaita/_common.scss | 2 ++
gtk/theme/Adwaita/gtk-contained-dark.css | 3 ++-
gtk/theme/Adwaita/gtk-contained.css | 3 ++-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index c8114cb..ed64ed7 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -39,6 +39,8 @@ $button_transition: all 200ms $ease-out-quad;
outline-offset: -3px;
outline-width: 1px;
-gtk-outline-radius: 2px;
+
+ -gtk-secondary-caret-color: $selected_bg_color
}
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index fee8e67..7b6a592 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -14,7 +14,8 @@
outline-style: dashed;
outline-offset: -3px;
outline-width: 1px;
- -gtk-outline-radius: 2px; }
+ -gtk-outline-radius: 2px;
+ -gtk-secondary-caret-color: #215d9c; }
/***************
* Base States *
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 8d10bbe..a5cee5f 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -14,7 +14,8 @@
outline-style: dashed;
outline-offset: -3px;
outline-width: 1px;
- -gtk-outline-radius: 2px; }
+ -gtk-outline-radius: 2px;
+ -gtk-secondary-caret-color: #4a90d9; }
/***************
* Base States *
--
cgit v0.12
From 9ce61b5c9a8e95bf92fd3cbda495f0ef397b89a8 Mon Sep 17 00:00:00 2001
From: Lapo Calamandrei <calamandrei@gmail.com>
Date: Sat, 2 Apr 2016 16:03:02 +0200
Subject: Adwaita: cosmetic fixes
---
gtk/theme/Adwaita/_common.scss | 14 +++++++-------
gtk/theme/Adwaita/gtk-contained-dark.css | 10 +++++-----
gtk/theme/Adwaita/gtk-contained.css | 10 +++++-----
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index ed64ed7..32dee8a 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -834,7 +834,7 @@ button {
// More inline toolbar buttons
toolbar.inline-toolbar toolbutton,
toolbar.inline-toolbar toolbutton:backdrop {
- & > button.flat { @extend %linked_middle; }
+ > button.flat { @extend %linked_middle; }
&:first-child > button.flat { @extend %linked:first-child; }
@@ -1574,7 +1574,7 @@ treeview.view {
border-left-color: mix($fg_color, $base_color, 50%); // this is actually the tree lines color,
border-top-color: $bg_color; // while this is the grid lines color, better then nothing
- & rubberband { @extend rubberband; } // to avoid borders being overridden by the previously set props
+ rubberband { @extend rubberband; } // to avoid borders being overridden by the previously set props
&:selected {
&:focus, & {
@@ -1923,7 +1923,7 @@ popover.background {
border-radius: 5px;
background-color: $popover_bg_color;
- &, .csd & { border: 1px solid $borders_color; }
+ .csd &, & { border: 1px solid $borders_color; }
box-shadow: 0 1px 2px transparentize(black, 0.7);
@@ -1939,7 +1939,7 @@ popover.background {
background-color: transparent;
}
- &, .csd & {
+ .csd &, & {
&.touch-selection,
&.magnifier {
@extend %osd;
@@ -2740,7 +2740,7 @@ treeview.view radio:selected { &:focus, & { @extend %radio; }} // This is a work
}
// ...on selected list rows
- row:selected & { &, &:disabled { border-color: $selected_borders_color; } }
+ row:selected & { &:disabled, & { border-color: $selected_borders_color; } }
// OSD
.osd & {
@@ -3887,7 +3887,7 @@ infobar { border-style: none; }
}
}
- & label:selected { &:focus, &:hover, & { background-color: darken($selected_bg_color, 10%); }}
+ label:selected { &:focus, &:hover, & { background-color: darken($selected_bg_color, 10%); }}
*:link { @extend %link_selected; }
}
@@ -4092,7 +4092,7 @@ colorchooser .popover.osd { border-radius: 5px; }
border-radius: 5px;
}
- &:backdrop { &:hover, &:disabled, & {@extend %undecorated_button; }}
+ &:backdrop { &:hover, &:disabled, & { @extend %undecorated_button; }}
}
}
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 7b6a592..c79f05f 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -126,7 +126,7 @@ textview {
textview:backdrop {
background-color: #333636; }
-popover.background.touch-selection, popover.background.magnifier, .csd popover.background.touch-selection, .csd popover.background.magnifier, popover.background.osd, .csd popover.background.osd, .app-notification,
+.csd popover.background.touch-selection, .csd popover.background.magnifier, popover.background.touch-selection, popover.background.magnifier, .csd popover.background.osd, popover.background.osd, .app-notification,
.app-notification.frame, .osd .scale-popup, .osd {
color: #eeeeec;
border: none;
@@ -642,7 +642,7 @@ button.osd {
text-shadow: none;
-gtk-icon-shadow: none;
border: none; }
-popover.background.touch-selection button, popover.background.magnifier button, .csd popover.background.touch-selection button, .csd popover.background.magnifier button, .app-notification button,
+.csd popover.background.touch-selection button, .csd popover.background.magnifier button, popover.background.touch-selection button, popover.background.magnifier button, .app-notification button,
.app-notification.frame button, .osd
button {
color: #eeeeec;
@@ -2217,7 +2217,7 @@ popover.background {
border-radius: 5px;
background-color: #393f3f;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
- popover.background, .csd popover.background {
+ .csd popover.background, popover.background {
border: 1px solid #1c1f1f; }
popover.background:backdrop {
background-color: #393f3f;
@@ -2228,7 +2228,7 @@ popover.background {
popover.background > toolbar {
border-style: none;
background-color: transparent; }
- popover.background.touch-selection, popover.background.magnifier, .csd popover.background.touch-selection, .csd popover.background.magnifier {
+ .csd popover.background.touch-selection, .csd popover.background.magnifier, popover.background.touch-selection, popover.background.magnifier {
border: 1px solid rgba(255, 255, 255, 0.1); }
popover.background separator {
margin: 3px; }
@@ -2944,7 +2944,7 @@ scale highlight, progressbar progress {
scale highlight:backdrop:disabled, progressbar progress:backdrop:disabled, progressbar:backdrop progress:disabled {
background-color: transparent;
border-color: transparent; }
- row:selected scale highlight, scale row:selected highlight, row:selected progressbar progress, progressbar row:selected progress, row:selected scale highlight:disabled, scale row:selected highlight:disabled, row:selected progressbar progress:disabled, progressbar row:selected progress:disabled {
+ row:selected scale highlight:disabled, scale row:selected highlight:disabled, row:selected progressbar progress:disabled, progressbar row:selected progress:disabled, row:selected scale highlight, scale row:selected highlight, row:selected progressbar progress, progressbar row:selected progress {
border-color: #0f2b48; }
.osd scale highlight, scale .osd highlight, .osd progressbar progress, progressbar .osd progress {
border-color: rgba(0, 0, 0, 0.7); }
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index a5cee5f..87e4f21 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -126,7 +126,7 @@ textview {
textview:backdrop {
background-color: #f2f2f2; }
-popover.background.touch-selection, popover.background.magnifier, .csd popover.background.touch-selection, .csd popover.background.magnifier, popover.background.osd, .csd popover.background.osd, .app-notification,
+.csd popover.background.touch-selection, .csd popover.background.magnifier, popover.background.touch-selection, popover.background.magnifier, .csd popover.background.osd, popover.background.osd, .app-notification,
.app-notification.frame, .osd .scale-popup, .osd {
color: #eeeeec;
border: none;
@@ -645,7 +645,7 @@ button.osd {
text-shadow: none;
-gtk-icon-shadow: none;
border: none; }
-popover.background.touch-selection button, popover.background.magnifier button, .csd popover.background.touch-selection button, .csd popover.background.magnifier button, .app-notification button,
+.csd popover.background.touch-selection button, .csd popover.background.magnifier button, popover.background.touch-selection button, popover.background.magnifier button, .app-notification button,
.app-notification.frame button, .osd
button {
color: #eeeeec;
@@ -2230,7 +2230,7 @@ popover.background {
border-radius: 5px;
background-color: #e8e8e7;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
- popover.background, .csd popover.background {
+ .csd popover.background, popover.background {
border: 1px solid #9d9d99; }
popover.background:backdrop {
background-color: #e8e8e7;
@@ -2241,7 +2241,7 @@ popover.background {
popover.background > toolbar {
border-style: none;
background-color: transparent; }
- popover.background.touch-selection, popover.background.magnifier, .csd popover.background.touch-selection, .csd popover.background.magnifier {
+ .csd popover.background.touch-selection, .csd popover.background.magnifier, popover.background.touch-selection, popover.background.magnifier {
border: 1px solid rgba(255, 255, 255, 0.1); }
popover.background separator {
margin: 3px; }
@@ -2973,7 +2973,7 @@ scale highlight, progressbar progress {
scale highlight:backdrop:disabled, progressbar progress:backdrop:disabled, progressbar:backdrop progress:disabled {
background-color: transparent;
border-color: transparent; }
- row:selected scale highlight, scale row:selected highlight, row:selected progressbar progress, progressbar row:selected progress, row:selected scale highlight:disabled, scale row:selected highlight:disabled, row:selected progressbar progress:disabled, progressbar row:selected progress:disabled {
+ row:selected scale highlight:disabled, scale row:selected highlight:disabled, row:selected progressbar progress:disabled, progressbar row:selected progress:disabled, row:selected scale highlight, scale row:selected highlight, row:selected progressbar progress, progressbar row:selected progress {
border-color: #184472; }
.osd scale highlight, scale .osd highlight, .osd progressbar progress, progressbar .osd progress {
border-color: rgba(0, 0, 0, 0.7); }
--
cgit v0.12
From 30e234d84749dea9ed137bddc2e94c8ff7fa48b7 Mon Sep 17 00:00:00 2001
From: Lapo Calamandrei <calamandrei@gmail.com>
Date: Sat, 2 Apr 2016 16:24:52 +0200
Subject: Adwaita: style textview border
see https://bugzilla.gnome.org/show_bug.cgi?id=764203
---
gtk/theme/Adwaita/_common.scss | 37 ++++++++++++++++++++++++++------
gtk/theme/Adwaita/gtk-contained-dark.css | 25 ++++++++++++++++-----
gtk/theme/Adwaita/gtk-contained.css | 25 ++++++++++++++++-----
3 files changed, 71 insertions(+), 16 deletions(-)
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 32dee8a..7733d2e 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -121,6 +121,37 @@ textview {
}
}
+textview border {
+ background-color: mix($bg_color, $base_color, 50%);
+ background-image: image($bg_color); // HACK: the border node just draws background so, using a background-image to draw the border
+ background-repeat: no-repeat;
+
+ &:backdrop {
+ background-color: mix($backdrop_bg_color, $backdrop_base_color, 50%);
+ background-image: image($backdrop_bg_color);
+ }
+
+ &.bottom {
+ background-size: 100% 1px;
+ background-position: top;
+ }
+
+ &.top {
+ background-size: 100% 1px;
+ background-position: bottom;
+ }
+
+ &.left {
+ background-size: 1px 100%;
+ background-position: right;
+ }
+
+ &.right {
+ background-size: 1px 100%;
+ background-position: left;
+ }
+}
+
iconview { @extend .view; }
.rubberband,
@@ -199,12 +230,6 @@ assistant {
.sidebar label.highlight { background-color: mix($bg_color, $fg_color, 80%); }
}
-textview { // This will get overridden by .view, needed by gedit line numbers
- background-color: mix($bg_color, $base_color, 50%);
-
- &:backdrop { background-color: mix($backdrop_bg_color, $backdrop_base_color, 50%); }
-}
-
%osd, .osd {
color: $osd_fg_color;
border: none;
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index c79f05f..0dbd69d 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -75,6 +75,26 @@ textview text {
textview text:selected {
border-radius: 3px; }
+textview border {
+ background-color: #313434;
+ background-image: image(#393f3f);
+ background-repeat: no-repeat; }
+ textview border:backdrop {
+ background-color: #333636;
+ background-image: image(#393f3f); }
+ textview border.bottom {
+ background-size: 100% 1px;
+ background-position: top; }
+ textview border.top {
+ background-size: 100% 1px;
+ background-position: bottom; }
+ textview border.left {
+ background-size: 1px 100%;
+ background-position: right; }
+ textview border.right {
+ background-size: 1px 100%;
+ background-position: left; }
+
.rubberband,
rubberband,
flowbox rubberband,
@@ -121,11 +141,6 @@ assistant .sidebar label {
assistant .sidebar label.highlight {
background-color: #5d6262; }
-textview {
- background-color: #313434; }
- textview:backdrop {
- background-color: #333636; }
-
.csd popover.background.touch-selection, .csd popover.background.magnifier, popover.background.touch-selection, popover.background.magnifier, .csd popover.background.osd, popover.background.osd, .app-notification,
.app-notification.frame, .osd .scale-popup, .osd {
color: #eeeeec;
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 87e4f21..a221f23 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -75,6 +75,26 @@ textview text {
textview text:selected {
border-radius: 3px; }
+textview border {
+ background-color: #f4f4f3;
+ background-image: image(#e8e8e7);
+ background-repeat: no-repeat; }
+ textview border:backdrop {
+ background-color: #f2f2f2;
+ background-image: image(#e8e8e7); }
+ textview border.bottom {
+ background-size: 100% 1px;
+ background-position: top; }
+ textview border.top {
+ background-size: 100% 1px;
+ background-position: bottom; }
+ textview border.left {
+ background-size: 1px 100%;
+ background-position: right; }
+ textview border.right {
+ background-size: 1px 100%;
+ background-position: left; }
+
.rubberband,
rubberband,
flowbox rubberband,
@@ -121,11 +141,6 @@ assistant .sidebar label {
assistant .sidebar label.highlight {
background-color: #c3c4c4; }
-textview {
- background-color: #f4f4f3; }
- textview:backdrop {
- background-color: #f2f2f2; }
-
.csd popover.background.touch-selection, .csd popover.background.magnifier, popover.background.touch-selection, popover.background.magnifier, .csd popover.background.osd, popover.background.osd, .app-notification,
.app-notification.frame, .osd .scale-popup, .osd {
color: #eeeeec;
--
cgit v0.12
From 17d1cd1506f04f1d737bb562fb5811e0e07538e9 Mon Sep 17 00:00:00 2001
From: Lapo Calamandrei <calamandrei@gmail.com>
Date: Mon, 4 Apr 2016 12:03:11 +0200
Subject: Adwaita: transparent textview border border
So it will play nicely with gedit color combinations.
See https://bugzilla.gnome.org/show_bug.cgi?id=764203
---
gtk/theme/Adwaita/_common.scss | 9 +++------
gtk/theme/Adwaita/gtk-contained-dark.css | 5 ++---
gtk/theme/Adwaita/gtk-contained.css | 5 ++---
3 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 7733d2e..d553c44 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -123,13 +123,10 @@ textview {
textview border {
background-color: mix($bg_color, $base_color, 50%);
- background-image: image($bg_color); // HACK: the border node just draws background so, using a background-image to draw the border
- background-repeat: no-repeat;
+ background-image: image(transparentize(black, 0.8)); // HACK: the border node just draws background so,
+ background-repeat: no-repeat; // using a background-image to draw the border
- &:backdrop {
- background-color: mix($backdrop_bg_color, $backdrop_base_color, 50%);
- background-image: image($backdrop_bg_color);
- }
+ &:backdrop { background-color: mix($backdrop_bg_color, $backdrop_base_color, 50%); }
&.bottom {
background-size: 100% 1px;
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 0dbd69d..c6acb03 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -77,11 +77,10 @@ textview text {
textview border {
background-color: #313434;
- background-image: image(#393f3f);
+ background-image: image(rgba(0, 0, 0, 0.2));
background-repeat: no-repeat; }
textview border:backdrop {
- background-color: #333636;
- background-image: image(#393f3f); }
+ background-color: #333636; }
textview border.bottom {
background-size: 100% 1px;
background-position: top; }
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index a221f23..361299f 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -77,11 +77,10 @@ textview text {
textview border {
background-color: #f4f4f3;
- background-image: image(#e8e8e7);
+ background-image: image(rgba(0, 0, 0, 0.2));
background-repeat: no-repeat; }
textview border:backdrop {
- background-color: #f2f2f2;
- background-image: image(#e8e8e7); }
+ background-color: #f2f2f2; }
textview border.bottom {
background-size: 100% 1px;
background-position: top; }
--
cgit v0.12
From 6144b2276c7298040c080f85ffa83afbe1257c54 Mon Sep 17 00:00:00 2001
From: Benjamin Otte <otte@redhat.com>
Date: Tue, 1 Dec 2015 17:25:54 +0100
Subject: window: Remove suspicious branch
This commit was found to make emacs windows shrink, but the reversal
caused more widespread damage than initially expected. I've send
suggested fixes to the emacs team, to avoid the shrinking window,
regardless of this commit.
Original commit message:
It seems this branch is not needed anymore. It was originally added in
1999 to support gtk_widget_realize(), but all those reasons seem
obsolete today.
Instead just call gtk_widget_realize().
If you end up at this commit when bisecting:
There is no bug that made me remove this code, it was purely meant to be
cleanup / dead code removal. I seem to have introduced a new bug or
bisecting wouldn't have let you here. So it seems we should just revert
this commit.
---
gtk/gtkwindow.c | 55 +------------------------------------------------------
1 file changed, 1 insertion(+), 54 deletions(-)
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 5922415..f1d736c 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -6092,7 +6092,6 @@ gtk_window_show (GtkWidget *widget)
GtkWindow *window = GTK_WINDOW (widget);
GtkWindowPrivate *priv = window->priv;
GtkContainer *container = GTK_CONTAINER (window);
- gboolean need_resize;
gboolean is_plug;
if (!_gtk_widget_is_toplevel (GTK_WIDGET (widget)))
@@ -6103,62 +6102,10 @@ gtk_window_show (GtkWidget *widget)
_gtk_widget_set_visible_flag (widget, TRUE);
- need_resize = _gtk_widget_get_alloc_needed (widget) || !_gtk_widget_get_realized (widget);
-
gtk_css_node_validate (gtk_widget_get_css_node (widget));
- if (need_resize)
- {
- GtkWindowGeometryInfo *info = gtk_window_get_geometry_info (window, TRUE);
- GtkAllocation allocation = { 0, 0 };
- GdkRectangle configure_request;
- GdkGeometry new_geometry;
- guint new_flags;
- gboolean was_realized;
-
- /* We are going to go ahead and perform this configure request
- * and then emulate a configure notify by going ahead and
- * doing a size allocate. Sort of a synchronous
- * mini-copy of gtk_window_move_resize() here.
- */
- gtk_window_compute_configure_request (window,
- &configure_request,
- &new_geometry,
- &new_flags);
-
- /* We update this because we are going to go ahead
- * and gdk_window_resize() below, rather than
- * queuing it.
- */
- info->last.configure_request = configure_request;
-
- /* and allocate the window - this is normally done
- * in move_resize in response to configure notify
- */
- allocation.width = configure_request.width;
- allocation.height = configure_request.height;
- gtk_widget_size_allocate (widget, &allocation);
+ gtk_widget_realize (widget);
- /* Then we guarantee we have a realize */
- was_realized = FALSE;
- if (!_gtk_widget_get_realized (widget))
- {
- gtk_widget_realize (widget);
- was_realized = TRUE;
- }
-
- /* We only send configure request if we didn't just finish
- * creating the window; if we just created the window
- * then we created it with widget->allocation anyhow.
- */
- if (!was_realized)
- gdk_window_move_resize (_gtk_widget_get_window (widget),
- configure_request.x,
- configure_request.y,
- configure_request.width,
- configure_request.height);
- }
-
gtk_container_check_resize (container);
gtk_widget_map (widget);
--
cgit v0.12