[libadwaita/wip/exalm/popover-selector] stylesheet: Simplify popover and messagedialog selectors
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/popover-selector] stylesheet: Simplify popover and messagedialog selectors
- Date: Mon, 15 Nov 2021 12:59:05 +0000 (UTC)
commit d495cc28e59472d6c467cc5eb264a05fdcdc0e6e
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Mon Nov 15 17:58:26 2021 +0500
stylesheet: Simplify popover and messagedialog selectors
Remove .background wherever possile.
src/stylesheet/widgets/_dropdowns.scss | 2 +-
src/stylesheet/widgets/_emoji-chooser.scss | 4 ++--
src/stylesheet/widgets/_menus.scss | 8 ++++----
src/stylesheet/widgets/_message-dialog.scss | 8 +++-----
src/stylesheet/widgets/_popovers.scss | 13 ++++++++-----
5 files changed, 18 insertions(+), 17 deletions(-)
---
diff --git a/src/stylesheet/widgets/_dropdowns.scss b/src/stylesheet/widgets/_dropdowns.scss
index 21b3083b..8e4bb232 100644
--- a/src/stylesheet/widgets/_dropdowns.scss
+++ b/src/stylesheet/widgets/_dropdowns.scss
@@ -1,4 +1,4 @@
-dropdown > popover.menu.background > contents { padding: 0; }
+dropdown > popover.menu > contents { padding: 0; }
dropdown > button > box {
border-spacing: 6px;
diff --git a/src/stylesheet/widgets/_emoji-chooser.scss b/src/stylesheet/widgets/_emoji-chooser.scss
index b2d651e4..557efe3e 100644
--- a/src/stylesheet/widgets/_emoji-chooser.scss
+++ b/src/stylesheet/widgets/_emoji-chooser.scss
@@ -1,4 +1,4 @@
-popover.background.emoji-picker > contents {
+popover.emoji-picker > contents {
padding: 0;
}
@@ -39,7 +39,7 @@ popover.emoji-picker emoji {
// Emoji completion popover
-popover.background.emoji-completion > contents {
+popover.emoji-completion > contents {
padding: $menu_margin;
padding-bottom: $menu_margin - 2px;
}
diff --git a/src/stylesheet/widgets/_menus.scss b/src/stylesheet/widgets/_menus.scss
index b71c3daf..29e7a8c6 100644
--- a/src/stylesheet/widgets/_menus.scss
+++ b/src/stylesheet/widgets/_menus.scss
@@ -47,7 +47,7 @@ popover.menu {
}
}
- &.background > contents {
+ > contents {
padding: 0;
&, > scrolledwindow > viewport {
@@ -57,11 +57,11 @@ popover.menu {
}
}
- &.background separator {
+ separator {
margin: 6px 0;
}
- &.background list separator {
+ list separator {
margin: 0;
}
@@ -227,7 +227,7 @@ menubar {
padding: 0 0 4px 0;
}
- popover.menu.background popover.menu.background > contents {
+ popover.menu popover.menu > contents {
margin: 0;
border-radius: $popover_radius; //including top
}
diff --git a/src/stylesheet/widgets/_message-dialog.scss b/src/stylesheet/widgets/_message-dialog.scss
index 40eb9386..48be0c12 100644
--- a/src/stylesheet/widgets/_message-dialog.scss
+++ b/src/stylesheet/widgets/_message-dialog.scss
@@ -18,11 +18,9 @@ window.dialog.message {
}
&.csd {
- &.background {
- // bigger radius for better antialiasing
- border-bottom-left-radius: $window_radius+1;
- border-bottom-right-radius: $window_radius+1;
- }
+ // bigger radius for better antialiasing
+ border-bottom-left-radius: $window_radius+1;
+ border-bottom-right-radius: $window_radius+1;
.dialog-action-area {
border-top: 1px solid $border_color;
diff --git a/src/stylesheet/widgets/_popovers.scss b/src/stylesheet/widgets/_popovers.scss
index 38d45c42..030e600a 100644
--- a/src/stylesheet/widgets/_popovers.scss
+++ b/src/stylesheet/widgets/_popovers.scss
@@ -1,6 +1,8 @@
-popover.background {
- background-color: transparent;
- font: initial; // Decouple the font of popovers from their entry/textview
+popover {
+ &.background {
+ background-color: transparent;
+ font: initial;
+ }
> arrow,
> contents {
@@ -8,7 +10,8 @@ popover.background {
color: $popover_fg_color;
background-clip: padding-box;
border: 1px solid $window_border_color;
- box-shadow: 0 1px 2px transparentize(black, 0.7);
+ box-shadow: 0 1px 3px 1px transparentize(black, .93),
+ 0 2px 6px 2px transparentize(black, .97);
}
> contents {
@@ -23,7 +26,7 @@ popover.background {
}
}
- .osd &.background,
+ .osd &,
&.touch-selection,
&.magnifier {
background-color: transparent;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]