diff --git a/src/stylesheet/_colors.scss b/src/stylesheet/_colors.scss index c6f0e18f9ffcd6926a80fe96d260c307b8f8d0e5..8b0d70cf25364e70432efd6c055ef6f5562b9323 100644 --- a/src/stylesheet/_colors.scss +++ b/src/stylesheet/_colors.scss @@ -7,39 +7,54 @@ $bg_color: if($variant == 'light', #f6f5f4, darken(desaturate(#3d3846, 100%), 4% $fg_color: if($variant == 'light', #2e3436, #eeeeec); $selected_fg_color: #ffffff; -$selected_bg_color: if($variant == 'light', #3584e4, darken(#3584e4, 20%)); -$selected_borders_color: if($variant== 'light', darken($selected_bg_color, 15%), darken($selected_bg_color, 30%)); +$selected_bg_color: if($variant == 'light', #3584e4, #62a0ea); +$selected_borders_color: darken($selected_bg_color, 15%); $borders_color: if($variant == 'light', darken($bg_color, 18%), darken($bg_color, 10%)); $alt_borders_color: if($variant == 'light', darken($bg_color, 24%), darken($bg_color, 18%)); $borders_edge: if($variant == 'light', transparentize(white, 0.2), transparentize($fg_color, 0.93)); -$link_color: if($variant == 'light', darken($selected_bg_color, 10%), lighten($selected_bg_color, 20%)); -$link_visited_color: if($variant == 'light', darken($selected_bg_color, 20%), lighten($selected_bg_color, 10%)); +$link_color:darken($selected_bg_color, 10%); +$link_visited_color: darken($selected_bg_color, 20%); $dark_fill: mix($borders_color, $bg_color, 50%); -$headerbar_bg_color: if($variant == 'light', lighten($bg_color, 5%), darken($bg_color, 3%)); +$headerbar_bg_color: $bg_color; $menu_color: $base_color; -$view_hover_color: transparentize($text_color, .93); -$view_selected_color: transparentize($text_color, .9); -$view_selected_hover_color: transparentize($text_color, .87); -$view_active_color: transparentize(black, .85); -$trough_color: transparentize($text_color, .85); -$trough_hover_color: transparentize($text_color, .8); -$trough_active_color: transparentize(black, .75); + +$view_hover_color: #{"alpha(currentColor, .07)"}; +$view_active_color: #{"alpha(currentColor, .16)"}; +$view_selected_color: #{"alpha(currentColor, .1)"}; +$view_selected_hover_color: #{"alpha(currentColor, .13)"}; +$view_selected_active_color: #{"alpha(currentColor, .19)"}; + +$trough_color: #{"alpha(currentColor, .15)"}; +$trough_hover_color: #{"alpha(currentColor, .2)"}; +$trough_active_color: #{"alpha(currentColor, .25)"}; + +$button_color: #{"alpha(currentColor, .1)"}; +$button_hover_color: #{"alpha(currentColor, .15)"}; +$button_active_color: #{"alpha(currentColor, .25)"}; +$button_checked_color: #{"alpha(currentColor, .2)"}; +$button_checked_hover_color: #{"alpha(currentColor, .25)"}; +$button_checked_active_color: #{"alpha(currentColor, .35)"}; + $fill_color: $selected_bg_color; $fill_text_color: $selected_fg_color; $fill_hover_color: mix($selected_bg_color, $text_color, 90%); -$fill_active_color: mix($selected_bg_color, black, 80%); +$fill_active_color: mix($selected_bg_color, $text_color, 80%); + $slider_color: mix(white, $base_color, 80%); $slider_hover_color: white; $scrollbar_bg_color: if($variant == 'light', mix($bg_color, $fg_color, 80%), mix($base_color, $bg_color, 50%)); $scrollbar_slider_color: mix($fg_color, $bg_color, 60%); $scrollbar_slider_hover_color: mix($fg_color, $bg_color, 80%); -$scrollbar_slider_active_color: if($variant=='light', darken($selected_bg_color, 10%), lighten($selected_bg_color, 10%)); +$scrollbar_slider_active_color: darken($selected_bg_color, 10%); $warning_color: #f57900; $error_color: #cc0000; $success_color: if($variant == 'light', #33d17a, darken(#33d17a, 10%)); +$suggested_color: $selected_bg_color; +$suggested_text_color: if($variant == 'light', darken($suggested_color, 10%), lighten($suggested_color, 10%)); $destructive_color: if($variant == 'light', #e01b24, darken(#e01b24, 10%)); +$destructive_text_color: if($variant == 'light', darken($destructive_color, 10%), lighten($destructive_color, 20%)); $osd_fg_color: #eeeeec; $osd_text_color: white; @@ -63,7 +78,7 @@ $insensitive_borders_color: mix($borders_color, $bg_color, 80%); //special cased widget colors $suggested_bg_color: $selected_bg_color; $suggested_border_color: $selected_borders_color; -$focus_border_color: if($variant == 'light', transparentize($selected_bg_color, 0.5), transparentize($selected_bg_color, 0.3)); +$focus_border_color: transparentize($selected_bg_color, 0.5); $alt_focus_border_color: if($variant == 'light', transparentize(white, 0.2), transparentize(white,0.7)); $dim_label_opacity: 0.55; @@ -83,7 +98,7 @@ $dim_label_opacity: 0.55; $insensitive_borders_color: mix($borders_color, $bg_color, 80%); //focus rings - $focus_border_color: if($variant == 'light', transparentize($selected_bg_color, 0.2), transparentize(white, 0.4)); + $focus_border_color: transparentize($selected_bg_color, 0.2); $alt_focus_border_color: if($variant == 'light', white, transparentize(white,0.4)); $dim_label_opacity: 0.9; diff --git a/src/stylesheet/_drawing.scss b/src/stylesheet/_drawing.scss index 7018cdc1e7024e256d9b15e3d3ac2a7e2aed39b6..09786bb88154456f56d486c55c5e62ca22a62e3f 100644 --- a/src/stylesheet/_drawing.scss +++ b/src/stylesheet/_drawing.scss @@ -53,13 +53,13 @@ @if $t==normal { color: $text_color; - border-color: $borders_color; + border-color: mix($borders_color, $base_color, 75%); background-color: $base_color; // for the transition to work the number of shadows in different states needs to match, hence the transparent shadow here. } @if $t==insensitive { color: $insensitive_fg_color; - border-color: $borders_color; + border-color: mix($borders_color, $insensitive_bg_color, 75%); background-color: $insensitive_bg_color; } @if $t==osd { @@ -94,190 +94,6 @@ @else { @return darken($c, 15%); } } -$_default_button_c: lighten($bg_color,2%); -@mixin button($t, $c:$_default_button_c, $tc:$fg_color) { -// -// Button drawing function -// -// $t: button type, -// $c: base button color for colored* types -// $tc: optional text color for colored* types -// -// possible $t values: -// normal, hover, active, checked-hover, checked-active, insensitive, insensitive-active, -// osd, osd-hover, osd-active, osd-insensitive, undecorated -// - $_button_shadow: 0 1px 2px transparentize($shadow_color, 0.03); - - @if $t==normal { - // - // normal button - // - color: $tc; - outline-color: if($c != $_default_button_c, $alt_focus_border_color, $focus_border_color); - border-color: if($c!=$_default_button_c, _border_color($c, true), $borders_color); //tint if not default button color - background-image: if($variant == 'light', linear-gradient(to top, darken($c, 2%) 2px, $c), - linear-gradient(to top, darken($c,1%) 2px, $c)); - @include _shadows($_button_shadow); - } - - @else if $t==hover { - // - // hovered button - // - color: $tc; - border-color: if($c != $_default_button_c, _border_color($c), $borders_color); - @if $variant == 'light' { - background-image: linear-gradient(to top, darken($c,16%), darken($c,8%) 1px); - @include _shadows($_button_shadow); - } - @else { - background-image: linear-gradient(to top, darken($c,4%) 20%, darken($c, 3%) 90%); - @include _shadows($_button_shadow); - } - } - - @else if $t==active { - // - // pushed button - // - color: $tc; - border-color: if($c != $_default_button_c, _border_color($c), $borders_color); - background-image: if($variant == 'light', image(darken($c, 14%)), image(darken($c, 9%))); - box-shadow: none; - } - - @else if $t==checked-hover { - // - // pushed togglebutton hover - // - color: $tc; - border-color: if($c != $_default_button_c, _border_color($c), $borders_color); - background-image: if($variant == 'light', image(darken($c, 18%)), image(darken($c, 12%))); - box-shadow: none; - } - - @else if $t==checked-active { - // - // pushed togglebutton pushed further :) - // - color: $tc; - border-color: if($c != $_default_button_c, _border_color($c), $borders_color); - background-image: if($variant == 'light', image(darken($c, 22%)), image(darken($c, 14%))); - box-shadow: none; - } - - @else if $t==insensitive { - // - // insensitive button - // - $_bg: if($c != $_default_button_c, mix($c, $base_color, 85%), $insensitive_bg_color); - - color: if($tc != $fg_color, mix($tc, $_bg, 50%), $insensitive_fg_color); - border-color: if($c != $_default_button_c, _border_color($c), $insensitive_borders_color); - background-image: image($_bg); - } - - @else if $t==insensitive-active { - // - // insensitive pushed button - // - $_bg: if($variant == 'light', darken(mix($c, $base_color, 85%), 8%), darken(mix($c, $base_color, 85%), 6%)); - $_bc: if($c != $_default_button_c, _border_color($c), $insensitive_borders_color); - - color: if($c != $_default_button_c, mix($tc, $_bg, 60%), $insensitive_fg_color); - border-color: $_bc; - background-image: image($_bg); - box-shadow: none; - } - - @else if $t==osd { - // - // normal osd button - // - $_bg: if($c != $_default_button_c, transparentize($c, 0.5), $osd_bg_color); - - color: $osd_fg_color; - outline-color: if($c != $_default_button_c, $alt_focus_border_color, $focus_border_color); - border-color: $osd_borders_color; - background-color: transparent; - background-image: image($_bg); - background-clip: padding-box; - } - - @else if $t==osd-hover { - // - // active osd button - // - $_bg: if($c != $_default_button_c, transparentize($c, 0.3), darken($osd_bg_color, 10%)); - - color: white; - border-color: $osd_borders_color; - background-color: transparent; - background-image: image($_bg); - background-clip: padding-box; - } - - @else if $t==osd-active { - // - // active osd button - // - $_bg: if($c != $_default_button_c, $c, darken($osd_bg_color, 20%)); - - color: white; - border-color: $osd_borders_color; - background-color: transparent; - background-image: image($_bg); - background-clip: padding-box; - box-shadow: none; - } - - @else if $t==osd-insensitive { - // - // insensitive osd button - // - color: $osd_insensitive_fg_color; - border-color: $osd_borders_color; - background-color: transparent; - background-image: image($osd_insensitive_bg_color); - background-clip: padding-box; - } - - @else if $t==undecorated { - // - // reset - // - border-color: transparent; - background-color: transparent; - background-image: none; - box-shadow: none; - } - @else if $t==undecorated-hover { - border-color: transparent; - background-image: none; - box-shadow: none; - background-color: $view_hover_color; - } - @else if $t==undecorated-active { - border-color: transparent; - background-image: none; - box-shadow: none; - background-color: $view_active_color; - } - @else if $t==undecorated-checked { - border-color: transparent; - background-image: none; - box-shadow: none; - background-color: $view_selected_color; - } - @else if $t==undecorated-checked-hover { - border-color: transparent; - background-image: none; - box-shadow: none; - background-color: $view_selected_hover_color; - } -} - @mixin overshoot($p, $c:$fg_color) { // // overshoot diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss index 9f73c252ee9392f6ced0f1264e7d2d9d0ed5dc27..8d68c80aed465f233d888f934755f3b89e6a51d5 100644 --- a/src/stylesheet/widgets/_buttons.scss +++ b/src/stylesheet/widgets/_buttons.scss @@ -1,9 +1,7 @@ // stuff for .needs-attention -$_dot_color: if($variant=='light', $selected_bg_color, - lighten($selected_bg_color,15%)); @keyframes needs_attention { - from { background-image: radial-gradient(farthest-side, $_dot_color 0%, transparentize($_dot_color, 1) 0%); } - to { background-image: radial-gradient(farthest-side, $_dot_color 95%, transparentize($_dot_color, 1)); } + from { background-image: radial-gradient(farthest-side, $selected_bg_color 0%, transparentize($selected_bg_color, 1) 0%); } + to { background-image: radial-gradient(farthest-side, $selected_bg_color 95%, transparentize($selected_bg_color, 1)); } } %button, @@ -11,86 +9,61 @@ button { @at-root %button_basic, & { min-height: 24px; min-width: 16px; - padding: 4px 9px; - border: 1px solid; + padding: 5px 10px; border-radius: $button_radius; - transition: $button_transition; + background-color: $button_color; - @include button(normal); + @if $contrast == 'high' { + box-shadow: inset 0 0 0 1px $borders_color; + } @include focus-ring(); + transition: $button_transition; &:hover { - @include button(hover); + background-color: $button_hover_color; } &.keyboard-activating, - &:active, - &:checked { - @include button(active); - - transition-duration: 50ms; - } - - &:checked:hover { @include button(checked-hover); } - &:checked:active { @include button(checked-active); } - - &:disabled { - @include button(insensitive); - - &:active, - &:checked { @include button(insensitive-active); } + &:active { + background-color: $button_active_color; } - @at-root %button_basic_flat, - &.flat { - @include button(undecorated); - // to avoid adjacent 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; + &:checked { + background-color: $button_checked_color; &:hover { - @include button(undecorated-hover); - transition: $button_transition; - transition-duration: 500ms; - - &:active { - @include button(undecorated-active); - } + background-color: $button_checked_hover_color; } - &:checked { - @include button(undecorated-checked); - transition: $button_transition; + &.keyboard-activating, + &:active { + background-color: $button_checked_active_color; + } + } - &:hover { - @include button(undecorated-checked-hover); + &:disabled { + filter: opacity(.5); - &:active { - @include button(undecorated-active); - } - } + label { + filter: none; } - - &:disabled { @include button(undecorated); } } &.image-button { min-width: 24px; - padding-left: 5px; - padding-right: 5px; + padding-left: 6px; + padding-right: 6px; } &.text-button { - padding-left: 16px; - padding-right: 16px; + padding-left: 17px; + padding-right: 17px; } &.text-button.image-button { - padding-left: 8px; - padding-right: 8px; + padding-left: 9px; + padding-right: 9px; label { padding-left: 8px; @@ -101,123 +74,140 @@ button { @at-root %button_basic_drop_active, &:drop(active) { color: $drop_target_color; - border-color: $drop_target_color; - box-shadow: inset 0 0 0 1px $drop_target_color; + box-shadow: inset 0 0 0 2px $drop_target_color; } } // big standalone buttons like in Documents pager &.osd { - min-width: 26px; + min-width: 32px; min-height: 32px; - &.image-button { - min-width: 30px; - &:only-child { - margin: 4px; - border-radius: 50%; // completely round when it is a single button - box-shadow: 0 1px 2px transparentize(black, 0.8); // drop shadow for the only child - }; - } + @include focus-ring($outer: true, $offset: 1px); + transition: $button_transition; color: $osd_fg_color; - border-radius: 5px; - - @include button(osd); + background-color: $osd_bg_color; - border: none; - box-shadow: none; + @if $contrast == 'high' { + box-shadow: 0 0 0 1px currentColor; + } &:hover { - @include button(osd-hover); - - border: none; - box-shadow: none; + color: white; + background-color: lighten($osd_bg_color, 10%); } - &:active, - &:checked { - @include button(osd-active); - - border: none; - box-shadow: none; + &.keyboard-activating, + &:active { + color: white; + background-color: lighten($osd_bg_color, 20%); } - } - - //overlay / OSD style - @at-root %osd_button, - .osd & { - @include button(osd); - - &:hover { @include button(osd-hover); } - - &:active, - &:checked { @include button(osd-active); } - &:disabled { @include button(osd-insensitive); } - - &.flat { - @include button(undecorated); - - box-shadow: none; + &:checked { + background-color: lighten($osd_bg_color, 15%); - &:hover { @include button(osd-hover); } + &:hover { + background-color: lighten($osd_bg_color, 25%); + } - &:disabled { - @include button(osd-insensitive); - background-image: none; - border-color: transparent; - box-shadow: none; + &.keyboard-activating, + &:active { + background-color: lighten($osd_bg_color, 30%); } + } - &:active, - &:checked { @include button(osd-active); } + // Specificity bump + &:drop(active) { + @extend %button_basic_drop_active; } } // Suggested and Destructive Action buttons - @each $b_type, $b_color in (suggested-action, $selected_bg_color), + @each $b_type, $b_color in (suggested-action, $suggested_color), (destructive-action, $destructive_color) { &.#{$b_type} { - @include button(normal, $b_color, white); - @include focus-ring($fc: $alt_focus_border_color); + color: white; + background-color: $b_color; + + box-shadow: none; - &.flat { - @include button(undecorated); + @include focus-ring($outer: true, $offset: 1px); + transition: $button_transition; - color: $b_color; //FIXME: does it work on the dark variant? + &:hover { + background-color: shade($b_color, 0.95); } - &:hover { @include button(hover, $b_color, white); } + &.keyboard-activating, + &:active { + background-color: shade($b_color, 0.8); + } - &:active, - &:checked { @include button(active, $b_color, white); } + &:checked { + background-color: shade($b_color, 0.85); - &.flat { - &:disabled { - @include button(undecorated); + &:hover { + background-color: shade($b_color, 0.8); + } - color: transparentize($b_color, 0.2); + &.keyboard-activating, + &:active { + background-color: shade($b_color, 0.7); } } + } + } - &:disabled { - @include button(insensitive); + @at-root %button_basic_flat, + &.flat { + background-color: transparent; + @include focus-ring(); + transition: $button_transition; - &:active, - &:checked { @include button(insensitive-active, $b_color, white); } + box-shadow: none; + + @if $contrast == 'high' { + &:hover, + &.keyboard-activating, + &:active, + &:checked { + box-shadow: inset 0 0 0 1px $borders_color; } + } - .osd & { - @include button(osd, $b_color); + &:hover { + background-color: $view_hover_color; + } - &:hover { @include button(osd-hover, $b_color); } + &.keyboard-activating, + &:active { + background-color: $view_active_color; + } - &:active, - &:checked { @include button(osd-active, $b_color); } + &:checked { + background-color: $view_selected_color; - &:disabled { @include button(osd-insensitive, $b_color); } + &:hover { + background-color: $view_selected_hover_color; } + + &.keyboard-activating, + &:active { + background-color: $view_selected_active_color; + } + } + + @each $b_type, $b_color in (suggested-action, $suggested_text_color), + (destructive-action, $destructive_text_color) { + &.#{$b_type} { + color: $b_color; + } + } + + // Specificity bump + &:drop(active) { + @extend %button_basic_drop_active; } } @@ -251,8 +241,8 @@ button { menubutton.circular &, &.circular { // force circular button shape - min-width: 32px; - min-height: 32px; + min-width: 34px; + min-height: 34px; padding: 0; border-radius: 9999px; @@ -265,7 +255,7 @@ button { // simulates the shadow labels and icons normally have in buttons. animation: needs_attention 150ms ease-in; - background-image: radial-gradient(farthest-side, $_dot_color 96%, transparentize($_dot_color,1 )); + background-image: radial-gradient(farthest-side, $selected_bg_color 96%, transparentize($selected_bg_color, 1)); background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; @@ -289,21 +279,18 @@ button { } button.color { - padding: 4px; + padding: 5px; > colorswatch:only-child { &, > overlay { border-radius: 0; } @if $variant == 'light' { box-shadow: 0 1px $shadow_color; - - .osd & { box-shadow: none; } } } @if $variant == 'light' { .osd &, & { - &:disabled, &:active, &:checked { colorswatch:only-child { box-shadow: none; }} } @@ -314,21 +301,23 @@ button.color { /* tone down as per new designs, see issue #1473 */ %outline_button, button.outline { - @extend %undecorated_button; - border: 1px solid transparentize($borders_color, .5); - - &:hover { @include button(hover); } + @extend %button_basic_flat; - &:active, - &:checked { @include button(active); } + @if $contrast == 'high' { + box-shadow: inset 0 0 0 1px $borders_color; + } + @else { + box-shadow: inset 0 0 0 1px #{"alpha(currentColor, .15)"}; - @each $b_type, $b_color in (suggested-action, $selected_bg_color), - (destructive-action, $destructive_color) { - &.#{$b_type} { // allow colored buttons in lists #3643 - @include button(normal, $b_color, white); - @include focus-ring($fc: $alt_focus_border_color); + &:hover, &:active, &:checked { + box-shadow: none; } } + + // Specificity bump + &:drop(active) { + @extend %button_basic_drop_active; + } } menubutton { diff --git a/src/stylesheet/widgets/_calendar.scss b/src/stylesheet/widgets/_calendar.scss index 89b535e2cbbd35f94c67d6699121e401b613a8e6..7fce9169e8a1fd4acc17a2c5ab47ae19eb09d5e8 100644 --- a/src/stylesheet/widgets/_calendar.scss +++ b/src/stylesheet/widgets/_calendar.scss @@ -6,9 +6,7 @@ calendar { border-bottom: 1px solid $borders_color; > button { - border: none; - background: none; - box-shadow: none; + @extend %button_basic_flat; border-radius: 0; } } diff --git a/src/stylesheet/widgets/_color-chooser.scss b/src/stylesheet/widgets/_color-chooser.scss index 9385acc3ca597ff30ba2312f3149dd6b0d2458d5..a8935c47eb1e70cad2769bd4994032a2af6036b3 100644 --- a/src/stylesheet/widgets/_color-chooser.scss +++ b/src/stylesheet/widgets/_color-chooser.scss @@ -107,6 +107,7 @@ colorswatch { > overlay { @extend %button_basic; + border: none; border-radius: $_colorswatch_radius 0 0 $_colorswatch_radius; } diff --git a/src/stylesheet/widgets/_dropdowns.scss b/src/stylesheet/widgets/_dropdowns.scss index 2ca81c915752e9f1b13ea6094c714ad926f575f6..e4bfb0268d036f96beb66912507576d3656e5fd0 100644 --- a/src/stylesheet/widgets/_dropdowns.scss +++ b/src/stylesheet/widgets/_dropdowns.scss @@ -48,4 +48,3 @@ combobox { } } } - diff --git a/src/stylesheet/widgets/_file-chooser.scss b/src/stylesheet/widgets/_file-chooser.scss index c7d59366c54909f16a434cf0792aa4557e3d182d..a7111bb7a21a71a3929951c8868c6890aa9f8ccb 100644 --- a/src/stylesheet/widgets/_file-chooser.scss +++ b/src/stylesheet/widgets/_file-chooser.scss @@ -25,8 +25,8 @@ filechooser { pathbar > button { &.text-button, &.image-button, & { - padding-left: 4px; - padding-right: 4px; + padding-left: 5px; + padding-right: 5px; } &.text-button.image-button label { diff --git a/src/stylesheet/widgets/_header-bar.scss b/src/stylesheet/widgets/_header-bar.scss index 9a834c6fd0d10b5bcaef8f7d3206e36cceedd5d3..d4d614e1eed4046b2c14eb12c2127b9d1f23b382 100644 --- a/src/stylesheet/widgets/_header-bar.scss +++ b/src/stylesheet/widgets/_header-bar.scss @@ -1,17 +1,10 @@ -$_header_bar_color: darken($bg_color, 10%); -$_header_bar_gradient: linear-gradient(to top, darken($_header_bar_color, 2%), lighten($_header_bar_color, 1%)); - -@if $variant == 'dark' { - $_header_bar_gradient: linear-gradient(to top, lighten($_header_bar_color, 4%), lighten($_header_bar_color, 6%)); -} - headerbar { padding: 0 6px; min-height: 46px; border-width: 0 0 1px; border-style: solid; border-color: $alt_borders_color; - background-image: $_header_bar_gradient; + background-color: $headerbar_bg_color; > windowhandle > box { &, @@ -22,7 +15,7 @@ headerbar { } &:backdrop { - background-image: linear-gradient(to top, $bg_color, $bg_color); + background-color: $headerbar_bg_color; transition: $backdrop_transition; @@ -34,15 +27,6 @@ headerbar { } } - /* Darken switchbuttons for headerbars. issue #1588 */ - stackswitcher > button:checked, - button:not(.flat).toggle:checked { - - background: if($variant == 'light', image(darken($bg_color, 17%)), image(darken($bg_color, 9%))); - border-color: darken($borders_color, 3%); - border-top-color: darken($borders_color, 8%); - } - &.default-decoration { min-height: 28px; padding: 4px; @@ -50,15 +34,15 @@ headerbar { windowcontrols { button, menubutton { - min-height: 26px; - min-width: 26px; + min-height: 28px; + min-width: 28px; margin: 0; padding: 0; } menubutton button { - min-height: 20px; - min-width: 20px; + min-height: 22px; + min-width: 22px; margin: 0; padding: 4px; } @@ -112,7 +96,7 @@ windowcontrols { @extend %button_basic_flat; border-radius: 9999px; - padding: 6px; + padding: 7px; margin: 0 2px; min-width: 0; min-height: 0; @@ -143,22 +127,21 @@ windowtitle { window.devel { headerbar { - $c: darken($bg_color, 10%); $gradient: cross-fade(10% -gtk-icontheme("system-run-symbolic"), image(transparent)) 90% 0/256px 256px no-repeat, - linear-gradient(to right, transparent 65%, transparentize($selected_bg_color, 0.8)), - $_header_bar_gradient; + linear-gradient(to right, transparent 65%, transparentize($selected_bg_color, 0.8)); + @if $variant == 'dark' { $gradient: cross-fade(10% -gtk-icontheme("system-run-symbolic"), image(transparent)) 90% 0/256px 256px no-repeat, - linear-gradient(to right, transparent 65%, transparentize($selected_bg_color, 0.9)), - $_header_bar_gradient; + linear-gradient(to right, transparent 65%, transparentize($selected_bg_color, 0.9)); } - background: $bg_color $gradient; + background: $headerbar_bg_color $gradient; &:backdrop { - background: $bg_color cross-fade(5% -gtk-icontheme("system-run-symbolic"), image(transparent)) 90% 0/256px 256px no-repeat, - linear-gradient(to right, transparent 65%, transparent), - linear-gradient(to top, $bg_color, $bg_color); + $gradient: cross-fade(5% -gtk-icontheme("system-run-symbolic"), image(transparent)) 90% 0/256px 256px no-repeat, + linear-gradient(to right, transparent 65%, transparent); + + background: $headerbar_bg_color $gradient; } } } diff --git a/src/stylesheet/widgets/_linked.scss b/src/stylesheet/widgets/_linked.scss index 4483408898118d85255141c1bb1b19089d5af73b..68bbf225c12b40ab1e919a88c678f9c42393fc3c 100644 --- a/src/stylesheet/widgets/_linked.scss +++ b/src/stylesheet/widgets/_linked.scss @@ -10,20 +10,23 @@ $_linked_widgets: ("%button", ""), ("%entry", ""), ("entry", ""); +.linked { + border-spacing: 3px; +} + @each $widget, $child in $_linked_widgets { .linked:not(.vertical) > { #{$widget} { &:dir(ltr):not(:first-child) #{$child}, &:dir(rtl):not(:last-child) #{$child} { - border-top-left-radius: 0; - border-bottom-left-radius: 0; + border-top-left-radius: 2px; + border-bottom-left-radius: 2px; } &:dir(ltr):not(:last-child) #{$child}, &:dir(rtl):not(:first-child) #{$child} { - border-right-style: none; - border-top-right-radius: 0; - border-bottom-right-radius: 0; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; } } } @@ -31,48 +34,13 @@ $_linked_widgets: ("%button", ""), .linked.vertical { #{$widget} { &:not(:first-child) #{$child} { - border-top-left-radius: 0; - border-top-right-radius: 0; + border-top-left-radius: 2px; + border-top-right-radius: 2px; } &:not(:last-child) #{$child} { - border-bottom-style: none; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - } - } - } -} - -%entry, -entry { - // Vertically linked entries - // FIXME: take care of "colored" entries - .linked.vertical > & { - // brighter border between linked entries - &:not(:disabled) + entry:not(:disabled), - &:not(:disabled) + %entry:not(:disabled) { - border-top-color: mix($borders_color, $base_color, 30%); - } - - // brighter border between linked insensitive entries - &:disabled + %entry:disabled, - &:disabled + entry:disabled { border-top-color: mix($borders_color, $base_color, 30%); } - - + %entry:drop(active):not(:only-child), - + entry:drop(active):not(:only-child) { border-top-color: $drop_target_color; } - } - - @each $widget, $child in $_linked_widgets { - .linked:not(.vertical) > &:drop(active):not(:only-child) + { - #{$widget} #{$child} { - border-left-color: $drop_target_color; - } - } - - .linked.vertical > &:drop(active):not(:only-child) + { - #{$widget} #{$child} { - border-top-color: $drop_target_color; + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; } } } diff --git a/src/stylesheet/widgets/_lists.scss b/src/stylesheet/widgets/_lists.scss index d1f9ac55b9492e3ac4d99ab67c61ca33139245fc..15dabb6eddd0cee8871f00a2ab65a6eefe49fca2 100644 --- a/src/stylesheet/widgets/_lists.scss +++ b/src/stylesheet/widgets/_lists.scss @@ -31,7 +31,7 @@ row { &.has-open-popup, &:hover { background-color: $view_selected_hover_color; } - &:active { background-color: $view_active_color; } + &:active { background-color: $view_selected_active_color; } } } diff --git a/src/stylesheet/widgets/_menus.scss b/src/stylesheet/widgets/_menus.scss index 6af7304c83ef5b3f9931800bf7ce966d17364c25..0f5eed14746bc629203538a3cc8a3e18a21a0900 100644 --- a/src/stylesheet/widgets/_menus.scss +++ b/src/stylesheet/widgets/_menus.scss @@ -14,7 +14,13 @@ popover.menu { outline: none; transition: none; - &:selected { background: image($view_selected_color); } + &:selected { + background-color: $view_selected_color; + + &:active { + background-color: $view_selected_active_color; + } + } } } @@ -24,10 +30,14 @@ popover.menu { button.circular.image-button.model { @extend %outline_button; + outline: none; padding: 11px; - &:focus { - background-color: $view_selected_color; - border-color: $view_selected_color; + &:selected { + background-color: $view_selected_color; + + &:active { + background-color: $view_selected_active_color; + } } } } @@ -93,7 +103,7 @@ popover.menu { background-color: $view_selected_color; &:active { - background-color: $view_active_color; // matching buttons + background-color: $view_selected_active_color; // matching buttons } } diff --git a/src/stylesheet/widgets/_message-dialog.scss b/src/stylesheet/widgets/_message-dialog.scss index 47cd7124452e0fe839b1a40bf78b5f2f1e0e1d7f..968b124f82d75ba322ee42ac7e9ade0e7ffbdbd6 100644 --- a/src/stylesheet/widgets/_message-dialog.scss +++ b/src/stylesheet/widgets/_message-dialog.scss @@ -24,20 +24,24 @@ window.dialog.message { border-bottom-right-radius: $window_radius+1; } - .dialog-action-area button { - padding: 10px 14px; // labels are not vertically centered on message dialog, this is a workaround - border-radius: 0; - border-left-style: solid; - border-right-style: none; - border-bottom-style: none; + .dialog-action-area { + border-top: 1px solid $borders_color; - &:first-child { - border-left-style: none; - border-bottom-left-radius: 7px; - } + > button { + @extend %button_basic_flat; + padding: 10px 14px; // labels are not vertically centered on message dialog, this is a workaround + border-radius: 0; + border: none; + border-left: 1px solid $borders_color; + + &:first-child { + border-bottom-left-radius: $window_radius+1; + border-left: none; + } - &:last-child { - border-bottom-right-radius: 7px; + &:last-child { + border-bottom-right-radius: $window_radius+1; + } } } } diff --git a/src/stylesheet/widgets/_misc.scss b/src/stylesheet/widgets/_misc.scss index 176b633c813dbf0487ac8e6b08acdebb118fb37a..516c2ff6418ec1375d1ba15e60b8c564eaf7919e 100644 --- a/src/stylesheet/widgets/_misc.scss +++ b/src/stylesheet/widgets/_misc.scss @@ -39,8 +39,6 @@ separator { transparent 2px); background-clip: padding-box; - button { @extend %osd_button; } - border { border: none; } } @@ -64,17 +62,8 @@ video { .scale-popup { .osd & { @extend %osd; } - .osd & button.flat { //FIXME: quick hack, redo properly - border-style: none; - border-radius: 5px; - } - button { // +/- buttons on GtkVolumeButton popup - &:hover { - @extend %undecorated_button; - background-color: transparentize($fg_color,0.9); - border-radius: 5px; - } + @extend %button_basic_flat; } } diff --git a/src/stylesheet/widgets/_notebook.scss b/src/stylesheet/widgets/_notebook.scss index 89947c47bab5bf7095f634cd81fca796e0e43c94..eb262fd5f9048dbbd19221efa5d0dc4dbde92c5a 100644 --- a/src/stylesheet/widgets/_notebook.scss +++ b/src/stylesheet/widgets/_notebook.scss @@ -113,10 +113,6 @@ notebook { border-radius: 0; &:hover:not(:active) { - background-clip: padding-box; - background-image: none; - background-color: transparentize(white, 0.7); - border-color: transparent; box-shadow: none; } } diff --git a/src/stylesheet/widgets/_popovers.scss b/src/stylesheet/widgets/_popovers.scss index 513891f007d670f8e8a8015476153c4461846eeb..627a7798253c88f44746937aabb65b97f3a2c814 100644 --- a/src/stylesheet/widgets/_popovers.scss +++ b/src/stylesheet/widgets/_popovers.scss @@ -54,9 +54,4 @@ popover.background { box-shadow: none; } } - - &.touch-selection, - &.magnifier { - button { @extend %osd_button; } - } } diff --git a/src/stylesheet/widgets/_scale.scss b/src/stylesheet/widgets/_scale.scss index 8baf8241a0b3a1037cb34a045aa420a85d535e81..041428be1dcdb298908b64b0d6b4f826c973c2ba 100644 --- a/src/stylesheet/widgets/_scale.scss +++ b/src/stylesheet/widgets/_scale.scss @@ -5,11 +5,6 @@ @if $contrast == "high" { box-shadow: inset 0 0 0 1px $borders_color; } - - // OSD - .osd & { - background-color: transparentize($osd_text_color, .85); - } } %scale_highlight { @@ -39,11 +34,6 @@ scale { // in media player to indicate how much video stream as been cached > fill { @extend %scale_trough; - - // OSD - .osd & { - background-color: mix($osd_fg_color, $osd_borders_color, 25%); - } } > slider { diff --git a/src/stylesheet/widgets/_spin-button.scss b/src/stylesheet/widgets/_spin-button.scss index f0492b47030474332a94485aa94f1312d3bdc6ac..4d00e847d0234d2d1357039df8d68b92e797af1e 100644 --- a/src/stylesheet/widgets/_spin-button.scss +++ b/src/stylesheet/widgets/_spin-button.scss @@ -1,13 +1,31 @@ spinbutton { - &:not(.vertical) { - // in this horizontal configuration, the whole spinbutton - // behaves as the entry, so we extend the entry styling - // and nuke the style on the internal entry - @extend %entry; + @extend %entry; + + padding: 0; + border-spacing: 0; + + /* :not here just to bump specificity above that of the list button styling */ + > button.image-button.up:not(.flat), + > button.image-button.down:not(.flat) { + margin: 0; + background: none; + border-style: solid; + border-color: transparentize($borders_color, 0.7); + border-radius: 0; + box-shadow: none; + color: inherit; + + &:hover { + color: $text_color; + background-color: $view_hover_color; + } - padding: 0; - border-spacing: 0; + &:active { + background-color: $view_active_color; + } + } + &:not(.vertical) { > text { min-width: 28px; padding: 6px; @@ -17,32 +35,12 @@ spinbutton { > button.image-button.up:not(.flat), > button.image-button.down:not(.flat) { min-height: 16px; - margin: 0; + min-width: 22px; padding-bottom: 0; padding-top: 0; - color: mix($fg_color, $base_color, 90%); - background-image: none; - border-style: none none none solid; - border-color: transparentize($borders_color, 0.7); - border-radius: 0; - box-shadow: none; + border-width: 0 0 0 1px; - &:dir(rtl) { border-style: none solid none none; } - - &:hover { - color: $fg_color; - background-color: darken($bg_color,5%); - } - - &:disabled { - color: transparentize($insensitive_fg_color, 0.7); - background-color: transparent; - } - - &:active { - background-color: transparentize(black, 0.9); - box-shadow: inset 0 2px 3px -1px transparentize(black, 0.8); - } + &:dir(rtl) { border-width: 0 1px 0 0; } &:dir(ltr):last-child { border-radius: 0 $button_radius $button_radius 0; } @@ -50,52 +48,24 @@ spinbutton { } } - // Vertical &.vertical { - // in the vertical configuration, we treat the spinbutton - // as a box, and tweak the style of the entry in the middle - // so that it's linked - - // FIXME: this should not be set at all, but otherwise it gets the wrong - // color - &:disabled { color: $insensitive_fg_color; } - - &:drop(active) { - border-color: transparent; - box-shadow: none; - } - > text { - @extend %entry; - - min-height: 32px; - min-width: 32px; - padding: 0; - border-radius: 0; - - > block-cursor { @include entry(block_cursor); } - } - - > button { - min-height: 32px; - min-width: 32px; - padding: 0; - - &.up { @extend %top_button; } - - &.down { @extend %bottom_button; } + min-height: 30px; + min-width: 30px; } - %top_button { - border-bottom-style: none; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - } + /* :not here just to bump specificity above that of the list button styling */ + > button.image-button.up:not(.flat), + > button.image-button.down:not(.flat) { + &:last-child { + border-width: 1px 0 0 0; + border-radius: 0 0 $button_radius $button_radius; + } - %bottom_button { - border-top-style: none; - border-top-left-radius: 0; - border-top-right-radius: 0; + &:first-child { + border-width: 0 0 1px 0; + border-radius: $button_radius $button_radius 0 0; + } } } diff --git a/src/stylesheet/widgets/_tab-view.scss b/src/stylesheet/widgets/_tab-view.scss index de13d2f6dca6f4330dd013190eb158136fba578f..39bdd216650cd55fd588e21597e71fbbd269e049 100644 --- a/src/stylesheet/widgets/_tab-view.scss +++ b/src/stylesheet/widgets/_tab-view.scss @@ -1,4 +1,4 @@ -$tab_bg: darken($bg_color, if($variant == 'dark', 6%, 12%)); +$tab_bg: darken($headerbar_bg_color, 6%); @mixin undershoot-gradient($dir) { @if $variant == 'dark' { diff --git a/src/stylesheet/widgets/_toolbars.scss b/src/stylesheet/widgets/_toolbars.scss index 912dbf52e3d8e3157a5f12f474035ab2a3c10758..88650b7ec1ec3492b524fb79777b9f96f125aa84 100644 --- a/src/stylesheet/widgets/_toolbars.scss +++ b/src/stylesheet/widgets/_toolbars.scss @@ -43,8 +43,8 @@ searchbar > revealer > box { background-color: mix($bg_color, $borders_color, 70%); .close { - min-width: 16px; - min-height: 16px; + min-width: 18px; + min-height: 18px; padding: 4px; border-radius: 50%; @extend %button_basic_flat; @@ -91,8 +91,8 @@ infobar { } .close { - min-width: 16px; - min-height: 16px; + min-width: 18px; + min-height: 18px; padding: 4px; border-radius: 50%; @extend %button_basic_flat; diff --git a/src/stylesheet/widgets/_trees.scss b/src/stylesheet/widgets/_trees.scss index 38a47923031bf4fcdb68f79aa8ca64c03579c0cd..c6eafb1ab5a05f336a4df4518d9270bf8353e21a 100644 --- a/src/stylesheet/widgets/_trees.scss +++ b/src/stylesheet/widgets/_trees.scss @@ -1,5 +1,6 @@ // To be used for opaque elements overlaid atop the selected row -$treeview_selection_opaque: mix(opacify($view_selected_color, 1), $base_color, 100% * alpha($view_selected_color)); +$treeview_selection_default: transparentize($text_color, .9); +$treeview_selection_opaque: mix(opacify($treeview_selection_default, 1), $base_color, 100% * alpha($treeview_selection_default)); columnview.view, treeview.view { @@ -127,7 +128,8 @@ treeview.view { %column_header_button { padding: 0 6px; background-image: none; - border-style: none none solid solid; + border-style: solid; + border-width: 0 0 1px 1px; border-color: $treeview_borders_color; border-radius: 0; @@ -136,7 +138,7 @@ treeview.view { background-image: none; } - &:last-child { border-right-style: none; } + &:last-child { border-right-width: 0; } } /********************************************************