mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
panel: Indicate focus using a pill-shaped background
The current way of indicating focus of elements in the panel does not work very well with a fully-transparent panel, a line at the bottom of the panel doesn't make too much sense if there is no real panel, but only the text and icons. To make the indicators look better in this case, switch to a pill-shaped background color to indicate the focus of items in the panel. For this to look good, there has to be a small black border above and below the background, this also requires increasing the height of the panel (from 1.86em to 2.2em) for visual purposes. Also, since we now no longer need to color the lower bottom of the panel, we can remove the custom drawing code for the border of the panels corner, so do that. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1397>
This commit is contained in:
parent
a44686affe
commit
c894ec95cd
3 changed files with 28 additions and 97 deletions
|
|
@ -1,11 +1,11 @@
|
|||
/* Date/Time Menu */
|
||||
|
||||
.clock-display-box {
|
||||
spacing: $base_spacing / 2;
|
||||
spacing: 2px;
|
||||
|
||||
.clock {
|
||||
padding-left: $base_padding;
|
||||
padding-right: $base_padding;
|
||||
padding-left: $base_padding * 2;
|
||||
padding-right: $base_padding * 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
$panel_corner_radius: $base_border_radius+1;
|
||||
$panel_bg_color: #000;
|
||||
$panel_fg_color: #ccc;
|
||||
$panel_height: 1.86em;
|
||||
$panel_height: 2.2em;
|
||||
|
||||
|
||||
#panel {
|
||||
|
|
@ -21,7 +21,6 @@ $panel_height: 1.86em;
|
|||
.panel-corner {
|
||||
-panel-corner-radius: 0;
|
||||
-panel-corner-background-color: transparent;
|
||||
-panel-corner-border-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -35,11 +34,6 @@ $panel_height: 1.86em;
|
|||
-panel-corner-radius: $panel_corner_radius;
|
||||
-panel-corner-background-color: $panel_bg_color;
|
||||
-panel-corner-border-width: 2px;
|
||||
-panel-corner-border-color: transparent;
|
||||
|
||||
&:active, &:overview, &:focus {
|
||||
-panel-corner-border-color: lighten($selected_bg_color,5%);
|
||||
}
|
||||
}
|
||||
|
||||
// panel menus
|
||||
|
|
@ -48,13 +42,30 @@ $panel_height: 1.86em;
|
|||
color: $panel_fg_color;
|
||||
-natural-hpadding: $base_padding * 2;
|
||||
-minimum-hpadding: $base_padding;
|
||||
transition-duration: 150ms;
|
||||
border: 3px solid transparent;
|
||||
border-radius: 99px;
|
||||
|
||||
&:hover {
|
||||
color: lighten($panel_fg_color, 20%);
|
||||
&.clock-display {
|
||||
.clock {
|
||||
transition-duration: 150ms;
|
||||
border: 3px solid transparent;
|
||||
border-radius: 99px;
|
||||
}
|
||||
}
|
||||
|
||||
&:active, &:overview, &:focus, &:checked {
|
||||
color: lighten($panel_fg_color, 20%);
|
||||
&:hover, &:active, &:overview, &:focus, &:checked {
|
||||
box-shadow: inset 0 0 0 100px rgba(255, 255, 255, 0.20);
|
||||
|
||||
// The clock display needs to have the background on .clock because
|
||||
// we want to exclude the do-not-disturb indicator from the background
|
||||
&.clock-display {
|
||||
box-shadow: none;
|
||||
|
||||
.clock {
|
||||
box-shadow: inset 0 0 0 100px rgba(255, 255, 255, 0.20);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// status area icons
|
||||
|
|
@ -83,25 +94,6 @@ $panel_height: 1.86em;
|
|||
}
|
||||
}
|
||||
|
||||
.panel-button {
|
||||
&:active, &:overview, &:focus, &:checked {
|
||||
// Trick due to St limitations. It needs a background to draw a box-shadow
|
||||
background-color: rgba(0, 0, 0, 0.01);
|
||||
box-shadow: inset 0 -2px 0 0 lighten($selected_bg_color,5%);
|
||||
}
|
||||
}
|
||||
|
||||
.panel-button.clock-display {
|
||||
// Move highlight from .panel-button to .clock
|
||||
&:active, &:overview, &:focus, &:checked {
|
||||
box-shadow: none;
|
||||
|
||||
.clock {
|
||||
background-color: rgba(0, 0, 0, 0.01);
|
||||
box-shadow: inset 0 -2px 0 0 lighten($selected_bg_color,5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.panel-status-indicators-box,
|
||||
.panel-status-menu-box {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue