1
0
mirror of https://github.com/horst3180/arc-theme.git synced 2024-10-27 19:04:02 +00:00
horst3180_arc-theme/common/gtk-3.0/3.14/sass/_common.scss

2780 lines
74 KiB
SCSS
Raw Normal View History

2015-05-16 20:50:01 +00:00
@function gtkalpha($c,$a) {
@return unquote("alpha(#{$c},#{$a})");
}
$ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
2015-06-07 21:00:55 +00:00
$asset_suffix: if($variant=='dark', '-dark', ''); // use dark assets in dark variant
2015-07-08 00:51:09 +00:00
$darker_asset_suffix: if($darker=='true', '-dark', $asset_suffix);
2015-05-16 20:50:01 +00:00
* {
background-clip: padding-box;
-GtkToolButton-icon-spacing: 4;
-GtkTextView-error-underline-color: $error_color;
-GtkPaned-handle-size: 1;
-GtkCheckButton-indicator-size: 16;
-GtkCheckMenuItem-indicator-size: 16;
-GtkScrolledWindow-scrollbar-spacing: 0;
-GtkScrolledWindow-scrollbars-within-bevel: 1;
-GtkToolItemGroup-expander-size: 11;
-GtkExpander-expander-size: 16;
-GtkTreeView-expander-size: 11;
-GtkTreeView-horizontal-separator: 4;
-GtkMenu-horizontal-padding: 0;
-GtkMenu-vertical-padding: 0;
-GtkWidget-link-color: $link_color;
-GtkWidget-visited-link-color: $link_visited_color;
-GtkWidget-focus-padding: 2; // FIXME: do we still need these?
-GtkWidget-focus-line-width: 1; //
-GtkWidget-text-handle-width: 20;
-GtkWidget-text-handle-height: 20;
-GtkDialog-button-spacing: 4;
-GtkDialog-action-area-border: 0;
-GtkStatusbar-shadow-type: none;
// We use the outline properties to signal the focus properties
outline-color: transparentize($fg_color, 0.7);
outline-style: dashed;
outline-offset: -3px;
outline-width: 1px;
outline-radius: 2px;
}
2015-12-28 16:54:04 +00:00
//
// Base States
//
2015-05-16 20:50:01 +00:00
.background {
color: $fg_color;
2015-07-17 21:43:41 +00:00
background-color: if($transparency == 'true', transparentize($bg_color, 0.001), $bg_color); // without this headerbar transparency doesn't seem to work
2015-05-16 20:50:01 +00:00
}
*:insensitive {
-gtk-image-effect: dim;
}
.gtkstyle-fallback {
background-color: $bg_color;
color: $fg_color;
&:prelight {
background-color: lighten($bg_color, 10%);
color: $fg_color;
}
&:active {
background-color: darken($bg_color, 10%);
color: $fg_color;
}
&:insensitive {
background-color: $insensitive_bg_color;
color: $insensitive_fg_color;
}
&:selected {
background-color: $selected_bg_color;
color: $selected_fg_color;
}
}
.view {
color: $text_color;
background-color: $base_color;
&:selected,
&:selected:focus,
&:selected:hover {
@extend %selected_items;
}
&.dim-label {
color: transparentize($text_color, 0.45);
&:selected, &:selected:focus {
color: transparentize($selected_fg_color, 0.35);
text-shadow: none;
}
}
}
.rubberband {
border: 1px solid $selected_bg_color;
background-color: transparentize($selected_bg_color,0.8);
}
2015-05-28 15:41:22 +00:00
GtkLabel {
2015-05-16 20:50:01 +00:00
&.separator {
color: $fg_color;
@extend .dim-label;
}
&:selected,
&:selected:focus,
&:selected:hover {
@extend %selected_items;
}
&:insensitive {
color: $insensitive_fg_color;
}
}
.dim-label {
opacity: 0.55;
}
GtkAssistant {
.sidebar {
background-color: $base_color;
border-top: 1px solid $borders_color;
&:dir(ltr) { border-right: 1px solid $borders_color; }
&:dir(rtl) { border-left: 1px solid $borders_color; }
}
&.csd .sidebar { border-top-style: none; }
2015-05-28 15:41:22 +00:00
.sidebar GtkLabel {
2015-05-16 20:50:01 +00:00
padding: 6px 12px;
}
2015-05-28 15:41:22 +00:00
.sidebar GtkLabel.highlight {
2015-05-16 20:50:01 +00:00
background-color: $selected_bg_color;
color: $selected_fg_color;
}
}
GtkTextView { // This will get overridden by .view, needed by gedit line numbers
background-color: mix($bg_color, $base_color, 50%);
}
2015-05-28 15:41:22 +00:00
GtkFlowBox .grid-child {
2015-05-16 20:50:01 +00:00
padding: 3px;
border-radius: 3px;
&:selected {
@extend %selected_items;
outline-offset: -2px;
}
}
%osd, .osd {
color: $osd_fg_color;
border: none;
background-color: $osd_bg_color;
background-clip: padding-box;
outline-color: transparentize($osd_fg_color, 0.7);
box-shadow: none;
}
2015-12-28 16:54:04 +00:00
//
// Spinner Animations
//
2015-05-16 20:50:01 +00:00
@keyframes spin {
to { -gtk-icon-transform: rotate(1turn); }
}
.spinner {
background-image: none;
background-color: blue;
opacity: 0; // non spinning spinner makes no sense
-gtk-icon-source: -gtk-icontheme('process-working-symbolic');
&:active {
opacity: 1;
animation: spin 1s linear infinite;
&:insensitive {
opacity: 0.5;
}
}
}
2016-01-03 21:35:53 +00:00
$vert_padding: 5px;
2015-12-28 16:54:04 +00:00
//
// Text Entries
//
2015-05-16 20:50:01 +00:00
.entry {
border: 1px solid;
2016-01-03 21:35:53 +00:00
padding: $vert_padding 8px;
2015-05-16 20:50:01 +00:00
2015-08-26 11:08:42 +00:00
border-radius: 3px;
2015-05-16 20:50:01 +00:00
transition: all 200ms $ease-out-quad;
@include entry(normal);
2016-01-03 21:35:53 +00:00
&.image { // icons inside the entry
&.left { padding-left: 0; }
&.right { padding-right: 0; }
}
2015-05-16 20:50:01 +00:00
&.flat, &.flat:focus {
padding: 2px;
@include entry(normal);
border: none;
border-radius: 0;
}
&:focus {
background-clip: border-box;
@include entry(focus);
}
2015-05-16 20:50:01 +00:00
&:insensitive { @include entry(insensitive); }
&:selected,
&:selected:focus {
background-color: $selected_bg_color;
color: $selected_fg_color;
}
&.progressbar {
2015-06-06 14:14:01 +00:00
margin: 2px 12px;
2015-05-16 20:50:01 +00:00
border-radius: 0;
border-width: 0 0 2px;
border-color: $selected_bg_color;
border-style: solid;
background-image: none;
background-color: transparent;
box-shadow: none;
}
.linked > & { //FIXME: use same buttons linking logic and template
&:first-child {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
&:dir(rtl) { border-right-style: none;}
}
&:last-child {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-left-style: none;
&:dir(rtl) { border-left-style: solid; }
}
}
@each $e_type, $e_color, $e_fg_color in (warning, $warning_color, $warning_fg_color),
(error, $error_color, $error_fg_color) {
2015-09-20 14:46:14 +00:00
&.#{$e_type} {
color: $selected_fg_color;
border-color: if($variant=='light', $e_color, $entry_border);
background-image: linear-gradient(to bottom, mix($e_color, $base_color, 60%));
2015-05-16 20:50:01 +00:00
2015-09-20 14:46:14 +00:00
&:focus {
color: $e_fg_color;
2015-09-20 14:46:14 +00:00
background-image: linear-gradient(to bottom, $e_color);
box-shadow: none;
}
&:selected, &:selected:focus {
background-color: $e_fg_color;
2015-09-20 14:46:14 +00:00
color: $e_color;
}
2015-05-16 20:50:01 +00:00
}
}
&.image { // entry icons colors
color: mix($fg_color,$base_color,80%);
}
.linked.vertical > & { //FIXME comment stuff and make the whole thing smarter.
border-bottom-color: mix($borders_color, $base_color, 30%);
box-shadow: none;
@extend %linked_vertical;
&:focus {
border-color: $selected_bg_color;
box-shadow: 0 -1px 0 0 $selected_bg_color;
@extend %linked_vertical;
}
&:insensitive {
border-bottom-color: mix($borders_color, $base_color, 30%);
@extend %linked_vertical;
}
&:first-child {
border-bottom-color: mix($borders_color, $base_color, 30%);
&:focus {
border-bottom-color: $selected_bg_color;
box-shadow: none;
}
&:insensitive {
border-bottom-color: mix($borders_color, $base_color, 30%);
@extend %linked_vertical:first-child;
}
}
&:last-child {
border-bottom-color: rgba(0,0,0,0.14);
&:focus {
border-bottom-color: $selected_bg_color;
box-shadow: 0 -1px 0 0 $selected_bg_color;
@extend %linked_vertical:last-child;
}
&:insensitive {
border-bottom-color: rgba(0,0,0,0.14);
@extend %linked_vertical:last-child;
}
}
}
2015-07-16 19:24:51 +00:00
.osd & {
@include entry(osd);
&:focus { @include entry(osd-focus); }
&:insensitive { @include entry(osd-insensitive); }
}
2015-05-16 20:50:01 +00:00
}
2015-08-26 18:10:02 +00:00
GtkSearchEntry.entry { border-radius: 20px; }
2015-12-28 16:54:04 +00:00
//
// Buttons
//
2015-05-16 20:50:01 +00:00
// stuff for .needs-attention
$_dot_color: $selected_bg_color;
@keyframes needs_attention {
from {
background-image: -gtk-gradient(radial,
center center, 0,
center center, 0.01,
to($_dot_color),
to(transparent));
}
to {
background-image: -gtk-gradient(radial,
center center, 0,
center center, 0.5,
to($selected_bg_color),
to(transparent));
}
}
.button {
$_button_transition: all 200ms $ease-out-quad;
transition: $_button_transition;
border: 1px solid;
border-radius: 3px;
2016-01-03 21:35:53 +00:00
padding: $vert_padding 8px;
2015-05-16 20:50:01 +00:00
@include button(normal);
2015-12-28 16:54:04 +00:00
&.flat {
2015-05-16 20:50:01 +00:00
@include button(undecorated);
2015-09-11 20:08:41 +00:00
background-color: transparentize($button_bg, 1);
border-color: transparentize($button_border, 1);
2015-05-16 20:50:01 +00:00
// to avoid adiacent buttons borders clashing when transitioning, the transition on the normal state is set
// to none, while it's added back in the hover state, so the button decoration will fade in on hover, but
// it won't fade out when the pointer leave the button allocation area. To make the transition more evident
// in this case the duration is increased.
transition: none;
&:hover {
transition: $_button_transition;
transition-duration: 350ms;
&:active { transition: $_button_transition; }
}
}
&:hover {
@include button(hover);
-gtk-image-effect: highlight;
}
&:active, &:checked {
2015-09-09 19:19:57 +00:00
background-clip: if($variant=='light', border-box, padding-box);
2015-05-16 20:50:01 +00:00
@include button(active);
transition-duration: 50ms;
}
//Webkitgtk workaround start
&:active { color: $fg_color; }
&:active:hover, &:checked { color: $selected_fg_color; }
//Webkitgtk workaround end
2015-05-16 20:50:01 +00:00
&.flat:insensitive {
@include button(undecorated);
}
&:insensitive {
@include button(insensitive);
&:active, &:checked {
@include button(insensitive-active);
}
}
// big standalone buttons like in Documents pager
&.osd {
2015-09-11 22:22:28 +00:00
color: $osd_fg_color;
2015-05-16 20:50:01 +00:00
outline-color: transparentize($osd_fg_color, 0.7);
background-color: $osd_bg_color;
2015-09-11 22:22:28 +00:00
border-color: darken($osd_bg_color, 8%);
2015-05-16 20:50:01 +00:00
&.image-button { padding: 10px; }
2015-09-11 22:22:28 +00:00
&:hover { color: $selected_bg_color; }
2015-05-16 20:50:01 +00:00
&:active, &:checked { @include button(osd-active); }
&:insensitive { @include button(osd-insensitive); }
}
//overlay / OSD style
.osd & {
@include button(osd);
// there's a problem with sass which prevents it to extend the linked
// placeholder as expected, it should just be "@extend %linked;", the
// placeholder is basically replicated here
//
// Workaround START
border-radius: 0;
border-left-style: none;
border-right-style: none;
&:dir(rtl) {
border-radius: 0;
border-right-style: none;
border-left-style: none
}
&:first-child {
border-radius: 3px 0 0 3px;
border-left-style: solid;
}
&:last-child {
border-radius: 0 3px 3px 0;
border-right-style: solid;
&:dir(rtl) { border-left-style: solid; }
}
&:only-child {
border-radius: 3px;
border-style: solid;
}
// Workaround END
&:hover {
@include button(osd-hover);
@extend %linked;
2015-10-27 17:38:52 +00:00
&, &:first-child, &:last-child { box-shadow: none; }
2015-05-16 20:50:01 +00:00
}
&:active, &:checked {
2015-09-21 18:44:36 +00:00
background-clip: padding-box;
2015-05-16 20:50:01 +00:00
@include button(osd-active);
@extend %linked;
}
&:insensitive {
@include button(osd-insensitive);
@extend %linked;
}
&.flat {
@include button(undecorated);
box-shadow: none;
&:hover {
@include button(osd-hover);
2015-10-27 17:38:52 +00:00
&, &:first-child, &:last-child { box-shadow: none; }
2015-05-16 20:50:01 +00:00
}
&:insensitive {
@include button(osd-insensitive);
background-image: none;
}
&:active, &:checked {
@include button(osd-active);
}
}
}
// Suggested and Destructive Action buttons
@each $b_type, $b_color, $b_fg in (suggested-action, $suggested_color, $suggested_fg_color),
(destructive-action, $destructive_color, $destructive_fg_color) {
2015-05-16 20:50:01 +00:00
&.#{$b_type} {
@include button(suggested_destructive, $b_color, $b_fg);
2015-05-16 20:50:01 +00:00
&.flat {
@include button(undecorated);
color: $b_color;
outline-color: transparentize($b_color, 0.7);
2015-05-16 20:50:01 +00:00
}
&:hover {
@include button(suggested_destructive, lighten($b_color, 10%), $b_fg);
2015-05-16 20:50:01 +00:00
}
&:active, &:checked {
@include button(suggested_destructive, darken($b_color, 10%), $b_fg);
2015-05-16 20:50:01 +00:00
}
&.flat:insensitive {
2015-07-16 17:10:57 +00:00
@include button(undecorated);
color: $insensitive_fg_color;
2015-05-16 20:50:01 +00:00
}
&:insensitive { @include button(insensitive); }
2015-05-16 20:50:01 +00:00
}
}
2016-01-04 00:30:51 +00:00
&.image-button { padding: 2px + $vert_padding; }
.header-bar &.image-button { padding: 2px + $vert_padding 10px; }
2015-05-16 20:50:01 +00:00
&.text-button {
padding-left: 16px;
padding-right: 16px;
}
&.text-button.image-button {
// those buttons needs uneven horizontal padding, we want the icon side
// to have the image-button padding, while the text side the text-button
// one, so we're adding the missing padding to the label depending on
// its position inside the button
2016-01-03 21:35:53 +00:00
padding: $vert_padding 8px; // same as .button
2015-05-16 20:50:01 +00:00
GtkLabel:first-child { padding-left: 8px; }
GtkLabel:last-child { padding-right: 8px; }
}
.stack-switcher > & {
// to position the needs attention dot, padding is added to the button
// child, a label needs just lateral padding while an icon needs vertical
// padding added too.
outline-offset: -3px; // needs to be set or it gets overridden by GtkRadioButton outline-offset
> GtkLabel {
padding-left: 6px; // label padding
padding-right: 6px; //
}
> GtkImage {
padding-left: 6px;
padding-right: 6px;
2016-01-03 21:35:53 +00:00
padding-top: $vert_padding - 2px;
padding-bottom: $vert_padding - 2px;
2015-05-16 20:50:01 +00:00
}
2016-01-03 21:35:53 +00:00
&.text-button { padding: $vert_padding 10px; } // needed or it will get overridden
2015-05-16 20:50:01 +00:00
2016-01-03 21:35:53 +00:00
&.image-button { padding: $vert_padding - 3px 4px; }
2015-05-16 20:50:01 +00:00
2015-05-28 15:41:22 +00:00
&.needs-attention > GtkLabel,
2015-05-16 20:50:01 +00:00
&.needs-attention > GtkImage { @extend %needs_attention; }
2016-01-03 21:35:53 +00:00
&.needs-attention:active > .label,
2015-05-16 20:50:01 +00:00
&.needs-attention:active > GtkImage,
2015-05-28 15:41:22 +00:00
&.needs-attention:checked > GtkLabel,
2015-05-16 20:50:01 +00:00
&.needs-attention:checked > GtkImage {
animation: none;
background-image: none;
}
}
%needs_attention {
animation: needs_attention 150ms ease-in;
background-image: -gtk-gradient(radial,
center center, 0,
center center, 0.5,
to($_dot_color),
to(transparent));
background-size: 6px 6px, 6px 6px;
background-repeat: no-repeat;
2015-06-07 21:00:55 +00:00
@if $variant == 'light' { background-position: right 3px, right 4px; }
@else { background-position: right 3px, right 2px; }
2015-05-16 20:50:01 +00:00
&:dir(rtl) {
2015-06-07 21:00:55 +00:00
@if $variant == 'light' { background-position: left 3px, left 4px; }
@else { background-position: left 3px, left 2px; }
2015-05-16 20:50:01 +00:00
}
}
//inline-toolbar buttons
.inline-toolbar &, .inline-toolbar &:backdrop {
border-radius: 2px;
border-width: 1px;
@extend %linked;
}
.linked > &,
.linked > &:hover,
.linked > &:active,
.linked > &:checked { @extend %linked; }
.linked.vertical > &,
.linked.vertical > &:hover,
.linked.vertical > &:active,
.linked.vertical > &:checked { @extend %linked_vertical; }
}
// all the following is for the +|- buttons on inline toolbars, that way
// should really be deprecated...
.inline-toolbar GtkToolButton > .button { // redefining the button look is
// needed since those are flat...
@include button(normal);
&:hover { @include button(hover); }
&:active,
&:checked{ @include button(active); }
&:insensitive { @include button(insensitive); }
&:insensitive:active,
&:insensitive:checked { @include button(insensitive-active); }
}
// More inline toolbar buttons
.inline-toolbar.toolbar GtkToolButton {
& > .button.flat { @extend %linked_middle; }
&:dir(rtl) > .button.flat { @extend %linked_middle:dir(rtl); }
&:first-child > .button.flat { @extend %linked:first-child; }
&:last-child > .button.flat { @extend %linked:last-child; }
&:last-child:dir(rtl) > .button.flat { @extend %linked:last-child:dir(rtl); }
&:only-child > .button.flat { @extend %linked:only-child; }
}
2015-09-09 19:19:57 +00:00
$_linked_separator_color: if($variant=='light', transparentize($button_border, 0.6), transparentize($button_border, 0.5));
2015-05-16 20:50:01 +00:00
%linked_middle {
border-radius: 0;
border-left-style: none;
border-right-style: none;
&:hover {
2015-09-09 19:19:57 +00:00
box-shadow: inset 1px 0 $_linked_separator_color,
inset -1px 0 $_linked_separator_color;
2015-05-16 20:50:01 +00:00
}
2015-09-09 19:19:57 +00:00
&:active, &:checked { box-shadow: none; }
2015-05-16 20:50:01 +00:00
&:dir(rtl) {
border-radius: 0; // needed when including %linked_middle:dir(rtl)
}
}
%linked {
@extend %linked_middle;
&:first-child {
border-radius: 3px 0 0 3px;
border-left-style: solid;
2015-09-09 19:19:57 +00:00
&:hover { box-shadow: inset -1px 0 $_linked_separator_color; }
&:active, &:checked { box-shadow: none; }
2015-05-16 20:50:01 +00:00
}
&:last-child {
border-radius: 0 3px 3px 0;
border-right-style: solid;
2015-09-09 19:19:57 +00:00
&:hover { box-shadow: inset 1px 0 $_linked_separator_color; }
&:active, &:checked { box-shadow: none; }
2015-05-16 20:50:01 +00:00
&:dir(rtl) { border-bottom-left-radius: 0; }
}
&:only-child {
border-radius: 3px;
border-style: solid;
&:hover { box-shadow: none; }
2015-09-09 19:19:57 +00:00
&:active, &:checked { box-shadow: none; }
2015-05-16 20:50:01 +00:00
}
}
%linked_vertical_middle {
border-style: solid;
border-bottom-style: none;
border-top-style: none;
border-radius: 0;
2015-09-09 19:19:57 +00:00
&:hover {
box-shadow: inset 0 -1px $_linked_separator_color,
inset 0 1px $_linked_separator_color;
}
&:active, &:checked { box-shadow: none; }
2015-05-16 20:50:01 +00:00
}
%linked_vertical{
@extend %linked_vertical_middle;
&:first-child {
border-radius: 3px 3px 0 0;
border-top-style: solid;
2015-09-09 19:19:57 +00:00
&:hover { box-shadow: inset 0 -1px $_linked_separator_color; }
&:active, &:checked { box-shadow: none; }
2015-05-16 20:50:01 +00:00
}
&:last-child {
border-radius: 0 0 3px 3px;
border-bottom-style: solid;
2015-09-09 19:19:57 +00:00
&:hover { box-shadow: inset 0 1px $_linked_separator_color; }
&:active, &:checked { box-shadow: none; }
2015-05-16 20:50:01 +00:00
}
&:only-child {
border-radius: 3px;
border-style: solid;
&:hover { box-shadow: none; }
2015-09-09 19:19:57 +00:00
&:active, &:checked { box-shadow: none; }
2015-05-16 20:50:01 +00:00
}
}
%undecorated_button {
border-color: transparent;
background-color: transparent;
background-image: none;
box-shadow: none;
}
/* menu buttons */
.menuitem.button.flat {
transition: none;
@extend %undecorated_button;
outline-offset: -1px;
border-radius: 2px;
2015-09-09 19:19:57 +00:00
&:hover { background-color: if($variant=='light', mix($fg_color,$bg_color,5%), mix($fg_color,$bg_color,10%)); }
2015-08-13 22:26:50 +00:00
&:active, &:selected {
2015-05-16 20:50:01 +00:00
@extend %selected_items;
}
2015-08-13 22:26:50 +00:00
&:checked { color: $fg_color; }
2015-05-16 20:50:01 +00:00
}
2015-12-28 16:54:04 +00:00
//
// Links
//
2015-05-16 20:50:01 +00:00
*:link {
color: $link_color;
&:visited {
color: $link_visited_color;
*:selected & { color: mix($selected_fg_color, $selected_bg_color, 60%); }
}
&:hover {
color: lighten($link_color,10%);
*:selected & { color: mix($selected_fg_color, $selected_bg_color, 90%); }
}
&:active {
color: $link_color;
*:selected & { color: mix($selected_fg_color, $selected_bg_color, 80%); }
}
&:selected, *:selected & {
color: mix($selected_fg_color, $selected_bg_color, 80%);
}
}
.button:link, .button:visited {
@extend %undecorated_button;
@extend *:link;
&:hover, &:active, &:checked {
@extend %undecorated_button;
}
}
2015-12-28 16:54:04 +00:00
//
// Spinbuttons
//
2015-05-16 20:50:01 +00:00
.spinbutton {
border-radius: 3px;
.button {
background-image: none;
border: 1px solid transparentize($borders_color,0.4);
border-style: none none none solid;
color: mix($fg_color,$base_color,95%);
border-radius: 0;
box-shadow: none;
2015-12-28 16:54:04 +00:00
2015-05-16 20:50:01 +00:00
&:dir(rtl) { border-style: none solid none none; }
&:first-child { color: red; }
2015-09-09 19:19:57 +00:00
2015-05-16 20:50:01 +00:00
&:insensitive {
color: $insensitive_fg_color;
}
&:active {
background-color: $selected_bg_color;
color: $selected_fg_color;
}
}
// .osd & {
// .button {
// @include button(undecorated);
// color: $osd_fg_color;
// border-style: none none none solid;
// border-color: transparentize($osd_borders_color, 0.3);
// border-radius: 0;
// box-shadow: none;
// &:dir(rtl) { border-style: none solid none none; }
// &:hover {
// @include button(undecorated);
// color: $osd_fg_color;
// border-color: transparentize(opacify($osd_borders_color, 1), 0.5);
// background-color: transparentize($osd_fg_color, 0.9);
// box-shadow: none;
// }
// &:insensitive {
// @include button(undecorated);
// color: $osd_insensitive_fg_color;
// border-color: transparentize(opacify($osd_borders_color, 1), 0.5);
// box-shadow: none;
// }
// &:last-child { border-radius: 0 2px 2px 0; }
// &:dir(rtl):first-child { border-radius: 2px 0 0 2px; }
// }
// }
&.vertical, &.vertical:dir(rtl) {
.button {
&:first-child {
@extend %top_button;
@include button(normal);
&:active {
@extend %top_button;
@include button(active);
}
&:hover {
@extend %top_button;
@include button(hover);
}
&:insensitive {
@extend %top_button;
@include button(insensitive);
}
}
&:last-child {
@extend %bottom_button;
@include button(normal);
&:active {
@extend %bottom_button;
@include button(active);
}
&:hover {
@extend %bottom_button;
@include button(hover);
}
&:insensitive {
@extend %bottom_button;
@include button(insensitive);
}
}
}
&.entry {
border-radius: 0;
padding-left: 5px;
padding-right: 5px;
}
%top_button {
border-radius: 2px 2px 0 0;
border-style: solid solid none solid;
}
%bottom_button {
border-radius: 0 0 2px 2px;
border-style: none solid solid solid;
}
}
GtkTreeView & {
&.entry, &.entry:focus {
padding: 1px;
border-width: 1px 0;
border-color: $selected_bg_color;
border-radius: 0;
box-shadow: none;
}
}
}
2015-12-28 16:54:04 +00:00
//
// Comboboxes
//
2015-05-16 20:50:01 +00:00
GtkComboBox {
-GtkComboBox-arrow-scaling: 0.5;
-GtkComboBox-shadow-type: none;
2016-01-03 21:35:53 +00:00
> .button { // Otherwise combos
padding-top: $vert_padding - 2px; // are bigger than
padding-bottom: $vert_padding - 2px; // buttons
2015-12-28 16:54:04 +00:00
}
2015-05-16 20:50:01 +00:00
&:insensitive {
color: $insensitive_fg_color;
}
.separator.vertical {
// always disable separators
-GtkWidget-wide-separators: true;
}
&.combobox-entry .entry {
@extend %linked;
2015-09-11 20:05:29 +00:00
&:dir(ltr) {
border-right-style: none;
2015-09-14 10:08:55 +00:00
@if $variant=='light' { &:focus { box-shadow: 1px 0 $selected_bg_color; } }
2015-09-11 20:05:29 +00:00
}
&:dir(rtl) {
border-left-style: none;
2015-09-14 10:08:55 +00:00
@if $variant=='light' { &:focus { box-shadow: -1px 0 $selected_bg_color; } }
2015-09-11 20:05:29 +00:00
}
2015-05-16 20:50:01 +00:00
}
&.combobox-entry .button {
@extend %linked;
2015-09-11 20:05:29 +00:00
&:dir(ltr) {
box-shadow: inset 1px 0 $button_border;
2015-05-16 20:50:01 +00:00
2015-09-11 20:05:29 +00:00
&:insensitive { box-shadow: inset 1px 0 transparentize($button_border, 0.45); }
2015-05-16 20:50:01 +00:00
}
2015-09-11 20:05:29 +00:00
&:dir(rtl) {
box-shadow: inset -1px 0 $button_border;
2015-05-16 20:50:01 +00:00
2015-09-11 20:05:29 +00:00
&:insensitive { box-shadow: inset -1px 0 transparentize($button_border, 0.45); }
}
2015-05-16 20:50:01 +00:00
}
}
.linked > GtkComboBox > .button {
// the combo is a composite widget so the way we do button linking doesn't
// work, special case needed. See
// https://bugzilla.gnome.org/show_bug.cgi?id=733979
&:dir(ltr) { @extend %linked_middle; } // specificity bump
&:dir(rtl) { @extend %linked_middle:dir(rtl); }
}
.linked > GtkComboBox:first-child > .button {
@extend %linked:first-child;
}
.linked > GtkComboBox:last-child > .button {
@extend %linked:last-child;
}
.linked > GtkComboBox:only-child > .button {
@extend %linked:only-child;
}
.linked.vertical > GtkComboBoxText > .button,
.linked.vertical > GtkComboBox > .button { @extend %linked_vertical_middle; }
.linked.vertical > GtkComboBoxText:first-child > .button,
.linked.vertical > GtkComboBox:first-child > .button { @extend %linked_vertical:first-child; }
.linked.vertical > GtkComboBoxText:last-child > .button,
.linked.vertical > GtkComboBox:last-child > .button { @extend %linked_vertical:last-child; }
.linked.vertical > GtkComboBoxText:only-child > .button,
.linked.vertical > GtkComboBox:only-child > .button { @extend %linked_vertical:only-child; }
2015-12-28 16:54:04 +00:00
//
// Toolbars
//
2015-05-16 20:50:01 +00:00
.toolbar {
-GtkWidget-window-dragging: true;
padding: 4px;
background-color: $bg_color;
.osd &, &.osd {
padding: 7px;
2015-09-09 19:19:57 +00:00
border: 1px solid transparentize(black, 0.5);
border-radius: 3px;
background-color: transparentize($osd_bg_color, 0.1);
2015-05-16 20:50:01 +00:00
}
}
.primary-toolbar {
color: $header_fg;
background-color: opacify($header_bg, 1);
box-shadow: none;
border-width: 0 0 1px 0;
border-style: solid;
border-image: linear-gradient(to bottom, opacify($header_bg, 1),
darken($header_bg, 7%)) 1 0 1 0; //temporary hack for rhythmbox 3.1
//&:backdrop { background-color: opacify($header_bg_backdrop, 1); }
2015-05-16 20:50:01 +00:00
.separator { @extend %header_separator; }
@extend %header_widgets;
}
.inline-toolbar {
@extend .toolbar;
background-color: darken($bg_color, 3%);
border-style: solid;
border-color: $borders_color;
border-width: 0 1px 1px;
padding: 3px;
border-radius: 0 0 3px 3px;
}
.search-bar {
background-color: $bg_color;
border-style: solid;
border-color: $borders_color;
border-width: 0 0 1px;
padding: 3px;
//box-shadow: inset 0 1px 2px rgba(0,0,0,0.25);
}
.action-bar { background-color: darken($bg_color, 3%) }
2015-12-28 16:54:04 +00:00
//
// Headerbars
//
2015-05-16 20:50:01 +00:00
.header-bar {
2016-01-03 21:35:53 +00:00
padding: 5px 5px 4px 5px;
2015-05-16 20:50:01 +00:00
border-width: 0 0 1px;
border-style: solid;
border-radius: 0;
border-color: opacify($header_border, 1);
2015-05-16 20:50:01 +00:00
color: $header_fg;
background-color: opacify($header_bg, 1);
.csd & { // Transparent header-bars only in csd windows
background-color: $header_bg;
border-color: $header_border;
}
2015-05-16 20:50:01 +00:00
&:backdrop { color: transparentize($header_fg, 0.3); }
2015-05-16 20:50:01 +00:00
.title {
2016-01-03 21:35:53 +00:00
padding-left: 12px;
padding-right: 12px;
2015-05-16 20:50:01 +00:00
}
.subtitle {
font-size: smaller;
2016-01-03 21:35:53 +00:00
padding-left: 12px;
padding-right: 12px;
2015-05-16 20:50:01 +00:00
@extend .dim-label;
}
// Selectionmode
2015-07-11 21:19:36 +00:00
&.selection-mode,
&.titlebar.selection-mode {
color: $selection_mode_fg;
2015-05-16 20:50:01 +00:00
background-color: $selection_mode_bg;
border-color: darken($selection_mode_bg, 4%);
box-shadow: none;
2015-05-16 22:34:40 +00:00
&:backdrop {
background-color: $selection_mode_bg;
color: transparentize($selection_mode_fg, 0.4);
2015-05-16 22:34:40 +00:00
}
2015-05-16 20:50:01 +00:00
.subtitle:link { @extend *:link:selected; }
.button {
2015-05-16 22:34:40 +00:00
color: $selected_fg_color;
outline-color: transparentize($selected_fg_color, 0.7);
background-color: transparentize($selected_fg_color, 1);
border-color: transparentize($selected_fg_color, 1);
&.flat {
@include button(undecorated);
color: $selected_fg_color;
background-color: transparentize($selected_fg_color, 1);
}
&:hover {
color: $selected_fg_color;
outline-color: transparentize($selected_fg_color, 0.7);
background-color: transparentize($selected_fg_color, 0.95);
border-color: transparentize($selected_fg_color, 0.5);
}
&:active, &:checked {
2015-07-11 21:19:36 +00:00
color: $selection_mode_bg;
outline-color: transparentize($selection_mode_bg, 0.7);
background-color: $selected_fg_color;
border-color: $selected_fg_color;
2015-05-16 22:34:40 +00:00
}
&:insensitive {
color: transparentize($selected_fg_color, 0.6);
background-color: transparentize($selected_fg_color, 1);
border-color: transparentize($selected_fg_color, 1);
&:active, &:checked {
2015-07-11 21:19:36 +00:00
color: transparentize($selection_mode_bg, 0.6);
background-color: transparentize($selected_fg_color, 0.85);
border-color: transparentize($selected_fg_color, 0.85);
2015-05-16 22:34:40 +00:00
}
}
2015-05-16 20:50:01 +00:00
}
.selection-menu {
box-shadow: none;
padding-left: 10px;
padding-right: 10px;
GtkArrow { -GtkArrow-arrow-scaling: 1; }
.arrow {
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
}
}
.maximized & { background-color: opacify($selection_mode_bg, 1); }
}
.tiled &, .tiled &:backdrop,
.maximized &, .maximized &:backdrop {
border-radius: 0; // squared corners when the window is max'd or tiled
}
.maximized & {
background-color: opacify($header_bg, 1);
border-color: opacify($header_border, 1);
2015-05-16 20:50:01 +00:00
}
&.default-decoration,
.csd &.default-decoration, // needed under wayland, since all gtk3 windows are csd windows
&.default-decoration:backdrop,
.csd &.default-decoration:backdrop {
2016-01-05 19:11:02 +00:00
padding-top: 5px;
padding-bottom: 5px;
background-color: opacify($header_bg, 1);
border-bottom-width: 0;
.maximized & { background-color: opacify($header_bg, 1); }
}
2015-05-16 20:50:01 +00:00
}
.titlebar {
padding-left: 7px;
padding-right: 7px;
2015-07-08 00:51:09 +00:00
border-radius: if($darker=='false' and $variant=='light', 4px 4px 0 0, 3px 3px 0 0);
2015-05-16 20:50:01 +00:00
color: $header_fg;
background-color: opacify($header_bg, 1);
2015-05-16 20:50:01 +00:00
box-shadow: inset 0 1px lighten($header_bg, 3%);
.csd & { background-color: $header_bg; }
&:backdrop {
color: transparentize($header_fg, 0.3);
background-color: opacify($header_bg_backdrop, 1);
2015-06-07 21:00:55 +00:00
.csd & { background-color: $header_bg_backdrop; }
}
.maximized & {
background-color: opacify($header_bg, 1);
&:backdrop, .csd &:backdrop { background-color: opacify($header_bg_backdrop, 1); }
}
2015-05-16 20:50:01 +00:00
}
.titlebar .titlebar,
.titlebar .titlebar:backdrop { background-color: transparent; }
2015-05-16 20:50:01 +00:00
// Only extending .header-bar avoids some problems (Gnome Documents searchbar)
.header-bar {
.header-bar-separator,
& > GtkBox > .separator.vertical { @extend %header_separator; }
@extend %header_widgets;
}
%header_separator {
-GtkWidget-wide-separators: true;
-GtkWidget-separator-width: 1px;
border-width: 0 1px;
border-image: linear-gradient(to bottom,
transparentize($header_fg, 1) 25%,
transparentize($header_fg, 0.65) 25%,
transparentize($header_fg, 0.65) 75%,
transparentize($header_fg, 1) 75%) 0 1/0 1px stretch;
&:backdrop { opacity: 0.6; }
}
%header_widgets {
2015-12-28 16:54:04 +00:00
// Headerbar Entries
2015-05-16 20:50:01 +00:00
.entry {
@include entry(header-normal);
&:backdrop { opacity: 0.85; }
2015-05-17 08:56:05 +00:00
&:focus {
@include entry(header-focus);
2015-09-09 19:19:57 +00:00
background-clip: if($darker=='false' and $variant=='light', border-box, padding-box);
2015-05-28 15:41:22 +00:00
&.image { color: $selected_fg_color; }
2015-05-17 08:56:05 +00:00
}
2015-05-16 20:50:01 +00:00
&:insensitive { @include entry(header-insensitive); }
&:selected:focus {
background-color: $selected_fg_color;
color: $selected_bg_color;
}
2015-06-06 14:14:01 +00:00
&.progressbar {
border-color: $selected_bg_color;
background-image: none;
background-color: transparent;
}
2015-09-20 14:46:14 +00:00
@each $e_type, $e_color, $e_fg_color in (warning, $warning_color, $warning_fg_color),
(error, $error_color, $error_fg_color) {
2015-09-20 14:46:14 +00:00
&.#{$e_type} {
color: $e_fg_color;
2015-09-20 14:46:14 +00:00
border-color: if($darker=='false' and $variant=='light', $e_color, $header_entry_border);
background-image: linear-gradient(to bottom, mix($e_color, $header_bg, 60%));
&:focus {
color: $e_fg_color;
2015-09-20 14:46:14 +00:00
background-image: linear-gradient(to bottom, $e_color);
}
&:selected, &:selected:focus {
background-color: $e_fg_color;
2015-09-20 14:46:14 +00:00
color: $e_color;
}
}
}
2015-05-16 20:50:01 +00:00
}
2015-12-28 16:54:04 +00:00
// Headerbar Buttons
2015-05-16 20:50:01 +00:00
.button {
@include button(header-normal);
&:backdrop { opacity: 0.7; }
&:hover { @include button(header-hover); }
2015-09-09 19:19:57 +00:00
&:active, &:checked {
@include button(header-active);
background-clip: if($darker=='false' and $variant=='light', border-box, padding-box);
}
2015-05-16 20:50:01 +00:00
&:insensitive { @include button(header-insensitive); }
&:insensitive:active, &:insensitive:checked { @include button(header-insensitive-active); }
}
.linked > .button { border-radius: 3px; border-style: solid}
.linked > .button:hover { box-shadow: none; }
.linked.stack-switcher > .button,
.linked.path-bar > .button {
2015-09-09 19:19:57 +00:00
$_linked_separator_color: $header_button_border;
2015-05-16 20:50:01 +00:00
@include button(header-hover);
2015-09-09 19:19:57 +00:00
&:hover { background-color: lighten($header_button_bg, 15%); }
2015-05-16 20:50:01 +00:00
&:active, &:checked { @include button(header-active); }
2015-09-09 19:19:57 +00:00
&:insensitive { color: transparentize($header_fg, 0.4); }
2015-05-16 20:50:01 +00:00
@extend %linked;
2015-09-09 19:19:57 +00:00
&:hover {
box-shadow: inset 1px 0 $_linked_separator_color,
inset -1px 0 $_linked_separator_color;
}
&:active, &:checked { box-shadow: none; }
&:first-child {
&:hover { box-shadow: inset -1px 0 $_linked_separator_color; }
&:active, &:checked { box-shadow: none; }
}
&:last-child {
&:hover { box-shadow: inset 1px 0 $_linked_separator_color; }
&:active, &:checked { box-shadow: none; }
}
&:only-child {
&:hover { box-shadow: none; }
&:active, &:checked { box-shadow: none; }
}
2015-05-16 20:50:01 +00:00
}
2015-12-28 16:54:04 +00:00
// Headerbar Suggested and Destructive Action buttons
@each $b_type, $b_color, $b_fg in (suggested-action, $suggested_color, $suggested_fg_color),
(destructive-action, $destructive_color, $destructive_fg_color) {
2015-05-16 20:50:01 +00:00
.button.#{$b_type} {
@include button(suggested_destructive, $b_color, $b_fg);
2015-05-16 20:50:01 +00:00
&.flat {
@include button(undecorated);
color: $b_color;
outline-color: transparentize($b_color, 0.7);
2015-05-16 20:50:01 +00:00
}
&:hover {
@include button(suggested_destructive, lighten($b_color, 10%), $b_fg);
2015-05-16 20:50:01 +00:00
}
&:active, &:checked {
@include button(suggested_destructive, darken($b_color, 10%), $b_fg);
2015-05-16 20:50:01 +00:00
}
&.flat:insensitive,
&:insensitive { @include button(header-insensitive); }
2015-05-16 20:50:01 +00:00
}
.button.#{$b_type}:backdrop,
.button.#{$b_type}:backdrop {
opacity: 0.8;
}
}
2015-12-28 16:54:04 +00:00
// Headerbar Spinbuttons
2015-05-16 20:50:01 +00:00
& .spinbutton {
2015-09-11 20:27:25 +00:00
&:focus .button {
color: $selected_fg_color;
2015-05-16 20:50:01 +00:00
2015-09-11 20:27:25 +00:00
&:hover { background-color: transparentize($selected_fg_color, 0.9); border-color: transparent; }
&:insensitive { color: transparentize($selected_fg_color, 0.6); }
}
.button {
color: $header_fg;
2015-05-16 20:50:01 +00:00
2015-09-11 20:27:25 +00:00
&:hover { background-color: transparentize($header_fg, 0.75); border-color: transparent; }
&:insensitive { color: transparentize($header_fg, 0.3); }
&:active { background-color: rgba(0,0,0,0.1); }
2015-05-16 20:50:01 +00:00
}
}
2015-12-28 16:54:04 +00:00
// Headerbar ComboBoxes
2015-05-16 20:50:01 +00:00
& GtkComboBox{
&:insensitive { color: transparentize($header_fg, 0.6); }
&.combobox-entry .button {
@include entry(header-normal);
2015-09-09 19:19:57 +00:00
&:hover { @include entry(header-focus); box-shadow: none; }
2015-05-16 20:50:01 +00:00
&:insensitive { @include entry(header-insensitive); }
}
2015-09-11 20:18:19 +00:00
&.combobox-entry .entry {
&:dir(ltr) {
&:focus { box-shadow: none; }
}
&:dir(rtl) {
&:focus { box-shadow: none; }
}
}
&.combobox-entry .button {
&:dir(ltr) {
box-shadow: inset 1px 0 $header_button_border;
&:insensitive { box-shadow: inset 1px 0 transparentize($header_button_border, 0.45); }
}
&:dir(rtl) {
box-shadow: inset -1px 0 $header_button_border;
&:insensitive { box-shadow: inset -1px 0 transparentize($header_button_border, 0.45); }
}
}
2015-05-16 20:50:01 +00:00
}
2015-12-28 16:54:04 +00:00
// Headerbar Switches
2015-05-16 20:50:01 +00:00
GtkSwitch {
&:backdrop { opacity: 0.75; }
}
GtkProgressBar {
2015-09-09 19:19:57 +00:00
&.trough { background-color: if($variant=='light' and $darker=='false', opacify($header_button_border, 0.05), $header_button_border); }
2015-05-16 20:50:01 +00:00
&:backdrop { opacity: 0.75; }
}
2015-12-28 16:54:04 +00:00
// Headerbar Scale
2015-05-16 20:50:01 +00:00
.scale {
&:backdrop { opacity: 0.75; }
&.trough {
2015-09-09 19:19:57 +00:00
$_trough_bg: if($variant=='light' and $darker=='false', opacify($header_button_border, 0.05), $header_button_border);
background-image: linear-gradient(to bottom, $_trough_bg);
2015-05-16 20:50:01 +00:00
2015-09-09 19:19:57 +00:00
&:insensitive { background-image: linear-gradient(to bottom, if($variant=='light' and $darker=='false', transparentize($_trough_bg, 0.05), transparentize($_trough_bg, 0.1))); }
2015-05-16 20:50:01 +00:00
}
&.slider {
2015-09-09 19:19:57 +00:00
$_slider_border: if($variant=='light' and $darker=='false', opacify($header_button_border, 0.2), opacify($header_button_border, 0.3));
$_slider_bg: if($variant=='light' and $darker=='false', opacify($header_button_bg,1), lighten(opacify($header_bg,1), 10%));
2015-05-16 20:50:01 +00:00
2015-09-09 19:19:57 +00:00
background-image: linear-gradient(to bottom, $_slider_bg);
border-color: $_slider_border;
2015-07-08 00:51:09 +00:00
2015-09-09 19:19:57 +00:00
&:hover {
background-image: linear-gradient(to bottom, lighten($_slider_bg, 5%));
border-color: $_slider_border;
}
&:active {
background-image: linear-gradient(to bottom, $selected_bg_color);
border-color: $selected_bg_color;
}
&:insensitive {
background-image: linear-gradient(to bottom, mix($_slider_bg, $header_bg, 70%));
border-color: $_slider_border;
2015-07-08 00:51:09 +00:00
}
2015-05-16 20:50:01 +00:00
}
}
}
2015-12-28 16:54:04 +00:00
//
// Pathbars
//
2015-05-16 20:50:01 +00:00
.path-bar .button {
2016-01-03 21:35:53 +00:00
padding: 5px 10px;
2015-07-29 14:49:22 +00:00
2016-01-03 21:35:53 +00:00
&:first-child { padding-left: 10px; }
&:last-child { padding-right: 10px; }
2015-05-16 20:50:01 +00:00
&:only-child {
2016-01-03 21:35:53 +00:00
padding-left: 14px;
padding-right: 14px;
2015-05-16 20:50:01 +00:00
}
// the following is for spacing the icon and the label inside the home button
2016-01-03 21:35:53 +00:00
GtkLabel:last-child { padding-left: 4px; }
GtkLabel:first-child { padding-right: 4px; }
GtkLabel:only-child, GtkLabel { padding-right: 0; padding-left: 0; }
GtkImage { padding-top: 2px; padding-bottom: 1px; }
2015-05-16 20:50:01 +00:00
}
2015-12-28 16:54:04 +00:00
//
// Tree Views
//
2015-05-16 20:50:01 +00:00
GtkTreeView.view { // treeview grid lines and expanders, unfortunatelly
// the tree lines color can't be set
-GtkTreeView-grid-line-width: 1;
-GtkTreeView-grid-line-pattern: '';
-GtkTreeView-tree-line-width: 1;
-GtkTreeView-tree-line-pattern: '';
-GtkTreeView-expander-size: 16;
2015-05-28 15:41:22 +00:00
border-color: transparentize($fg_color, 0.8); // this is actually the line color
// :selected is ignored hence no style for it
2015-05-16 20:50:01 +00:00
&.dnd {
border-style: solid none;
border-width: 1px;
border-color: mix($fg_color, $selected_bg_color, 50%);
}
&.expander {
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
&:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
color: mix($fg_color, $base_color, 50%);
&:hover { color: $fg_color; }
&:selected {
color: mix($selected_fg_color, $selected_bg_color, 70%);
&:hover { color: $selected_fg_color; }
}
&:checked {
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
}
}
&.progressbar { // progress bar in treeviews
color: $selected_fg_color;
border-radius: 3px;
background-image: linear-gradient(to bottom, $selected_bg_color);
2015-05-16 20:50:01 +00:00
&:selected {
color: $selected_bg_color;
box-shadow: none;
background-image: linear-gradient(to bottom, $selected_fg_color);
2015-05-16 20:50:01 +00:00
}
}
&.trough, &.trough:selected { // progress bar trough in treeviews
color: $fg_color;
background-image: linear-gradient(to bottom, $button_border);
2015-05-16 20:50:01 +00:00
border-radius: 3px;
border-width: 0;
}
}
column-header {
.button {
@extend %column_header_button;
$_column_header_color: mix($fg_color,$base_color,80%);
color: $_column_header_color;
background-color: $base_color;
&:hover {
@extend %column_header_button;
color: $selected_bg_color;
box-shadow: none;
transition: none; //I shouldn't need this
}
&:active {
@extend %column_header_button;
color: $fg_color;
transition: none; //I shouldn't need this
}
&.dnd {
@extend column-header.button.dnd;
}
}
&:last-child .button,
&:last-child.button { //treeview-like derived widgets in Banshee and Evolution
border-right-style: none;
border-image: none;
}
}
column-header.button.dnd { // for treeview-like derive widgets
transition: none;
color: $selected_bg_color;
box-shadow: inset 1px 1px 0 1px $selected_bg_color,
inset -1px 0 0 1px $selected_bg_color,
inset 1px 1px $base_color, inset -1px 0 $base_color;;
&:active { @extend column-header.button.dnd; }
&:selected { @extend column-header.button.dnd; }
&:hover { @extend column-header.button.dnd; }
}
%column_header_button {
padding: 3px 6px;
background-image: none;
border-style: none solid none none;
border-radius: 0;
border-image: linear-gradient(to bottom,
2015-06-07 21:00:55 +00:00
transparentize(if($variant == 'light', black, white), 1) 20%,
transparentize(if($variant == 'light', black, white), 0.89) 20%,
transparentize(if($variant == 'light', black, white), 0.89) 80%,
transparentize(if($variant == 'light', black, white), 1) 80%) 0 1 0 0 / 0 1px 0 0 stretch;
2015-05-16 20:50:01 +00:00
2015-07-18 17:27:03 +00:00
&:active, &:hover { background-color: $base_color; }
&:active:hover { color: $fg_color; }
2015-05-16 20:50:01 +00:00
&:insensitive {
border-color: $bg_color;
background-image: none;
}
}
2015-12-28 16:54:04 +00:00
//
// Menus
//
2015-05-16 20:50:01 +00:00
.menubar {
-GtkWidget-window-dragging: true;
padding: 0px;
background-color: opacify($header_bg, 1);
color: $header_fg;
&:backdrop {
color: transparentize($header_fg, 0.3);
//background-color: opacify($header_bg_backdrop, 1);
}
2015-05-16 20:50:01 +00:00
& > .menuitem {
padding: 4px 8px;
2015-05-16 20:50:01 +00:00
border: solid transparent;
border-width: 0;
&:hover { //Seems like it :hover even with keyboard focus
background-color: $selected_bg_color;
color: $selected_fg_color;
}
&:insensitive {
color: transparentize($header_fg, 0.6);
border-color: transparent;
}
}
}
2015-11-05 17:23:27 +00:00
.menu {
2015-05-16 20:50:01 +00:00
margin: 4px;
padding: 0;
border-radius: 0;
2015-09-09 19:19:57 +00:00
background-color: if($variant=='light', $base_color, $bg_color);
2015-05-16 20:50:01 +00:00
border: 1px solid $borders_color;
.csd & {
padding: 4px 0px;
2015-08-03 18:18:19 +00:00
border-radius: 2px;
2015-05-16 20:50:01 +00:00
border: none;
}
.menuitem {
padding: 5px;
&:hover {
color: $selected_fg_color;
background-color: $selected_bg_color;
2015-05-16 20:50:01 +00:00
}
&:insensitive {
color: $insensitive_fg_color;
}
2015-05-19 20:42:47 +00:00
&.separator { color: transparentize($base_color, 1); }
2015-05-16 20:50:01 +00:00
//submenu indicators
&.arrow { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); }
&.arrow:dir(rtl) {-gtk-icon-source:-gtk-icontheme('pan-end-symbolic-rtl'); }
}
&.button { // overlow buttons
@extend %undecorated_button;
border-style: none;
border-radius: 0;
&.top { border-bottom: 1px solid mix($fg_color, $base_color, 10%); }
&.bottom { border-top: 1px solid mix($fg_color, $base_color, 10%); }
&:hover { background-color: mix($fg_color, $base_color, 10%); }
&:insensitive {
color: transparent;
background-color: transparent;
border-color: transparent ;
}
}
}
2015-11-05 17:23:27 +00:00
.csd .popup { border-radius: 2px; }
2015-05-16 20:50:01 +00:00
.menuitem .accelerator { color: gtkalpha(currentColor,0.55); }
2015-12-28 16:54:04 +00:00
//
// Popovers
//
2015-05-16 20:50:01 +00:00
.popover {
2015-05-28 15:41:22 +00:00
margin: 10px;
2015-05-16 20:50:01 +00:00
padding: 2px;
border: 1px solid darken($borders_color, 5%);
border-radius: 3px;
background-clip: border-box;
2015-09-09 19:19:57 +00:00
background-color: if($variant=='light', $base_color, $bg_color);
2015-05-16 20:50:01 +00:00
2015-07-08 00:51:09 +00:00
box-shadow: 0 2px 6px 1px if($variant=='light', transparentize(black, 0.93), transparentize(black, 0.65));
2015-05-16 20:50:01 +00:00
2015-05-19 20:42:47 +00:00
& .separator { color: transparentize($base_color, 1); }
2015-05-28 15:41:22 +00:00
GtkLabel.separator { @extend GtkLabel.separator; } // Noice
2015-05-16 20:50:01 +00:00
> .list,
> .view,
> .toolbar,
&.osd > .toolbar {
border-style: none;
background-color: transparent;
}
&.osd { @extend %osd; }
}
//touch selection handlebars for the Popover.osd above
.entry.cursor-handle,
.cursor-handle {
background-color: transparent;
background-image: none;
box-shadow: none;
border-style: none;
&.top { -gtk-icon-source: -gtk-icontheme('selection-start-symbolic'); }
&.bottom { -gtk-icon-source: -gtk-icontheme('selection-end-symbolic'); }
}
2015-12-28 16:54:04 +00:00
//
// Notebooks and Tabs
//
2015-05-16 20:50:01 +00:00
.notebook {
padding: 0;
2015-07-14 20:47:28 +00:00
background-color: $base_color;
-GtkNotebook-initial-gap: 4;
2015-05-16 20:50:01 +00:00
-GtkNotebook-arrow-spacing: 5;
-GtkNotebook-tab-curvature: 0;
2015-07-14 20:47:28 +00:00
-GtkNotebook-tab-overlap: 1;
2015-05-16 20:50:01 +00:00
-GtkNotebook-has-tab-gap: false;
-GtkWidget-focus-padding: 0;
-GtkWidget-focus-line-width: 0;
transition: all 200ms $ease-out-quad;
&.frame {
border: 1px solid $borders_color;
2015-12-28 16:54:04 +00:00
2015-05-16 20:50:01 +00:00
&.top { border-top-width: 0; }
&.bottom { border-bottom-width: 0; }
&.right { border-right-width: 0; }
&.left { border-left-width: 0; }
}
&.header {
2015-07-14 20:47:28 +00:00
background-color: $bg_color;
2015-05-16 20:50:01 +00:00
// this is the shading of the header behind the tabs
&.frame {
2015-07-14 20:47:28 +00:00
border: 0px solid $borders_color;
2015-05-16 20:50:01 +00:00
&.top { border-bottom-width: 0; }
&.bottom { border-top-width: 0; }
&.right { border-left-width: 0; }
&.left { border-right-width: 0; }
}
2015-07-14 20:47:28 +00:00
$_header_border: $borders_color;
2015-12-28 16:54:04 +00:00
&.top { box-shadow: inset 0 -1px $_header_border; }
&.bottom { box-shadow: inset 0 1px $_header_border; }
&.right { box-shadow: inset 1px 0 $_header_border; }
&.left { box-shadow: inset -1px 0 $_header_border; }
2015-05-16 20:50:01 +00:00
}
tab {
border-width: 0;
border-style: solid;
border-color: transparent;
background-color: transparent;
outline-color: transparent;
outline-offset: 0;
2015-07-14 20:47:28 +00:00
// tab sizing
$vpadding: 4px;
$hpadding: 15px;
2015-05-16 20:50:01 +00:00
//FIXME: we get double border in some cases, not considering the broken
//notebook content frame...
2015-07-14 20:47:28 +00:00
&.top, &.bottom { padding: $vpadding $hpadding; }
&.left, &.right { padding: $vpadding $hpadding; }
2015-05-16 20:50:01 +00:00
&.reorderable-page {
&.top, &.bottom {
padding-left: 12px; // for a nicer close button
padding-right: 12px; // placement
}
}
@each $_tab in (top, bottom, right, left) {
&.reorderable-page.#{$_tab}, &.#{$_tab} {
2015-07-14 20:47:28 +00:00
@if $_tab==top or $_tab==bottom {
padding-#{$_tab}: $vpadding + 2;
}
@else if $_tab==left or $_tab==right {
padding-#{$_tab}: $hpadding + 2;
}
@if $_tab==top { border-radius: 3.5px 2px 0 0; }
@else if $_tab==bottom { border-radius: 0 0 2px 3.5px; }
@else if $_tab==left { border-radius: 3.5px 0 0 3.5px; }
@else if $_tab==right { border-radius: 0 3.5px 3.5px 0; }
border-width: 0;
border-#{$_tab}-width: 2px;
2015-05-16 20:50:01 +00:00
border-color: transparent;
2015-07-14 20:47:28 +00:00
background-color: transparentize($base_color, 1);
2015-05-16 20:50:01 +00:00
&:hover, &.prelight-page {
2015-07-14 20:47:28 +00:00
background-color: transparentize($base_color, 0.5);
box-shadow: inset 0 1px $borders_color,
inset 0 -1px $borders_color,
inset 1px 0 $borders_color,
inset -1px 0 $borders_color;
2015-05-16 20:50:01 +00:00
}
&:active, &.active-page, &.active-page:hover {
2015-07-14 20:47:28 +00:00
background-color: $base_color;
@if $_tab==top {
box-shadow: inset 0 1px $borders_color,
inset 0 -1px $base_color,
inset 1px 0 $borders_color,
inset -1px 0 $borders_color;
}
@else if $_tab==bottom {
box-shadow: inset 0 -1px $base_color,
inset 0 -1px $borders_color,
inset 1px 0 $borders_color,
inset -1px 0 $borders_color;
}
@else if $_tab==left {
box-shadow: inset 0 1px $borders_color,
inset 0 -1px $borders_color,
inset 1px 0 $borders_color,
inset -1px 0 $base_color;
}
@else if $_tab==right {
box-shadow: inset 0 1px $borders_color,
inset 0 -1px $borders_color,
inset 1px 0 $base_color,
inset -1px 0 $borders_color;
}
2015-05-16 20:50:01 +00:00
}
}
}
GtkLabel { //tab text
padding: 0 2px; // needed for a nicer focus ring
color: $insensitive_fg_color;
}
.prelight-page GtkLabel, GtkLabel.prelight-page {
// prelight tab text
color: mix($fg_color, $insensitive_fg_color, 50%);
}
.active-page GtkLabel, GtkLabel.active-page {
// active tab text
color: $fg_color;
}
.button { //tab close button
padding: 0;
@extend %undecorated_button;
color: mix($bg_color, $fg_color, 35%);
&:hover {
color: lighten(red, 15%);
}
&:active {
color: $selected_bg_color;
}
& > GtkImage { // this is a hack which makes tabs grow
padding: 2px;
}
}
}
&.arrow {
color: $insensitive_fg_color;
&:hover { color: mix($fg_color, $insensitive_fg_color, 50%); }
&:active { color: $fg_color; }
&:insensitive {
2015-08-03 17:23:10 +00:00
color: transparentize($insensitive_fg_color,0.3);
2015-05-16 20:50:01 +00:00
}
}
}
2015-12-28 16:54:04 +00:00
//
// Scrollbars
//
2015-12-02 23:20:09 +00:00
$_scrollbar_bg_color: darken($base_color, 1%);
2015-05-16 20:50:01 +00:00
.scrollbar {
2015-05-28 15:41:22 +00:00
background-clip: padding-box;
background-image: none;
border-style: solid;
-GtkRange-trough-border: 0;
2015-05-16 20:50:01 +00:00
-GtkScrollbar-has-backward-stepper: false;
-GtkScrollbar-has-forward-stepper: false;
2015-12-02 23:20:09 +00:00
-GtkRange-slider-width: 13;
2015-05-16 20:50:01 +00:00
-GtkScrollbar-min-slider-length: 42; // minimum size for the slider.
// sadly can't be in '.slider'
// where it belongs
2015-05-28 15:41:22 +00:00
2015-05-16 20:50:01 +00:00
-GtkRange-stepper-spacing: 0;
-GtkRange-trough-under-steppers: 1;
.button {
border: none;
}
2015-12-02 23:20:09 +00:00
&.trough {
background-color: $_scrollbar_bg_color;
border-left: 1px solid $borders_color;
&.horizontal {
border-left: none;
border-top: 1px solid $borders_color;
}
}
2015-05-28 15:41:22 +00:00
&.slider {
2015-12-02 23:20:09 +00:00
border-radius: 21px 20px 20px 21px;
2015-05-28 15:41:22 +00:00
border: 3px solid transparent; //margin :/
2015-12-02 23:20:09 +00:00
border-left-width: 4px;
background-color: mix($fg_color, $bg_color, 40%);
&.horizontal {
border-radius: 21px 21px 20px 20px;
border-left-width: 3px;
border-top-width: 4px;
}
2015-05-28 15:41:22 +00:00
&:hover {
2015-12-02 23:20:09 +00:00
background-color: mix($fg_color, $bg_color, 25%);
2015-05-16 20:50:01 +00:00
}
&:prelight:active,
&:active {
2015-05-28 15:41:22 +00:00
background-color: $selected_bg_color;
2015-05-16 20:50:01 +00:00
}
2015-05-28 15:41:22 +00:00
&.fine-tune {
border-width: 4px;
&:prelight:active {
background-color: $selected_bg_color;
2015-05-16 20:50:01 +00:00
}
}
2015-05-28 15:41:22 +00:00
&:insensitive {
background-color: transparent;
2015-05-16 20:50:01 +00:00
}
}
}
.scrollbars-junction,
.scrollbars-junction.frame { // the small square between two scrollbars
border-color: transparent;
2015-12-02 23:20:09 +00:00
background-color: $_scrollbar_bg_color;
2015-05-16 20:50:01 +00:00
}
2015-12-28 16:54:04 +00:00
//
// Switches
//
2015-05-16 20:50:01 +00:00
GtkSwitch {
font: 1;
-GtkSwitch-slider-width: 41;
2015-07-08 00:51:09 +00:00
outline-color: transparent;
2015-05-16 20:50:01 +00:00
&.trough, &.slider {
background-size: 52px 24px;
background-repeat: no-repeat;
background-position: right center;
color: transparent;
border-color: transparent;
border-image: none;
border-style: none;
box-shadow: none;
&:dir(rtl) { background-position: left center; }
}
}
2015-09-21 19:31:16 +00:00
@each $k,$l in ('',''),
(':active','-active'),
(':insensitive','-insensitive'),
(':active:insensitive','-active-insensitive') {
2015-05-16 20:50:01 +00:00
2015-09-21 19:31:16 +00:00
// load switch troughs from .png files in assets directory
2015-05-16 20:50:01 +00:00
2015-09-21 19:31:16 +00:00
GtkSwitch.trough#{$k} {
background-image: -gtk-scaled(url("assets/switch#{$l}#{$asset_suffix}.png"),url("assets/switch#{$l}#{$asset_suffix}@2.png"));
}
2015-05-16 20:50:01 +00:00
.menu .menuitem:hover GtkSwitch.trough#{$k},
2015-09-21 19:50:48 +00:00
.list-row:selected GtkSwitch.trough#{$k},
GtkInfoBar GtkSwitch.trough#{$k} {
2015-09-21 19:31:16 +00:00
background-image: -gtk-scaled(url("assets/switch#{$l}-selected.png"),url("assets/switch#{$l}-selected@2.png"));
}
2015-05-16 20:50:01 +00:00
2015-09-21 19:31:16 +00:00
.header-bar GtkSwitch.trough#{$k},
.primary-toolbar GtkSwitch.trough#{$k} {
background-image: -gtk-scaled(url("assets/switch#{$l}-header#{$darker_asset_suffix}.png"),url("assets/switch#{$l}-header#{$darker_asset_suffix}@2.png"));
2015-05-16 20:50:01 +00:00
}
}
2015-12-28 16:54:04 +00:00
//
// Check and Radio items *
//
2015-05-16 20:50:01 +00:00
@each $w,$a in ('check', 'checkbox'),
('radio','radio') {
//standard checks and radios
@each $s,$as in ('','-unchecked'),
(':insensitive','-unchecked-insensitive'),
(':inconsistent', '-mixed'),
(':inconsistent:insensitive', '-mixed-insensitive'),
(':checked', '-checked'),
(':checked:insensitive','-checked-insensitive') {
.#{$w}#{$s} {
2015-06-07 21:00:55 +00:00
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}#{$asset_suffix}.png"),
url("assets/#{$a}#{$as}#{$asset_suffix}@2.png"));
2015-05-16 20:50:01 +00:00
}
2015-10-02 11:38:50 +00:00
%osd_check_radio {
.#{$w}#{$s} {
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}-dark.png"),
url("assets/#{$a}#{$as}-dark@2.png"));
}
}
2015-05-16 20:50:01 +00:00
// the borders of checks and radios are
// too similar in luminosity to the selected background color, hence
// we need special casing.
.menu .menuitem.#{$w}#{$s}:hover,
2015-05-16 20:50:01 +00:00
GtkTreeView.view.#{$w}#{$s}:selected,
2015-09-21 19:50:48 +00:00
.list-row:selected .#{$w}#{$s},
GtkInfoBar .#{$w}#{$s} {
2015-05-16 20:50:01 +00:00
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}-selected.png"),
url("assets/#{$a}#{$as}-selected@2.png"));
}
}
}
2015-12-28 16:54:04 +00:00
// Selectionmode
2015-05-16 20:50:01 +00:00
@each $s,$as in ('','-selectionmode'),
(':checked', '-checked-selectionmode') {
GtkIconView.view.check#{$s},
GtkFlowBox.view.check#{$s} {
2015-06-07 21:00:55 +00:00
-gtk-icon-source: -gtk-scaled(url("assets/checkbox#{$as}#{$asset_suffix}.png"),
url("assets/checkbox#{$as}#{$asset_suffix}@2.png"));
2015-05-16 20:50:01 +00:00
background-color: transparent;
}
}
GtkCheckButton.text-button, GtkRadioButton.text-button {
// this is for a nice focus on check and radios text
padding: 1px 2px 4px;
outline-offset: 0;
&:insensitive,
&:insensitive:active,
&:insensitive:inconsistent {
// set insensitive color, which is overriden otherwise
color: $insensitive_fg_color;
}
}
2015-12-28 16:54:04 +00:00
//
// GtkScale
//
2015-05-16 20:50:01 +00:00
.scale {
-GtkScale-slider-length: 15;
-GtkRange-slider-width: 15;
-GtkRange-trough-border: 0;
outline-offset: -1px;
outline-radius: 2px;
&.trough { margin: 5px; }
&.fine-tune {
&.trough { border-radius: 5px; margin: 3px; }
}
&.slider {
2015-09-09 19:19:57 +00:00
$_slider_border: if($variant=='light', transparentize(darken($button_border,25%), 0.5), darken($button_border,2%));
2015-05-16 20:50:01 +00:00
background-clip: border-box;
2015-09-09 19:19:57 +00:00
background-image: linear-gradient(to bottom, $button_bg);
border: 1px solid $_slider_border;
2015-05-16 20:50:01 +00:00
border-radius: 50%;
box-shadow: none;
&:hover {
2015-09-09 19:19:57 +00:00
background-image: linear-gradient(to bottom, lighten($button_bg, 5%));
border-color: $_slider_border;
2015-05-16 20:50:01 +00:00
}
&:insensitive {
2015-07-08 00:51:09 +00:00
background-image: linear-gradient(to bottom, mix($entry_bg, $bg_color, 55%));
2015-09-09 19:19:57 +00:00
border-color: transparentize($_slider_border, 0.2);
2015-05-16 20:50:01 +00:00
}
&:active {
2015-09-09 19:19:57 +00:00
background-image: linear-gradient(to bottom, $selected_bg_color);
border-color: $selected_bg_color;
2015-05-16 20:50:01 +00:00
}
//OSD sliders
.osd & {
background-image: linear-gradient(to bottom, $osd_bg_color);
border-color: $selected_bg_color;
&:hover { background-image: linear-gradient(to bottom, $selected_bg_color); }
&:active {
background-image: linear-gradient(to bottom, darken($selected_bg_color, 10%));
border-color: darken($selected_bg_color, 10%);
}
}
2015-09-21 19:50:48 +00:00
//selected list-row and infobar sliders
2016-06-01 18:02:32 +00:00
.menu .menuitem:hover &,
2015-09-21 19:50:48 +00:00
.list-row:selected &,
GtkInfoBar & {
2015-05-16 20:50:01 +00:00
background-image: linear-gradient(to bottom, $selected_fg_color);
border-color: $selected_fg_color;
&:hover {
background-image: linear-gradient(to bottom, mix($selected_fg_color, $selected_bg_color, 85%));
border-color: mix($selected_fg_color, $selected_bg_color, 85%);
}
&:active {
background-image: linear-gradient(to bottom, mix($selected_fg_color, $selected_bg_color, 50%));
border-color: mix($selected_fg_color, $selected_bg_color, 50%);
}
&:insensitive{
background-image: linear-gradient(to bottom, mix($selected_fg_color, $selected_bg_color, 55%));
border-color: mix($selected_fg_color, $selected_bg_color, 55%);
}
}
}
&.trough {
2015-07-08 00:51:09 +00:00
2015-09-09 19:19:57 +00:00
$_scale_trough_bg: if($variant == 'light', $button_border, darken($bg_color, 5%));
2015-07-08 00:51:09 +00:00
2015-05-16 20:50:01 +00:00
border: none;
border-radius: 2.5px;
2015-07-08 00:51:09 +00:00
background-image: linear-gradient(to bottom, $_scale_trough_bg);
2015-05-16 20:50:01 +00:00
&.highlight {
background-image: linear-gradient(to bottom, $selected_bg_color);
&:insensitive {
background-image: linear-gradient(to bottom, transparentize($selected_bg_color, 0.45));
}
}
&:insensitive {
2015-07-08 00:51:09 +00:00
background-image: linear-gradient(to bottom, transparentize($_scale_trough_bg, 0.45));
2015-05-16 20:50:01 +00:00
}
//OSD troughs
.osd & {
background-image: linear-gradient(to bottom, lighten($osd_bg_color, 7%));
outline-color: transparentize($osd_fg_color, 0.8);
&.highlight {
background-image: none;
background-image: linear-gradient(to bottom, $selected_bg_color);
}
&:insensitive { }
}
2015-09-21 19:50:48 +00:00
// troughs in selected list-rows and infobars
2016-06-01 18:02:32 +00:00
.menu .menuitem:hover &,
2015-09-21 19:50:48 +00:00
.list-row:selected &,
GtkInfoBar & {
2015-05-16 20:50:01 +00:00
background-image: linear-gradient(to bottom, transparentize(black, 0.8));
&.highlight {
background-image: linear-gradient(to bottom, $selected_fg_color);
&:insensitive { background-image: linear-gradient(to bottom, mix($selected_fg_color, $selected_bg_color, 55%)); }
}
&:insensitive { background-image: linear-gradient(to bottom, transparentize(black, 0.9)); }
}
}
}
2015-12-28 16:54:04 +00:00
//
// Progress bars
//
2015-05-16 20:50:01 +00:00
GtkProgressBar {
padding: 0;
font-size: smaller;
color: transparentize($fg_color, 0.3);
&.osd {
-GtkProgressBar-xspacing: 0;
-GtkProgressBar-yspacing: 0;
-GtkProgressBar-min-horizontal-bar-height: 3;
}
}
// moving bit
.progressbar {
background-color: $selected_bg_color;
border: none;
border-radius: 3px;
box-shadow: none; //needed for clipping
&.left.right {
}
&.osd {
background-color: $selected_bg_color;
}
2015-09-21 19:50:48 +00:00
.list-row:selected &,
GtkInfoBar & { background-color: $selected_fg_color; }
2015-05-16 20:50:01 +00:00
}
.osd .scale.progressbar {
background-color: $selected_bg_color;
}
// background
GtkProgressBar.trough {
border: none;
border-radius: 3px;
2015-09-09 19:19:57 +00:00
background-color: if($variant == 'light', $button_border, darken($bg_color, 5%));
2015-05-16 20:50:01 +00:00
&.osd {
border-style: none;
background-color: transparent;
box-shadow: none;
}
2015-09-21 19:50:48 +00:00
.list-row:selected &,
GtkInfoBar & { background-color: transparentize(black, 0.8); }
2015-05-16 20:50:01 +00:00
}
2015-12-28 16:54:04 +00:00
//
// Level Bar
//
2015-05-16 20:50:01 +00:00
GtkLevelBar {
-GtkLevelBar-min-block-width: 34;
-GtkLevelBar-min-block-height: 3;
2015-12-28 16:54:04 +00:00
&.vertical {
-GtkLevelBar-min-block-width: 3;
-GtkLevelBar-min-block-height: 34;
}
2015-05-16 20:50:01 +00:00
}
.level-bar {
&.trough {
@extend GtkProgressBar.trough;
padding: 3px;
border-radius: 4px;
}
&.fill-block {
// FIXME: it would be nice to set make fill blocks bigger, but we'd need
// :nth-child working on discrete indicators
border: 1px solid $selected_bg_color;
background-color: $selected_bg_color;
border-radius: 2px;
&.indicator-discrete {
&.horizontal { margin: 0 1px; }
&.vertical { margin: 1px 0; }
}
&.level-high {
border-color: $success_color;
background-color: $success_color;
}
&.level-low {
border-color: $warning_color;
background-color: $warning_color;
}
&.empty-fill-block {
2015-09-09 19:19:57 +00:00
background-color: if($variant=='light', transparentize($fg_color,0.8), $base_color);
border-color: if($variant=='light', transparentize($fg_color,0.8), $base_color);
2015-05-16 20:50:01 +00:00
}
}
}
2015-12-28 16:54:04 +00:00
//
// Frames
//
2015-05-16 20:50:01 +00:00
.frame {
border: 1px solid $borders_color;
&.flat { border-style: none; }
padding: 0;
&.action-bar {
padding: 6px;
border-width: 1px 0 0;
}
}
GtkScrolledWindow {
GtkViewport.frame { // avoid double borders when viewport inside
// scrolled window
border-style: none;
}
}
//vbox and hbox separators
.separator {
// always disable separators
// -GtkWidget-wide-separators: true;
color: transparentize(black, 0.9);
// Font and File button separators
GtkFileChooserButton &,
GtkFontButton &,
GtkFileChooserButton &.vertical,
GtkFontButton &.vertical {
// always disable separators
-GtkWidget-wide-separators: true;
}
}
2015-12-28 16:54:04 +00:00
//
// Lists
//
2015-05-16 20:50:01 +00:00
.list, .list-row {
background-color: $base_color;
border-color: $borders_color;
}
.list-row,
.grid-child {
padding: 2px;
}
.list-row.button {
@extend %undecorated_button;
background-color: transparentize(black, 1); // for the transition
border-style: none; // I need no borders here
border-radius: 0; // and no rounded corners
box-shadow: none; // and no box-shadow
&:hover {
2015-06-07 21:00:55 +00:00
background-color: if($variant == 'light', transparentize(black, 0.95), transparentize(white, 0.97));
2015-05-16 20:50:01 +00:00
}
&:active {
color: $fg_color;
}
&:selected {
&:active { color: $selected_fg_color; }
&:hover { background-color: mix(black, $selected_bg_color, 10%); }
&:insensitive {
color: transparentize($selected_fg_color, 0.3);
background-color: transparentize($selected_bg_color, 0.3);
2015-05-28 15:41:22 +00:00
GtkLabel { color: inherit; }
2015-05-16 20:50:01 +00:00
}
}
}
.list-row:selected {
@extend %selected_items;
.button { @extend %selected-button }
}
// transition
.list-row, list-row.button {
transition: all 300ms $ease-out-quad;
&:hover { transition: none; }
}
2015-12-28 16:54:04 +00:00
//
// App Notifications
//
2015-05-16 20:50:01 +00:00
.app-notification,
.app-notification.frame {
padding: 10px;
color: $dark_sidebar_fg;
background-color: $dark_sidebar_bg;
2015-07-02 14:59:22 +00:00
background-clip: border-box;
border-radius: 0 0 2px 2px;
border-width: 0 1px 1px 1px;
2015-05-16 20:50:01 +00:00
border-style: solid;
border-color: darken($dark_sidebar_bg, 10%);
2015-07-02 14:59:22 +00:00
.button {
@include button(osd);
&.flat {
@extend %undecorated_button;
border-color: transparentize($selected_bg_color, 1);
&:insensitive { @extend %undecorated_button; }
}
&:hover { @include button(osd-hover); }
2015-09-21 18:44:36 +00:00
&:active, &:checked { @include button(osd-active); background-clip: padding-box; }
2015-07-02 14:59:22 +00:00
&:insensitive { @include button(osd-insensitive);
}
}
2015-05-16 20:50:01 +00:00
}
2015-12-28 16:54:04 +00:00
//
// Expanders
//
.expander {
2015-05-16 20:50:01 +00:00
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
&:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
&:hover { color: lighten($fg_color,30%); } //only lightens the arrow
&:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
}
2015-12-28 16:54:04 +00:00
//
// Calendar
//
2015-05-16 20:50:01 +00:00
GtkCalendar {
2015-07-10 18:11:41 +00:00
color: $fg_color;
2015-05-16 20:50:01 +00:00
border: 1px solid $borders_color;
border-radius: 3px;
padding: 2px;
&:selected {
background-color: $selected_bg_color;
color: $selected_fg_color;
border-radius: 1.5px;
}
&.header {
color: $fg_color;
border: none;
border-radius: 0;
}
&.button, &.button:focus {
color: transparentize($fg_color,0.55);
2015-09-09 19:19:57 +00:00
@include button(undecorated);
2015-05-16 20:50:01 +00:00
&:hover {
color: $fg_color;
}
2015-09-14 10:08:55 +00:00
&:insensitive {
color: $insensitive_fg_color;
background-color: transparent;
background-image: none;
}
2015-05-16 20:50:01 +00:00
}
&.highlight { color: gtkalpha(currentColor,0.55); }
}
2015-12-28 16:54:04 +00:00
//
// Dialogs
//
2015-05-16 20:50:01 +00:00
.message-dialog .dialog-action-area .button {
padding: 8px;
}
.message-dialog { // Message Dialog styling
-GtkDialog-button-spacing: 0;
.titlebar { background-color: $header_bg; border-bottom: 1px solid darken($header_bg, 7%) }
&.csd { // rounded bottom border styling for csd version
&.background {
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
border: none;
}
.dialog-action-area .button {
padding: 8px;
border-radius: 0;
@extend %middle_button;
&:hover, &:active, &:insensitive {
@extend %middle_button;
}
&:first-child{ @extend %first_button; }
&:last-child { @extend %last_button; }
}
%middle_button {
border-right-style: none;
border-bottom-style: none;
}
%last_button {
border-bottom-right-radius: 3px;
}
%first_button {
border-left-style: none;
border-bottom-left-radius: 3px;
}
}
}
GtkFileChooserDialog {
.search-bar {
background-color: $bg_color;
border-color: $borders_color;
box-shadow: none;
}
.dialog-action-box {
border-top: 1px solid $borders_color;
}
}
2015-12-28 16:54:04 +00:00
//
// Sidebar
//
2015-05-16 20:50:01 +00:00
.sidebar {
border: none;
2016-01-23 21:38:37 +00:00
background-color: lighten($bg_color, 2%);
2015-05-16 20:50:01 +00:00
2015-05-28 15:41:22 +00:00
.scrollbar {
&.trough {
background-color: transparent;
border-width: 2px;
border-color: transparent;
}
}
2015-05-16 20:50:01 +00:00
&:selected {
background-color: $selected_bg_color;
}
}
// Places sidebar is a special case, since the view here have to look like chrome not content, so we override text color
GtkPlacesSidebar.sidebar .view {
color: $fg_color;
background-color: transparent;
&:selected {
color: $selected_fg_color;
background-color: $selected_bg_color;
}
&.separator { @extend .separator; }
}
.sidebar-item {
padding: 10px 4px;
> GtkLabel {
padding-left: 6px;
padding-right: 6px;
}
&.needs-attention > GtkLabel {
@extend %needs_attention;
background-size: 6px 6px, 0 0;
}
}
2015-12-28 16:54:04 +00:00
//
// Paned
//
2015-05-28 15:41:22 +00:00
GtkPaned {
// This is actually the invisible area of the paned separator, not a margin...
margin: 0 8px 8px 0; //drag area of the separator
2015-05-16 20:50:01 +00:00
&:dir(rtl) {
margin-right: 0;
margin-left: 8px;
}
}
2015-05-28 15:41:22 +00:00
.pane-separator {
//FIXME abusing a background-image to get rid of the handle decoration
//I'd like something better...
background-image: linear-gradient(to bottom, $borders_color);
2015-05-16 20:50:01 +00:00
}
2015-12-28 16:54:04 +00:00
//
// GtkInfoBar
//
2015-05-16 20:50:01 +00:00
GtkInfoBar {
border-style: none;
.button { @extend %selected-button }
}
.info,
.question,
.warning,
2015-05-18 10:22:28 +00:00
.error,
GtkInfoBar {
2015-05-16 20:50:01 +00:00
background-color: $selected_bg_color;
color: $selected_fg_color;
}
//
// Buttons on selected backgrounds
//
%selected-button {
color: $selected_fg_color;
outline-color: transparentize($selected_fg_color, 0.7);
background-color: transparentize($selected_fg_color, 1);
border-color: transparentize($selected_fg_color, 0.5);
&.flat {
@include button(undecorated);
color: $selected_fg_color;
background-color: transparentize($selected_fg_color, 1);
}
&:hover {
color: $selected_fg_color;
outline-color: transparentize($selected_fg_color, 0.7);
background-color: transparentize($selected_fg_color, 0.8);
border-color: transparentize($selected_fg_color, 0.2);
}
2015-07-16 13:59:59 +00:00
&:active, &:active:hover, &:checked {
2015-07-11 21:19:36 +00:00
color: $selected_bg_color;
outline-color: transparentize($selected_bg_color, 0.7);
background-color: $selected_fg_color;
border-color: $selected_fg_color;
2015-05-16 20:50:01 +00:00
}
&:insensitive {
color: transparentize($selected_fg_color, 0.6);
background-color: transparentize($selected_fg_color, 1);
border-color: transparentize($selected_fg_color, 0.8);
&:active, &:checked {
2015-07-11 21:19:36 +00:00
color: transparentize($selected_bg_color, 0.6);
background-color: transparentize($selected_fg_color, 0.8);
2015-05-16 20:50:01 +00:00
border-color: transparentize($selected_fg_color, 0.8);
}
}
}
2015-12-28 16:54:04 +00:00
//
// Tooltips
//
2015-05-16 20:50:01 +00:00
.tooltip {
&.background {
// background-color needs to be set this way otherwise it gets drawn twice
// see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details.
2016-05-14 11:31:18 +00:00
background-color: lighten($osd_bg_color, 10%);
2015-05-16 20:50:01 +00:00
background-clip: padding-box;
}
color: $osd_fg_color;
2015-05-16 20:50:01 +00:00
border-radius: 2px;
&.window-frame.csd {
background-color: transparent;
}
}
.tooltip * { //Yeah this is ugly
padding: 4px;
background-color: transparent;
color: inherit; // just to be sure
}
2015-12-28 16:54:04 +00:00
//
// Color Chooser
//
2015-05-16 20:50:01 +00:00
GtkColorSwatch {
2015-05-28 15:41:22 +00:00
border: none;
box-shadow: inset 0 1px 1px transparentize(black, 0.6);
2015-05-16 20:50:01 +00:00
2015-05-28 15:41:22 +00:00
&.color-light {
&:hover {
background-image: linear-gradient(to bottom,
transparentize(white, 0.6));
}
}
&.color-dark {
&:hover {
background-image: linear-gradient(to bottom,
transparentize(white, 0.8));
2015-05-16 20:50:01 +00:00
}
}
2015-05-28 15:41:22 +00:00
&:hover {
border-color: transparentize(black, 0.5);
}
2015-05-16 20:50:01 +00:00
&.top {
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}
&.bottom {
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
}
2015-05-28 15:41:22 +00:00
&.left, &:first-child {
2015-05-16 20:50:01 +00:00
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
2015-05-28 15:41:22 +00:00
&.right, &:last-child {
2015-05-16 20:50:01 +00:00
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
2015-05-28 15:41:22 +00:00
&:only-child {
2015-05-16 20:50:01 +00:00
border-radius: 3px;
}
2015-05-28 15:41:22 +00:00
&.color-active-badge {
border-width: 2px;
&:hover { background-image: none; }
&.color-light, &.color-light:hover {
color: transparentize(black,0.7);
border-color: transparentize(black,0.7);
}
&.color-dark, &.color-dark:hover {
color: transparentize(white,0.5);
border-color: transparentize(white,0.5);
2015-05-16 20:50:01 +00:00
}
}
2015-05-28 15:41:22 +00:00
}
GtkColorChooserWidget #add-color-button {
border-color: mix($borders_color,$bg_color,50%);
background-color: mix($borders_color,$bg_color,50%);
color: $bg_color;
box-shadow: none;
&:hover {
border-color: $borders_color;
background-color: $borders_color;
2015-05-16 20:50:01 +00:00
}
}
GtkColorButton.button {
2016-01-03 21:35:53 +00:00
padding: 5px; // Uniform padding on the GtkColorButton
2015-05-16 20:50:01 +00:00
GtkColorSwatch { border-radius: 0; }
}
2015-12-28 16:54:04 +00:00
//
// Misc
//
2015-05-16 20:50:01 +00:00
.scale-popup .button { // +/- buttons on GtkVolumeButton popup
padding: 6px;
&:hover {
@include button(hover);
}
}
GtkVolumeButton.button { padding: 8px; }
2015-12-28 16:54:04 +00:00
// Decouple the font of context menus from their entry/textview
.touch-selection,
.context-menu { font: initial;}
.monospace { font: Monospace; }
//
// Overshoot
//
// This is used by GtkScrolledWindow, when content is touch-dragged past boundaries.
// This draws a box on top of the content, the size changes programmatically.
.overshoot {
&.top { @include overshoot(top); }
&.bottom { @include overshoot(bottom); }
&.left { @include overshoot(left); }
&.right { @include overshoot(right); }
}
//
// Undershoot
//
// Overflow indication, works similarly to the overshoot, the size if fixed tho.
.undershoot {
&.top { @include undershoot(top); }
&.bottom { @include undershoot(bottom); }
&.left { @include undershoot(left); }
&.right { @include undershoot(right); }
}
//
// Window Decorations
//
2015-05-16 20:50:01 +00:00
.window-frame {
2015-07-08 00:51:09 +00:00
border-radius: if($darker=='false' and $variant=='light', 4px 4px 0 0, 3px 3px 0 0);
2015-05-16 20:50:01 +00:00
border-width: 0px;
2015-07-08 00:51:09 +00:00
$_wm_border: if($variant=='light', transparentize(black, 0.9), transparentize(black, 0.45));
2015-05-16 20:50:01 +00:00
2015-09-11 14:49:52 +00:00
box-shadow: 0 0 0 1px if($darker=='true' or $variant == 'dark', darken($header_bg, 7%), $_wm_border),
2015-09-09 19:19:57 +00:00
0 8px 8px 0 if($variant == 'light', opacify($_wm_border, 0.1), transparentize($_wm_border, 0.2));
2015-05-16 20:50:01 +00:00
2015-12-28 16:54:04 +00:00
// this is used for the resize cursor area
2015-05-16 20:50:01 +00:00
margin: 10px;
&:backdrop {
2015-09-11 14:49:52 +00:00
box-shadow: 0 0 0 1px if($darker=='true' or $variant == 'dark', transparentize(darken($header_bg, 7%), 0.1), $_wm_border),
2015-09-09 19:19:57 +00:00
0 5px 5px 0 if($variant == 'light', opacify($_wm_border, 0.1), transparentize($_wm_border, 0.2));
2015-05-16 20:50:01 +00:00
}
&.tiled {
border-radius: 0;
}
2015-11-05 17:23:27 +00:00
&.popup {
box-shadow: none;
border-radius: 0;
}
2015-05-16 20:50:01 +00:00
&.csd {
&.popup, &.menu {
2015-08-03 18:18:19 +00:00
border-radius: 2px;
2015-06-07 21:00:55 +00:00
box-shadow: 0 3px 6px if($variant == 'light', $_wm_border, transparentize($_wm_border, 0.1)),
2015-09-09 19:19:57 +00:00
0 0 0 1px if($variant == 'light', $_wm_border, darken($bg_color, 10%));
2015-05-16 20:50:01 +00:00
}
&.tooltip {
border-radius: 2px;
2016-05-14 11:31:18 +00:00
box-shadow: 0 1px 3px 1px if($variant == 'light', $_wm_border, transparentize($_wm_border, 0.3));
2015-05-16 20:50:01 +00:00
}
2015-07-14 17:16:14 +00:00
&.message-dialog { border-radius: 3px; }
2015-05-16 20:50:01 +00:00
}
}
//
// Titlebuttons
//
2015-05-28 15:41:22 +00:00
.header-bar, .titlebar,
.header-bar.selection-mode, .titlebar.selection-mode {
2015-05-16 20:50:01 +00:00
&.default-decoration .button.titlebutton { // no vertical padding for ssd buttons
padding-top: 0px; // already handled by the titlebar-padding
padding-bottom: 0px;
}
2015-05-16 20:50:01 +00:00
.button.titlebutton {
2016-01-03 21:35:53 +00:00
@extend .image-button;
padding: 8px 4px;
2015-05-16 20:50:01 +00:00
@include button(undecorated);
2015-05-19 20:42:47 +00:00
background-color: transparentize($header_bg, 1);
2016-04-14 11:55:52 +00:00
border-color: transparentize($header_bg, 1);
2015-05-16 20:50:01 +00:00
2015-05-28 15:41:22 +00:00
color: transparent;
background-position: center;
background-repeat: no-repeat;
2015-05-16 20:50:01 +00:00
2015-05-28 15:41:22 +00:00
&:backdrop { opacity: 1; }
}
2015-05-16 20:50:01 +00:00
2015-05-28 15:41:22 +00:00
// Minimize
2015-05-16 20:50:01 +00:00
2015-05-28 15:41:22 +00:00
.right .button.titlebutton:nth-last-child(3),
.right:dir(rtl) .button.titlebutton:nth-child(3),
.left .button.titlebutton:nth-child(3),
.left:dir(rtl) .button.titlebutton:nth-last-child(3) {
2016-01-24 15:52:09 +00:00
background-image: -gtk-scaled(url('assets/titlebutton-minimize#{$darker_asset_suffix}.png'),url('assets/titlebutton-minimize#{$darker_asset_suffix}@2.png'));
2015-05-28 15:41:22 +00:00
2016-01-24 15:52:09 +00:00
&:hover, &:backdrop:hover { background-image: -gtk-scaled(url('assets/titlebutton-minimize-hover#{$darker_asset_suffix}.png'),url('assets/titlebutton-minimize-hover#{$darker_asset_suffix}@2.png')); }
&:active:hover { background-image: -gtk-scaled(url('assets/titlebutton-minimize-active#{$darker_asset_suffix}.png'),url('assets/titlebutton-minimize-active#{$darker_asset_suffix}@2.png')); }
&:backdrop { background-image: -gtk-scaled(url('assets/titlebutton-minimize-backdrop#{$darker_asset_suffix}.png'),url('assets/titlebutton-minimize-backdrop#{$darker_asset_suffix}@2.png')); }
2015-05-28 15:41:22 +00:00
}
// Maximize
.right .button.titlebutton:nth-last-child(2),
.right:dir(rtl) .button.titlebutton:nth-child(2),
.left .button.titlebutton:nth-child(2),
.left:dir(rtl) .button.titlebutton:nth-last-child(2) {
2016-01-24 15:52:09 +00:00
background-image: -gtk-scaled(url('assets/titlebutton-maximize#{$darker_asset_suffix}.png'),url('assets/titlebutton-maximize#{$darker_asset_suffix}@2.png'));
2015-05-28 15:41:22 +00:00
2016-01-24 15:52:09 +00:00
&:hover, &:backdrop:hover { background-image: -gtk-scaled(url('assets/titlebutton-maximize-hover#{$darker_asset_suffix}.png'),url('assets/titlebutton-maximize-hover#{$darker_asset_suffix}@2.png')); }
&:active:hover { background-image: -gtk-scaled(url('assets/titlebutton-maximize-active#{$darker_asset_suffix}.png'),url('assets/titlebutton-maximize-active#{$darker_asset_suffix}@2.png')); }
&:backdrop { background-image: -gtk-scaled(url('assets/titlebutton-maximize-backdrop#{$darker_asset_suffix}.png'),url('assets/titlebutton-maximize-backdrop#{$darker_asset_suffix}@2.png')); }
2015-05-28 15:41:22 +00:00
}
// Close
.right .button.titlebutton:last-child,
.right:dir(rtl) .button.titlebutton:first-child,
.left .button.titlebutton:first-child,
.left:dir(rtl) .button.titlebutton:last-child {
2015-07-08 00:51:09 +00:00
background-image: -gtk-scaled(url('assets/titlebutton-close#{$darker_asset_suffix}.png'),url('assets/titlebutton-close#{$darker_asset_suffix}@2.png'));
2015-05-28 15:41:22 +00:00
2015-07-08 00:51:09 +00:00
&:hover, &:backdrop:hover { background-image: -gtk-scaled(url('assets/titlebutton-close-hover#{$darker_asset_suffix}.png'),url('assets/titlebutton-close-hover#{$darker_asset_suffix}@2.png')); }
&:active:hover { background-image: -gtk-scaled(url('assets/titlebutton-close-active#{$darker_asset_suffix}.png'),url('assets/titlebutton-close-active#{$darker_asset_suffix}@2.png')); }
&:backdrop { background-image: -gtk-scaled(url('assets/titlebutton-close-backdrop#{$darker_asset_suffix}.png'),url('assets/titlebutton-close-backdrop#{$darker_asset_suffix}@2.png')); }
2015-05-28 15:41:22 +00:00
}
}
// Fallback menubutton
2016-02-02 18:30:47 +00:00
.header-bar, .titlebar {
.left GtkMenuButton.button.titlebutton:first-child,
.left:dir(rtl) GtkMenuButton.button.titlebutton:last-child,
&.selection-mode .left GtkMenuButton.button.titlebutton:first-child,
&.selection-mode .left:dir(rtl) GtkMenuButton.button.titlebutton:last-child {
2015-05-28 15:41:22 +00:00
2016-02-02 18:30:47 +00:00
padding: 4px 6px 4px 6px;
color: $header_fg;
&, &:hover, &:active:hover,
&:backdrop, &:backdrop:hover {
background-image: none;
background-color: transparentize($header_bg, 1);
border-color: transparentize($header_bg, 1);
}
2015-05-16 20:50:01 +00:00
2016-02-02 18:30:47 +00:00
&:hover, &:backdrop:hover { @include button(header-hover); }
&:active:hover, &:checked { @include button(header-active); }
}
}
2015-05-16 20:50:01 +00:00
2015-12-28 16:54:04 +00:00
// catch all extend
2015-05-16 20:50:01 +00:00
%selected_items {
background-image: none;
background-color: $selected_bg_color;
color: $selected_fg_color;
outline-color: transparentize($selected_fg_color, 0.7);
}