[gnome-shell/wip/fmuellner/solid-panel] panel: Remove panel translucency
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/solid-panel] panel: Remove panel translucency
- Date: Wed, 30 Jan 2019 17:23:21 +0000 (UTC)
commit a56dee68c4d906797f805e93ad841315a99be12f
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Jan 30 17:48:28 2019 +0100
panel: Remove panel translucency
Since commit 447bf55e45b we turn the top bar translucent when
free-floating. While this looks fancy and reduces the appearance
of cutting into the available screen space, it has also had a
negative effect on legibility.
Nobody stepped up to address those issues in two years, so revert
back to the fully opaque top bar.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/408
data/theme/gnome-shell-sass/_common.scss | 50 ++------------------------
js/ui/panel.js | 60 --------------------------------
2 files changed, 3 insertions(+), 107 deletions(-)
---
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
index b7d052bcc..cbf1ceecf 100644
--- a/data/theme/gnome-shell-sass/_common.scss
+++ b/data/theme/gnome-shell-sass/_common.scss
@@ -729,9 +729,7 @@ StScrollBar {
/* TOP BAR */
#panel {
- background-color: rgba(0, 0, 0, 0.35);
- /* transition from solid to transparent */
- transition-duration: 500ms;
+ background-color: black;
font-weight: bold;
height: 1.86em;
font-feature-settings: "tnum";
@@ -748,7 +746,7 @@ StScrollBar {
.panel-corner {
-panel-corner-radius: $panel-corner-radius;
- -panel-corner-background-color: rgba(0, 0, 0, 0.35);
+ -panel-corner-background-color: black;
-panel-corner-border-width: 2px;
-panel-corner-border-color: transparent;
@@ -767,9 +765,7 @@ StScrollBar {
-natural-hpadding: 12px;
-minimum-hpadding: 6px;
font-weight: bold;
- color: #eee;
- text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.9);
- transition-duration: 100ms;
+ color: #ccc;
.app-menu-icon {
-st-icon-style: symbolic;
@@ -778,21 +774,8 @@ StScrollBar {
//dimensions of the icon are hardcoded
}
- .system-status-icon,
- .app-menu-icon > StIcon,
- .popup-menu-arrow {
- icon-shadow: 0px 1px 2px rgba(0, 0, 0, 0.9);
- }
-
&:hover {
color: lighten($fg_color, 10%);
- text-shadow: 0px 1px 6px rgba(0, 0, 0, 1);
-
- .system-status-icon,
- .app-menu-icon > StIcon,
- .popup-menu-arrow {
- icon-shadow: 0px 1px 6px rgba(0, 0, 0, 1);
- }
}
&:active, &:overview, &:focus, &:checked {
@@ -801,8 +784,6 @@ StScrollBar {
background-color: rgba(0, 0, 0, 0.01);
box-shadow: inset 0 -2px 0px lighten($selected_bg_color,5%);
color: lighten($fg_color,10%);
-
- & > .system-status-icon { icon-shadow: black 0 2px 2px; }
}
.system-status-icon { icon-size: 1.09em; padding: 0 5px; }
@@ -827,31 +808,6 @@ StScrollBar {
.screencast-indicator { color: $warning_color; }
.remote-access-indicator { color: $warning_color; }
-
- &.solid {
- background-color: black;
- /* transition from transparent to solid */
- transition-duration: 300ms;
-
- .panel-corner {
- -panel-corner-background-color: black;
- }
-
- .panel-button {
- color: #ccc;
- text-shadow: none;
-
- &:hover, &:active, &:overview, &:focus, &:checked {
- color: lighten($fg_color, 10%);
- }
- }
-
- .system-status-icon,
- .app-menu-icon > StIcon,
- .popup-menu-arrow {
- icon-shadow: none;
- }
- }
}
// calendar popover
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 3e3f4d4d8..a10b6a8cb 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -797,11 +797,9 @@ class Panel extends St.Widget {
Main.overview.connect('showing', () => {
this.add_style_pseudo_class('overview');
- this._updateSolidStyle();
});
Main.overview.connect('hiding', () => {
this.remove_style_pseudo_class('overview');
- this._updateSolidStyle();
});
Main.layoutManager.panelBox.add(this);
@@ -810,31 +808,10 @@ class Panel extends St.Widget {
Main.sessionMode.connect('updated', this._updatePanel.bind(this));
- this._trackedWindows = new Map();
- global.window_group.connect('actor-added', this._onWindowActorAdded.bind(this));
- global.window_group.connect('actor-removed', this._onWindowActorRemoved.bind(this));
- global.window_manager.connect('switch-workspace', this._updateSolidStyle.bind(this));
-
global.display.connect('workareas-changed', () => { this.queue_relayout(); });
this._updatePanel();
}
- _onWindowActorAdded(container, metaWindowActor) {
- let signalIds = [];
- ['allocation-changed', 'notify::visible'].forEach(s => {
- signalIds.push(metaWindowActor.connect(s, this._updateSolidStyle.bind(this)));
- });
- this._trackedWindows.set(metaWindowActor, signalIds);
- }
-
- _onWindowActorRemoved(container, metaWindowActor) {
- this._trackedWindows.get(metaWindowActor).forEach(id => {
- metaWindowActor.disconnect(id);
- });
- this._trackedWindows.delete(metaWindowActor);
- this._updateSolidStyle();
- }
-
vfunc_get_preferred_width(actor, forHeight) {
let primaryMonitor = Main.layoutManager.primaryMonitor;
@@ -1042,8 +1019,6 @@ class Panel extends St.Widget {
else
Main.messageTray.bannerAlignment = Clutter.ActorAlign.CENTER;
- this._updateSolidStyle();
-
if (this._sessionStyle)
this._removeStyleClassName(this._sessionStyle);
@@ -1060,41 +1035,6 @@ class Panel extends St.Widget {
}
}
- _updateSolidStyle() {
- if (this.has_style_pseudo_class('overview') || !Main.sessionMode.hasWindows) {
- this._removeStyleClassName('solid');
- return;
- }
-
- if (!Main.layoutManager.primaryMonitor)
- return;
-
- /* Get all the windows in the active workspace that are in the primary monitor and visible */
- let workspaceManager = global.workspace_manager;
- let activeWorkspace = workspaceManager.get_active_workspace();
- let windows = activeWorkspace.list_windows().filter(metaWindow => {
- return metaWindow.is_on_primary_monitor() &&
- metaWindow.showing_on_its_workspace() &&
- !metaWindow.is_hidden() &&
- metaWindow.get_window_type() != Meta.WindowType.DESKTOP;
- });
-
- /* Check if at least one window is near enough to the panel */
- let [, panelTop] = this.get_transformed_position();
- let panelBottom = panelTop + this.get_height();
- let scale = St.ThemeContext.get_for_stage(global.stage).scale_factor;
- let isNearEnough = windows.some(metaWindow => {
- let verticalPosition = metaWindow.get_frame_rect().y;
- return verticalPosition < panelBottom + 5 * scale;
- });
-
- if (isNearEnough)
- this._addStyleClassName('solid');
- else
- this._removeStyleClassName('solid');
-
- }
-
_hideIndicators() {
for (let role in PANEL_ITEM_IMPLEMENTATIONS) {
let indicator = this.statusArea[role];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]