summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorLapo Calamandrei <calamandrei@gmail.com>2014-12-17 19:42:11 +0100
committerLapo Calamandrei <calamandrei@gmail.com>2014-12-17 19:42:11 +0100
commitfdc8c6103a2e11fa4e3ea292728190684932406b (patch)
tree4a416ea03bd2a29ba652170f9dc4e5051cbadbd8 /gtk
parentbf383acd5de9defaa0bb04a96d6e8a705090c6ec (diff)
downloadgtk+-fdc8c6103a2e11fa4e3ea292728190684932406b.tar.gz
Adwaita: another stab at the undershoot
Diffstat (limited to 'gtk')
-rw-r--r--gtk/theme/Adwaita/_common.scss92
-rw-r--r--gtk/theme/Adwaita/_drawing.scss44
-rw-r--r--gtk/theme/Adwaita/gtk-contained-dark.css162
-rw-r--r--gtk/theme/Adwaita/gtk-contained.css162
4 files changed, 250 insertions, 210 deletions
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index ed8e57ff2c..be8ba06f82 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -120,54 +120,6 @@ $ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
background-color: transparentize($selected_bg_color,0.8);
}
-// This is used by GtkScrolledWindow, when content is touch-dragged past boundaries.
-.overshoot {
- &.top {
- @include overshoot(top);
- &:backdrop { @include overshoot(top, backdrop); }
- }
- &.bottom {
- @include overshoot(bottom);
- &:backdrop { @include overshoot(bottom, backdrop); }
- }
- &.left {
- @include overshoot(left);
- &:backdrop { @include overshoot(left, backdrop); }
- }
- &.right {
- @include overshoot(right);
- &:backdrop { @include overshoot(right, backdrop); }
- }
-}
-
-.undershoot { //FIXME: make a mixin for the overshoot, special case the dark variant
- &.top {
- background: none;
- background-image: linear-gradient(to bottom, transparentize(black, 0.7),
- transparentize(black, 0.9) 2px,
- transparent 10px);
- }
- &.bottom {
- background: none;
- background-image: linear-gradient(to top, transparentize(black, 0.8),
- transparentize(black, 0.95) 2px,
- transparent 7px);
- }
- &.left {
- background: none;
- background-image: linear-gradient(to right, transparentize(black, 0.8),
- transparentize(black, 0.95) 2px,
- transparent 7px);
- }
- &.right {
- background: none;
- background-image: linear-gradient(to left, transparentize(black, 0.8),
- transparentize(black, 0.95) 2px,
- transparent 7px);
- }
- &:backdrop { background-image: none; }
-}
-
.label {
&.separator {
color: $fg_color;
@@ -3276,3 +3228,47 @@ GtkVolumeButton.button { padding: 8px; }
.monospace {
font: Monospace;
}
+
+// This is used by GtkScrolledWindow, when content is touch-dragged past boundaries.
+.overshoot {
+ &.top {
+ @include overshoot(top);
+ &:backdrop { @include overshoot(top, backdrop); }
+ }
+ &.bottom {
+ @include overshoot(bottom);
+ &:backdrop { @include overshoot(bottom, backdrop); }
+ }
+ &.left {
+ @include overshoot(left);
+ &:backdrop { @include overshoot(left, backdrop); }
+ }
+ &.right {
+ @include overshoot(right);
+ &:backdrop { @include overshoot(right, backdrop); }
+ }
+}
+
+.undershoot { //FIXME: the dark variant needs love
+ &.top {
+ @include undershoot(top);
+ }
+
+ &.bottom {
+ @include undershoot(bottom);
+ }
+
+ &.left {
+ @include undershoot(left);
+ }
+
+ &.right {
+ @include undershoot(right);
+ }
+
+ &.sidebar {
+ background-color: transparent; // otherwise it get inherited
+ }
+
+ &:backdrop { background-image: none; }
+}
diff --git a/gtk/theme/Adwaita/_drawing.scss b/gtk/theme/Adwaita/_drawing.scss
index 867662a5d5..b8fa1d9ec9 100644
--- a/gtk/theme/Adwaita/_drawing.scss
+++ b/gtk/theme/Adwaita/_drawing.scss
@@ -523,7 +523,7 @@
@if $p==bottom {
$_position: center bottom;
- $_linear_gradient_direction: to top;
+ $_linear_gradient_direction: to top;
}
@else if $p==right {
@@ -537,7 +537,7 @@
$_small_gradient_size: $_small_gradient_length 100%;
$_big_gradient_size: $_big_gradient_length 100%;
}
-
+
$_small_gradient_color: $c;
$_big_gradient_color: $c;
@@ -577,3 +577,43 @@
border: none; //
box-shadow: none; //
}
+
+@mixin undershoot($p) {
+//
+// undershoot
+//
+// $p: position
+//
+// possible $p values:
+// top, bottom, right, left
+//
+
+ $_shadow_color: if($variant == 'light', transparentize(black, 0.7), transparentize(black, 0.5));
+
+ background-color: transparent; // shouldn't be needed, but better to be sure;
+
+ @if $p==top {
+ background-image: linear-gradient(to bottom, $_shadow_color,
+ transparentize($_shadow_color, 0.5) 3px,
+ transparent);
+ }
+
+ @else if $p==bottom {
+
+ background-image: linear-gradient(to top, transparentize(black, 0.5),
+ transparentize(black, 0.8) 3%,
+ transparent,
+ transparentize(black, 0.98) 25%,
+ transparent);
+ }
+
+ @else {
+ $_dir: left;
+
+ @if $p==left { $_dir: right; }
+
+ background-image: linear-gradient(to $_dir, $_shadow_color,
+ transparentize($_shadow_color, 0.7) 2px,
+ transparent);
+ }
+}
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 6c881a29ba..bebcee6be0 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -75,86 +75,6 @@
border: 1px solid #215d9c;
background-color: rgba(33, 93, 156, 0.2); }
-.overshoot.top {
- background-image: -gtk-gradient(radial, center top, 0, center top, 0.5, to(#040404), to(rgba(4, 4, 4, 0))), -gtk-gradient(radial, center top, 0, center top, 0.6, from(rgba(238, 238, 236, 0.07)), to(rgba(238, 238, 236, 0)));
- background-size: 100% 5%, 100% 100%;
- background-repeat: no-repeat;
- background-position: center top;
- background-color: transparent;
- border: none;
- box-shadow: none; }
- .overshoot.top:backdrop {
- background-image: -gtk-gradient(radial, center top, 0, center top, 0.5, to(#1e2222), to(rgba(30, 34, 34, 0)));
- background-size: 100% 5%;
- background-repeat: no-repeat;
- background-position: center top;
- background-color: transparent;
- border: none;
- box-shadow: none; }
-.overshoot.bottom {
- background-image: -gtk-gradient(radial, center bottom, 0, center bottom, 0.5, to(#040404), to(rgba(4, 4, 4, 0))), -gtk-gradient(radial, center bottom, 0, center bottom, 0.6, from(rgba(238, 238, 236, 0.07)), to(rgba(238, 238, 236, 0)));
- background-size: 100% 5%, 100% 100%;
- background-repeat: no-repeat;
- background-position: center bottom;
- background-color: transparent;
- border: none;
- box-shadow: none; }
- .overshoot.bottom:backdrop {
- background-image: -gtk-gradient(radial, center bottom, 0, center bottom, 0.5, to(#1e2222), to(rgba(30, 34, 34, 0)));
- background-size: 100% 5%;
- background-repeat: no-repeat;
- background-position: center bottom;
- background-color: transparent;
- border: none;
- box-shadow: none; }
-.overshoot.left {
- background-image: -gtk-gradient(radial, left center, 0, left center, 0.5, to(#040404), to(rgba(4, 4, 4, 0))), -gtk-gradient(radial, left center, 0, left center, 0.6, from(rgba(238, 238, 236, 0.07)), to(rgba(238, 238, 236, 0)));
- background-size: 5% 100%, 100% 100%;
- background-repeat: no-repeat;
- background-position: left center;
- background-color: transparent;
- border: none;
- box-shadow: none; }
- .overshoot.left:backdrop {
- background-image: -gtk-gradient(radial, left center, 0, left center, 0.5, to(#1e2222), to(rgba(30, 34, 34, 0)));
- background-size: 5% 100%;
- background-repeat: no-repeat;
- background-position: left center;
- background-color: transparent;
- border: none;
- box-shadow: none; }
-.overshoot.right {
- background-image: -gtk-gradient(radial, right center, 0, right center, 0.5, to(#040404), to(rgba(4, 4, 4, 0))), -gtk-gradient(radial, right center, 0, right center, 0.6, from(rgba(238, 238, 236, 0.07)), to(rgba(238, 238, 236, 0)));
- background-size: 5% 100%, 100% 100%;
- background-repeat: no-repeat;
- background-position: right center;
- background-color: transparent;
- border: none;
- box-shadow: none; }
- .overshoot.right:backdrop {
- background-image: -gtk-gradient(radial, right center, 0, right center, 0.5, to(#1e2222), to(rgba(30, 34, 34, 0)));
- background-size: 5% 100%;
- background-repeat: no-repeat;
- background-position: right center;
- background-color: transparent;
- border: none;
- box-shadow: none; }
-
-.undershoot.top {
- background: none;
- background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1) 2px, transparent 10px); }
-.undershoot.bottom {
- background: none;
- background-image: linear-gradient(to top, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.05) 2px, transparent 7px); }
-.undershoot.left {
- background: none;
- background-image: linear-gradient(to right, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.05) 2px, transparent 7px); }
-.undershoot.right {
- background: none;
- background-image: linear-gradient(to left, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.05) 2px, transparent 7px); }
-.undershoot:backdrop {
- background-image: none; }
-
.label.separator, GtkPlacesSidebar.sidebar .view .label.separator {
color: #eeeeec; }
.label.separator:backdrop, GtkPlacesSidebar.sidebar .view .label.separator:backdrop {
@@ -4424,6 +4344,88 @@ GtkVolumeButton.button, .header-bar GtkVolumeButton.button.titlebutton,
.monospace {
font: Monospace; }
+.overshoot.top {
+ background-image: -gtk-gradient(radial, center top, 0, center top, 0.5, to(#040404), to(rgba(4, 4, 4, 0))), -gtk-gradient(radial, center top, 0, center top, 0.6, from(rgba(238, 238, 236, 0.07)), to(rgba(238, 238, 236, 0)));
+ background-size: 100% 5%, 100% 100%;
+ background-repeat: no-repeat;
+ background-position: center top;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+ .overshoot.top:backdrop {
+ background-image: -gtk-gradient(radial, center top, 0, center top, 0.5, to(#1e2222), to(rgba(30, 34, 34, 0)));
+ background-size: 100% 5%;
+ background-repeat: no-repeat;
+ background-position: center top;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+.overshoot.bottom {
+ background-image: -gtk-gradient(radial, center bottom, 0, center bottom, 0.5, to(#040404), to(rgba(4, 4, 4, 0))), -gtk-gradient(radial, center bottom, 0, center bottom, 0.6, from(rgba(238, 238, 236, 0.07)), to(rgba(238, 238, 236, 0)));
+ background-size: 100% 5%, 100% 100%;
+ background-repeat: no-repeat;
+ background-position: center bottom;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+ .overshoot.bottom:backdrop {
+ background-image: -gtk-gradient(radial, center bottom, 0, center bottom, 0.5, to(#1e2222), to(rgba(30, 34, 34, 0)));
+ background-size: 100% 5%;
+ background-repeat: no-repeat;
+ background-position: center bottom;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+.overshoot.left {
+ background-image: -gtk-gradient(radial, left center, 0, left center, 0.5, to(#040404), to(rgba(4, 4, 4, 0))), -gtk-gradient(radial, left center, 0, left center, 0.6, from(rgba(238, 238, 236, 0.07)), to(rgba(238, 238, 236, 0)));
+ background-size: 5% 100%, 100% 100%;
+ background-repeat: no-repeat;
+ background-position: left center;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+ .overshoot.left:backdrop {
+ background-image: -gtk-gradient(radial, left center, 0, left center, 0.5, to(#1e2222), to(rgba(30, 34, 34, 0)));
+ background-size: 5% 100%;
+ background-repeat: no-repeat;
+ background-position: left center;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+.overshoot.right {
+ background-image: -gtk-gradient(radial, right center, 0, right center, 0.5, to(#040404), to(rgba(4, 4, 4, 0))), -gtk-gradient(radial, right center, 0, right center, 0.6, from(rgba(238, 238, 236, 0.07)), to(rgba(238, 238, 236, 0)));
+ background-size: 5% 100%, 100% 100%;
+ background-repeat: no-repeat;
+ background-position: right center;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+ .overshoot.right:backdrop {
+ background-image: -gtk-gradient(radial, right center, 0, right center, 0.5, to(#1e2222), to(rgba(30, 34, 34, 0)));
+ background-size: 5% 100%;
+ background-repeat: no-repeat;
+ background-position: right center;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+
+.undershoot.top {
+ background-color: transparent;
+ background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 3px, transparent); }
+.undershoot.bottom {
+ background-color: transparent;
+ background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2) 3%, transparent, rgba(0, 0, 0, 0.02) 25%, transparent); }
+.undershoot.left {
+ background-color: transparent;
+ background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), transparent 2px, transparent); }
+.undershoot.right {
+ background-color: transparent;
+ background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), transparent 2px, transparent); }
+.undershoot.sidebar {
+ background-color: transparent; }
+.undershoot:backdrop {
+ background-image: none; }
+
/* GTK NAMED COLORS
----------------
use responsibly! */
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 3d0b9fefc8..7078d62b7c 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -75,86 +75,6 @@
border: 1px solid #4a90d9;
background-color: rgba(74, 144, 217, 0.2); }
-.overshoot.top {
- background-image: -gtk-gradient(radial, center top, 0, center top, 0.5, to(#878787), to(rgba(135, 135, 135, 0))), -gtk-gradient(radial, center top, 0, center top, 0.6, from(rgba(46, 52, 54, 0.07)), to(rgba(46, 52, 54, 0)));
- background-size: 100% 5%, 100% 100%;
- background-repeat: no-repeat;
- background-position: center top;
- background-color: transparent;
- border: none;
- box-shadow: none; }
- .overshoot.top:backdrop {
- background-image: -gtk-gradient(radial, center top, 0, center top, 0.5, to(#a8a8a8), to(rgba(168, 168, 168, 0)));
- background-size: 100% 5%;
- background-repeat: no-repeat;
- background-position: center top;
- background-color: transparent;
- border: none;
- box-shadow: none; }
-.overshoot.bottom {
- background-image: -gtk-gradient(radial, center bottom, 0, center bottom, 0.5, to(#878787), to(rgba(135, 135, 135, 0))), -gtk-gradient(radial, center bottom, 0, center bottom, 0.6, from(rgba(46, 52, 54, 0.07)), to(rgba(46, 52, 54, 0)));
- background-size: 100% 5%, 100% 100%;
- background-repeat: no-repeat;
- background-position: center bottom;
- background-color: transparent;
- border: none;
- box-shadow: none; }
- .overshoot.bottom:backdrop {
- background-image: -gtk-gradient(radial, center bottom, 0, center bottom, 0.5, to(#a8a8a8), to(rgba(168, 168, 168, 0)));
- background-size: 100% 5%;
- background-repeat: no-repeat;
- background-position: center bottom;
- background-color: transparent;
- border: none;
- box-shadow: none; }
-.overshoot.left {
- background-image: -gtk-gradient(radial, left center, 0, left center, 0.5, to(#878787), to(rgba(135, 135, 135, 0))), -gtk-gradient(radial, left center, 0, left center, 0.6, from(rgba(46, 52, 54, 0.07)), to(rgba(46, 52, 54, 0)));
- background-size: 5% 100%, 100% 100%;
- background-repeat: no-repeat;
- background-position: left center;
- background-color: transparent;
- border: none;
- box-shadow: none; }
- .overshoot.left:backdrop {
- background-image: -gtk-gradient(radial, left center, 0, left center, 0.5, to(#a8a8a8), to(rgba(168, 168, 168, 0)));
- background-size: 5% 100%;
- background-repeat: no-repeat;
- background-position: left center;
- background-color: transparent;
- border: none;
- box-shadow: none; }
-.overshoot.right {
- background-image: -gtk-gradient(radial, right center, 0, right center, 0.5, to(#878787), to(rgba(135, 135, 135, 0))), -gtk-gradient(radial, right center, 0, right center, 0.6, from(rgba(46, 52, 54, 0.07)), to(rgba(46, 52, 54, 0)));
- background-size: 5% 100%, 100% 100%;
- background-repeat: no-repeat;
- background-position: right center;
- background-color: transparent;
- border: none;
- box-shadow: none; }
- .overshoot.right:backdrop {
- background-image: -gtk-gradient(radial, right center, 0, right center, 0.5, to(#a8a8a8), to(rgba(168, 168, 168, 0)));
- background-size: 5% 100%;
- background-repeat: no-repeat;
- background-position: right center;
- background-color: transparent;
- border: none;
- box-shadow: none; }
-
-.undershoot.top {
- background: none;
- background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1) 2px, transparent 10px); }
-.undershoot.bottom {
- background: none;
- background-image: linear-gradient(to top, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.05) 2px, transparent 7px); }
-.undershoot.left {
- background: none;
- background-image: linear-gradient(to right, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.05) 2px, transparent 7px); }
-.undershoot.right {
- background: none;
- background-image: linear-gradient(to left, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.05) 2px, transparent 7px); }
-.undershoot:backdrop {
- background-image: none; }
-
.label.separator, GtkPlacesSidebar.sidebar .view .label.separator {
color: #2e3436; }
.label.separator:backdrop, GtkPlacesSidebar.sidebar .view .label.separator:backdrop {
@@ -4595,6 +4515,88 @@ GtkVolumeButton.button, .header-bar GtkVolumeButton.button.titlebutton,
.monospace {
font: Monospace; }
+.overshoot.top {
+ background-image: -gtk-gradient(radial, center top, 0, center top, 0.5, to(#878787), to(rgba(135, 135, 135, 0))), -gtk-gradient(radial, center top, 0, center top, 0.6, from(rgba(46, 52, 54, 0.07)), to(rgba(46, 52, 54, 0)));
+ background-size: 100% 5%, 100% 100%;
+ background-repeat: no-repeat;
+ background-position: center top;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+ .overshoot.top:backdrop {
+ background-image: -gtk-gradient(radial, center top, 0, center top, 0.5, to(#a8a8a8), to(rgba(168, 168, 168, 0)));
+ background-size: 100% 5%;
+ background-repeat: no-repeat;
+ background-position: center top;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+.overshoot.bottom {
+ background-image: -gtk-gradient(radial, center bottom, 0, center bottom, 0.5, to(#878787), to(rgba(135, 135, 135, 0))), -gtk-gradient(radial, center bottom, 0, center bottom, 0.6, from(rgba(46, 52, 54, 0.07)), to(rgba(46, 52, 54, 0)));
+ background-size: 100% 5%, 100% 100%;
+ background-repeat: no-repeat;
+ background-position: center bottom;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+ .overshoot.bottom:backdrop {
+ background-image: -gtk-gradient(radial, center bottom, 0, center bottom, 0.5, to(#a8a8a8), to(rgba(168, 168, 168, 0)));
+ background-size: 100% 5%;
+ background-repeat: no-repeat;
+ background-position: center bottom;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+.overshoot.left {
+ background-image: -gtk-gradient(radial, left center, 0, left center, 0.5, to(#878787), to(rgba(135, 135, 135, 0))), -gtk-gradient(radial, left center, 0, left center, 0.6, from(rgba(46, 52, 54, 0.07)), to(rgba(46, 52, 54, 0)));
+ background-size: 5% 100%, 100% 100%;
+ background-repeat: no-repeat;
+ background-position: left center;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+ .overshoot.left:backdrop {
+ background-image: -gtk-gradient(radial, left center, 0, left center, 0.5, to(#a8a8a8), to(rgba(168, 168, 168, 0)));
+ background-size: 5% 100%;
+ background-repeat: no-repeat;
+ background-position: left center;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+.overshoot.right {
+ background-image: -gtk-gradient(radial, right center, 0, right center, 0.5, to(#878787), to(rgba(135, 135, 135, 0))), -gtk-gradient(radial, right center, 0, right center, 0.6, from(rgba(46, 52, 54, 0.07)), to(rgba(46, 52, 54, 0)));
+ background-size: 5% 100%, 100% 100%;
+ background-repeat: no-repeat;
+ background-position: right center;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+ .overshoot.right:backdrop {
+ background-image: -gtk-gradient(radial, right center, 0, right center, 0.5, to(#a8a8a8), to(rgba(168, 168, 168, 0)));
+ background-size: 5% 100%;
+ background-repeat: no-repeat;
+ background-position: right center;
+ background-color: transparent;
+ border: none;
+ box-shadow: none; }
+
+.undershoot.top {
+ background-color: transparent;
+ background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), transparent 3px, transparent); }
+.undershoot.bottom {
+ background-color: transparent;
+ background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2) 3%, transparent, rgba(0, 0, 0, 0.02) 25%, transparent); }
+.undershoot.left {
+ background-color: transparent;
+ background-image: linear-gradient(to right, rgba(0, 0, 0, 0.3), transparent 2px, transparent); }
+.undershoot.right {
+ background-color: transparent;
+ background-image: linear-gradient(to left, rgba(0, 0, 0, 0.3), transparent 2px, transparent); }
+.undershoot.sidebar {
+ background-color: transparent; }
+.undershoot:backdrop {
+ background-image: none; }
+
/* GTK NAMED COLORS
----------------
use responsibly! */