Commit 07506a90 authored by Lapo Calamandrei's avatar Lapo Calamandrei

Adwaita: fix popover styling

...in the process simplified the touch-selection styling, check
and radios not fixed there since I'm going to add proper osd assets
for those (istead of forcing the dark variant assets there as before).
parent 861ac8e3
......@@ -27,7 +27,7 @@ $destructive_color: if($variant == 'light', #ef2929, darken(#ef2929,10%));
$osd_fg_color: #eeeeec;
$osd_text_color: white;
$osd_bg_color: transparentize(#202526, 0.3);
$osd_bg_color: transparentize(#202526, 0.2);
$osd_insensitive_bg_color: transparentize(mix($osd_fg_color, opacify($osd_bg_color, 1), 10%), 0.5);
$osd_insensitive_fg_color: mix($osd_fg_color, opacify($osd_bg_color, 1), 50%);
$osd_borders_color: transparentize(black, 0.3);
......
......@@ -190,14 +190,12 @@ textview { // This will get overridden by .view, needed by gedit line numbers
$backdrop_base_color, 50%); }
}
popover.magnifier,
%osd, .osd {
color: $osd_fg_color;
border: none;
background-color: $osd_bg_color;
background-clip: padding-box;
outline-color: transparentize($osd_fg_color, 0.7);
box-shadow: none;
text-shadow: 0 1px black;
-gtk-icon-shadow: 0 1px black;
&:backdrop {
......@@ -1535,12 +1533,11 @@ menuitem accelerator { color: gtkalpha(currentColor,0.55); }
* Popovers *
***************/
popover {
popover.background {
padding: 2px;
border: 1px solid $borders_color;
border-radius: 5px;
.csd &, & { border: 1px solid $borders_color; }
background-color: mix($bg_color, $base_color, 50%);
box-shadow: 0 1px 2px transparentize(black, 0.7);
&:backdrop {
......@@ -1560,7 +1557,16 @@ popover {
transition: none;
}
&.osd { @extend %osd; }
.csd &, & {
&.touch-selection,
&.magnifier {
@extend %osd;
border: 1px solid transparentize(white, 0.9);
button { @extend %osd_button };
}
&.osd { @extend %osd; }
}
}
/*************
......@@ -3341,49 +3347,6 @@ cursor-handle {
font: initial;
}
popover.touch-selection {
font: initial;
color: $osd_fg_color;
border: none;
background-color: opacify($osd_bg_color,0.2);
background-clip: padding-box;
outline-color: transparentize($osd_fg_color, 0.7);
box-shadow: none;
text-shadow: 0 1px black;
-gtk-icon-shadow: 0 1px black;
&:backdrop { text-shadow: none; }
button {
@include button(osd);
&:hover { @include button(osd-hover); }
&:active, &:checked { @include button(osd-active); }
&:insensitive, &:backdrop:insensitive { @include button(osd-insensitive); }
&:backdrop { @include button(osd-backdrop); }
}
// checkboxes and radios to use the -dark style for OSD style popovers
@each $w,$a in ('check', 'checkbox'),
('radio','radio') {
@each $s,$as in ('','-unchecked'),
(':hover', '-unchecked-hover'),
(':active', '-unchecked-active'),
(':insensitive','-unchecked-insensitive'),
(':inconsistent', '-mixed'),
(':inconsistent:hover', '-mixed-hover'),
(':inconsistent:selected', '-mixed-active'),
(':inconsistent:insensitive', '-mixed-insensitive'),
(':checked', '-checked'),
(':checked:insensitive','-checked-insensitive'),
(':checked:hover', '-checked-hover'),
(':checked:active', '-checked-active'),
(':backdrop:checked', '-checked-backdrop') {
.#{$w}#{$s} {
-gtk-icon-shadow: none;
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}-dark.png"),
url("assets/#{$a}#{$as}-dark@2.png"));
}
}
}
}
button.circular {
border-radius: 20px;
outline-radius: 20px;
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment