gnome-shell/data/theme/gnome-shell-sass/widgets/_popovers.scss
Sam Hewitt 39301a744e theme: Stylesheet papercuts and other visual fixes
- remove tiled preview corners; merge with misc.scss
- sync general label styles from libadwaita
- use variables in ibus css
- remove redundant spacing variable as its equal to padding
- use more global styles in screenshot css
- tidy up entry styles
- cleanup the networks dialog stylesheet
- make colours less dark
- cleanup the popover stylesheet
- cleanup the mixins for tiles and overview icons
- adjust the button style definitions on checked style
- add osd button definitions

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2172>
2022-02-14 13:35:41 -03:30

202 lines
4.9 KiB
SCSS

/* Popovers/Menus */
// the popover itself
.popup-menu-boxpointer {
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
margin-bottom: 1.75em; // so it doesn't touch the bottom of the screen
}
}
// popover content
.popup-menu-content {
padding: $base_padding;
// account for margin oddities
padding-top: $base_padding - 2px !important;
padding-bottom: $base_padding - 2px !important;
border-radius: $modal_radius - 2px;
border: 1px solid $borders_edge;
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.1);
background-color: $bg_color;
}
// menu items
.popup-menu-item {
padding: $base_padding*1.5 $base_padding*2;
margin: 2px 0;
border-radius: $base_border_radius;
transition: 0.2s all ease;
background-color: transparent;
&:focus, &:hover {
background-color: $hover_bg_color !important;
&:active { background-color: $active_bg_color !important;}
}
&:checked {background-color: $checked_bg_color !important;}
&:checked {
margin-bottom: 0;
box-shadow: inset 0 -1px 0 0 darken($checked_bg_color, 5%);
border-radius: $base_border_radius $base_border_radius 0 0;
&:focus,&:hover { background-color: lighten($checked_bg_color, 3%) !important;}
&:active { background-color: lighten($checked_bg_color, 5%) !important;}
}
&:active {
background-color: lighten($active_bg_color, 5%);
color: $active_fg_color;
}
&:insensitive {color: transparentize($fg_color,0.5);}
}
// all other graphical elements (sliders)
.popup-inactive-menu-item {
color: $fg_color;
&:insensitive { color: $insensitive_fg_color; }
}
// symbolic icons in popover
.popup-menu-arrow,
.popup-menu-icon {
icon-size: 16px !important; // for some reason the variable doesn't work here
}
.popup-menu-arrow {
&:ltr {margin-right: $base_margin;}
&:rtl {margin-left: $base_margin;}
}
// popover submenus
.popup-sub-menu {
background-color: $checked_bg_color;
border-radius: 0 0 $base_border_radius $base_border_radius;
.popup-menu-ornament {
min-width: $base_icon_size !important;
}
// submenu specific styles
.popup-menu-item {
border-radius: 0;
margin: 0;
&:last-child {
border-radius: 0 0 $base_border_radius $base_border_radius;
}
&:focus,&:hover { background-color: lighten($hover_bg_color, 10%) !important;}
&:checked {
background-color: lighten($checked_bg_color, 10%) !important;
&:focus,&:hover { background-color: lighten($checked_bg_color, 8%) !important;}
}
&:active { background-color: lighten($active_bg_color, 10%) !important;}
}
.popup-menu-section {
.popup-menu-item:last-child {
&:hover,&:focus {border-radius: 0;}
}
&:last-child .popup-menu-item:last-child {
border-radius: 0 0 $base_border_radius $base_border_radius;
}
}
}
// container for radio and check boxes
.popup-menu-ornament {
@extend %heading;
width: 1.2em;
text-align: center !important;
&:ltr {text-align: right;};
&:rtl {text-align: left;};
}
// separator
.popup-separator-menu-item {
padding:0;
margin: 4px 0;
.popup-separator-menu-item-separator {
height: 1px; //not really the whole box
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 at the top-level in this menu, hide it
.popup-menu-ornament { width: 0 !important; }
// lock screen, shutdown, etc. buttons
.popup-menu-icon {
-st-icon-style: symbolic;
&:ltr {margin-right: $base_margin*2;}
&:rtl {margin-left: $base_margin*2;}
}
// account for ornaments in submenus with padding
.popup-sub-menu .popup-menu-item > :first-child {
// this value is hardcoded for visual effect
&:ltr { margin-left: $base_margin*2;}
&:rtl { margin-right: $base_margin*2;}
}
}
// right-click (and panel) app menu
.app-menu {
max-width: 27.25em;
.popup-menu-content { margin: $base_margin;}
&.panel-menu {
.popup-menu-content { margin: 0;} // avoid doubling up margin
}
// this is unneeded at the top-level in this menu, hide it
.popup-menu-ornament { width: 0 !important; }
.popup-inactive-menu-item:first-child {
// "Open Windows" label
> StLabel {
@extend %caption_heading;
&:ltr {margin-right: $base_margin*2;}
&:rtl {margin-left: $base_margin*2;}
}
}
}