panel: Fix drawing functions for light theme
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2823>
This commit is contained in:
parent
7b139b00f3
commit
a466029374
@ -367,6 +367,7 @@
|
|||||||
// $flat: if true, the button is filled instead of transparent
|
// $flat: if true, the button is filled instead of transparent
|
||||||
// $highlighted_child: if true, applies some special overrides for to a
|
// $highlighted_child: if true, applies some special overrides for to a
|
||||||
// child element, see _panel.scss for details
|
// 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:"") {
|
@mixin panel_button($bg:$panel_fg_color, $fg:$panel_fg_color, $flat: true, $highlighted_child: false, $child_class:"") {
|
||||||
@ -382,21 +383,21 @@
|
|||||||
@if $flat {
|
@if $flat {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
|
||||||
&:active, &:overview, &:focus, &:checked {
|
&:active, &:focus, &:checked {
|
||||||
box-shadow: inset 0 0 0 100px transparentize($bg, 0.75);
|
box-shadow: inset 0 0 0 100px transparentize($fg, 0.75);
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: inset 0 0 0 100px transparentize($bg, 0.65);
|
box-shadow: inset 0 0 0 100px transparentize($fg, 0.65);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: inset 0 0 0 100px transparentize($bg, 0.8);
|
box-shadow: inset 0 0 0 100px transparentize($fg, 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
} @else {
|
} @else {
|
||||||
box-shadow: inset 0 0 0 100px transparentize($bg, 0.2);
|
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;
|
box-shadow: inset 0 0 0 100px $bg;
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: inset 0 0 0 100px transparentize($bg, 0.05);
|
box-shadow: inset 0 0 0 100px transparentize($bg, 0.05);
|
||||||
@ -418,17 +419,14 @@
|
|||||||
border-radius: 99px;
|
border-radius: 99px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:active, &:overview, &:focus, &:checked {
|
&:active, &:focus, &:checked {
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
|
|
||||||
#{$child_class} {
|
#{$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 {
|
&:hover {
|
||||||
box-shadow: none !important;
|
box-shadow: inset 0 0 0 100px transparentize($fg, 0.65) !important;
|
||||||
#{$child_class} {
|
|
||||||
box-shadow: inset 0 0 0 100px transparentize($bg, 0.65);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -436,7 +434,7 @@
|
|||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
#{$child_class} {
|
#{$child_class} {
|
||||||
box-shadow: inset 0 0 0 100px transparentize($bg, 0.8);
|
box-shadow: inset 0 0 0 100px transparentize($fg, 0.8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,18 +19,6 @@ $panel_transition_duration: 250ms; // same as the overview transition duration
|
|||||||
transition-duration: $panel_transition_duration;
|
transition-duration: $panel_transition_duration;
|
||||||
box-shadow: inset 0 -1px 0 0 $panel_border_color;
|
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 menus
|
||||||
.panel-button {
|
.panel-button {
|
||||||
@include panel_button($panel_fg_color);
|
@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-indicators-box,
|
||||||
.panel-status-menu-box {
|
.panel-status-menu-box {
|
||||||
spacing: 2px;
|
spacing: 2px;
|
||||||
|
@ -276,11 +276,11 @@ class ActivitiesButton extends PanelMenu.Button {
|
|||||||
this.label_actor = this._label;
|
this.label_actor = this._label;
|
||||||
|
|
||||||
Main.overview.connect('showing', () => {
|
Main.overview.connect('showing', () => {
|
||||||
this.add_style_pseudo_class('overview');
|
this.add_style_pseudo_class('checked');
|
||||||
this.add_accessible_state(Atk.StateType.CHECKED);
|
this.add_accessible_state(Atk.StateType.CHECKED);
|
||||||
});
|
});
|
||||||
Main.overview.connect('hiding', () => {
|
Main.overview.connect('hiding', () => {
|
||||||
this.remove_style_pseudo_class('overview');
|
this.remove_style_pseudo_class('checked');
|
||||||
this.remove_accessible_state(Atk.StateType.CHECKED);
|
this.remove_accessible_state(Atk.StateType.CHECKED);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user