Compare commits

...

5 Commits

Author SHA1 Message Date
Florian Müllner 94eba47358 Bump version to 3.30.1
Update NEWS.
2018-10-08 22:55:05 +02:00
Florian Müllner d34933de0b Update sass submodule 2018-10-08 22:50:52 +02:00
Florian Müllner 9410bdfad6 window-list: Ignore hidden buttons when scrolling
Window lists are per-monitor, so workspaces are implemented by
simply hiding all buttons that correspond to windows/apps on
other workspaces. That means we need to take the visibility
into account when handling scroll-events to switch through the
list, or else we'll end up switching "randomly" between workspaces.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/78
2018-10-06 16:05:46 +00:00
Florian Müllner d424b0f645 window-list: Minor clean-up
Modern javascript has explicit methods for locating the first
element of an array that meets a certain condition, use those
instead of manually looping over the array.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/78
2018-10-06 16:05:46 +00:00
Florian Müllner c0454db0c6 appsMenu: Consider scale-factor in height computation
Actor heights are in physical pixels, while CSS measures are in logical
pixels, so we need to adjust accordingly to prevent the scale factor
from being applied twice.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/102
2018-09-23 17:31:03 +02:00
5 changed files with 29 additions and 30 deletions
+9
View File
@@ -1,3 +1,12 @@
3.30.1
======
* apps-menu: Fix height on HiDPI systems [Florian; #102]
* window-list: Only switch between windows on active workspace when scrolling
[Florian; #78]
Contributors:
Florian Müllner
3.30.0 3.30.0
====== ======
* Bump version * Bump version
+4 -1
View File
@@ -685,7 +685,10 @@ class ApplicationsButton extends PanelMenu.Button {
//Load applications //Load applications
this._displayButtons(this._listApplications(null)); this._displayButtons(this._listApplications(null));
let height = this.categoriesBox.height + MENU_HEIGHT_OFFSET + 'px'; let themeContext = St.ThemeContext.get_for_stage(global.stage);
let scaleFactor = themeContext.scale_factor;
let categoriesHeight = this.categoriesBox.height / scaleFactor;
let height = Math.round(categoriesHeight) + MENU_HEIGHT_OFFSET + 'px';
this.mainBox.style+=('height: ' + height); this.mainBox.style+=('height: ' + height);
} }
+14 -27
View File
@@ -898,17 +898,12 @@ class WindowList {
else else
return; return;
let children = this._windowList.get_children().map(a => a._delegate); let children = this._windowList.get_children()
let active = 0; .filter(c => c.visible)
for (let i = 0; i < children.length; i++) { .map(a => a._delegate);
if (children[i].active) { let active = children.findIndex(c => c.active);
active = i; let newActive = Math.max(0, Math.min(active + diff, children.length-1));
break; children[newActive].activate();
}
}
active = Math.max(0, Math.min(active + diff, children.length-1));
children[active].activate();
} }
_updatePosition() { _updatePosition() {
@@ -1023,12 +1018,9 @@ class WindowList {
_removeApp(app) { _removeApp(app) {
let children = this._windowList.get_children(); let children = this._windowList.get_children();
for (let i = 0; i < children.length; i++) { let child = children.find(c => c._delegate.app == app);
if (children[i]._delegate.app == app) { if (child)
children[i].destroy(); child.destroy();
return;
}
}
} }
_onWindowAdded(ws, win) { _onWindowAdded(ws, win) {
@@ -1042,10 +1034,8 @@ class WindowList {
return; return;
let children = this._windowList.get_children(); let children = this._windowList.get_children();
for (let i = 0; i < children.length; i++) { if (children.find(c => c._delegate.metaWindow == win))
if (children[i]._delegate.metaWindow == win) return;
return;
}
let button = new WindowButton(win, this._perMonitor, this._monitor.index); let button = new WindowButton(win, this._perMonitor, this._monitor.index);
this._windowList.layout_manager.pack(button.actor, this._windowList.layout_manager.pack(button.actor,
@@ -1065,12 +1055,9 @@ class WindowList {
return; // not actually removed, just moved to another workspace return; // not actually removed, just moved to another workspace
let children = this._windowList.get_children(); let children = this._windowList.get_children();
for (let i = 0; i < children.length; i++) { let child = children.find(c => c._delegate.metaWindow == win);
if (children[i]._delegate.metaWindow == win) { if (child)
children[i].destroy(); child.destroy();
return;
}
}
} }
_onWorkspacesChanged() { _onWorkspacesChanged() {
+1 -1
View File
@@ -1,5 +1,5 @@
project('gnome-shell-extensions', project('gnome-shell-extensions',
version: '3.30.0', version: '3.30.1',
meson_version: '>= 0.44.0', meson_version: '>= 0.44.0',
license: 'GPL2+' license: 'GPL2+'
) )