[gnome-shell/T27795: 25/138] bottomPanel: Move the top panel to the bottom
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/T27795: 25/138] bottomPanel: Move the top panel to the bottom
- Date: Tue, 1 Oct 2019 23:31:26 +0000 (UTC)
commit c8e6a60c21de4e4dbf671421c7dc90c66371db4e
Author: Mario Sanchez Prada <mario endlessm com>
Date: Mon Jan 29 18:35:15 2018 +0000
bottomPanel: Move the top panel to the bottom
Also, make sure that the necessary adjustments are made as well:
* Update the panel barrier's position.
* Properly set the location of the arrow for popup menus.
* Properly place the ghost panel at the bottom, used to account
for the space of the real panel when showing the window picker.
* Adjust calculations for making the bottom panel transparent/solid.
https://phabricator.endlessm.com/T681
https://phabricator.endlessm.com/T17662
data/theme/gnome-shell-sass/_endless.scss | 9 +++++++++
js/ui/layout.js | 4 +++-
js/ui/overview.js | 15 ++++++++-------
js/ui/panelMenu.js | 2 +-
4 files changed, 21 insertions(+), 9 deletions(-)
---
diff --git a/data/theme/gnome-shell-sass/_endless.scss b/data/theme/gnome-shell-sass/_endless.scss
index fdab2e0d03..61d8bea059 100644
--- a/data/theme/gnome-shell-sass/_endless.scss
+++ b/data/theme/gnome-shell-sass/_endless.scss
@@ -55,3 +55,12 @@
}
}
}
+
+// Bottom panel
+
+.popup-menu {
+ &.panel-menu {
+ -boxpointer-gap: 0px;
+ margin-bottom: 0px;
+ }
+}
diff --git a/js/ui/layout.js b/js/ui/layout.js
index facc814538..e22ceb3248 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -372,7 +372,7 @@ var LayoutManager = GObject.registerClass({
if (!this.primaryMonitor)
return;
- this.panelBox.set_position(this.primaryMonitor.x, this.primaryMonitor.y);
+ this.panelBox.set_position(this.primaryMonitor.x, this.primaryMonitor.y + this.primaryMonitor.height
- this.panelBox.height);
this.panelBox.set_size(this.primaryMonitor.width, -1);
this.keyboardIndex = this.primaryIndex;
@@ -404,6 +404,8 @@ var LayoutManager = GObject.registerClass({
x1: primary.x + primary.width, y1: primary.y,
x2: primary.x + primary.width, y2: primary.y +
this.panelBox.height,
directions: Meta.BarrierDirection.NEGATIVE_X });
+
+ this.panelBox.set_position(this.primaryMonitor.x, this.primaryMonitor.y +
this.primaryMonitor.height - this.panelBox.height);
}
}
diff --git a/js/ui/overview.js b/js/ui/overview.js
index ba76ce6426..97e5d58207 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -216,13 +216,6 @@ var Overview = class {
this._shellInfo = new ShellInfo();
- // Add a clone of the panel to the overview so spacing and such is
- // automatic
- this._panelGhost = new St.Bin({ child: new Clutter.Clone({ source: Main.panel }),
- reactive: false,
- opacity: 0 });
- this._overview.add_actor(this._panelGhost);
-
this._searchEntry = new St.Entry({ style_class: 'search-entry',
/* Translators: this is the text displayed
in the search entry when no search is
@@ -243,6 +236,14 @@ var Overview = class {
// Add our same-line elements after the search entry
this._overview.add(this._controls.actor, { y_fill: true, expand: true });
+ // Add a clone of the panel to the overview so spacing and such is
+ // automatic
+ this._panelGhost = new St.Bin({ child: new Clutter.Clone({ source: Main.panel }),
+ reactive: false,
+ opacity: 0 });
+
+ this._overview.add_actor(this._panelGhost);
+
// TODO - recalculate everything when desktop size changes
this.dashIconSize = this._dash.iconSize;
this._dash.connect('icon-size-changed', () => {
diff --git a/js/ui/panelMenu.js b/js/ui/panelMenu.js
index b8cbd8c052..f797792b68 100644
--- a/js/ui/panelMenu.js
+++ b/js/ui/panelMenu.js
@@ -107,7 +107,7 @@ var Button = GObject.registerClass({
if (dontCreateMenu)
this.menu = new PopupMenu.PopupDummyMenu(this);
else
- this.setMenu(new PopupMenu.PopupMenu(this, menuAlignment, St.Side.TOP, 0));
+ this.setMenu(new PopupMenu.PopupMenu(this, menuAlignment, St.Side.BOTTOM, 0));
}
setSensitive(sensitive) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]