panel: Fix drawing functions for light theme

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2823>
This commit is contained in:
Sam Hewitt 2023-07-05 12:30:14 -02:30 committed by Marge Bot
parent 7b139b00f3
commit a466029374
3 changed files with 30 additions and 27 deletions

View File

@ -367,6 +367,7 @@
// $flat: if true, the button is filled instead of transparent
// $highlighted_child: if true, applies some special overrides for to a
// child element, see _panel.scss for details
// $child_class: class name of the child element
//
@mixin panel_button($bg:$panel_fg_color, $fg:$panel_fg_color, $flat: true, $highlighted_child: false, $child_class:"") {
@ -382,21 +383,21 @@
@if $flat {
box-shadow: none;
&:active, &:overview, &:focus, &:checked {
box-shadow: inset 0 0 0 100px transparentize($bg, 0.75);
&:active, &:focus, &:checked {
box-shadow: inset 0 0 0 100px transparentize($fg, 0.75);
&:hover {
box-shadow: inset 0 0 0 100px transparentize($bg, 0.65);
box-shadow: inset 0 0 0 100px transparentize($fg, 0.65);
}
}
&:hover {
box-shadow: inset 0 0 0 100px transparentize($bg, 0.8);
box-shadow: inset 0 0 0 100px transparentize($fg, 0.8);
}
} @else {
box-shadow: inset 0 0 0 100px transparentize($bg, 0.2);
&:active, &:overview, &:focus, &:checked {
&:active, &:focus, &:checked {
box-shadow: inset 0 0 0 100px $bg;
&:hover {
box-shadow: inset 0 0 0 100px transparentize($bg, 0.05);
@ -418,17 +419,14 @@
border-radius: 99px;
}
&:active, &:overview, &:focus, &:checked {
&:active, &:focus, &:checked {
box-shadow: none !important;
#{$child_class} {
box-shadow: inset 0 0 0 100px transparentize($bg, 0.75);
}
box-shadow: inset 0 0 0 100px transparentize($fg, 0.75);
&:hover {
box-shadow: none !important;
#{$child_class} {
box-shadow: inset 0 0 0 100px transparentize($bg, 0.65);
box-shadow: inset 0 0 0 100px transparentize($fg, 0.65) !important;
}
}
}
@ -436,7 +434,7 @@
&:hover {
box-shadow: none !important;
#{$child_class} {
box-shadow: inset 0 0 0 100px transparentize($bg, 0.8);
box-shadow: inset 0 0 0 100px transparentize($fg, 0.8);
}
}
}

View File

@ -19,18 +19,6 @@ $panel_transition_duration: 250ms; // same as the overview transition duration
transition-duration: $panel_transition_duration;
box-shadow: inset 0 -1px 0 0 $panel_border_color;
// transparent panel on lock & login screens
&.unlock-screen,
&.login-screen,
&:overview {
background-color: transparent;
box-shadow: none;
.panel-button {
@include panel_button($panel_system_fg_color);
}
}
// panel menus
.panel-button {
@include panel_button($panel_fg_color);
@ -92,6 +80,23 @@ $panel_transition_duration: 250ms; // same as the overview transition duration
}
}
// transparent panel on lock & login screens
&.unlock-screen,
&.login-screen,
&:overview {
background-color: transparent;
box-shadow: none;
.panel-button {
@include panel_button($panel_system_fg_color, $fg:$panel_system_fg_color);
// clock
&.clock-display {
@include panel_button($panel_system_fg_color, $fg:$panel_system_fg_color, $highlighted_child: true, $child_class:".clock");
}
}
}
.panel-status-indicators-box,
.panel-status-menu-box {
spacing: 2px;

View File

@ -276,11 +276,11 @@ class ActivitiesButton extends PanelMenu.Button {
this.label_actor = this._label;
Main.overview.connect('showing', () => {
this.add_style_pseudo_class('overview');
this.add_style_pseudo_class('checked');
this.add_accessible_state(Atk.StateType.CHECKED);
});
Main.overview.connect('hiding', () => {
this.remove_style_pseudo_class('overview');
this.remove_style_pseudo_class('checked');
this.remove_accessible_state(Atk.StateType.CHECKED);
});