diff --git a/NEWS b/NEWS index 9654892..33ac37e 100644 --- a/NEWS +++ b/NEWS @@ -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 ====== * Bump version diff --git a/data/gnome-shell-sass/_common.scss b/data/gnome-shell-sass/_common.scss index 5338f28..37ac362 100644 --- a/data/gnome-shell-sass/_common.scss +++ b/data/gnome-shell-sass/_common.scss @@ -48,17 +48,18 @@ padding: 4px 32px; @include button(normal); &:focus { @include button(focus); } + &:hover { @include button(hover); } &:insensitive { @include button(insensitive); } &:active { @include button(active); } - } .modal-dialog-linked-button { border-right-width: 1px; @include button(normal); &:insensitive { @include button(insensitive); } + &:focus { @include button(focus); } + &:hover { @include button(hover); } &:active { @include button(active); } - &:focus { @include button(focus); } padding: 12px; &:first-child { @@ -688,7 +689,6 @@ height: 50px; background-color: $selected_bg_color; color: $selected_fg_color; - //background-image: url("resource:///org/gnome/shell/theme/ws-switch-arrow-up.png"); background-size: 32px; border-radius: 8px; } diff --git a/data/gnome-shell-sass/_drawing.scss b/data/gnome-shell-sass/_drawing.scss index 66d5ada..7ac18b1 100644 --- a/data/gnome-shell-sass/_drawing.scss +++ b/data/gnome-shell-sass/_drawing.scss @@ -150,8 +150,8 @@ // // focused button // - $_bg: if($c!=$osd_bg_color, transparentize($c, 0.5), - $osd_bg_color); + $_bg: if($c!=$osd_bg_color, transparentize($c, 0.3), + lighten($osd_bg_color,3%)); color: $osd_fg_color; text-shadow: 0 1px black; @@ -164,7 +164,7 @@ // active osd button // $_bg: if($c!=$osd_bg_color, transparentize($c, 0.3), - lighten($osd_bg_color,10%)); + lighten($osd_bg_color,3%)); color: white; border-color: $osd_borders_color; @@ -182,7 +182,7 @@ color: white; border-color: $osd_borders_color; - background-color: darken($_bg,5%); + background-color: $selected_bg_color; // This should be none, but it's creating some issues with borders, so to // workaround it for now, use inset wich goes through a different code path. // see https://bugzilla.gnome.org/show_bug.cgi?id=752934 diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js index deb6cc3..a4aa852 100644 --- a/extensions/apps-menu/extension.js +++ b/extensions/apps-menu/extension.js @@ -685,7 +685,10 @@ //Load applications 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); } diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js index 8257eac..b8ab37b 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -898,17 +898,12 @@ else return; - let children = this._windowList.get_children().map(a => a._delegate); - let active = 0; - for (let i = 0; i < children.length; i++) { - if (children[i].active) { - active = i; - break; - } - } - - active = Math.max(0, Math.min(active + diff, children.length-1)); - children[active].activate(); + let children = this._windowList.get_children() + .filter(c => c.visible) + .map(a => a._delegate); + let active = children.findIndex(c => c.active); + let newActive = Math.max(0, Math.min(active + diff, children.length-1)); + children[newActive].activate(); } _updatePosition() { @@ -1023,12 +1018,9 @@ _removeApp(app) { let children = this._windowList.get_children(); - for (let i = 0; i < children.length; i++) { - if (children[i]._delegate.app == app) { - children[i].destroy(); - return; - } - } + let child = children.find(c => c._delegate.app == app); + if (child) + child.destroy(); } _onWindowAdded(ws, win) { @@ -1042,10 +1034,8 @@ return; let children = this._windowList.get_children(); - for (let i = 0; i < children.length; i++) { - if (children[i]._delegate.metaWindow == win) - return; - } + if (children.find(c => c._delegate.metaWindow == win)) + return; let button = new WindowButton(win, this._perMonitor, this._monitor.index); this._windowList.layout_manager.pack(button.actor, @@ -1065,12 +1055,9 @@ return; // not actually removed, just moved to another workspace let children = this._windowList.get_children(); - for (let i = 0; i < children.length; i++) { - if (children[i]._delegate.metaWindow == win) { - children[i].destroy(); - return; - } - } + let child = children.find(c => c._delegate.metaWindow == win); + if (child) + child.destroy(); } _onWorkspacesChanged() { diff --git a/meson.build b/meson.build index ef836e0..6b7654b 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('gnome-shell-extensions', - version: '3.30.0', + version: '3.30.1', meson_version: '>= 0.44.0', license: 'GPL2+' )