gnome-shell-dark-theme/gnome-shell-sass/widgets/_panel.scss

213 lines
4.9 KiB
SCSS
Raw Permalink Normal View History

/* Top Bar */
// a.k.a. the panel
2024-09-19 22:21:34 -04:00
$privacy_indicator_color: if($variant == 'light', $orange_4, $red_3);
$recording_indicator_color: $red_3;
2023-10-09 22:24:14 -04:00
2024-03-25 13:34:36 -04:00
$transparent_panel_fg_color: $light_1; // always white for transparent lock screens
$system_panel_fg_color: $system_fg_color; // always light for lockscreen, overview
$panel_height: 2.2em;
$panel_transition_duration: 250ms; // same as the overview transition duration
#panel {
background-color: $panel_bg_color;
font-weight: bold;
height: $panel_height;
@extend %numeric;
transition-duration: $panel_transition_duration;
// panel menus
.panel-button {
2024-03-25 13:34:36 -04:00
@include panel_button();
2024-09-19 22:21:34 -04:00
-natural-hpadding: 6px;
-minimum-hpadding: 4px;
// status area icons
.system-status-icon {
2024-03-25 13:34:36 -04:00
icon-size: $scalable_icon_size;
2024-09-19 22:21:34 -04:00
padding: 0;
margin: 0 $base_margin;
}
// app menu icon
.app-menu-icon {
-st-icon-style: symbolic;
// dimensions of the icon are hardcoded
}
2024-03-25 13:34:36 -04:00
// reduce margin between icons in combined menu
.panel-status-menu-box,
.panel-status-indicators-box {
2024-09-19 22:21:34 -04:00
spacing: 0px;
2024-03-25 13:34:36 -04:00
> .system-status-icon {
padding: 0;
}
}
&#panelActivities {
2024-09-19 22:21:34 -04:00
-natural-hpadding: 10px;
-minimum-hpadding: 8px;
2023-10-09 22:24:14 -04:00
& StBoxLayout {
2024-03-25 13:34:36 -04:00
padding: 0 $scaled_padding * 0.5; // use em padding to keep proportion
2023-10-09 22:24:14 -04:00
spacing: 5px;
}
2023-10-09 22:24:14 -04:00
& .workspace-dot {
2024-03-25 13:34:36 -04:00
border-radius: $forced_circular_radius;
min-width: $scalable_icon_size * 0.5;
min-height: $scalable_icon_size * 0.5;
2023-10-09 22:24:14 -04:00
background-color: $panel_fg_color;
}
}
2023-10-09 22:24:14 -04:00
// screen activity indicators
&.screen-recording-indicator,
&.screen-sharing-indicator {
StBoxLayout {
2024-03-25 13:34:36 -04:00
spacing: $scaled_padding;
2023-10-09 22:24:14 -04:00
}
StIcon {
2024-03-25 13:34:36 -04:00
icon-size: $scalable_icon_size;
2024-09-19 22:21:34 -04:00
&:first-child {
margin-left: 3px;
}
2023-10-09 22:24:14 -04:00
}
}
&.screen-recording-indicator {
2024-03-25 13:34:36 -04:00
@include panel_button($bg:$recording_indicator_color, $fg:$_base_color_light, $style: filled);
2023-10-09 22:24:14 -04:00
}
&.screen-sharing-indicator {
2024-03-25 13:34:36 -04:00
@include panel_button($bg:$privacy_indicator_color, $fg:$_base_color_light, $style: filled);
2023-10-09 22:24:14 -04:00
}
// clock
&.clock-display {
// The clock display needs to have the background on .clock because
// we want to exclude the do-not-disturb indicator from the background
// see _drawing.scss for override details
2024-03-25 13:34:36 -04:00
@include panel_button($highlighted_child: true, $child_class: '.clock');
2024-09-19 22:21:34 -04:00
-natural-hpadding: 0px;
-minimum-hpadding: 0px;
padding-left: 0px;
padding-right: 0px;
2023-10-09 22:24:14 -04:00
.clock {
// the highlighted child
}
2024-03-25 13:34:36 -04:00
.messages-indicator {
icon-size: $scalable_icon_size;
}
}
}
@if $laptop {
#panelActivities {
border-radius: 18px 3px 3px 3px;
}
#panelRight > *:last-child > * {
border-radius: 3px 18px 3px 3px;
}
}
2024-03-25 13:34:36 -04:00
// transparent panel on overview, lock & login screens
&:overview,
&.unlock-screen,
2024-03-25 13:34:36 -04:00
&.login-screen {
2023-10-09 22:24:14 -04:00
background-color: transparent;
2024-03-25 13:34:36 -04:00
// unfortunate duplication to keep indicator style in these states
2023-10-09 22:24:14 -04:00
.panel-button {
2024-03-25 13:34:36 -04:00
&.screen-recording-indicator {
@include panel_button($bg:$recording_indicator_color, $fg:$_base_color_light, $style: filled);
}
2024-03-25 13:34:36 -04:00
&.screen-sharing-indicator {
@include panel_button($bg:$privacy_indicator_color, $fg:$_base_color_light, $style: filled);
}
2024-03-25 13:34:36 -04:00
}
}
// use transparent text styles for lock & login screen panels
&.unlock-screen,
&.login-screen {
.panel-button {
@include panel_button($fg:$transparent_panel_fg_color);
2023-10-09 22:24:14 -04:00
// clock
&.clock-display {
2024-03-25 13:34:36 -04:00
@include panel_button($fg:$transparent_panel_fg_color, $highlighted_child: true, $child_class: '.clock');
}
2024-03-25 13:34:36 -04:00
}
}
2024-03-25 13:34:36 -04:00
// use system text styles for overview panel
&:overview {
.panel-button {
@include panel_button($fg:$system_panel_fg_color);
&#panelActivities .workspace-dot {
background-color: $system_panel_fg_color;
2023-10-09 22:24:14 -04:00
}
2024-03-25 13:34:36 -04:00
// clock
&.clock-display {
@include panel_button($fg:$system_panel_fg_color, $highlighted_child: true, $child_class: '.clock');
}
}
}
2024-03-25 13:34:36 -04:00
.panel-status-indicators-box,
.panel-status-menu-box {
spacing: 2px;
}
// spacing between power icon and (optional) percentage label
.power-status.panel-status-indicators-box {
2024-09-19 22:21:34 -04:00
padding-left: 0px;
spacing: 0;
2024-09-19 22:21:34 -04:00
@if $laptop {
margin-bottom: 2px;
} @else {
margin-left: 0px;
}
}
2023-10-09 22:24:14 -04:00
// important privacy related indicators
.privacy-indicator { color: $privacy_indicator_color; }
}
// App Menu
#appMenu {
2024-03-25 13:34:36 -04:00
spacing: $scaled_padding;
.label-shadow { color: transparent; }
}
#appMenu .panel-status-menu-box {
2024-03-25 13:34:36 -04:00
padding: 0 $scaled_padding;
spacing: $scaled_padding;
}
// Clock
.clock-display-box {
spacing: 2px;
.clock {
2024-09-19 22:21:34 -04:00
padding-left: 8px;
padding-right: 8px;
}
StIcon:last-child {
margin-right: 3px;
}
}