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.20/sass/_common.scss

3180 lines
79 KiB
SCSS
Raw Normal View History

2016-02-19 10:06:17 +00:00
@function gtkalpha($c,$a) {
@return unquote("alpha(#{$c},#{$a})");
}
$ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
2016-03-31 17:58:44 +00:00
$backdrop_transition: 200ms ease-out;
2016-02-19 10:06:17 +00:00
$asset_suffix: if($variant=='dark', '-dark', ''); // use dark assets in dark variant
$darker_asset_suffix: if($darker=='true', '-dark', $asset_suffix);
* {
background-clip: padding-box;
-GtkToolButton-icon-spacing: 4;
-GtkTextView-error-underline-color: $error_color;
-GtkScrolledWindow-scrollbar-spacing: 0;
-GtkToolItemGroup-expander-size: 11;
-GtkWidget-text-handle-width: 20;
-GtkWidget-text-handle-height: 20;
-GtkDialog-button-spacing: 4;
-GtkDialog-action-area-border: 0;
// We use the outline properties to signal the focus properties
2016-08-31 11:25:34 +00:00
outline-color: gtkalpha(currentColor, 0.3);
2016-02-19 10:06:17 +00:00
outline-style: dashed;
outline-offset: -3px;
outline-width: 1px;
-gtk-outline-radius: 2px;
}
//
// Base States
//
.background {
color: $fg_color;
background-color: if($transparency == 'true', transparentize($bg_color, 0.001), $bg_color); // without this headerbar transparency doesn't seem to work
}
2016-03-22 11:24:30 +00:00
*:disabled { -gtk-icon-effect: dim; }
2016-02-19 10:06:17 +00:00
.gtkstyle-fallback {
background-color: $bg_color;
color: $fg_color;
&:hover {
background-color: lighten($bg_color, 10%);
color: $fg_color;
}
&:active {
background-color: darken($bg_color, 10%);
color: $fg_color;
}
&:disabled {
background-color: $insensitive_bg_color;
color: $insensitive_fg_color;
}
&:selected {
background-color: $selected_bg_color;
color: $selected_fg_color;
}
}
.view,
2016-03-22 11:24:30 +00:00
%view {
2016-02-19 10:06:17 +00:00
color: $text_color;
background-color: $base_color;
2016-03-22 11:24:30 +00:00
&:selected {
&, &:focus {
@extend %selected_items;
border-radius: 2px;
2016-02-19 10:06:17 +00:00
}
}
}
2016-03-22 11:24:30 +00:00
.view,
textview {
text {
@extend %view;
2016-02-19 10:06:17 +00:00
2016-03-22 11:24:30 +00:00
selection { &:focus, & { @extend %selected_items; }}
2016-02-19 10:06:17 +00:00
}
}
2016-05-28 17:08:51 +00:00
textview border { background-color: mix($bg_color, $base_color, 50%); }
2016-04-05 21:45:23 +00:00
2016-03-22 11:24:30 +00:00
iconview { @extend .view; }
2016-02-19 10:06:17 +00:00
rubberband,
.rubberband {
border: 1px solid darken($selected_bg_color, 10%);
background-color: transparentize(darken($selected_bg_color, 10%), 0.8);
}
flowbox {
rubberband { @extend rubberband }
flowboxchild {
padding: 3px;
border-radius: 2px;
&:selected {
2016-03-02 12:28:11 +00:00
@extend %selected_items;
2016-03-22 11:24:30 +00:00
outline-offset: -2px;
2016-02-19 10:06:17 +00:00
}
}
}
label {
&.separator {
@extend .dim-label;
2016-03-22 11:24:30 +00:00
color: $fg_color;
2016-02-19 10:06:17 +00:00
}
2016-03-22 11:24:30 +00:00
row:selected &,
&:selected { @extend %nobg_selected_items; }
selection {
color: $selected_fg_color;
background-color: $selected_bg_color;
2016-02-19 10:06:17 +00:00
}
2016-03-22 11:24:30 +00:00
2016-02-19 10:06:17 +00:00
&:disabled {
color: $insensitive_fg_color;
2016-03-22 11:24:30 +00:00
selection { @extend %selected_items:disabled; }
2016-02-19 10:06:17 +00:00
}
}
.dim-label {
opacity: 0.55;
}
assistant {
.sidebar {
background-color: $base_color;
border-top: 1px solid $borders_color;
}
2016-03-02 12:28:11 +00:00
2016-02-19 10:06:17 +00:00
&.csd .sidebar { border-top-style: none; }
2016-03-22 11:24:30 +00:00
2016-03-02 12:28:11 +00:00
.sidebar label { padding: 6px 12px; }
2016-02-19 10:06:17 +00:00
.sidebar label.highlight {
background-color: $selected_bg_color;
color: $selected_fg_color;
}
}
2016-03-22 11:24:30 +00:00
textview { // This will get overridden by .view, needed by gedit line numbers
background-color: $base_color;
}
2016-02-19 10:06:17 +00:00
%osd, .osd {
color: $osd_fg_color;
border: none;
background-color: $osd_bg_color;
background-clip: padding-box;
box-shadow: none;
}
//
// Spinner Animations
//
@keyframes spin {
to { -gtk-icon-transform: rotate(1turn); }
}
spinner {
background: none;
opacity: 0; // non spinning spinner makes no sense
-gtk-icon-source: -gtk-icontheme('process-working-symbolic');
&:checked {
opacity: 1;
animation: spin 1s linear infinite;
&:disabled {
opacity: 0.5;
}
}
}
//
// Text Entries
//
entry {
min-height: 22px;
2016-02-19 10:06:17 +00:00
border: 1px solid;
padding: 2px 8px;
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
caret-color: currentColor;
2016-02-19 10:06:17 +00:00
border-radius: 3px;
transition: all 200ms $ease-out-quad;
&.search { border-radius: 20px; }
@include entry(normal);
image { // icons inside the entry
color: mix($fg_color,$base_color,80%);
&.left { padding-left: 0; padding-right: 5px; }
&.right { padding-right: 0; padding-left: 5px; }
}
2016-03-22 11:24:30 +00:00
&.flat {
&, &:focus {
min-height: 0;
padding: 2px;
background-image: none;
border-color: transparent;
border-radius: 0;
}
2016-02-19 10:06:17 +00:00
}
&:focus {
background-clip: border-box;
@include entry(focus);
}
&:disabled { @include entry(insensitive); }
2016-03-22 11:24:30 +00:00
selection { &:focus, & { @extend %selected_items; }}
2016-02-19 10:06:17 +00:00
2016-03-22 11:24:30 +00:00
// error and warning style
@each $e_type, $e_color, $e_fg_color in (warning, $warning_color, $warning_fg_color),
(error, $error_color, $error_fg_color),
// entry.search-missing for Gnome-Builder
(search-missing, $error_color, $error_fg_color) {
2016-02-19 10:06:17 +00:00
&.#{$e_type} {
color: $e_fg_color;
2016-02-19 10:06:17 +00:00
border-color: if($variant=='light', $e_color, $entry_border);
background-color: mix($e_color, $base_color, 60%);
2016-02-19 10:06:17 +00:00
image { color: $e_fg_color; }
2016-02-19 10:06:17 +00:00
&:focus {
color: $e_fg_color;
background-color: $e_color;
2016-02-19 10:06:17 +00:00
box-shadow: none;
}
selection, selection:focus {
background-color: $e_fg_color;
2016-02-19 10:06:17 +00:00
color: $e_color;
}
}
}
2016-03-22 11:24:30 +00:00
&:drop(active) {
&:focus, & {
border-color: $drop_target_color;
2016-03-22 12:03:08 +00:00
box-shadow: none;
2016-03-22 11:24:30 +00:00
}
}
2016-02-19 10:06:17 +00:00
.osd & {
@include entry(osd);
&:focus { @include entry(osd-focus); }
&:disabled { @include entry(osd-insensitive); }
2016-03-23 22:41:38 +00:00
selection {
&:focus, & {
color: $selected_bg_color;
background-color: $selected_fg_color;
}
}
2016-02-19 10:06:17 +00:00
}
2016-02-19 10:06:17 +00:00
2016-03-22 11:24:30 +00:00
progress {
margin: 0 -6px;
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 entries
2016-02-19 10:06:17 +00:00
.linked:not(.vertical) > &,
.linked:not(.vertical) > &:focus { @extend %linked; }
.linked.vertical > &,
.linked.vertical > &:focus { @extend %linked_vertical; }
2016-02-19 10:06:17 +00:00
}
2016-03-22 11:24:30 +00:00
treeview entry {
&.flat, & {
border-radius: 0;
background-image: none;
background-color: $base_color;
&:focus { border-color: $selected_bg_color; }
}
}
2016-02-19 10:06:17 +00:00
//
// Buttons
//
// 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));
}
}
2016-04-02 20:42:44 +00:00
$button_transition: all 200ms $ease-out-quad;
2016-02-19 10:06:17 +00:00
button {
min-height: 22px;
2016-02-19 10:06:17 +00:00
min-width: 20px;
2016-04-02 20:42:44 +00:00
transition: $button_transition;
2016-02-19 10:06:17 +00:00
border: 1px solid;
border-radius: 3px;
padding: 2px 6px;
2016-02-19 10:06:17 +00:00
@include button(normal);
separator { margin: 4px 1px; }
&.flat {
@include button(undecorated);
// 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;
2016-03-22 11:24:30 +00:00
2016-02-19 10:06:17 +00:00
&:hover {
2016-04-02 20:42:44 +00:00
transition: $button_transition;
2016-02-19 10:06:17 +00:00
transition-duration: 350ms;
2016-03-22 11:24:30 +00:00
2016-04-02 20:42:44 +00:00
&:active { transition: $button_transition; }
2016-02-19 10:06:17 +00:00
}
}
2016-03-22 11:24:30 +00:00
2016-02-19 10:06:17 +00:00
&:hover {
@include button(hover);
-gtk-icon-effect: highlight;
}
2016-03-22 11:24:30 +00:00
2016-02-19 10:06:17 +00:00
&:active, &:checked {
@include button(active);
2016-03-22 11:24:30 +00:00
background-clip: if($variant=='light', border-box, padding-box);
2016-02-19 10:06:17 +00:00
transition-duration: 50ms;
2016-09-20 19:30:16 +00:00
&:not(:disabled) label:disabled { color: inherit; opacity: 0.6; }
2016-02-19 10:06:17 +00:00
}
//Webkitgtk workaround start
&:active { color: $fg_color; }
&:active:hover, &:checked { color: $selected_fg_color; }
//Webkitgtk workaround end
2016-03-22 11:24:30 +00:00
&.flat:disabled { @include button(undecorated); }
2016-02-19 10:06:17 +00:00
&:disabled {
@include button(insensitive);
2016-03-22 11:24:30 +00:00
2016-02-19 10:06:17 +00:00
&:active, &:checked {
@include button(insensitive-active);
}
}
2016-03-22 11:24:30 +00:00
&.image-button {
2016-03-31 19:25:07 +00:00
min-width: 24px;
padding-left: 5px;
padding-right: 5px;
2016-03-22 11:24:30 +00:00
}
&.text-button {
2016-03-31 19:25:07 +00:00
padding-left: 12px;
padding-right: 12px;
2016-03-22 11:24:30 +00:00
}
&.text-button.image-button {
2016-03-31 19:25:07 +00:00
padding-left: 5px;
padding-right: 5px;
2016-03-22 11:24:30 +00:00
label {
2016-03-31 19:25:07 +00:00
&:first-child {
padding-left: 8px;
padding-right: 2px;
}
&:last-child {
padding-right: 8px;
padding-left: 2px;
}
&:only-child {
padding-left: 8px;
padding-right: 8px;
}
2016-03-22 11:24:30 +00:00
}
2016-04-01 12:04:59 +00:00
&.popup { padding-right: 8px; padding-left: 8px; }
2016-03-22 11:24:30 +00:00
}
&:drop(active) {
color: $drop_target_color;
border-color: $drop_target_color;
2016-03-22 12:03:08 +00:00
box-shadow: none;
2016-03-22 11:24:30 +00:00
}
2016-02-19 10:06:17 +00:00
// big standalone buttons like in Documents pager
&.osd {
color: $osd_fg_color;
background-color: $osd_bg_color;
border-color: darken($osd_bg_color, 8%);
&.image-button {
2016-03-21 21:08:47 +00:00
padding: 0;
min-height: 36px;
min-width: 36px;
2016-02-19 10:06:17 +00:00
}
&:hover { color: $selected_bg_color; }
&:active, &:checked { @include button(osd-active); }
&:disabled { @include button(osd-insensitive); }
}
//overlay / OSD style
.osd & {
@include button(osd);
&:hover { @include button(osd-hover); }
&:active, &:checked {
background-clip: padding-box;
@include button(osd-active);
}
&:disabled { @include button(osd-insensitive); }
&.flat {
@include button(undecorated);
box-shadow: none;
&:hover { @include button(osd-hover); }
&:disabled {
@include button(osd-insensitive);
background-image: none;
}
&:active, &:checked { @include button(osd-active); }
}
}
2016-02-19 10:06:17 +00:00
.osd .linked:not(.vertical):not(.path-bar) > &:hover:not(:checked):not(:active):not(:only-child),
.osd .linked:not(.vertical):not(.path-bar) > &:hover:not(:checked):not(:active) + &:not(:checked):not(:active) { box-shadow: none; }
2016-02-19 10:06:17 +00:00
// 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) {
2016-02-19 10:06:17 +00:00
&.#{$b_type} {
@include button(suggested_destructive, $b_color, $b_fg);
2016-02-19 10:06:17 +00:00
&.flat {
@include button(undecorated);
color: $b_color;
}
&:hover {
@include button(suggested_destructive, lighten($b_color, 10%), $b_fg);
2016-02-19 10:06:17 +00:00
}
&:active, &:checked {
@include button(suggested_destructive, darken($b_color, 10%), $b_fg);
2016-02-19 10:06:17 +00:00
}
&.flat:disabled {
@include button(undecorated);
color: $insensitive_fg_color;
}
&:disabled { @include button(insensitive); }
}
}
.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
> label {
padding-left: 6px; // label padding
padding-right: 6px; //
}
> image {
padding-left: 6px;
padding-right: 6px;
padding-top: 3px;
padding-bottom: 3px;
}
&.text-button {
padding-left: 10px;
padding-right: 10px;
}
&.image-button {
padding-left: 2px;
padding-right: 2px;
}
2016-03-21 20:59:14 +00:00
&.needs-attention {
> label, > image { @extend %needs_attention; }
&:active, &:checked {
> label, > image {
animation: none;
background-image: none;
}
}
2016-02-19 10:06:17 +00:00
}
}
%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;
@if $variant == 'light' { background-position: right 3px, right 4px; }
@else { background-position: right 3px, right 2px; }
&:dir(rtl) {
@if $variant == 'light' { background-position: left 3px, left 4px; }
@else { background-position: left 3px, left 2px; }
}
}
// hide separators
&.font,
&.file { separator { background-color: transparent; }}
2016-02-19 10:06:17 +00:00
//inline-toolbar buttons
.inline-toolbar &, .inline-toolbar &:backdrop {
border-radius: 2px;
border-width: 1px;
@extend %linked;
}
.linked:not(.vertical) > &,
.linked:not(.vertical) > &:hover,
.linked:not(.vertical) > &:active,
2016-03-22 11:24:30 +00:00
.linked:not(.vertical) > &:checked { @extend %linked; }
2016-02-19 10:06:17 +00:00
.linked.vertical > &,
.linked.vertical > &:hover,
.linked.vertical > &:active,
2016-03-22 11:24:30 +00:00
.linked.vertical > &:checked { @extend %linked_vertical; }
2016-02-19 10:06:17 +00:00
}
// all the following is for the +|- buttons on inline toolbars, that way
// should really be deprecated...
.inline-toolbar toolbutton > button { // redefining the button look is
// needed since those are flat...
@include button(normal);
&:hover { @include button(hover); }
&:active,
&:checked{ @include button(active); }
&:disabled { @include button(insensitive); }
&:disabled:active,
&:disabled:checked { @include button(insensitive-active); }
}
// More inline toolbar buttons
toolbar.inline-toolbar toolbutton {
& > button.flat { @extend %linked_middle; }
&:first-child > button.flat { @extend %linked:first-child; }
&:last-child > button.flat { @extend %linked:last-child; }
&:only-child > button.flat { @extend %linked:only-child; }
}
// Some crazy linking stuff
2016-02-19 10:06:17 +00:00
@mixin linking_rules($a:0.7, $var:$variant, $vert:'false', $entry_rules:'true', $button_rules:'true',
$e_border:$entry_border, $b_border:$button_border) {
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
$_border: if($vert=='false', left, top);
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
@if $entry_rules=='true' {
> entry + entry { border-#{$_border}-color: transparentize($e_border, $a); }
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
> entry.error + entry,
> entry + entry.error { border-#{$_border}-color: if($var=='light', $error_color, transparentize($e_border, $a)); }
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
> entry.warning + entry,
> entry + entry.warning { border-#{$_border}-color: if($var=='light', $warning_color, transparentize($e_border, $a)); }
2016-02-19 10:06:17 +00:00
2016-04-11 17:42:43 +00:00
> entry.error + entry.warning,
> entry.warning + entry.error { border-#{$_border}-color: if($var=='light', mix($error_color, $warning_color, 50%), transparentize($e_border, $a));}
2016-02-19 10:06:17 +00:00
2016-03-22 12:03:08 +00:00
@each $e_type, $e_color in (':focus',$selected_bg_color),
(':drop(active)', $drop_target_color),
('.warning:focus', $warning_color),
('.error:focus', $error_color) {
2016-02-19 10:06:17 +00:00
2016-03-22 12:03:08 +00:00
> entry + entry#{$e_type}:not(:last-child),
> entry + entry#{$e_type}:last-child { border-#{$_border}-color: if($var=='light', $e_color, $e_border); }
2016-02-19 10:06:17 +00:00
2016-03-22 12:03:08 +00:00
> entry#{$e_type}:not(:only-child) {
2016-02-19 10:06:17 +00:00
+ entry,
+ button,
2016-03-03 10:56:24 +00:00
+ combobox > box > button.combo { border-#{$_border}-color: if($var=='light', $e_color, $e_border); }
2016-02-19 10:06:17 +00:00
}
}
2016-04-11 17:42:43 +00:00
> button:active + entry,
2016-02-19 10:06:17 +00:00
> button:checked + entry { border-#{$_border}-color: if($var=='light', $selected_bg_color, $e_border); }
}
@if $button_rules=='true' {
2016-04-11 17:42:43 +00:00
$_uncolored_button: 'button:not(:checked):not(:active):not(.suggested-action):not(.destructive-action)';
2016-02-19 10:06:17 +00:00
> button + button { border-#{$_border}-style: none; }
2016-02-19 10:06:17 +00:00
2016-04-11 17:42:43 +00:00
> #{$_uncolored_button}:hover:not(:only-child),
> #{$_uncolored_button}:hover + #{$_uncolored_button} { box-shadow: inset if($vert=='false', 1px 0, 0 1px) $b_border; }
2016-02-19 10:06:17 +00:00
> #{$_uncolored_button}:disabled:not(:only-child),
> #{$_uncolored_button}:disabled + #{$_uncolored_button}:not(:hover) { box-shadow: inset if($vert=='false', 1px 0, 0 1px) transparentize($b_border, 0.5); }
2016-04-11 17:42:43 +00:00
> button:active + #{$_uncolored_button}:hover,
> button:checked + #{$_uncolored_button}:hover,
> button.suggested-action + #{$_uncolored_button}:hover,
> button.destructive-action + #{$_uncolored_button}:hover,
> entry + #{$_uncolored_button}:hover:not(:only-child),
> #{$_uncolored_button}:first-child:disabled,
> #{$_uncolored_button}:disabled + #{$_uncolored_button}:disabled,
> #{$_uncolored_button}:first-child:hover,
> button:active + #{$_uncolored_button}:disabled,
> button:checked + #{$_uncolored_button}:disabled,
> button.suggested-action + #{$_uncolored_button}:disabled,
> button.destructive-action + #{$_uncolored_button}:disabled,
> entry + #{$_uncolored_button}:disabled:not(:only-child), { box-shadow: none; }
2016-02-19 10:06:17 +00:00
}
2016-02-19 10:06:17 +00:00
}
2016-02-19 10:06:17 +00:00
// special case, because path-bars are bugged
@mixin pathbar_linking_rules($sep_color:if($variant=='light', transparentize($button_border, 0.6), transparentize($button_border, 0.5))) {
2016-02-19 10:06:17 +00:00
2016-10-01 19:49:37 +00:00
> button + button { border-left-style: none; }
2016-02-19 10:06:17 +00:00
2016-10-01 19:49:37 +00:00
> button:hover:not(:checked):not(:active):not(:only-child) {
2016-02-19 10:06:17 +00:00
2016-10-01 19:49:37 +00:00
&:hover {
box-shadow: inset 1px 0 $sep_color,
inset -1px 0 $sep_color;
2016-02-19 10:06:17 +00:00
}
2016-10-01 19:49:37 +00:00
&:first-child:hover { box-shadow: inset -1px 0 $sep_color; }
&:last-child:hover { box-shadow: inset 1px 0 $sep_color; }
}
2016-02-19 10:06:17 +00:00
}
2016-02-19 10:06:17 +00:00
// Apply the rules defined above
.linked:not(.vertical) {
&:not(.path-bar) { @include linking_rules(); }
&.path-bar { @include pathbar_linking_rules(); }
2016-02-19 10:06:17 +00:00
}
2016-02-19 10:06:17 +00:00
.linked.vertical { @include linking_rules($vert:'true'); }
2016-02-19 10:06:17 +00:00
%linked_middle {
border-radius: 0;
border-right-style: none;
}
%linked {
@extend %linked_middle;
&:first-child {
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
&:last-child {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
border-right-style: solid;
}
&:only-child {
border-radius: 3px;
border-style: solid;
}
}
%linked_vertical_middle {
border-radius: 0;
border-bottom-style: none;
}
%linked_vertical{
@extend %linked_vertical_middle;
&:first-child {
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}
&:last-child {
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
border-bottom-style: solid;
}
&:only-child {
border-radius: 3px;
border-style: solid;
}
}
%undecorated_button {
border-color: transparent;
background-color: transparent;
background-image: none;
box-shadow: none;
}
// menu buttons
menuitem.button.flat,
modelbutton.flat {
transition: none;
2016-03-10 15:22:00 +00:00
min-height: 24px;
2016-02-19 10:06:17 +00:00
padding-left: 8px;
padding-right: 8px;
2016-03-10 15:22:00 +00:00
outline-offset: -3px;
2016-02-19 10:06:17 +00:00
border-radius: 2px;
@extend %undecorated_button;
&:hover { background-color: if($variant=='light', mix($fg_color,$bg_color,5%), mix($fg_color,$bg_color,10%)); }
2016-03-23 20:46:35 +00:00
&:active, &:selected { &, arrow { @extend %selected_items; } }
2016-02-19 10:06:17 +00:00
&:checked { color: $fg_color; }
// FIXME: temporary workaround
check:last-child,
radio:last-child { margin-left: 8px; }
check:first-child,
radio:first-child { margin-right: 8px; }
}
modelbutton.flat arrow {
&.left { -gtk-icon-source: -gtk-icontheme("pan-start-symbolic"); }
&.right { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); }
}
//
// Links
//
*:link {
color: $link_color;
2016-03-22 11:24:30 +00:00
2016-02-19 10:06:17 +00:00
&: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%); }
}
2016-03-22 11:24:30 +00:00
@at-root %link_selected,
&:selected,
*:selected & { color: mix($selected_fg_color, $selected_bg_color, 80%); }
2016-02-19 10:06:17 +00:00
}
button:link, button:visited {
@extend %undecorated_button;
@extend *:link;
2016-03-02 12:28:11 +00:00
2016-02-19 10:06:17 +00:00
&:hover, &:active, &:checked {
@extend %undecorated_button;
}
> label { text-decoration-line: underline; }
}
//
// Spinbuttons
//
spinbutton {
2016-02-25 23:10:22 +00:00
2016-03-22 12:03:08 +00:00
&:drop(active) { box-shadow: none; }
2016-02-19 10:06:17 +00:00
button:active { color: $selected_fg_color; }
2016-02-25 23:10:22 +00:00
&:disabled { color: $insensitive_fg_color; }
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
&:not(.vertical) {
2016-03-21 20:39:18 +00:00
entry { min-width: 28px; }
2016-03-02 11:41:43 +00:00
button, entry { @extend %linked; }
&:dir(ltr) entry,
&:dir(rtl) button.up { border-radius: 3px 0 0 3px; }
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
> button + button { border-left-style: none; }
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
> button:hover:not(:active),
> button:hover + button { box-shadow: inset 1px 0 $button_border; }
2016-02-19 10:06:17 +00:00
2016-09-20 19:30:16 +00:00
> button:disabled + button:not(:disabled):not(:active):not(:checked):not(:hover),
> button:not(:disabled):not(:active):not(:checked):not(:hover) + button:disabled { box-shadow: inset 1px 0 transparentize($button_border, 0.5); }
2016-02-19 10:06:17 +00:00
> button:first-child:hover:not(:active),
2016-03-02 11:41:43 +00:00
> button.up:dir(rtl):hover:not(:active),
2016-02-19 10:06:17 +00:00
> entry + button:not(:active):hover { box-shadow: none; }
> entry:focus + button { border-left-color: if($variant=='light', $selected_bg_color, $entry_border); }
2016-03-22 12:03:08 +00:00
> entry:drop(active) + button { border-left-color: $drop_target_color; }
2016-03-23 22:41:38 +00:00
.osd & {
> button:hover:not(:active),
> button:hover + button { box-shadow: inset 1px 0 $osd_button_border; }
> button:first-child:hover:not(:active),
> button.up:dir(rtl):hover:not(:active),
> entry + button:not(:active):hover { box-shadow: none; }
> entry:focus + button { border-left-color: $osd_button_border; }
}
2016-02-19 10:06:17 +00:00
}
2016-02-19 10:06:17 +00:00
&.vertical {
2016-02-19 10:06:17 +00:00
button, entry {
padding-left: 4px;
padding-right: 4px;
min-width: 0;
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
@extend %linked_vertical;
}
2016-03-02 11:41:43 +00:00
button.up { border-radius: 3px 3px 0 0; }
2016-02-19 10:06:17 +00:00
> entry:focus + button { border-top-color: if($variant=='light', $selected_bg_color, $entry_border); }
2016-03-22 12:03:08 +00:00
> entry:drop(active) + button { border-top-color: $drop_target_color; }
2016-02-19 10:06:17 +00:00
}
}
//
// Comboboxes
//
combobox {
2016-02-19 10:06:17 +00:00
button.combo {
min-width: 0; // otherwise the arrow placement is unsymmetric
padding-left: 8px; //
padding-right: 8px //
}
2016-02-19 10:06:17 +00:00
arrow {
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
min-height: 16px;
min-width: 16px;
}
2016-03-22 11:24:30 +00:00
&:drop(active) button.combo { @extend button:drop(active); }
2016-03-03 11:11:17 +00:00
.linked:not(.vertical) > & > box > button.combo {
2016-02-19 10:06:17 +00:00
// the combobox is a composite widget so the way we do button linking doesn't
// work, special case needed.
&:dir(ltr),
&:dir(rtl) { @extend %linked_middle; } // specificity bump
2016-02-19 10:06:17 +00:00
}
2016-03-03 10:56:24 +00:00
.linked:not(.vertical) > &:first-child > box > button.combo { @extend %linked:first-child; }
.linked:not(.vertical) > &:last-child > box > button.combo { @extend %linked:last-child; }
.linked:not(.vertical) > &:only-child > box > button.combo { @extend %linked:only-child; }
2016-02-19 10:06:17 +00:00
2016-03-03 10:56:24 +00:00
.linked.vertical > & > box > button.combo { @extend %linked_vertical_middle; }
.linked.vertical > &:first-child > box > button.combo { @extend %linked_vertical:first-child; }
.linked.vertical > &:last-child > box > button.combo { @extend %linked_vertical:last-child; }
.linked.vertical > &:only-child > box > button.combo { @extend %linked_vertical:only-child; }
2016-02-19 10:06:17 +00:00
}
2016-02-19 10:06:17 +00:00
//
// Toolbars
//
toolbar {
-GtkWidget-window-dragging: true;
padding: 4px;
background-color: $bg_color;
separator { background: none; }
&.horizontal separator { margin: 0 6px; }
&.vertical separator { margin: 6px 0; }
2016-03-22 11:24:30 +00:00
.osd & { background-color: transparent; }
&.osd {
2016-02-19 10:06:17 +00:00
padding: 7px;
border: 1px solid transparentize(black, 0.5);
border-radius: 3px;
background-color: transparentize($osd_bg_color, 0.1);
2016-03-22 11:24:30 +00:00
&.left,
&.right,
&.top,
&.bottom { border-radius: 0; } // positional classes for `attached` osd toolbars
2016-03-23 21:58:42 +00:00
&.top { border-width: 0 0 1px 0; }
&.bottom { border-width: 1px 0 0 0; }
&.left { border-width: 0 1px 0 0; }
&.right { border-width: 0 0 0 1px; }
2016-03-22 11:24:30 +00:00
}
2016-03-30 20:17:03 +00:00
&:not(.inline-toolbar) {
2016-03-22 11:24:30 +00:00
switch,
scale,
entry,
spinbutton,
button {
margin-right: 1px;
margin-bottom: 1px;
}
2016-03-27 17:34:33 +00:00
.linked > button,
.linked > entry { margin-right:0; }
2016-02-19 10:06:17 +00:00
}
}
.primary-toolbar:not(.libreoffice-toolbar) { // LO messes up the toolbar styling, so exclude LO toolbars
2016-02-19 10:06:17 +00:00
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); }
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;
}
searchbar {
background-color: $bg_color;
border-style: solid;
border-color: $borders_color;
border-width: 0 0 1px;
padding: 3px;
}
actionbar {
padding: 6px;
border-top: 1px solid $borders_color;
background-color: darken($bg_color, 3%);
}
//
// Headerbars
//
2016-03-28 09:33:07 +00:00
$_header_radius: if($darker=='false' and $variant=='light', 4px, 3px);
headerbar,
%titlebar {
2016-02-19 10:06:17 +00:00
min-height: 42px;
2016-03-28 09:33:07 +00:00
padding: 0 7px;
2016-02-19 10:06:17 +00:00
border-width: 0 0 1px;
border-style: solid;
border-color: opacify($header_border, 1);
color: $header_fg;
background-color: opacify($header_bg, 1);
2016-03-28 09:33:07 +00:00
box-shadow: inset 0 1px lighten($header_bg, 3%);
2016-02-19 10:06:17 +00:00
.csd & { // Transparent header-bars only in csd windows
background-color: $header_bg;
border-color: $header_border;
}
2016-02-19 10:06:17 +00:00
&:backdrop {
2016-03-31 17:58:44 +00:00
transition: $backdrop_transition;
2016-02-19 10:06:17 +00:00
color: transparentize($header_fg, 0.3);
2016-03-28 09:33:07 +00:00
background-color: opacify($header_bg_backdrop, 1);
2016-02-19 10:06:17 +00:00
.csd & { background-color: $header_bg_backdrop; }
}
2016-02-19 10:06:17 +00:00
.title {
padding-left: 12px;
padding-right: 12px;
}
.subtitle {
font-size: smaller;
padding-left: 12px;
padding-right: 12px;
@extend .dim-label;
}
// Selectionmode
2016-03-30 02:20:42 +00:00
&.selection-mode {
color: $selection_mode_fg;
2016-02-19 10:06:17 +00:00
background-color: $selection_mode_bg;
border-color: darken($selection_mode_bg, 4%);
box-shadow: none;
&:backdrop {
background-color: $selection_mode_bg;
color: transparentize($selection_mode_fg, 0.4);
2016-02-19 10:06:17 +00:00
}
.subtitle:link { @extend *:link:selected; }
.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);
2016-03-28 09:33:07 +00:00
&:backdrop { background-color: opacify($header_bg_backdrop, 1); }
2016-02-19 10:06:17 +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-03-07 21:25:37 +00:00
min-height: 28px;
padding: 0 3px;
2016-02-19 10:06:17 +00:00
background-color: opacify($header_bg, 1);
border-bottom-width: 0;
.maximized & { background-color: opacify($header_bg, 1); }
}
2016-03-28 22:37:22 +00:00
separator.titlebutton { @extend %header_separator; }
2016-02-19 10:06:17 +00:00
}
.titlebar {
2016-03-28 09:33:07 +00:00
border-radius: $_header_radius $_header_radius 0 0;
}
2016-02-19 10:06:17 +00:00
2016-03-28 09:33:07 +00:00
headerbar {
2016-03-31 17:43:43 +00:00
@extend %header_widgets;
2016-03-28 09:47:22 +00:00
entry, button, separator {
margin-top: 6px;
margin-bottom: 6px;
}
2016-03-28 22:37:22 +00:00
// Fixes split headerbars
2016-03-28 09:33:07 +00:00
separator:first-child + &,
2016-03-28 22:37:22 +00:00
&:first-child {
&, &:backdrop {
border-top-left-radius: $_header_radius;
.maximized &,
.tiled & { border-radius: 0; }
}
}
&:last-child {
&, &:backdrop {
border-top-right-radius: $_header_radius;
2016-02-19 10:06:17 +00:00
2016-03-28 22:37:22 +00:00
.maximized &,
.tiled & { border-radius: 0; }
}
}
2016-02-19 10:06:17 +00:00
}
2016-03-28 22:37:22 +00:00
// Fixes split headerbars too
2016-03-28 09:33:07 +00:00
.titlebar:not(headerbar) {
window > &,
window.csd > & {
&, &:backdrop {
padding: 0;
2016-03-30 14:51:27 +00:00
background: none;
border: none;
box-shadow: none;
}
2016-03-28 09:33:07 +00:00
}
2016-02-19 10:06:17 +00:00
2016-08-30 23:00:14 +00:00
> separator { background-image: _solid($header_border); }
2016-03-10 23:02:11 +00:00
2016-03-28 09:33:07 +00:00
@extend %titlebar;
2016-02-19 10:06:17 +00:00
}
2016-02-19 10:06:17 +00:00
%header_separator {
min-width: 1px;
min-height: 1px;
background: none;
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 {
// Headerbar Entries
2016-02-19 10:06:17 +00:00
entry {
2016-02-19 10:06:17 +00:00
@include entry(header-normal);
&:backdrop { opacity: 0.85; }
&:focus {
@include entry(header-focus);
background-clip: if($darker=='false' and $variant=='light', border-box, padding-box);
image { color: $selected_fg_color; }
}
&:disabled { @include entry(header-insensitive); }
selection:focus {
background-color: $selected_fg_color;
color: $selected_bg_color;
}
progress {
border-color: $selected_bg_color;
background-image: none;
background-color: transparent;
}
@each $e_type, $e_color, $e_fg_color in (warning, $warning_color, $warning_fg_color),
(error, $error_color, $error_fg_color) {
2016-02-19 10:06:17 +00:00
&.#{$e_type} {
color: $e_fg_color;
2016-02-19 10:06:17 +00:00
border-color: if($darker=='false' and $variant=='light', $e_color, $header_entry_border);
background-color: mix($e_color, $header_bg, 60%);
2016-02-19 10:06:17 +00:00
&:focus {
color: $e_fg_color;
background-color: $e_color;
2016-02-19 10:06:17 +00:00
}
selection, selection:focus {
background-color: $e_fg_color;
2016-02-19 10:06:17 +00:00
color: $e_color;
}
}
}
}
// Headerbar Buttons
button {
@include button(header-normal);
&:backdrop { opacity: 0.7; }
&:hover { @include button(header-hover); }
&:active, &:checked {
@include button(header-active);
background-clip: if($darker=='false' and $variant=='light', border-box, padding-box);
}
&:disabled { @include button(header-insensitive); }
&:disabled:active, &:disabled:checked { @include button(header-insensitive-active); }
}
2016-03-30 10:22:10 +00:00
&.selection-mode button {
&, &.flat {
@include button(undecorated);
color: $selection_mode_fg;
background-color: transparentize($selection_mode_fg, 1);
2016-03-30 10:22:10 +00:00
}
&:hover { @extend %normal_selected_button; }
&:active, &:checked { @extend %selected-button:active; }
&:disabled {
@extend %selected-button.flat:disabled;
&:checked, &:active { @extend %selected-button:disabled:checked; }
}
}
2016-02-19 10:06:17 +00:00
// Linking stuff
2016-04-01 12:00:25 +00:00
// Disconnect linked buttons
2016-03-30 02:42:30 +00:00
.linked:not(.vertical):not(.path-bar):not(.stack-switcher) {
button:not(:last-child):not(:only-child) { margin-right: 1px; }
}
2016-02-19 10:06:17 +00:00
// Reset buttons
2016-04-01 12:00:25 +00:00
.linked:not(.vertical):not(.path-bar) > button {
&, &:hover, &:active, &:checked, &:disabled {
border-radius: 3px;
border-style: solid;
}
2016-02-19 10:06:17 +00:00
}
2016-04-11 17:42:43 +00:00
.linked:not(.vertical):not(.path-bar) {
$_uncolored_button: 'button:not(:checked):not(:active):not(.suggested-action):not(.destructive-action)';
> #{$_uncolored_button}:hover:not(:only-child),
> #{$_uncolored_button}:hover + #{$_uncolored_button},
> #{$_uncolored_button}:disabled:not(:only-child),
> #{$_uncolored_button}:disabled + #{$_uncolored_button}:not(:hover) { box-shadow: none; }
2016-02-19 10:06:17 +00:00
}
2016-02-19 10:06:17 +00:00
// special case for path-bars and stack-switchers
.linked:not(.vertical):not(.path-bar).stack-switcher,
.linked:not(.vertical).path-bar {
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
> button {
@include button(header-hover);
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
&:hover { background-color: lighten($header_button_bg, 15%); }
&:active, &:checked { @include button(header-active); }
&:disabled { color: transparentize($header_fg, 0.4); }
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
&, &:hover, &:active, &:checked, &:disabled { @extend %linked; }
2016-02-19 10:06:17 +00:00
}
2016-02-19 10:06:17 +00:00
@include pathbar_linking_rules($sep_color:$header_button_border);
}
2016-02-19 10:06:17 +00:00
// use linking rules for entries only
.linked:not(.vertical):not(.path-bar) {
@include linking_rules( $a:0.5,
$var:if($variant=='light' and $darker=='false', 'light', 'dark'),
$button_rules:'false',
$e_border:$header_entry_border,
$b_border:$header_button_border );
2016-02-19 10:06:17 +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) {
2016-02-19 10:06:17 +00:00
button.#{$b_type} {
@include button(suggested_destructive, $b_color, $b_fg);
2016-02-19 10:06:17 +00:00
&.flat {
@include button(undecorated);
color: $b_color;
}
&:hover {
@include button(suggested_destructive, lighten($b_color, 10%), $b_fg);
2016-02-19 10:06:17 +00:00
}
&:active, &:checked {
@include button(suggested_destructive, darken($b_color, 10%), $b_fg);
2016-02-19 10:06:17 +00:00
}
&.flat:disabled,
&:disabled { @include button(header-insensitive); }
}
button.#{$b_type}:backdrop,
button.#{$b_type}:backdrop {
opacity: 0.8;
}
}
// Headerbar Spinbuttons
2016-02-19 10:06:17 +00:00
spinbutton:not(.vertical) {
&:focus {
color: $selected_fg_color;
caret-color: $selected_fg_color;
2016-02-19 10:06:17 +00:00
}
button {
2016-02-19 10:06:17 +00:00
&,&:disabled { @include button(header-hover); }
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
&:hover { background-color: lighten($header_button_bg, 15%); }
&:active, &:checked { @include button(header-active); }
&:disabled { color: transparentize($header_fg, 0.4); }
2016-02-19 10:06:17 +00:00
}
2016-02-19 10:06:17 +00:00
> button + button { border-left-style: none; }
> button:hover:not(:active),
> button:hover + button { box-shadow: inset 1px 0 $header_button_border; }
2016-09-20 19:30:16 +00:00
> button:disabled + button:not(:disabled):not(:active):not(:checked):not(:hover),
> button:not(:disabled):not(:active):not(:checked):not(:hover) + button:disabled { box-shadow: inset 1px 0 $header_button_border; }
2016-02-19 10:06:17 +00:00
> button:first-child:hover:not(:active),
> entry + button:not(:active):hover { box-shadow: none; }
> entry:focus + button { border-left-color: if($variant=='light' and $darker=='false', $selected_bg_color, $header_entry_border); }
2016-02-19 10:06:17 +00:00
}
// Headerbar ComboBoxes
combobox {
&:disabled { color: transparentize($header_fg, 0.6); }
2016-04-01 12:00:25 +00:00
> .linked > button.combo {
2016-02-19 10:06:17 +00:00
@include entry(header-normal);
&:hover { @include entry(header-focus); box-shadow: none; }
&:disabled { @include entry(header-insensitive); }
}
2016-04-01 12:00:25 +00:00
> .linked > entry.combo {
2016-02-19 10:06:17 +00:00
&:dir(ltr) {
border-right-style: none;
&:focus { box-shadow: none; }
@if $variant=='light' and $darker=='false' { &:focus { box-shadow: 1px 0 $selected_bg_color; } }
}
&:dir(rtl) {
border-left-style: none;
&:focus { box-shadow: none; }
@if $variant=='light' and $darker=='false' { &:focus { box-shadow: -1px 0 $selected_bg_color; } }
}
}
2016-04-01 12:00:25 +00:00
> .linked > button.combo {
2016-02-19 10:06:17 +00:00
&:dir(ltr) {
&, &:hover, &:active, &:checked, &:disabled {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
&:dir(rtl) {
&, &:hover, &:active, &:checked, &:disabled {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
}
}
2016-02-19 10:06:17 +00:00
}
// Headerbar Switches
switch {
&:backdrop { opacity: 0.75; }
}
progressbar {
trough { background-color: if($variant=='light' and $darker=='false', opacify($header_button_border, 0.05), $header_button_border); }
&:backdrop { opacity: 0.75; }
}
// Headerbar Scale
scale {
$_trough_bg: if($variant=='light' and $darker=='false', opacify($header_button_border, 0.05), $header_button_border);
&:backdrop { opacity: 0.75; }
slider {
$_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%));
2016-04-02 20:42:44 +00:00
background-color: $_slider_bg;
2016-02-19 10:06:17 +00:00
border-color: $_slider_border;
&:hover {
2016-04-02 20:42:44 +00:00
background-color: lighten($_slider_bg, 5%);
2016-02-19 10:06:17 +00:00
border-color: $_slider_border;
}
&:active {
2016-04-02 20:42:44 +00:00
background-color: $selected_bg_color;
2016-02-19 10:06:17 +00:00
border-color: $selected_bg_color;
}
&:disabled {
2016-04-02 20:42:44 +00:00
background-color: mix($_slider_bg, $header_bg, 70%);
2016-02-19 10:06:17 +00:00
border-color: $_slider_border;
}
}
trough {
2016-04-02 20:42:44 +00:00
background-color: $_trough_bg;
2016-02-19 10:06:17 +00:00
2016-04-02 20:42:44 +00:00
&:disabled { background-color: if($variant=='light' and $darker=='false', transparentize($_trough_bg, 0.05), transparentize($_trough_bg, 0.1)); }
2016-02-19 10:06:17 +00:00
}
}
}
//
// Pathbars
//
.path-bar button {
2016-03-09 19:00:09 +00:00
&.text-button, &.image-button, & {
padding-left: 6px;
padding-right: 6px;
}
2016-02-19 10:06:17 +00:00
2016-03-09 19:00:09 +00:00
&.text-button.image-button label { padding-left: 0; padding-right: 0; }
&.text-button.image-button, & {
label:last-child { padding-right: 10px; }
label:first-child { padding-left: 10px; }
2016-02-19 10:06:17 +00:00
}
2016-03-23 14:07:19 +00:00
&.slider-button,
&:not(.image-button):not(.text-button) {
2016-03-22 11:24:30 +00:00
padding-left: 1px;
padding-right: 1px;
}
2016-03-09 19:00:09 +00:00
image {
padding-left: 4px;
padding-right: 4px;
}
2016-02-19 10:06:17 +00:00
}
//
// Tree Views
//
treeview.view {
2016-08-31 12:11:33 +00:00
@at-root * {
-GtkTreeView-horizontal-separator: 4;
-GtkTreeView-grid-line-width: 1;
-GtkTreeView-grid-line-pattern: '';
-GtkTreeView-tree-line-width: 1;
-GtkTreeView-tree-line-pattern: '';
-GtkTreeView-expander-size: 16;
}
2016-02-19 10:06:17 +00:00
border-left-color: transparentize($fg_color, 0.85); // this is actually the tree lines color,
border-top-color: transparentize(black, 0.9); // while this is the grid lines color, better then nothing
rubberband { @extend rubberband; } // to avoid borders being overridden by the previously set props
2016-03-31 13:55:30 +00:00
acceleditor > label { background-color: $selected_bg_color; }
2016-02-19 10:06:17 +00:00
&:selected {
2016-03-22 11:24:30 +00:00
&, &:focus {
border-radius: 0;
border-left-color: mix($selected_fg_color, $selected_bg_color, 50%);
border-top-color: transparentize($fg_color, 0.9); // doesn't work unfortunately
2016-02-19 10:06:17 +00:00
2016-03-22 11:24:30 +00:00
@extend %selected_items;
}
2016-02-19 10:06:17 +00:00
}
&:disabled {
color: $insensitive_fg_color;
2016-03-22 11:24:30 +00:00
2016-02-19 10:06:17 +00:00
&:selected {
color: mix($selected_fg_color, $selected_bg_color, 40%);
}
}
2016-03-02 12:28:11 +00:00
&.separator {
min-height: 2px;
color: transparentize(black, 0.9);
}
2016-02-19 10:06:17 +00:00
2016-03-22 11:24:30 +00:00
&:drop(active) {
2016-02-19 10:06:17 +00:00
border-style: solid none;
border-width: 1px;
border-color: mix($fg_color, $selected_bg_color, 50%);
2016-03-22 11:24:30 +00:00
&.after { border-top-style: none; }
&.before { border-bottom-style: none; }
2016-02-19 10:06:17 +00:00
}
&.expander {
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
2016-03-02 12:28:11 +00:00
2016-02-19 10:06:17 +00:00
&: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; }
}
2016-03-02 12:28:11 +00:00
&:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
2016-02-19 10:06:17 +00:00
}
2016-03-23 20:46:35 +00:00
&.progressbar, &.progressbar:focus { // progress bar in treeviews
2016-02-19 10:06:17 +00:00
color: $selected_fg_color;
border-radius: 3px;
2016-08-30 23:00:14 +00:00
background-color: $selected_bg_color;
2016-02-19 10:06:17 +00:00
2016-03-23 20:46:35 +00:00
&:selected, &:selected:focus {
2016-02-19 10:06:17 +00:00
color: $selected_bg_color;
box-shadow: none;
2016-08-30 23:00:14 +00:00
background-color: $selected_fg_color;
2016-02-19 10:06:17 +00:00
}
}
2016-09-20 09:13:56 +00:00
&.trough { // progress bar trough in treeviews
2016-02-19 10:06:17 +00:00
color: $fg_color;
2016-08-30 23:00:14 +00:00
background-color: $button_border;
2016-02-19 10:06:17 +00:00
border-radius: 3px;
border-width: 0;
2016-09-20 09:13:56 +00:00
&:selected, &:selected:focus {
color: $selected_fg_color;
background-color: transparentize(black, 0.8);
border-radius: 3px;
border-width: 0;
}
2016-02-19 10:06:17 +00:00
}
header {
button {
$_column_header_color: mix($fg_color,$base_color,80%);
2016-02-19 10:06:17 +00:00
2016-02-25 23:10:22 +00:00
min-height: 0;
min-width: 0;
padding: 3px 6px;
font-weight: bold;
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
color: $_column_header_color;
background-color: $base_color;
2016-02-25 23:10:22 +00:00
background-image: none;
border-style: none solid none none;
border-radius: 0;
border-image: linear-gradient(to bottom,
$base_color 20%,
transparentize(if($variant == 'light', black, white), 0.89) 20%,
transparentize(if($variant == 'light', black, white), 0.89) 80%,
$base_color 80%) 0 1 0 0 / 0 1px 0 0 stretch;
&:hover { color: $selected_bg_color; }
&:active { color: $fg_color; }
&:active, &:hover { background-color: $base_color; }
&:active:hover { color: $fg_color; }
&:disabled {
border-color: $bg_color;
background-image: none;
2016-02-19 10:06:17 +00:00
}
2016-02-25 23:10:22 +00:00
&:last-child {
border-right-style: none;
border-image: none;
2016-02-19 10:06:17 +00:00
}
}
}
2016-02-25 23:10:22 +00:00
button.dnd,
header.button.dnd {
&, &:selected, &:hover, &:active {
padding: 0 6px;
transition: none;
color: $selected_fg_color;
background-color: $selected_bg_color;
border-radius: 0;
border-style: none;
}
2016-02-19 10:06:17 +00:00
}
2016-02-19 10:06:17 +00:00
}
//
// Menus
//
menubar,
.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);
}
2016-03-02 12:28:11 +00:00
> menuitem {
padding: 4px 8px;
2016-02-19 10:06:17 +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;
}
&:disabled {
color: transparentize($header_fg, 0.6);
border-color: transparent;
}
}
}
menu,
.menu {
$_menu_bg: if($variant=='light', $base_color, $bg_color);
margin: 4px;
padding: 0;
border-radius: 0;
background-color: $_menu_bg;
border: 1px solid $borders_color;
.csd & {
padding: 4px 0px;
border-radius: 2px;
border: none;
}
separator,
.csd & separator {
2016-02-19 10:06:17 +00:00
margin: 2px 0;
2016-02-19 10:06:17 +00:00
background-color: $_menu_bg;
}
// Firefox workaround
2016-05-16 20:28:36 +00:00
.separator:not(label),
.csd & .separator:not(label) { color: $_menu_bg; }
// Firefox workaround end
2016-02-19 10:06:17 +00:00
menuitem {
2016-03-02 12:28:11 +00:00
min-height: 16px;
2016-02-19 10:06:17 +00:00
min-width: 40px;
padding: 5px;
2016-02-19 10:06:17 +00:00
&:hover {
color: $selected_fg_color;
background-color: $selected_bg_color;
2016-02-19 10:06:17 +00:00
}
&:disabled {
color: $insensitive_fg_color;
}
//submenu indicators
arrow {
min-height: 16px;
min-width: 16px;
&:dir(ltr) {
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
margin-left: 10px;
}
&:dir(rtl) {
-gtk-icon-source:-gtk-icontheme('pan-end-symbolic-rtl');
margin-right: 10px;
}
}
@at-root menuitem {
accelerator { color: gtkalpha(currentColor,0.55); }
check, radio {
min-height: 16px;
min-width: 16px;
2016-03-24 15:31:45 +00:00
&:dir(ltr) { margin-right: 6px; margin-left: 2px; }
&:dir(rtl) { margin-left: 6px; margin-right: 2px; }
2016-02-19 10:06:17 +00:00
}
}
}
2016-03-28 10:09:09 +00:00
// overflow buttons
> arrow {
@include button(undecorated);
2016-02-19 10:06:17 +00:00
min-width: 16px;
min-height: 16px;
2016-03-28 10:09:09 +00:00
padding: 4px;
background-color: $_menu_bg;
border-radius: 0;
2016-02-19 10:06:17 +00:00
&.top {
2016-03-28 10:09:09 +00:00
margin-top: -6px;
2016-02-19 10:06:17 +00:00
border-bottom: 1px solid mix($fg_color, $base_color, 10%);
2016-03-28 10:09:09 +00:00
-gtk-icon-source: -gtk-icontheme('pan-up-symbolic');
2016-02-19 10:06:17 +00:00
}
&.bottom {
2016-03-28 10:09:09 +00:00
margin-bottom: -6px;
2016-02-19 10:06:17 +00:00
border-top: 1px solid mix($fg_color, $base_color, 10%);
2016-03-28 10:09:09 +00:00
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
2016-02-19 10:06:17 +00:00
}
&:hover { background-color: mix($fg_color, $base_color, 10%); }
&:disabled {
color: transparent;
background-color: transparent;
border-color: transparent ;
}
}
}
//
// Popovers
//
popover,
popover.background {
$_popover_bg: if($variant=='light', $base_color, $bg_color);
padding: 2px;
border-radius: 3px;
background-clip: border-box;
background-color: $_popover_bg;
box-shadow: 0 2px 6px 1px if($variant=='light', transparentize(black, 0.93), transparentize(black, 0.65));
.csd &, & { border: 1px solid darken($borders_color, 5%); }
& separator { background-color: $_popover_bg; }
label.separator { @extend label.separator; } // Noice
> list,
> .view,
2016-03-22 11:24:30 +00:00
> toolbar {
2016-02-19 10:06:17 +00:00
border-style: none;
background-color: transparent;
}
2016-03-02 12:28:11 +00:00
&, .csd & {
&.osd, &.magnifier { @extend %osd; }
&.touch-selection { @extend .context-menu }
2016-03-22 11:24:30 +00:00
&.osd { @extend %osd; }
2016-03-02 12:28:11 +00:00
}
2016-02-19 10:06:17 +00:00
}
//touch selection handlebars for the Popover.osd above
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'); }
}
//
// Notebooks and Tabs
//
notebook {
padding: 0;
2016-02-19 10:06:17 +00:00
&.frame {
border: 1px solid $borders_color;
2016-04-05 22:04:04 +00:00
> header {
// ugly hack to hide the borders around the header
margin: -1px;
&.top { margin-bottom: 0; }
&.bottom { margin-top: 0; }
&.left { margin-right: 0; }
&.right { margin-left: 0; }
2016-04-05 22:04:04 +00:00
&.top, &.bottom { padding-left: 0; padding-right: 0; }
&.left, &.right { padding-top: 0; padding-bottom: 0; }
}
2016-03-03 14:40:57 +00:00
}
> stack:not(:only-child) { // the :not(:only-child) is for "hidden" notebooks
background-color: $base_color;
2016-02-19 10:06:17 +00:00
}
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
> header {
2016-03-21 20:07:05 +00:00
padding: 2px;
2016-02-19 10:06:17 +00:00
background-color: $bg_color;
2016-02-19 10:06:17 +00:00
&.top { box-shadow: inset 0 -1px $borders_color; }
&.bottom { box-shadow: inset 0 1px $borders_color; }
&.right { box-shadow: inset 1px 0 $borders_color; }
&.left { box-shadow: inset -1px 0 $borders_color; }
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
@each $_pos, $_bpos in (top, bottom), (bottom, top), (right, left), (left, right) {
2016-02-19 10:06:17 +00:00
// sizing and borders
2016-02-19 10:06:17 +00:00
&.#{$_pos} {
padding-#{$_bpos}: 0;
2016-02-19 10:06:17 +00:00
2016-03-03 14:40:57 +00:00
> tabs > tab {
padding: 2px 10px;
2016-03-21 20:07:05 +00:00
min-width: 20px;
min-height: 20px;
2016-03-03 14:40:57 +00:00
outline-offset: -4px;
2016-02-19 10:06:17 +00:00
border: 1px solid transparent;
border-#{$_bpos}: none;
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
// tab overlap
2016-04-05 22:04:04 +00:00
+ tab {
@if $_pos==top or $_pos==bottom { margin-left: -1px; }
@else { margin-top: -1px; }
}
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
// tab border radius
2016-02-19 10:06:17 +00:00
@if $_pos==top { border-radius: 1px 1px 0 0; }
@else if $_pos==bottom { border-radius: 0 0 1px 1px; }
@else if $_pos==left { border-radius: 1px 0 0 1px; }
@else if $_pos==right { border-radius: 0 1px 1px 0; }
2016-02-19 10:06:17 +00:00
}
}
}
2016-02-19 10:06:17 +00:00
// overflow arrows
2016-02-19 10:06:17 +00:00
&.top, &.bottom {
2016-03-03 14:40:57 +00:00
> tabs > arrow.up {
2016-02-19 10:06:17 +00:00
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
&:last-child { margin-left: 2px; }
}
2016-03-03 14:40:57 +00:00
> tabs > arrow.down {
2016-02-19 10:06:17 +00:00
-gtk-icon-source: -gtk-icontheme('pan-start-symbolic');
&:first-child { margin-right: 2px; }
}
2016-02-19 10:06:17 +00:00
}
&.left, &.right {
2016-03-03 14:40:57 +00:00
> tabs > arrow.up {
2016-02-19 10:06:17 +00:00
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
&:last-child { margin-top: 2px; }
}
2016-03-03 14:40:57 +00:00
> tabs > arrow.down {
2016-02-19 10:06:17 +00:00
-gtk-icon-source: -gtk-icontheme('pan-up-symbolic');
&:first-child { margin-bottom: 2px; }
}
2016-02-19 10:06:17 +00:00
}
2016-03-03 14:40:57 +00:00
> tabs > arrow {
2016-02-19 10:06:17 +00:00
color: $insensitive_fg_color;
&:hover { color: mix($fg_color, $insensitive_fg_color, 50%); }
&:active { color: $fg_color; }
&:disabled { color: transparentize($insensitive_fg_color,0.3); }
}
2016-04-05 22:04:04 +00:00
2016-02-19 10:06:17 +00:00
// tab colors
2016-04-05 22:04:04 +00:00
&.top > tabs > tab:hover:not(:checked) { box-shadow: inset 0 -1px $borders_color; }
&.bottom > tabs > tab:hover:not(:checked) { box-shadow: inset 0 1px $borders_color; }
&.left > tabs > tab:hover:not(:checked) { box-shadow: inset -1px 0 $borders_color; }
&.right > tabs > tab:hover:not(:checked) { box-shadow: inset 1px 0 $borders_color; }
2016-03-03 14:40:57 +00:00
> tabs > tab {
color: $insensitive_fg_color;
2016-02-19 10:06:17 +00:00
background-color: transparentize($base_color, 1);
2016-02-19 10:06:17 +00:00
2016-03-03 14:40:57 +00:00
&:hover:not(:checked) {
color: mix($fg_color, $insensitive_fg_color, 50%);
2016-02-19 10:06:17 +00:00
background-color: transparentize($base_color, 0.5);
border-color: $borders_color;
}
2016-03-01 22:26:00 +00:00
&:checked {
2016-03-03 14:40:57 +00:00
color: $fg_color;
2016-02-19 10:06:17 +00:00
background-color: $base_color;
border-color: $borders_color;
2016-02-19 10:06:17 +00:00
}
2016-02-19 10:06:17 +00:00
// close button
2016-03-03 14:40:57 +00:00
button.flat {
2016-03-21 20:07:05 +00:00
min-height: 22px;
2016-02-19 10:06:17 +00:00
min-width: 16px;
padding: 0;
color: mix($bg_color, $fg_color, 35%);
&:hover {
@extend %undecorated_button;
color: lighten(red, 15%);
}
&:active, &:active:hover {
@extend %undecorated_button;
color: $selected_bg_color;
}
2016-02-19 10:06:17 +00:00
}
}
}
}
//
// Scrollbars
//
$_scrollbar_bg_color: darken($base_color, 1%);
2016-05-14 10:18:02 +00:00
scrollbar {
$_slider_min_length: 40px;
// disable steppers
2016-02-19 10:06:17 +00:00
@at-root * {
-GtkScrollbar-has-backward-stepper: false;
-GtkScrollbar-has-forward-stepper: false;
}
2016-05-14 10:18:02 +00:00
background-color: $_scrollbar_bg_color;
transition: 300ms $ease-out-quad;
// scrollbar border
&.top { border-bottom: 1px solid $borders_color; }
&.bottom { border-top: 1px solid $borders_color; }
&.left { border-right: 1px solid $borders_color; }
&.right { border-left: 1px solid $borders_color; }
2016-02-19 10:06:17 +00:00
button { border: none; }
2016-03-22 11:24:30 +00:00
&.vertical button {
&.down { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
&.up { -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); }
2016-03-02 11:28:43 +00:00
}
2016-03-22 11:24:30 +00:00
&.horizontal button {
&.down { -gtk-icon-source: -gtk-icontheme('pan-right-symbolic'); }
&.up { -gtk-icon-source: -gtk-icontheme('pan-left-symbolic'); }
2016-03-02 11:28:43 +00:00
}
2016-05-14 10:18:02 +00:00
// slider
slider {
min-width: 6px;
min-height: 6px;
margin: -1px;
border: 4px solid transparent;
border-radius: 8px;
background-clip: padding-box;
background-color: mix($fg_color, $bg_color, 40%);
&:hover { background-color: mix($fg_color, $bg_color, 30%); }
&:hover:active { background-color: $selected_bg_color;}
&:disabled { background-color: transparent; }
}
&.fine-tune {
slider {
min-width: 4px;
min-height: 4px;
}
&.horizontal slider { border-width: 5px 4px; }
&.vertical slider { border-width: 4px 5px; }
}
2016-02-19 10:06:17 +00:00
&.overlay-indicator {
2016-05-14 10:18:02 +00:00
&:not(.dragging):not(.hovering) {
2016-02-19 10:06:17 +00:00
opacity: 0.4;
2016-05-14 10:18:02 +00:00
border-color: transparent;
background-color: transparent;
2016-02-19 10:06:17 +00:00
slider {
margin: 0;
2016-05-14 10:18:02 +00:00
min-width: 4px;
min-height: 4px;
2016-02-19 10:06:17 +00:00
background-color: mix($fg_color, $bg_color, 70%);
border: 1px solid if($variant == 'light', transparentize(white, 0.4), transparentize(black, 0.7));
}
2016-05-14 10:18:02 +00:00
&.horizontal slider {
margin: 0 2px;
min-width: $_slider_min_length;
2016-02-19 10:06:17 +00:00
}
&.vertical slider {
2016-05-14 10:18:02 +00:00
margin: 2px 0;
min-height: $_slider_min_length;
2016-02-19 10:06:17 +00:00
}
}
&.dragging,
&.hovering { opacity: 0.99; }
}
2016-05-14 10:18:02 +00:00
&.horizontal slider { min-width: $_slider_min_length; }
&.vertical slider { min-height: $_slider_min_length; }
2016-02-19 10:06:17 +00:00
}
//
// Switches
//
switch {
2016-08-30 23:00:14 +00:00
font-size: 1px;
2016-02-19 10:06:17 +00:00
2016-03-30 01:58:15 +00:00
min-width: 52px;
min-height: 24px;
background-size: 52px 24px;
background-repeat: no-repeat;
background-position: center center;
2016-03-30 12:31:52 +00:00
slider {
min-width: 1px;
min-height: 1px;
}
2016-02-19 10:06:17 +00:00
&, slider {
2016-03-30 12:31:52 +00:00
outline-color: transparent;
2016-02-19 10:06:17 +00:00
color: transparent;
2016-03-30 12:31:52 +00:00
border: none;
2016-02-19 10:06:17 +00:00
box-shadow: none;
}
}
@each $k,$l in ('',''),
(':checked','-active'),
2016-02-19 10:06:17 +00:00
(':disabled','-insensitive'),
(':checked:disabled','-active-insensitive') {
2016-02-19 10:06:17 +00:00
// load switch troughs from .png files in assets directory
switch#{$k} {
background-image: -gtk-scaled(url("assets/switch#{$l}#{$asset_suffix}.png"),url("assets/switch#{$l}#{$asset_suffix}@2.png"));
}
menuitem:hover switch#{$k},
2016-02-19 10:06:17 +00:00
row:selected switch#{$k},
infobar switch#{$k} {
background-image: -gtk-scaled(url("assets/switch#{$l}-selected.png"),url("assets/switch#{$l}-selected@2.png"));
}
headerbar switch#{$k},
.primary-toolbar switch#{$k} {
background-image: -gtk-scaled(url("assets/switch#{$l}-header#{$darker_asset_suffix}.png"),url("assets/switch#{$l}-header#{$darker_asset_suffix}@2.png"));
}
}
//
2016-03-22 11:24:30 +00:00
// Check and Radio items
2016-02-19 10:06:17 +00:00
//
@each $w,$a in ('check', 'checkbox'),
('radio','radio') {
//standard checks and radios
@each $s,$as in ('','-unchecked'),
(':disabled','-unchecked-insensitive'),
(':indeterminate', '-mixed'),
(':indeterminate:disabled', '-mixed-insensitive'),
(':checked', '-checked'),
(':checked:disabled','-checked-insensitive') {
.#{$w}#{$s},
2016-02-19 10:06:17 +00:00
#{$w}#{$s},
treeview.#{$w}#{$s} {
2016-02-19 10:06:17 +00:00
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}#{$asset_suffix}.png"),
url("assets/#{$a}#{$as}#{$asset_suffix}@2.png"));
}
2016-03-23 22:41:38 +00:00
.osd,
2016-02-19 10:06:17 +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"));
}
}
// the borders of checks and radios are
// too similar in luminosity to the selected background color, hence
// we need special casing.
menuitem #{$w}#{$s}:hover,
2016-02-19 10:06:17 +00:00
.view #{$w}#{$s}:selected,
2016-02-19 10:06:17 +00:00
treeview.#{$w}#{$s}:selected,
2016-02-19 10:06:17 +00:00
row:selected #{$w}#{$s},
infobar #{$w}#{$s} {
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}-selected.png"),
url("assets/#{$a}#{$as}-selected@2.png"));
}
}
}
// Selectionmode
@each $s,$as in ('','-selectionmode'),
(':checked', '-checked-selectionmode') {
.view.content-view.check#{$s}:not(list) {
-gtk-icon-source: -gtk-scaled(url("assets/checkbox#{$as}#{$asset_suffix}.png"),
url("assets/checkbox#{$as}#{$asset_suffix}@2.png"));
background-color: transparent;
}
}
checkbutton, radiobutton {
// this is for a nice focus on check and radios text
&.text-button {
2016-03-22 11:24:30 +00:00
padding: 2px 0;
outline-offset: 0;
}
2016-03-02 12:28:11 +00:00
2016-03-10 15:22:00 +00:00
label:not(:only-child) {
&:first-child { margin-left: 4px; }
&:last-child { margin-right: 4px; }
}
2016-02-19 10:06:17 +00:00
}
2016-03-22 11:24:30 +00:00
check,
radio {
2016-02-19 10:06:17 +00:00
min-width: 16px;
min-height: 16px;
margin: 0 2px;
2016-03-22 11:24:30 +00:00
&:only-child,
menu menuitem & { margin: 0; }
2016-02-19 10:06:17 +00:00
}
//
// GtkScale
//
scale {
2016-03-03 11:04:24 +00:00
$_marks_length: 3px;
2016-04-02 20:42:44 +00:00
$_marks_distance: 1px;
2016-03-03 11:04:24 +00:00
2016-04-05 16:58:22 +00:00
min-height: 15px;
min-width: 15px;
padding: 3px;
2016-03-02 11:28:43 +00:00
2016-04-02 20:42:44 +00:00
&.horizontal {
2016-04-05 16:58:22 +00:00
trough { padding: 0 4px; }
highlight, fill { margin: 0 -4px; }
2016-04-02 20:42:44 +00:00
}
2016-03-03 11:04:24 +00:00
2016-04-05 16:58:22 +00:00
&.vertical {
trough { padding: 4px 0; }
highlight, fill { margin: -4px 0; }
2016-04-02 20:42:44 +00:00
}
// The slider is inside the trough, negative margin to make it bigger
slider {
min-height: 15px;
min-width: 15px;
margin: -6px;
}
// Click-and-hold the slider to activate
&.fine-tune {
// Make the trough grow in fine-tune mode
slider { margin: -4px; }
fill,
highlight,
trough {
border-radius: 5px;
-gtk-outline-radius: 7px;
2016-03-03 11:04:24 +00:00
}
2016-03-02 11:28:43 +00:00
}
2016-04-02 20:42:44 +00:00
// Trough
trough {
$_scale_trough_bg: if($variant == 'light', $button_border, darken($bg_color, 5%));
2016-03-07 21:50:11 +00:00
2016-04-02 20:42:44 +00:00
outline-offset: 2px;
-gtk-outline-radius: 4.5px;
border-radius: 2.5px;
background-color: $_scale_trough_bg;
&:disabled { background-color: transparentize($_scale_trough_bg, 0.45); }
//OSD troughs
.osd & {
background-color: lighten($osd_bg_color, 7%);
highlight {
background-color: $selected_bg_color;
&:disabled { }
2016-03-07 21:50:11 +00:00
}
2016-04-02 20:42:44 +00:00
&:disabled { }
2016-03-07 21:50:11 +00:00
}
2016-04-02 20:42:44 +00:00
// Troughs in selected list-rows and infobars
menuitem:hover &,
2016-04-02 20:42:44 +00:00
row:selected &,
infobar & {
background-color: transparentize(black, 0.8);
2016-02-19 10:06:17 +00:00
2016-04-02 20:42:44 +00:00
highlight {
background-color: $selected_fg_color;
2016-03-02 11:28:43 +00:00
2016-04-02 20:42:44 +00:00
&:disabled { background-color: mix($selected_fg_color, $selected_bg_color, 55%); }
}
2016-03-02 11:28:43 +00:00
2016-04-02 20:42:44 +00:00
&:disabled { background-color: transparentize(black, 0.9); }
}
2016-02-19 10:06:17 +00:00
}
2016-04-02 20:42:44 +00:00
// The colored part of trough
highlight {
2016-02-19 10:06:17 +00:00
border-radius: 2.5px;
2016-04-02 20:42:44 +00:00
background-color: $selected_bg_color;
&:disabled { background-color: transparentize($selected_bg_color, 0.45); }
}
// this is another differently styled part of the trough, the most relevant use case is for example
// in media player to indicate how much video stream as been cached
fill {
border-radius: 2.5px;
background-color: transparentize($selected_bg_color, 0.5);
&:disabled { background-color: transparent; }
2016-02-19 10:06:17 +00:00
}
slider {
$_slider_border: if($variant=='light', transparentize(darken($button_border,25%), 0.5), darken($button_border,2%));
2016-04-02 20:42:44 +00:00
background-color: $button_bg;
2016-02-19 10:06:17 +00:00
border: 1px solid $_slider_border;
2016-04-02 20:42:44 +00:00
border-radius: 100%;
transition: $button_transition;
transition-property: background, border;
&:hover { background-color: lighten($button_bg, 5%); }
2016-02-19 10:06:17 +00:00
&:active {
2016-04-02 20:42:44 +00:00
background-clip: border-box;
background-color: $selected_bg_color;
2016-02-19 10:06:17 +00:00
border-color: $selected_bg_color;
}
2016-04-02 20:42:44 +00:00
&:disabled {
background-color: mix($entry_bg, $bg_color, 55%);
border-color: transparentize($_slider_border, 0.2);
2016-02-19 10:06:17 +00:00
}
2016-04-02 20:42:44 +00:00
// Selected list-row and infobar sliders
menuitem:hover &,
2016-02-19 10:06:17 +00:00
row:selected &,
infobar & {
2016-04-02 20:42:44 +00:00
background-clip: border-box;
background-color: $selected_fg_color;
2016-02-19 10:06:17 +00:00
border-color: $selected_fg_color;
&:hover {
2016-04-02 20:42:44 +00:00
background-color: mix($selected_fg_color, $selected_bg_color, 85%);
2016-02-19 10:06:17 +00:00
border-color: mix($selected_fg_color, $selected_bg_color, 85%);
}
&:active {
2016-04-02 20:42:44 +00:00
background-color: mix($selected_fg_color, $selected_bg_color, 50%);
2016-02-19 10:06:17 +00:00
border-color: mix($selected_fg_color, $selected_bg_color, 50%);
}
&:disabled{
2016-04-02 20:42:44 +00:00
background-color: mix($selected_fg_color, $selected_bg_color, 55%);
2016-02-19 10:06:17 +00:00
border-color: mix($selected_fg_color, $selected_bg_color, 55%);
}
}
2016-04-02 20:42:44 +00:00
// OSD sliders
.osd & {
background-clip: border-box;
background-color: $selected_bg_color;
border-color: $selected_bg_color;
2016-02-19 10:06:17 +00:00
2016-04-02 20:42:44 +00:00
&:hover {
background-color: lighten($selected_bg_color, 10%);
border-color: lighten($selected_bg_color, 10%)
2016-02-19 10:06:17 +00:00
}
2016-04-02 20:42:44 +00:00
&:active {
background-color: darken($selected_bg_color, 10%);
border-color: darken($selected_bg_color, 10%);
2016-02-19 10:06:17 +00:00
}
2016-04-02 20:42:44 +00:00
2016-02-19 10:06:17 +00:00
&:disabled { }
}
2016-04-02 20:42:44 +00:00
}
2016-02-19 10:06:17 +00:00
2016-04-02 20:42:44 +00:00
value { color: gtkalpha(currentColor, 0.4); }
marks {
color: gtkalpha(currentColor, 0.4);
@each $marks_class, $marks_pos, $marks_margin in (top, top, bottom),
(bottom, bottom, top),
(top, left, right),
(bottom, right, left) {
&.#{$marks_class} {
margin-#{$marks_margin}: $_marks_distance;
margin-#{$marks_pos}: -($_marks_distance + $_marks_length);
}
}
}
2016-02-19 10:06:17 +00:00
2016-04-02 20:42:44 +00:00
&.fine-tune marks {
@each $marks_class, $marks_pos, $marks_margin in (top, top, bottom),
(bottom, bottom, top),
(top, left, right),
(bottom, right, left) {
&.#{$marks_class} {
margin-#{$marks_margin}: ($_marks_distance - 1px);
margin-#{$marks_pos}: -($_marks_distance + $_marks_length - 2px);
2016-02-19 10:06:17 +00:00
}
}
}
2016-04-02 20:42:44 +00:00
&.horizontal {
indicator {
min-height: $_marks_length;
min-width: 1px;
}
&.fine-tune indicator { min-height: ($_marks_length - 1px); }
}
&.vertical {
indicator {
min-height: 1px;
min-width: $_marks_length;
}
&.fine-tune indicator { min-width: ($_marks_length - 1px); }
}
2016-02-19 10:06:17 +00:00
}
2016-04-02 20:42:44 +00:00
2016-02-19 10:06:17 +00:00
//
// Progress bars
//
progressbar {
padding: 0;
font-size: smaller;
color: transparentize($fg_color, 0.3);
&.osd {
min-width: 3px;
min-height: 3px;
background-color: transparent;
trough {
border-style: none;
background-color: transparent;
box-shadow: none;
}
}
// Moving bit
progress {
background-color: $selected_bg_color;
border: none;
border-radius: 3px;
box-shadow: none; //needed for clipping
row:selected &,
infobar & { background-color: $selected_fg_color; }
}
// Trough
trough {
border: none;
border-radius: 3px;
background-color: if($variant == 'light', $button_border, darken($bg_color, 5%));
row:selected &,
infobar & { background-color: transparentize(black, 0.8); }
}
}
//
// Level Bar
//
levelbar {
block {
min-width: 32px;
min-height: 1px;
}
&.vertical block {
min-width: 1px;
min-height: 32px;
}
trough {
border: none;
padding: 3px;
border-radius: 3px;
background-color: if($variant == 'light', $button_border, darken($bg_color, 5%));
}
&.horizontal.discrete block { margin: 0 1px; }
&.vertical.discrete block { margin: 1px 0; }
block:not(.empty) {
border: 1px solid $selected_bg_color;
background-color: $selected_bg_color;
border-radius: 2px;
}
block.low {
border-color: $warning_color;
background-color: $warning_color;
}
block.high {
border-color: $selected_bg_color;
background-color: $selected_bg_color;
}
block.full {
border-color: $success_color;
background-color: $success_color;
}
block.empty {
background-color: if($variant=='light', transparentize($fg_color,0.8), $base_color);
border-color: if($variant=='light', transparentize($fg_color,0.8), $base_color);
}
}
2016-02-25 23:10:22 +00:00
//
// Print dialog
//
printdialog {
paper {
border: 1px solid $borders_color;
2016-03-28 09:33:07 +00:00
background: $base_color;
2016-02-25 23:10:22 +00:00
padding: 0;
}
.dialog-action-box { margin: 12px; }
}
2016-02-19 10:06:17 +00:00
//
// Frames
//
2016-03-09 19:07:51 +00:00
frame > border,
2016-02-19 10:06:17 +00:00
.frame {
margin: 0;
padding: 0;
border-radius: 0;
border: 1px solid $borders_color;
2016-03-22 11:24:30 +00:00
2016-02-19 10:06:17 +00:00
&.flat { border-style: none; }
}
scrolledwindow {
2016-03-22 11:24:30 +00:00
viewport.frame { // avoid double borders when viewport inside scrolled window
2016-02-19 10:06:17 +00:00
border-style: none;
}
// 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); }
}
// 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); }
}
junction { // the small square between two scrollbars
border-color: transparent;
// the border image is used to add the missing dot between the borders, details, details, details...
border-image: linear-gradient(to bottom, $borders_color 1px, transparent 1px) 0 0 0 1 / 0 1px stretch;
background-color: $_scrollbar_bg_color;
&:dir(rtl) { border-image-slice: 0 1 0 0; }
}
}
//vbox and hbox separators
separator {
background-color: transparentize(black, 0.9);
min-width: 1px;
min-height: 1px;
}
//
// Lists
//
list {
background-color: $base_color;
border-color: $borders_color;
2016-03-02 12:28:11 +00:00
row { padding: 2px; }
}
2016-02-19 10:06:17 +00:00
2016-03-22 11:24:30 +00:00
row {
&:not(:hover) { transition: all 150ms $ease-out-quad; }
2016-02-19 10:06:17 +00:00
&:selected {
2016-03-22 11:24:30 +00:00
@extend %selected_items;
2016-02-19 10:06:17 +00:00
2016-03-22 11:24:30 +00:00
button { @extend %selected-button; }
}
&.activatable {
2016-02-19 10:06:17 +00:00
&.has-open-popup,
2016-03-22 11:24:30 +00:00
&:hover { background-color: if($variant == 'light', transparentize(black, 0.95), transparentize(white, 0.97)); }
2016-02-19 10:06:17 +00:00
2016-03-22 11:24:30 +00:00
&:active { color: $fg_color; }
2016-02-19 10:06:17 +00:00
&:disabled {
2016-03-22 11:24:30 +00:00
color: $insensitive_fg_color;
image { color: inherit; }
2016-02-19 10:06:17 +00:00
}
2016-03-22 11:24:30 +00:00
&:selected {
&:active { color: $selected_fg_color; }
2016-02-19 10:06:17 +00:00
2016-03-22 11:24:30 +00:00
&.has-open-popup,
&:hover { background-color: mix(black, $selected_bg_color, 10%); }
}
}
2016-02-19 10:06:17 +00:00
}
//
// App Notifications
//
.app-notification {
padding: 10px;
color: $dark_sidebar_fg;
background-color: $dark_sidebar_bg;
background-clip: border-box;
2016-03-22 11:24:30 +00:00
border-radius: 0 0 2px 2px;
border-width: 0 1px 1px 1px;
border-style: solid;
border-color: darken($dark_sidebar_bg, 10%);
2016-02-19 10:06:17 +00:00
border { border: none; }
button {
@include button(osd);
&.flat {
@extend %undecorated_button;
border-color: transparentize($selected_bg_color, 1);
&:disabled { @extend %undecorated_button; }
}
&:hover { @include button(osd-hover); }
&:active, &:checked { @include button(osd-active); background-clip: padding-box; }
&:disabled { @include button(osd-insensitive);
}
}
}
//
// Expanders
//
expander {
arrow {
min-width: 16px;
min-height: 16px;
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
2016-03-02 12:28:11 +00:00
2016-02-19 10:06:17 +00:00
&: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'); }
}
}
//
// Calendar
//
calendar {
color: $fg_color;
border: 1px solid $borders_color;
border-radius: 3px;
padding: 2px;
&:selected {
2016-08-31 11:35:50 +00:00
@extend %selected_items;
2016-02-19 10:06:17 +00:00
border-radius: 1.5px;
}
2016-08-31 11:35:50 +00:00
2016-02-19 10:06:17 +00:00
&.header {
color: $fg_color;
border: none;
}
2016-08-31 11:35:50 +00:00
&.button {
@extend %undecorated_button;
2016-02-19 10:06:17 +00:00
color: transparentize($fg_color,0.55);
2016-08-31 11:35:50 +00:00
&:hover { color: $fg_color; }
&:disabled { color: $insensitive_fg_color; }
2016-02-19 10:06:17 +00:00
}
2016-08-31 11:35:50 +00:00
2016-02-19 10:06:17 +00:00
&:indeterminate { color: gtkalpha(currentColor,0.55); }
2016-03-22 11:24:30 +00:00
&.highlight { color: $fg_color; }
2016-02-19 10:06:17 +00:00
}
//
// Dialogs
//
messagedialog { // Message Dialog styling
2016-03-28 22:22:45 +00:00
.titlebar {
min-height: 20px;
background-color: $header_bg;
border-bottom: 1px solid darken($header_bg, 7%);
}
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
.dialog-action-area button { padding: 8px; min-height: 0; }
2016-02-19 10:06:17 +00:00
&.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 {
2016-02-19 10:06:17 +00:00
border-bottom-style: none;
2016-02-19 10:06:17 +00:00
@extend %middle_button;
&:first-child{ @extend %first_button; }
&:last-child { @extend %last_button; }
2016-02-19 10:06:17 +00:00
&:only-child { @extend %single_button; }
2016-02-19 10:06:17 +00:00
}
%middle_button {
2016-02-19 10:06:17 +00:00
border-radius: 0;
2016-02-19 10:06:17 +00:00
border-right-style: none;
}
%last_button {
2016-02-19 10:06:17 +00:00
border-radius: 0 0 3px 0;
border-right-style: none;
2016-02-19 10:06:17 +00:00
}
%first_button {
2016-02-19 10:06:17 +00:00
border-radius: 0 0 0 3px;
2016-02-19 10:06:17 +00:00
border-left-style: none;
2016-02-19 10:06:17 +00:00
}
%single_button {
border-radius: 0 0 3px 3px;
border-left-style: none;
border-right-style: none;
2016-02-19 10:06:17 +00:00
}
}
}
2016-02-25 23:10:22 +00:00
//
// Filechooser
//
filechooser {
#pathbarbox { border-bottom: 1px solid transparentize($borders_color, 0.5); }
}
2016-03-22 11:24:30 +00:00
filechooserbutton:drop(active) {
box-shadow: none;
border-color: transparent;
}
2016-02-19 10:06:17 +00:00
//
// Sidebar
//
2016-03-09 19:07:51 +00:00
.sidebar {
border-style: none;
2016-02-25 23:10:22 +00:00
background-color: lighten($bg_color, 2%);
2016-02-19 10:06:17 +00:00
2016-03-09 19:07:51 +00:00
@at-root %sidebar_left,
&:dir(ltr),
&.left,
&.left:dir(rtl) {
border-right: 1px solid $borders_color;
border-left-style: none;
}
@at-root %sidebar_right,
&:dir(rtl),
2016-03-22 11:24:30 +00:00
&.right {
2016-03-09 19:07:51 +00:00
border-left: 1px solid $borders_color;
border-right-style: none;
}
2016-03-22 11:24:30 +00:00
list { background-color: transparent; }
2016-03-09 19:07:51 +00:00
paned & { &.left, &.right, &.left:dir(rtl), &:dir(rtl), &:dir(ltr), & { border-style: none; }}
2016-02-19 10:06:17 +00:00
}
stacksidebar {
2016-03-09 19:07:51 +00:00
&.sidebar {
&:dir(ltr) list,
&.left list,
&.left:dir(rtl) list { @extend %sidebar_left; }
&:dir(rtl) list,
&.right list { @extend %sidebar_right; }
}
2016-02-19 10:06:17 +00:00
row {
padding: 10px 4px;
2016-03-02 12:28:11 +00:00
2016-02-19 10:06:17 +00:00
> label {
padding-left: 6px;
padding-right: 6px;
}
&.needs-attention > label {
@extend %needs_attention;
background-size: 6px 6px, 0 0;
}
}
}
placessidebar {
2016-03-21 20:59:14 +00:00
> viewport.frame { border-style: none; }
2016-02-19 10:06:17 +00:00
row {
// Needs overriding of the GtkListBoxRow padding
2016-02-25 23:10:22 +00:00
min-height: 30px;
2016-02-19 10:06:17 +00:00
padding: 0px;
// Using margins/padding directly in the SidebarRow
// will make the animation of the new bookmark row jump
> revealer {
2016-02-25 23:10:22 +00:00
padding: 0 10px;
2016-02-19 10:06:17 +00:00
}
image.sidebar-icon {
&:dir(ltr) { padding-right: 8px; }
&:dir(rtl) { padding-left: 8px; }
}
label.sidebar-label {
&:dir(ltr) { padding-right: 2px; }
&:dir(rtl) { padding-left: 2px; }
}
@at-root button.sidebar-button {
2016-02-25 23:10:22 +00:00
min-width: 22px;
min-height: 22px;
margin-top: 2px;
margin-bottom: 2px;
2016-02-19 10:06:17 +00:00
padding: 0;
@extend button.flat;
border-radius: 100%;
-gtk-outline-radius: 100%;
2016-02-25 23:10:22 +00:00
2016-02-19 10:06:17 +00:00
&:not(:hover):not(:active) > image { opacity: 0.5 };
}
2016-03-22 11:24:30 +00:00
&.sidebar-placeholder-row {
padding: 0 8px;
min-height: 2px;
2016-08-30 23:00:14 +00:00
background-image: _solid($drop_target_color);
2016-03-22 11:24:30 +00:00
background-clip: content-box;
}
&.sidebar-new-bookmark-row { color: $selected_bg_color; }
2016-02-19 10:06:17 +00:00
2016-03-22 11:24:30 +00:00
&:drop(active):not(:disabled) {
2016-03-23 14:07:19 +00:00
&, label, image { color: $drop_target_color; }
2016-03-22 11:24:30 +00:00
box-shadow: inset 0 1px $drop_target_color,
inset 0 -1px $drop_target_color;
&:selected {
2016-03-23 14:07:19 +00:00
&, label, image { color: $selected_fg_color; }
2016-03-22 11:24:30 +00:00
background-color: $drop_target_color;
}
}
}
2016-02-19 10:06:17 +00:00
}
//
// Placesview
//
placesview {
.server-list-button > image {
-gtk-icon-transform: rotate(0turn);
}
.server-list-button:checked > image {
transition: 200ms $ease-out-quad;
-gtk-icon-transform: rotate(-0.5turn);
}
// this selects the "connect to server" label
> actionbar > revealer > box > label {
padding-left: 8px;
padding-right: 8px;
}
2016-02-19 10:06:17 +00:00
}
//
// Paned
//
paned {
> separator {
min-width: 1px;
min-height: 1px;
-gtk-icon-source: none;
border-style: none;
background-color: transparent;
2016-08-30 23:00:14 +00:00
background-image: _solid($borders_color);
2016-02-19 10:06:17 +00:00
background-size: 1px 1px;
2016-08-30 23:00:14 +00:00
&:selected { background-image: _solid($selected_bg_color); }
2016-02-19 10:06:17 +00:00
&.wide {
min-width: 5px;
min-height: 5px;
2016-03-21 21:28:01 +00:00
background-color: $bg_color;
2016-08-30 23:00:14 +00:00
background-image: _solid($borders_color), _solid($borders_color);
2016-02-19 10:06:17 +00:00
background-size: 1px 1px, 1px 1px;
}
}
&.horizontal > separator {
background-repeat: repeat-y;
&:dir(ltr) {
margin: 0 -8px 0 0;
padding: 0 8px 0 0;
background-position: left;
}
&:dir(rtl) {
margin: 0 0 0 -8px;
padding: 0 0 0 8px;
background-position: right;
}
&.wide {
2016-03-21 21:28:01 +00:00
margin: 0;
padding: 0;
2016-02-19 10:06:17 +00:00
background-repeat: repeat-y, repeat-y;
background-position: left, right;
}
}
&.vertical > separator {
margin: 0 0 -8px 0;
padding: 0 0 8px 0;
background-repeat: repeat-x;
background-position: top;
&.wide {
2016-03-21 21:28:01 +00:00
margin: 0;
padding: 0;
2016-02-19 10:06:17 +00:00
background-repeat: repeat-x, repeat-x;
background-position: bottom, top;
}
}
}
//
// GtkInfoBar
//
2016-08-31 12:02:58 +00:00
infobar {
border-style: none;
2016-02-19 10:06:17 +00:00
2016-08-31 12:02:58 +00:00
&.info,
&.question,
&.warning,
&.error {
background-color: $selected_bg_color;
color: $selected_fg_color;
caret-color: currentColor;
2016-03-22 11:24:30 +00:00
2016-08-31 12:02:58 +00:00
button { @extend %selected-button }
2016-03-22 11:24:30 +00:00
2016-08-31 12:02:58 +00:00
selection {
2016-03-22 11:24:30 +00:00
color: $selected_bg_color;
background-color: $selected_fg_color;
}
2016-08-31 12:02:58 +00:00
*:link { @extend %link_selected; }
}
2016-02-19 10:06:17 +00:00
}
//
// Buttons on selected backgrounds
//
%selected-button {
2016-03-30 10:22:10 +00:00
@at-root %normal_selected_button, & {
color: $selected_fg_color;
background-color: transparentize($selected_fg_color, 1);
border-color: transparentize($selected_fg_color, 0.5);
}
2016-02-19 10:06:17 +00:00
&.flat {
@include button(undecorated);
color: $selected_fg_color;
background-color: transparentize($selected_fg_color, 1);
2016-03-30 10:22:10 +00:00
&:disabled {
&, label { color: transparentize($selected_fg_color, 0.6); }
}
2016-02-19 10:06:17 +00:00
}
&:hover {
color: $selected_fg_color;
background-color: transparentize($selected_fg_color, 0.8);
border-color: transparentize($selected_fg_color, 0.2);
}
&:active, &:active:hover, &:checked {
color: $selected_bg_color;
background-color: $selected_fg_color;
border-color: $selected_fg_color;
}
&:disabled {
2016-03-30 10:22:10 +00:00
&, label { color: transparentize($selected_fg_color, 0.5); }
2016-02-19 10:06:17 +00:00
background-color: transparentize($selected_fg_color, 1);
2016-03-30 10:22:10 +00:00
border-color: transparentize($selected_fg_color, 0.6);
2016-02-19 10:06:17 +00:00
&:active, &:checked {
2016-03-30 10:22:10 +00:00
color: $selected_bg_color;
background-color: transparentize($selected_fg_color, 0.5);
border-color: transparentize($selected_fg_color, 0.6);
2016-02-19 10:06:17 +00:00
}
}
}
//
// Tooltips
//
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%);
2016-02-19 10:06:17 +00:00
background-clip: padding-box;
2016-03-21 20:10:05 +00:00
label { padding: 4px; }
2016-02-19 10:06:17 +00:00
}
border-radius: 2px;
box-shadow: none;
decoration { background-color: transparent; }
* { //Yeah this is ugly
background-color: transparent;
color: $osd_fg_color; // just to be sure
}
}
//
// Color Chooser
//
colorswatch {
// This widget is made of two boxes one on top of the other, the lower box is GtkColorSwatch {} the other one
// is GtkColorSwatch .overlay {}, GtkColorSwatch has the programmatically set background, so most of the style
// is applied to the overlay box.
$_colorswatch-radius: 2px;
&, &:drop(active) { border-style: none; }
// border rounding
&.top {
border-top-left-radius: $_colorswatch-radius + 0.5px;
border-top-right-radius: $_colorswatch-radius + 0.5;
overlay {
border-top-left-radius: $_colorswatch-radius;
border-top-right-radius: $_colorswatch-radius;
}
}
&.bottom {
border-bottom-left-radius: $_colorswatch-radius + 0.5px;
border-bottom-right-radius: $_colorswatch-radius + 0.5;
overlay {
border-bottom-left-radius: $_colorswatch-radius;
border-bottom-right-radius: $_colorswatch-radius;
}
}
&.left, &:first-child:not(.top) {
border-top-left-radius: $_colorswatch_radius + 0.5px;
border-bottom-left-radius: $_colorswatch_radius + 0.5px;
overlay {
border-top-left-radius: $_colorswatch_radius;
border-bottom-left-radius: $_colorswatch_radius;
}
}
&.right, &:last-child:not(.bottom) {
border-top-right-radius: $_colorswatch_radius + 0.5px;
border-bottom-right-radius: $_colorswatch_radius + 0.5px;
overlay {
border-top-right-radius: $_colorswatch_radius;
border-bottom-right-radius: $_colorswatch_radius;
}
}
&.dark overlay {
color: transparentize(white, 0.3);
&:hover {
border-color: if($variant == 'light', transparentize(black, 0.5), $borders_color);
}
}
&.light overlay {
color: transparentize(black, 0.3);
&:hover {
border-color: if($variant == 'light', transparentize(black, 0.7), $borders_color);
}
}
overlay {
border: 1px solid if($variant == 'light', transparentize(black, 0.85), $borders_color);
&:hover { background-color: transparentize(white, 0.8) }
}
&:disabled {
opacity: 0.5;
overlay {
border-color: transparentize(black, 0.4);
box-shadow: none;
}
}
&#add-color-button {
border-style: solid; // the borders are drawn by the overlay for standard colorswatches to have them semi
border-width: 1px; // translucent on the colored background, here it's not necessary so they need to be set
@include button(normal);
&:hover { @include button(hover); }
overlay { @include button(undecorated); } // reset the overlay to not cover the button style underneath
}
}
button.color {
padding: 0;
colorswatch:first-child:last-child {
&, overlay {
margin: 4px;
border-radius: 0;
}
}
}
2016-03-21 20:35:33 +00:00
// colorscale popup
colorchooser .popover.osd { border-radius: 3px; }
2016-02-19 10:06:17 +00:00
//
// Misc
//
//content view (grid/list)
.content-view {
background-color: $base_color;
&:hover { -gtk-icon-effect: highlight; }
rubberband { @extend rubberband; }
}
2016-03-22 11:24:30 +00:00
.scale-popup {
.osd & { @extend %osd; }
button { // +/- buttons on GtkVolumeButton popup
&:hover {
@include button(hover);
}
2016-02-19 10:06:17 +00:00
}
}
// Decouple the font of context menus from their entry/textview
.context-menu { font: initial; }
2016-08-30 23:00:14 +00:00
.monospace { font-family: Monospace; }
2016-02-19 10:06:17 +00:00
//
// Shortcuts Help
//
button.circular,
button.circular-button {
padding: 0;
min-width: 26px;
min-height: 26px;
border-radius: 50%;
-gtk-outline-radius: 50%;
label { padding: 0; }
}
.keycap {
2016-02-25 23:10:22 +00:00
min-width: 16px;
min-height: 20px;
padding: 3px 6px 4px 6px;
color: $fg_color;
2016-02-19 10:06:17 +00:00
background-color: $base_color;
border: 1px solid $borders_color;
2016-02-25 23:10:22 +00:00
border-radius: 2.5px;
2016-02-19 10:06:17 +00:00
box-shadow: inset 0px -2px 0px if($variant=='light', transparentize(black, 0.95), transparentize(black, 0.85));
}
stackswitcher button {
&.text-button { min-width: 80px; }
&.circular { min-width: 0; }
}
//
// Dnd
//
*:drop(active):focus,
*:drop(active) {
2016-03-22 11:24:30 +00:00
box-shadow: inset 0 0 0 1px $drop_target_color;
2016-02-19 10:06:17 +00:00
}
//
// Window Decorations
//
decoration {
border-radius: if($darker=='false' and $variant=='light', 4px 4px 0 0, 3px 3px 0 0);
border-width: 0px;
$_wm_border: if($variant=='light', transparentize(black, 0.9), transparentize(black, 0.45));
box-shadow: 0 0 0 1px if($darker=='true' or $variant == 'dark', darken($header_bg, 7%), $_wm_border),
0 8px 8px 0 if($variant == 'light', opacify($_wm_border, 0.1), transparentize($_wm_border, 0.2));
// this is used for the resize cursor area
margin: 10px;
&:backdrop {
// the transparent shadow here is to enforce that the shadow extents don't
// change when we go to backdrop, to prevent jumping windows
box-shadow: 0 0 0 1px if($darker=='true' or $variant == 'dark', transparentize(darken($header_bg, 7%), 0.1), $_wm_border),
0 8px 8px 0 transparent,
0 5px 5px 0 if($variant == 'light', opacify($_wm_border, 0.1), transparentize($_wm_border, 0.2));
2016-03-31 17:58:44 +00:00
transition: $backdrop_transition;
2016-02-19 10:06:17 +00:00
}
2016-02-25 23:10:22 +00:00
.fullscreen &,
2016-02-19 10:06:17 +00:00
.tiled & {
border-radius: 0;
}
2016-03-22 11:24:30 +00:00
.popup & {
2016-02-19 10:06:17 +00:00
box-shadow: none;
border-radius: 0;
}
// server-side decorations as used by mutter
2016-02-25 23:10:22 +00:00
.ssd & {
2016-02-19 10:06:17 +00:00
border-radius: if($darker=='false' and $variant=='light', 4px 4px 0 0, 3px 3px 0 0);
box-shadow: 0 0 0 1px if($darker=='true' or $variant == 'dark', transparentize(black, 0.35), $_wm_border);
&.maximized { border-radius: 0; }
}
.csd.popup & {
border-radius: 2px;
box-shadow: 0 3px 6px if($variant == 'light', $_wm_border, transparentize($_wm_border, 0.1)),
0 0 0 1px if($variant == 'light', $_wm_border, darken($bg_color, 10%));
}
tooltip.csd & {
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));
2016-02-19 10:06:17 +00:00
}
messagedialog.csd & {
border-radius: 3px;
}
.solid-csd & {
border-radius: 0;
margin: 1px;
background-color: $header_bg;
box-shadow: none;
}
}
//
// Titlebuttons
//
headerbar,
.titlebar {
&.default-decoration button.titlebutton { // no vertical padding for ssd buttons
padding: 0 4px; // already handled by the titlebar-padding
min-width: 0;
2016-03-07 21:25:37 +00:00
min-height: 0;
margin: 0;
2016-02-19 10:06:17 +00:00
}
button.titlebutton {
padding: 0;
min-width: 24px;
@include button(undecorated);
background-color: transparentize($header_bg, 1);
&:hover {
@include button(header-hover);
}
&:active, &:checked {
@include button(header-active);
}
&.close, &.maximize, &.minimize {
color: transparent;
background-color: transparent;
background-position: center;
background-repeat: no-repeat;
border-width: 0;
&:backdrop { opacity: 1; }
}
2016-02-19 10:06:17 +00:00
// Load png assets for each button
@each $k in ('close','maximize', 'minimize') {
@each $l, $m in ('',''), (':backdrop','-backdrop'), (':hover','-hover'), (':active','-active') {
2016-02-19 10:06:17 +00:00
2016-02-19 10:06:17 +00:00
&.#{$k}#{$l} { background-image: -gtk-scaled(url('assets/titlebutton-#{$k}#{$m}#{$darker_asset_suffix}.png'),
url('assets/titlebutton-#{$k}#{$m}#{$darker_asset_suffix}@2.png')); }
}
}
2016-02-19 10:06:17 +00:00
}
}
// catch all extend
%selected_items {
background-color: $selected_bg_color;
2016-03-22 11:24:30 +00:00
@at-root %nobg_selected_items, & {
color: $selected_fg_color;
&:disabled { color: mix($selected_fg_color, $selected_bg_color, 50%); }
}
2016-02-19 10:06:17 +00:00
}