gnome-shell/data/theme/gnome-shell-sass/widgets/_popovers.scss
Sam Hewitt 6a88c0f0be stylesheet: Fixes and missed updates for the 42 refresh
- increase the looking glass outer radii
- adjust the colours to be less dark
- fix oversized notification close icon
- fix separators and reduce padding in popovers
- fix colour mismatch in switch assets
- fix color of no-notifications asset
- rename assets to be consistent with dark-as-default scheme
- update checkbox assets
- fix calendar today border
- reduce icon size of placeholder notifications icon

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2111>
2022-01-21 18:11:37 +00:00

221 lines
4.9 KiB
SCSS

/* Popovers/Menus */
// the popover itself
.popup-menu-boxpointer {
-arrow-border-radius: $modal_radius;
-arrow-background-color: $bg_color;
-arrow-border-color: $borders_color;
-arrow-border-width: 1px;
-arrow-base: 24px;
-arrow-rise: 12px;
-arrow-box-shadow: none; // dreaming bugzilla #689995
margin: $base_margin; // used as distance from the screen edge
}
// container of the popover menu
.popup-menu {
min-width: 15em;
color: $fg_color;
//.popup-status-menu-item { font-weight: normal; color: pink; } //dunno what that is
&.panel-menu {
-boxpointer-gap: $base_margin+2px; // distance from the panel
// override popover styles for panel menus so
// we can draw a box shadow and no arrow
-arrow-border-radius: $modal_radius;
-arrow-background-color: transparent;
-arrow-border-color: transparent;
-arrow-border-width: 0;
-arrow-base: 0;
-arrow-rise: $base_margin; // use this as top margin
-arrow-box-shadow: none; // dreaming bugzilla #689995
margin-bottom: 1.75em; // so it doesn't touch the bottom of the screen
// style the menu content instead
.popup-menu-content {
border-radius: $modal_radius;
border: 1px solid $borders_color;
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.1);
background-color: $bg_color;
padding: $base_padding*1.5;
}
.popup-menu-item {}
}
}
// popover content;
.popup-menu-content {
padding: $base_padding;
}
// menu items
.popup-menu-item {
spacing: $base_spacing;
padding: $base_padding*1.5;
margin: 2px 0;
border-radius: $base_border_radius;
transition: 0.2s all ease;
&:ltr { padding-right:1.75em; padding-left: 0; }
&:rtl { padding-right: 0; padding-left:1.75em; }
&:hover {
background-color: $hover_bg_color;
}
&:checked {
background-color: $hover_bg_color;
font-weight: bold;
margin-bottom: 0;
box-shadow: inset 0 -1px 0 0 darken($hover_bg_color, 5%);
border-radius: $base_border_radius $base_border_radius 0 0;
&:hover {
background-color: darken($hover_bg_color, 4%);
}
}
&.selected {
background-color: transparentize($fg_color, if($variant=='light', 0.7, 0.9));
color: $fg_color;
}
&:active {
background-color: $active_bg_color;
color: $active_fg_color;
}
&:insensitive { color: transparentize($fg_color,0.5);}
}
// all icons and other graphical elements
.popup-inactive-menu-item {
color: $fg_color;
// "Open Windows" label
font-weight: bold;
font-size: smaller;
&:insensitive { color: $insensitive_fg_color; }
}
// symbolic icons in popover
.popup-menu-arrow,
.popup-menu-icon {
margin: 0;
padding:0;
icon-size: 16px !important;
}
.popup-menu-arrow {
margin-right: $base_margin;
}
// popover submenus
.popup-sub-menu {
background-color: $hover_bg_color;
border:none;
border-radius: 0 0 $base_border_radius $base_border_radius;
padding: 0;
margin-top: 0;
&:active {
background-color: transparent;
}
.popup-menu-ornament {
min-width: 14px !important;
}
.popup-menu-item {
margin: 0;
border-radius: 0;
padding: $base_padding*1.5 $base_padding*2;
&:last-child:hover{
border-radius: 0 0 $base_border_radius $base_border_radius;
}
}
}
// container for radio and check boxes
.popup-menu-ornament {
width: 1.2em;
font-weight: bold;
font-size: 1em;
&:ltr { text-align: right; };
&:rtl { text-align: left; };
}
// separator
.popup-separator-menu-item {
padding: 0;
&:ltr { padding-right:$base_padding; padding-left: 0; }
&:rtl { padding-right: 0; padding-left:$base_padding; }
.popup-separator-menu-item-separator {
height: 1px; //not really the whole box
margin: 0 !important;
padding: 0 !important;
background-color: $borders_color;
}
.popup-menu-ornament {
width: 0 !important;
}
.popup-sub-menu & {
padding: 0;
margin-right: 2.5em !important; // account for ornament
background-color: transparent;
.popup-separator-menu-item-separator {
background-color: lighten($borders_color, 7%);
}
}
}
// desktop background menu
.background-menu {
-boxpointer-gap: $base_margin;
-arrow-rise: 0px; // hide the beak on the menu
}
// system status menu
.aggregate-menu {
min-width: 22em;
// this is unneeded in at the top-level this menu, hide it
.popup-menu-ornament {width:0;padding:0;spacing:0;margin:0;}
.popup-menu-item {
&:ltr { padding-left:$base_padding;padding-right:$base_padding*2; }
&:rtl { padding-right:$base_padding;padding-left:$base_padding*2; }
}
// lock screen, shutdown, etc. buttons
.popup-menu-icon {
padding:0;
margin: 0 $base_margin;
-st-icon-style: symbolic;
}
.popup-sub-menu .popup-menu-item > :first-child {
// account for icons in submenus with padding
&:ltr {
padding-left: 0;
margin-left: $base_icon_size;
}
&:rtl {
padding-right: 0;
margin-right: $base_icon_size;
}
}
}