14 Commits
68.2 ... 70

Author SHA1 Message Date
Artyom Zorin
a40d94c14b Bump to version 70 2025-09-28 00:36:00 +01:00
Artyom Zorin
541f5f20da Bump version to 69.2 2025-09-16 16:06:38 +01:00
Artyom Zorin
250d988473 Bump to version 69.1 2025-09-15 16:45:47 +01:00
Artyom Zorin
41f92619bf Bump to version 69 2025-09-12 14:16:30 +01:00
Artyom Zorin
388febf2fd Bump to version 68.9 2025-09-08 21:42:14 +01:00
Artyom Zorin
dcec9442c2 Bump to version 68.8 2025-09-05 17:47:05 +01:00
Artyom Zorin
89fe8b9f4b Bump to version 68.7 2025-09-04 14:25:37 +01:00
Artyom Zorin
a4f86d41f8 Bump to version 68.5.3 2025-08-07 00:11:11 +01:00
Artyom Zorin
582b8b280b Bump to version 68.5.1 2025-08-05 22:50:54 +01:00
Artyom Zorin
ded853bdc2 Bump to version 68.5 2025-08-04 18:37:22 +01:00
Artyom Zorin
216d932ccc Bump to version 68.4 2025-07-31 20:01:46 +01:00
Artyom Zorin
f6c8dd38ce Bump to version 68.3 2025-07-07 13:00:30 +01:00
Artyom Zorin
34717961b6 Bump to version 68.2.3 2025-07-04 20:38:38 +01:00
Artyom Zorin
770649ff0a Updated metadata 2025-06-06 23:05:40 +01:00
28 changed files with 5707 additions and 2898 deletions

View File

@@ -8,9 +8,12 @@ IMAGES = ./*
TOLOCALIZE = src/extension.js src/prefs.js src/appIcons.js src/taskbar.js TOLOCALIZE = src/extension.js src/prefs.js src/appIcons.js src/taskbar.js
MSGSRC = $(wildcard po/*.po) MSGSRC = $(wildcard po/*.po)
ifeq ($(strip $(DESTDIR)),) ifeq ($(strip $(DESTDIR)),)
INSTALLTYPE = local
INSTALLBASE = $(HOME)/.local/share/gnome-shell/extensions INSTALLBASE = $(HOME)/.local/share/gnome-shell/extensions
else else
INSTALLTYPE = system
INSTALLBASE = $(DESTDIR)/usr/share/gnome-shell/extensions INSTALLBASE = $(DESTDIR)/usr/share/gnome-shell/extensions
SHARE_PREFIX = $(DESTDIR)/usr/share
endif endif
INSTALLNAME = zorin-taskbar@zorinos.com INSTALLNAME = zorin-taskbar@zorinos.com
@@ -65,6 +68,12 @@ install-local: _build
rm -rf $(INSTALLBASE)/$(INSTALLNAME) rm -rf $(INSTALLBASE)/$(INSTALLNAME)
mkdir -p $(INSTALLBASE)/$(INSTALLNAME) mkdir -p $(INSTALLBASE)/$(INSTALLNAME)
cp -r ./_build/* $(INSTALLBASE)/$(INSTALLNAME)/ cp -r ./_build/* $(INSTALLBASE)/$(INSTALLNAME)/
ifeq ($(INSTALLTYPE),system)
rm -r $(INSTALLBASE)/$(INSTALLNAME)/schemas $(INSTALLBASE)/$(INSTALLNAME)/locale
mkdir -p $(SHARE_PREFIX)/glib-2.0/schemas $(SHARE_PREFIX)/locale
cp -r ./schemas/*gschema.* $(SHARE_PREFIX)/glib-2.0/schemas
cp -r ./_build/locale/* $(SHARE_PREFIX)/locale
endif
-rm -fR _build -rm -fR _build
echo done echo done

105
debian/changelog vendored
View File

@@ -1,3 +1,108 @@
gnome-shell-extension-zorin-taskbar (70) noble; urgency=medium
* Rebased on upstream commit 134f6f991126b96738efef303572f1db9bdec9bd
but without commit 114d87149872da003af947315d4da2f0e40d41c9
-- Artyom Zorin <azorin@zoringroup.com> Sat, 27 Sep 2025 23:17:10 +0100
gnome-shell-extension-zorin-taskbar (69.2) noble; urgency=medium
* Adjusted app icon margin
-- Artyom Zorin <azorin@zoringroup.com> Tue, 16 Sep 2025 16:03:52 +0100
gnome-shell-extension-zorin-taskbar (69.1) noble; urgency=medium
* Set prefs window width
-- Artyom Zorin <azorin@zoringroup.com> Mon, 15 Sep 2025 16:44:10 +0100
gnome-shell-extension-zorin-taskbar (69) noble; urgency=medium
* Re-based on upstream version 69
-- Artyom Zorin <azorin@zoringroup.com> Fri, 12 Sep 2025 14:14:35 +0100
gnome-shell-extension-zorin-taskbar (68.9) noble; urgency=medium
* Rebased on upstream commit 44be0a739f26d872f27e81bd57928b6f61920476
and hid panel border settings
-- Artyom Zorin <azorin@zoringroup.com> Mon, 08 Sep 2025 21:39:56 +0100
gnome-shell-extension-zorin-taskbar (68.8) noble; urgency=medium
* Fixed app grid icon styling and rebased on upstream commit
4787d12180462f0c1c90d3f38ece5921e7e31b7a
-- Artyom Zorin <azorin@zoringroup.com> Fri, 05 Sep 2025 17:44:41 +0100
gnome-shell-extension-zorin-taskbar (68.7) noble; urgency=medium
* Adjusted window preview margin and rounding
-- Artyom Zorin <azorin@zoringroup.com> Thu, 04 Sep 2025 14:22:11 +0100
gnome-shell-extension-zorin-taskbar (68.6) noble; urgency=medium
* Introduced keep gnome shell dash option
-- Artyom Zorin <azorin@zoringroup.com> Sat, 23 Aug 2025 15:04:05 +0100
gnome-shell-extension-zorin-taskbar (68.5.3) noble; urgency=medium
* Added workaround for race condition
-- Artyom Zorin <azorin@zoringroup.com> Thu, 07 Aug 2025 00:09:07 +0100
gnome-shell-extension-zorin-taskbar (68.5.2) noble; urgency=medium
* Fixed settings cache issues
-- Artyom Zorin <azorin@zoringroup.com> Wed, 06 Aug 2025 23:45:25 +0100
gnome-shell-extension-zorin-taskbar (68.5.1) noble; urgency=medium
* Minor code cleanups
-- Artyom Zorin <azorin@zoringroup.com> Tue, 05 Aug 2025 22:47:20 +0100
gnome-shell-extension-zorin-taskbar (68.5) noble; urgency=medium
* Rebased on upstream commit 16e16c11ce08abc3c9f0bf922bbc08e17b2c1f08
-- Artyom Zorin <azorin@zoringroup.com> Mon, 04 Aug 2025 13:46:11 +0100
gnome-shell-extension-zorin-taskbar (68.4) noble; urgency=medium
* Applied monitor selection and reset geometry fixes
-- Artyom Zorin <azorin@zoringroup.com> Thu, 31 Jul 2025 19:40:58 +0100
gnome-shell-extension-zorin-taskbar (68.3) noble; urgency=medium
* Removed code to handle overview startup animation
-- Artyom Zorin <azorin@zoringroup.com> Mon, 07 Jul 2025 12:56:41 +0100
gnome-shell-extension-zorin-taskbar (68.2.3) noble; urgency=medium
* Fixed logic error when adjusting panel menu buttons
-- Artyom Zorin <azorin@zoringroup.com> Fri, 04 Jul 2025 20:36:32 +0100
gnome-shell-extension-zorin-taskbar (68.2.2) noble; urgency=medium
* Added settings schema to metadata file
-- Artyom Zorin <azorin@zoringroup.com> Fri, 06 Jun 2025 23:03:34 +0100
gnome-shell-extension-zorin-taskbar (68.2.1) noble; urgency=medium
* Updated debian control file
-- Artyom Zorin <azorin@zoringroup.com> Fri, 23 May 2025 20:05:49 +0100
gnome-shell-extension-zorin-taskbar (68.2) noble; urgency=medium gnome-shell-extension-zorin-taskbar (68.2) noble; urgency=medium
* Corrected code to detect Tiling Shell gap offset * Corrected code to detect Tiling Shell gap offset

2
debian/control vendored
View File

@@ -8,6 +8,6 @@ Rules-Requires-Root: no
Package: gnome-shell-extension-zorin-taskbar Package: gnome-shell-extension-zorin-taskbar
Architecture: all Architecture: all
Depends: ${misc:Depends}, gnome-shell (>= 46), gnome-shell (<< 48~) Depends: ${misc:Depends}, gnome-shell (>= 46), gnome-shell (<< 49~)
Description: Zorin Taskbar extension Description: Zorin Taskbar extension
A taskbar extension for the Zorin OS desktop. A taskbar extension for the Zorin OS desktop.

View File

@@ -3,7 +3,8 @@
"uuid": "zorin-taskbar@zorinos.com", "uuid": "zorin-taskbar@zorinos.com",
"name": "Zorin Taskbar", "name": "Zorin Taskbar",
"description": "A taskbar extension for the Zorin OS desktop.", "description": "A taskbar extension for the Zorin OS desktop.",
"shell-version": [ "46", "47", "48" ], "shell-version": [ "46", "47", "48", "49" ],
"gettext-domain": "zorin-taskbar", "gettext-domain": "zorin-taskbar",
"settings-schema": "org.gnome.shell.extensions.zorin-taskbar",
"version": 68 "version": 68
} }

View File

@@ -2,14 +2,14 @@
# This file is distributed under the same license as the Dash to Panel package. # This file is distributed under the same license as the Dash to Panel package.
# Enrico Bella <enricobe@hotmail.com>, 2018. # Enrico Bella <enricobe@hotmail.com>, 2018.
# Kowalski7cc <kowalski.7cc@gmail.com>, 2020. # Kowalski7cc <kowalski.7cc@gmail.com>, 2020.
# Albano Battistella <albanobattistella@gmail.com>, 2023. # Albano Battistella <albanobattistella@gmail.com>, 2023,2025.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-02-08 08:31-0500\n" "POT-Creation-Date: 2023-02-08 08:31-0500\n"
"PO-Revision-Date: 2023-12-22 20:38+0200\n" "PO-Revision-Date: 2025-09-14 13:38+0200\n"
"Last-Translator: Albano Battistella <albanoattistella@gmail.com>\n" "Last-Translator: Albano Battistella <albanoattistella@gmail.com>\n"
"Language-Team: Italian\n" "Language-Team: Italian\n"
"Language: it\n" "Language: it\n"
@@ -262,9 +262,8 @@ msgid "Windows"
msgstr "Finestre" msgstr "Finestre"
#: appIcons.js:1786 #: appIcons.js:1786
#, fuzzy
msgid "Power options" msgid "Power options"
msgstr "Altre opzioni" msgstr "Opzioni di alimentazione"
#: appIcons.js:1791 #: appIcons.js:1791
msgid "Event logs" msgid "Event logs"

3970
po/ja.po

File diff suppressed because it is too large Load Diff

1160
po/pl.po

File diff suppressed because it is too large Load Diff

View File

@@ -709,7 +709,7 @@ msgstr "p.e. <Super>i"
#: ui/BoxOverlayShortcut.ui.h:14 #: ui/BoxOverlayShortcut.ui.h:14
#, fuzzy #, fuzzy
msgid "Show window previews on hotkey" msgid "Show window previews on hotkey"
msgstr "Mostrar pré-visulização da janela ao pairar" msgstr "Mostrar pré-visualização da janela ao pairar"
#: ui/BoxOverlayShortcut.ui.h:15 #: ui/BoxOverlayShortcut.ui.h:15
msgid "Show previews when the application have multiple instances" msgid "Show previews when the application have multiple instances"
@@ -824,11 +824,11 @@ msgstr "Usar o botão do meio na visualização para fechar a janela "
#: ui/BoxWindowPreviewOptions.ui.h:8 #: ui/BoxWindowPreviewOptions.ui.h:8
msgid "Window previews preferred size (px)" msgid "Window previews preferred size (px)"
msgstr "Tamanho preferido da pré-visulização da janela (px)" msgstr "Tamanho preferido da pré-visualização da janela (px)"
#: ui/BoxWindowPreviewOptions.ui.h:9 #: ui/BoxWindowPreviewOptions.ui.h:9
msgid "Window previews aspect ratio X (width)" msgid "Window previews aspect ratio X (width)"
msgstr "Proporção da pré-visulização da janela no eixto X (comprimento)" msgstr "Proporção da pré-visualização da janela no eixto X (comprimento)"
#: ui/BoxWindowPreviewOptions.ui.h:10 #: ui/BoxWindowPreviewOptions.ui.h:10
msgid "1" msgid "1"
@@ -920,11 +920,11 @@ msgstr "Fixo"
#: ui/BoxWindowPreviewOptions.ui.h:32 #: ui/BoxWindowPreviewOptions.ui.h:32
msgid "Window previews aspect ratio Y (height)" msgid "Window previews aspect ratio Y (height)"
msgstr "Proporção da pré-visulização da janela no eixto Y (altura)" msgstr "Proporção da pré-visualização da janela no eixto Y (altura)"
#: ui/BoxWindowPreviewOptions.ui.h:33 #: ui/BoxWindowPreviewOptions.ui.h:33
msgid "Window previews padding (px)" msgid "Window previews padding (px)"
msgstr "Preenchimento da pré-visulização de janela (px)" msgstr "Preenchimento da pré-visualização de janela (px)"
#: ui/BoxWindowPreviewOptions.ui.h:34 #: ui/BoxWindowPreviewOptions.ui.h:34
msgid "Use custom opacity for the previews background" msgid "Use custom opacity for the previews background"
@@ -1167,12 +1167,12 @@ msgstr ""
#: ui/SettingsBehavior.ui.h:8 #: ui/SettingsBehavior.ui.h:8
msgid "Show window previews on hover" msgid "Show window previews on hover"
msgstr "Mostrar pré-visulização da janela ao pairar" msgstr "Mostrar pré-visualização da janela ao pairar"
#: ui/SettingsBehavior.ui.h:9 #: ui/SettingsBehavior.ui.h:9
#, fuzzy #, fuzzy
msgid "Show tooltip on hover" msgid "Show tooltip on hover"
msgstr "Mostrar pré-visulização da janela ao pairar" msgstr "Mostrar pré-visualização da janela ao pairar"
#: ui/SettingsBehavior.ui.h:10 #: ui/SettingsBehavior.ui.h:10
msgid "Isolate" msgid "Isolate"

781
po/ru.po

File diff suppressed because it is too large Load Diff

1333
po/tr.po

File diff suppressed because it is too large Load Diff

View File

@@ -100,6 +100,11 @@
<summary>Style of the running indicator (unfocused)</summary> <summary>Style of the running indicator (unfocused)</summary>
<description>Style of the running indicator for the icon for applications which are not currently focused</description> <description>Style of the running indicator for the icon for applications which are not currently focused</description>
</key> </key>
<key type="b" name="stockgs-keep-dash">
<default>false</default>
<summary>Keep dash</summary>
<description>Whether to keep the stock gnome-shell dash while in overview</description>
</key>
<key type="b" name="stockgs-keep-top-panel"> <key type="b" name="stockgs-keep-top-panel">
<default>false</default> <default>false</default>
<summary>Keep top panel</summary> <summary>Keep top panel</summary>
@@ -149,6 +154,26 @@
<summary>Modified panel opacity</summary> <summary>Modified panel opacity</summary>
<description>Modified opacity for the panel when a window is near</description> <description>Modified opacity for the panel when a window is near</description>
</key> </key>
<key type="b" name="trans-use-border">
<default>false</default>
<summary>Display border</summary>
<description>Display a border between panel and the rest of the desktop</description>
</key>
<key type="i" name="trans-border-width">
<default>1</default>
<summary>Width of panel border</summary>
<description>Customize the width of the panel border</description>
</key>
<key type="b" name="trans-border-use-custom-color">
<default>false</default>
<summary>Override panel border color</summary>
<description>Replace current panel border color</description>
</key>
<key type="s" name="trans-border-custom-color">
<default>"rgba(200,200,200,0.2)"</default>
<summary>Custom panel border color</summary>
<description>Custom panel border color</description>
</key>
<key type="b" name="intellihide"> <key type="b" name="intellihide">
<default>false</default> <default>false</default>
<summary>Intellihide</summary> <summary>Intellihide</summary>
@@ -156,18 +181,39 @@
</key> </key>
<key type="b" name="intellihide-hide-from-windows"> <key type="b" name="intellihide-hide-from-windows">
<default>true</default> <default>true</default>
<summary>Only hide from windows</summary> <summary>Only hide from overlapping windows</summary>
<description>Dictates if the dash should only hide when in conflict with windows</description> <description>Dictates if the dash should only hide when in conflict with windows</description>
</key> </key>
<key type="b" name="intellihide-hide-from-monitor-windows">
<default>false</default>
<summary>Only hide from windows on monitor</summary>
</key>
<key name="intellihide-behaviour" enum="org.gnome.shell.extensions.zorin-taskbar.proximityBehavior"> <key name="intellihide-behaviour" enum="org.gnome.shell.extensions.zorin-taskbar.proximityBehavior">
<default>'FOCUSED_WINDOWS'</default> <default>'FOCUSED_WINDOWS'</default>
<summary>Intellihide behaviour</summary> <summary>Intellihide behaviour</summary>
<description>Dictates how to intelligently hide the panel</description> <description>Dictates how to intelligently hide the panel</description>
</key> </key>
<key type="b" name="intellihide-use-pointer">
<default>true</default>
<summary>Intellihide mouse pointer</summary>
<description>The mouse pointer next to the edge of the screen reveals the panel</description>
</key>
<key type="b" name="intellihide-use-pointer-limit-size">
<default>false</default>
<summary>Limit to panel length</summary>
</key>
<key type="b" name="intellihide-revealed-hover">
<default>true</default>
<summary>Panel stays revealed when hovered</summary>
</key>
<key type="b" name="intellihide-revealed-hover-limit-size">
<default>false</default>
<summary>Limit to panel length</summary>
</key>
<key type="b" name="intellihide-use-pressure"> <key type="b" name="intellihide-use-pressure">
<default>false</default> <default>false</default>
<summary>Intellihide pressure</summary> <summary>Intellihide pressure</summary>
<description>To reveal the panel, pressure needs to be applied to the edege of the screen</description> <description>To reveal the panel, pressure needs to be applied to the edge of the screen</description>
</key> </key>
<key type="b" name="intellihide-show-in-fullscreen"> <key type="b" name="intellihide-show-in-fullscreen">
<default>false</default> <default>false</default>

View File

@@ -168,7 +168,7 @@ export const TaskbarAppIcon = GObject.registerClass(
}) })
this._dtpIconContainer = new St.Widget({ this._dtpIconContainer = new St.Widget({
layout_manager: new Clutter.BinLayout(), layout_manager: new Clutter.BinLayout(),
style: getIconContainerStyle(panel.checkIfVertical()), style: getIconContainerStyle(panel.geom.vertical),
}) })
this.remove_child(this._iconContainer) this.remove_child(this._iconContainer)
@@ -199,7 +199,7 @@ export const TaskbarAppIcon = GObject.registerClass(
this._container.add_child(this._dotsContainer) this._container.add_child(this._dotsContainer)
this.set_child(this._container) this.set_child(this._container)
if (panel.checkIfVertical()) { if (panel.geom.vertical) {
this.set_width(panel.geom.innerSize) this.set_width(panel.geom.innerSize)
} }
@@ -365,6 +365,11 @@ export const TaskbarAppIcon = GObject.registerClass(
_onDestroy() { _onDestroy() {
super._onDestroy() super._onDestroy()
if (this._updateIconIdleId) {
GLib.source_remove(this._updateIconIdleId)
this._updateIconIdleId = 0
}
this._timeoutsHandler.destroy() this._timeoutsHandler.destroy()
this._signalsHandler.destroy() this._signalsHandler.destroy()
@@ -395,18 +400,25 @@ export const TaskbarAppIcon = GObject.registerClass(
// and position are random values, which might exceeds the integer range // and position are random values, which might exceeds the integer range
// resulting in an error when assigned to the a rect. This is a more like // resulting in an error when assigned to the a rect. This is a more like
// a workaround to prevent flooding the system with errors. // a workaround to prevent flooding the system with errors.
if (this.get_stage() == null) return if (this.get_stage() == null || this._updateIconIdleId) return
let rect = new Mtk.Rectangle() this._updateIconIdleId = GLib.idle_add(GLib.PRIORITY_LOW, () => {
let rect = new Mtk.Rectangle()
;[rect.x, rect.y] = this.get_transformed_position() ;[rect.x, rect.y] = this.get_transformed_position()
;[rect.width, rect.height] = this.get_transformed_size() ;[rect.width, rect.height] = this.get_transformed_size()
let windows = this.window let windows = this.window
? [this.window] ? [this.window]
: this.getAppIconInterestingWindows(true) : this.getAppIconInterestingWindows(true)
windows.forEach(function (w) {
w.set_icon_geometry(rect) windows.forEach(function (w) {
w.set_icon_geometry(rect)
})
this._updateIconIdleId = 0
return GLib.SOURCE_REMOVE
}) })
} }
@@ -561,7 +573,7 @@ export const TaskbarAppIcon = GObject.registerClass(
SETTINGS.get_int('group-apps-label-max-width') * scaleFactor SETTINGS.get_int('group-apps-label-max-width') * scaleFactor
let variableWidth = let variableWidth =
!useFixedWidth || !useFixedWidth ||
this.dtpPanel.checkIfVertical() || this.dtpPanel.geom.vertical ||
this.dtpPanel.taskbar.fullScrollView this.dtpPanel.taskbar.fullScrollView
this._windowTitle[maxLabelWidth > 0 ? 'show' : 'hide']() this._windowTitle[maxLabelWidth > 0 ? 'show' : 'hide']()
@@ -621,7 +633,7 @@ export const TaskbarAppIcon = GObject.registerClass(
_setAppIconPadding() { _setAppIconPadding() {
const padding = getIconPadding(this.dtpPanel) const padding = getIconPadding(this.dtpPanel)
const margin = Taskbar.APPICON_MARGIN const margin = Taskbar.APPICON_MARGIN
let vertical = this.dtpPanel.checkIfVertical() let vertical = this.dtpPanel.geom.vertical
this.set_style( this.set_style(
`padding: ${vertical ? margin : 0}px ${vertical ? 0 : margin}px;`, `padding: ${vertical ? margin : 0}px ${vertical ? 0 : margin}px;`,
@@ -655,7 +667,7 @@ export const TaskbarAppIcon = GObject.registerClass(
Main.uiGroup.add_child(this._menu.actor) Main.uiGroup.add_child(this._menu.actor)
this._menuManager.addMenu(this._menu) this._menuManager.addMenu(this._menu)
} }
this._menu.updateQuitText() this._menu.updateQuitItems()
this.emit('menu-state-changed', true) this.emit('menu-state-changed', true)
@@ -1599,7 +1611,6 @@ export function getInterestingWindows(app, monitor, isolateMonitors) {
if ( if (
monitor && monitor &&
SETTINGS.get_boolean('multi-monitors') &&
(isolateMonitors || SETTINGS.get_boolean('isolate-monitors')) (isolateMonitors || SETTINGS.get_boolean('isolate-monitors'))
) { ) {
windows = windows.filter(function (w) { windows = windows.filter(function (w) {
@@ -1647,36 +1658,44 @@ export class TaskbarSecondaryMenu extends AppMenu.AppMenu {
this._enableFavorites = true this._enableFavorites = true
this._showSingleWindows = true this._showSingleWindows = true
if (source.window)
this._quitAllItem = this.addAction('QuitAll', () =>
this._quitFromTaskbar(true),
)
// replace quit item // replace quit item
delete this._quitItem delete this._quitItem
this._quitItem = this.addAction(_('Quit'), () => this._quitFromTaskbar()) this._quitItem = this.addAction(_('Quit'), () => this._quitFromTaskbar())
} }
updateQuitText() { updateQuitItems() {
let count = this.sourceActor.window let ungrouped = !!this.sourceActor.window
? 1 let quitText = _('Quit')
: getInterestingWindows(this._app, this.sourceActor.dtpPanel.monitor) let count = getInterestingWindows(
.length this._app,
this.sourceActor.dtpPanel.monitor,
).length
let quitMultipleText = ngettext(
'Quit %d Window',
'Quit %d Windows',
count,
).format(count)
if (count > 0) { if (ungrouped) {
let quitFromTaskbarMenuText = '' this._quitAllItem.label.set_text(quitMultipleText)
if (count == 1) quitFromTaskbarMenuText = _('Quit') this._quitAllItem.visible = count > 1
else } else quitText = quitMultipleText
quitFromTaskbarMenuText = ngettext(
'Quit %d Window',
'Quit %d Windows',
count,
).format(count)
this._quitItem.label.set_text(quitFromTaskbarMenuText) this._quitItem.visible = count > 0
} this._quitItem.label.set_text(quitText)
} }
_quitFromTaskbar() { _quitFromTaskbar(all) {
let time = global.get_current_time() let time = global.get_current_time()
let windows = this.sourceActor.window // ungrouped applications let windows =
? [this.sourceActor.window] !all && this.sourceActor.window // ungrouped applications
: getInterestingWindows(this._app, this.sourceActor.dtpPanel.monitor) ? [this.sourceActor.window]
: getInterestingWindows(this._app, this.sourceActor.dtpPanel.monitor)
if (windows.length == this._app.get_windows().length) if (windows.length == this._app.get_windows().length)
this._app.request_quit() this._app.request_quit()
@@ -1708,7 +1727,7 @@ export function ItemShowLabel() {
let labelWidth = this.label.get_width() let labelWidth = this.label.get_width()
let labelHeight = this.label.get_height() let labelHeight = this.label.get_height()
let position = this._dtpPanel.getPosition() let position = this._dtpPanel.geom.position
let labelOffset = node.get_length('-x-offset') let labelOffset = node.get_length('-x-offset')
let xOffset = Math.floor((itemWidth - labelWidth) / 2) let xOffset = Math.floor((itemWidth - labelWidth) / 2)
@@ -1909,7 +1928,7 @@ export const ShowAppsIconWrapper = class extends EventEmitter {
*/ */
export const MyShowAppsIconMenu = class extends PopupMenu.PopupMenu { export const MyShowAppsIconMenu = class extends PopupMenu.PopupMenu {
constructor(actor, dtpPanel) { constructor(actor, dtpPanel) {
super(actor, 0, dtpPanel.getPosition()) super(actor, 0, dtpPanel.geom.position)
this._dtpPanel = dtpPanel this._dtpPanel = dtpPanel

View File

@@ -36,7 +36,6 @@ const ZORIN_DASH_UUID = 'zorin-dash@zorinos.com'
export const ZORIN_TILING_SHELL_UUID = 'zorin-tiling-shell@zorinos.com' export const ZORIN_TILING_SHELL_UUID = 'zorin-tiling-shell@zorinos.com'
let panelManager let panelManager
let startupCompleteHandler
let zorinDashDelayId = 0 let zorinDashDelayId = 0
export let DTP_EXTENSION = null export let DTP_EXTENSION = null
@@ -54,13 +53,17 @@ export default class ZorinTaskbarExtension extends Extension {
constructor(metadata) { constructor(metadata) {
super(metadata) super(metadata)
this._realHasOverview = Main.sessionMode.hasOverview
//create an object that persists until gnome-shell is restarted, even if the extension is disabled //create an object that persists until gnome-shell is restarted, even if the extension is disabled
PERSISTENTSTORAGE = {} PERSISTENTSTORAGE = {}
} }
async enable() { async enable() {
// Workaround for race condition in GNOME Shell where enable() may be called multiple times
if (this._alreadyEnabled) {
return
}
this._alreadyEnabled = true
DTP_EXTENSION = this DTP_EXTENSION = this
SETTINGS = this.getSettings('org.gnome.shell.extensions.zorin-taskbar') SETTINGS = this.getSettings('org.gnome.shell.extensions.zorin-taskbar')
try { try {
@@ -94,16 +97,6 @@ export default class ZorinTaskbarExtension extends Extension {
// To remove later, try to map settings using monitor indexes to monitor ids // To remove later, try to map settings using monitor indexes to monitor ids
PanelSettings.adjustMonitorSettings(SETTINGS) PanelSettings.adjustMonitorSettings(SETTINGS)
Main.layoutManager.startInOverview = false
if (Main.layoutManager._startingUp) {
Main.sessionMode.hasOverview = false
startupCompleteHandler = Main.layoutManager.connect(
'startup-complete',
() => (Main.sessionMode.hasOverview = this._realHasOverview),
)
}
this.enableGlobalStyles() this.enableGlobalStyles()
let completeEnable = () => { let completeEnable = () => {
@@ -134,15 +127,20 @@ export default class ZorinTaskbarExtension extends Extension {
disable() { disable() {
if (zorinDashDelayId) GLib.Source.remove(zorinDashDelayId) if (zorinDashDelayId) GLib.Source.remove(zorinDashDelayId)
zorinDashDelayId = 0
panelManager.disable() panelManager?.disable()
PanelSettings.clearCache()
DTP_EXTENSION = null DTP_EXTENSION = null
SETTINGS = null SETTINGS = null
TILINGSETTINGS = null
SHELLSETTINGS = null SHELLSETTINGS = null
DESKTOPSETTINGS = null DESKTOPSETTINGS = null
TERMINALSETTINGS = null TERMINALSETTINGS = null
NOTIFICATIONSSETTINGS = null
panelManager = null panelManager = null
tracker = null
delete global.zorinTaskbar delete global.zorinTaskbar
@@ -150,12 +148,7 @@ export default class ZorinTaskbarExtension extends Extension {
AppIcons.resetRecentlyClickedApp() AppIcons.resetRecentlyClickedApp()
if (startupCompleteHandler) { this._alreadyEnabled = false
Main.layoutManager.disconnect(startupCompleteHandler)
startupCompleteHandler = null
}
Main.sessionMode.hasOverview = this._realHasOverview
} }
resetGlobalStyles() { resetGlobalStyles() {

View File

@@ -20,10 +20,10 @@
import Clutter from 'gi://Clutter' import Clutter from 'gi://Clutter'
import Meta from 'gi://Meta' import Meta from 'gi://Meta'
import Mtk from 'gi://Mtk'
import Shell from 'gi://Shell' import Shell from 'gi://Shell'
import St from 'gi://St' import St from 'gi://St'
import * as GrabHelper from 'resource:///org/gnome/shell/ui/grabHelper.js'
import * as Layout from 'resource:///org/gnome/shell/ui/layout.js' import * as Layout from 'resource:///org/gnome/shell/ui/layout.js'
import * as Main from 'resource:///org/gnome/shell/ui/main.js' import * as Main from 'resource:///org/gnome/shell/ui/main.js'
import * as OverviewControls from 'resource:///org/gnome/shell/ui/overviewControls.js' import * as OverviewControls from 'resource:///org/gnome/shell/ui/overviewControls.js'
@@ -37,6 +37,7 @@ const INTELLIHIDE_PRESSURE_THRESHOLD = 100
const INTELLIHIDE_PRESSURE_TIME = 1000 const INTELLIHIDE_PRESSURE_TIME = 1000
const INTELLIHIDE_ANIMATION_TIME = 200 const INTELLIHIDE_ANIMATION_TIME = 200
const INTELLIHIDE_CLOSE_DELAY = 400 const INTELLIHIDE_CLOSE_DELAY = 400
const INTELLIHIDE_REVEAL_DELAY = 0
const INTELLIHIDE_ENABLE_START_DELAY = 2000 const INTELLIHIDE_ENABLE_START_DELAY = 2000
//timeout intervals //timeout intervals
@@ -90,10 +91,11 @@ export const Intellihide = class {
this._monitor = this._dtpPanel.monitor this._monitor = this._dtpPanel.monitor
this._animationDestination = -1 this._animationDestination = -1
this._pendingUpdate = false this._pendingUpdate = false
this._hover = false
this._hoveredOut = false this._hoveredOut = false
this._windowOverlap = false this._windowOverlap = false
this._translationProp = this._translationProp =
'translation_' + (this._dtpPanel.checkIfVertical() ? 'x' : 'y') 'translation_' + (this._dtpPanel.geom.vertical ? 'x' : 'y')
this._panelBox.translation_y = 0 this._panelBox.translation_y = 0
this._panelBox.translation_x = 0 this._panelBox.translation_x = 0
@@ -101,9 +103,18 @@ export const Intellihide = class {
this._setTrackPanel(true) this._setTrackPanel(true)
this._bindGeneralSignals() this._bindGeneralSignals()
if (SETTINGS.get_boolean('intellihide-hide-from-windows')) { if (this._hidesFromWindows()) {
let watched = SETTINGS.get_boolean('intellihide-hide-from-windows')
? this._panelBox.get_parent()
: new Mtk.Rectangle({
x: this._monitor.x,
y: this._monitor.y,
width: this._monitor.width,
height: this._monitor.height,
})
this._proximityWatchId = this._proximityManager.createWatch( this._proximityWatchId = this._proximityManager.createWatch(
this._panelBox.get_parent(), watched,
this._dtpPanel.monitor.index, this._dtpPanel.monitor.index,
Proximity.Mode[SETTINGS.get_string('intellihide-behaviour')], Proximity.Mode[SETTINGS.get_string('intellihide-behaviour')],
0, 0,
@@ -115,7 +126,8 @@ export const Intellihide = class {
) )
} }
this._setRevealMechanism() if (SETTINGS.get_boolean('intellihide-use-pointer'))
this._setRevealMechanism()
let lastState = SETTINGS.get_int('intellihide-persisted-state') let lastState = SETTINGS.get_int('intellihide-persisted-state')
@@ -140,19 +152,19 @@ export const Intellihide = class {
disable(reset) { disable(reset) {
this.enabled = false this.enabled = false
this._hover = false
if (this._proximityWatchId) { if (this._proximityWatchId) {
this._proximityManager.removeWatch(this._proximityWatchId) this._proximityManager.removeWatch(this._proximityWatchId)
} }
this._setTrackPanel(false) this._setTrackPanel(false)
this._signalsHandler.destroy()
this._timeoutsHandler.destroy()
this._removeRevealMechanism() this._removeRevealMechanism()
this._revealPanel(!reset) this._revealPanel(!reset)
this._signalsHandler.destroy()
this._timeoutsHandler.destroy()
} }
destroy() { destroy() {
@@ -170,7 +182,7 @@ export const Intellihide = class {
) )
} }
revealAndHold(holdStatus) { revealAndHold(holdStatus, immediate) {
if ( if (
!this.enabled || !this.enabled ||
(holdStatus == Hold.NOTIFY && (holdStatus == Hold.NOTIFY &&
@@ -179,7 +191,7 @@ export const Intellihide = class {
) )
return return
if (!this._holdStatus) this._revealPanel() if (!this._holdStatus) this._revealPanel(immediate)
this._holdStatus |= holdStatus this._holdStatus |= holdStatus
@@ -202,6 +214,13 @@ export const Intellihide = class {
this.enable() this.enable()
} }
_hidesFromWindows() {
return (
SETTINGS.get_boolean('intellihide-hide-from-windows') ||
SETTINGS.get_boolean('intellihide-hide-from-monitor-windows')
)
}
_changeEnabledStatus() { _changeEnabledStatus() {
let intellihide = SETTINGS.get_boolean('intellihide') let intellihide = SETTINGS.get_boolean('intellihide')
let onlySecondary = SETTINGS.get_boolean('intellihide-only-secondary') let onlySecondary = SETTINGS.get_boolean('intellihide-only-secondary')
@@ -225,21 +244,19 @@ export const Intellihide = class {
[ [
this._dtpPanel.taskbar, this._dtpPanel.taskbar,
['menu-closed', 'end-drag'], ['menu-closed', 'end-drag'],
() => { () => this._queueUpdatePanelPosition(),
this._panelBox.sync_hover()
this._onHoverChanged()
},
], ],
[ [
SETTINGS, SETTINGS,
[ [
'changed::intellihide-use-pointer',
'changed::intellihide-use-pressure', 'changed::intellihide-use-pressure',
'changed::intellihide-hide-from-windows', 'changed::intellihide-hide-from-windows',
'changed::intellihide-behaviour', 'changed::intellihide-hide-from-monitor-windows',
'changed::intellihide-behaviour'
], ],
() => this.reset(), () => this.reset(),
], ],
[this._panelBox, 'notify::hover', () => this._onHoverChanged()],
[ [
this._dtpPanel.taskbar.previewMenu, this._dtpPanel.taskbar.previewMenu,
'open-state-changed', 'open-state-changed',
@@ -261,22 +278,12 @@ export const Intellihide = class {
} }
} }
_onHoverChanged() {
this._hoveredOut = !this._panelBox.hover
this._queueUpdatePanelPosition()
}
_setTrackPanel(enable) { _setTrackPanel(enable) {
let actorData = Utils.getTrackedActorData(this._panelBox) let actorData = Utils.getTrackedActorData(this._panelBox)
actorData.affectsStruts = !enable actorData.affectsStruts = !enable
actorData.trackFullscreen = !enable actorData.trackFullscreen = !enable
Main.layoutManager.panelBox.reactive = enable
Main.layoutManager.panelBox.track_hover = enable
this._panelBox.track_hover = enable
this._panelBox.reactive = enable
this._panelBox.visible = enable ? enable : this._panelBox.visible this._panelBox.visible = enable ? enable : this._panelBox.visible
Main.layoutManager._queueUpdateRegions() Main.layoutManager._queueUpdateRegions()
@@ -299,19 +306,26 @@ export const Intellihide = class {
this._signalsHandler.add([ this._signalsHandler.add([
this._pressureBarrier, this._pressureBarrier,
'trigger', 'trigger',
() => this._queueUpdatePanelPosition(true), () => {
let [x, y] = global.get_pointer()
if (this._pointerIn(x, y, 1, 'intellihide-use-pointer-limit-size'))
this._queueUpdatePanelPosition(true)
else this._pressureBarrier._isTriggered = false
},
]) ])
} else {
this._pointerWatch = PointerWatcher.getPointerWatcher().addWatch(
CHECK_POINTER_MS,
(x, y) => this._checkMousePointer(x, y),
)
} }
this._pointerWatch = PointerWatcher.getPointerWatcher().addWatch(
CHECK_POINTER_MS,
(x, y) => this._checkMousePointer(x, y),
)
} }
_removeRevealMechanism() { _removeRevealMechanism() {
if (this._pointerWatch) { if (this._pointerWatch) {
PointerWatcher.getPointerWatcher()._removeWatch(this._pointerWatch) PointerWatcher.getPointerWatcher()._removeWatch(this._pointerWatch)
this._pointerWatch = 0
} }
if (this._pressureBarrier) { if (this._pressureBarrier) {
@@ -326,7 +340,7 @@ export const Intellihide = class {
let position = this._dtpPanel.geom.position let position = this._dtpPanel.geom.position
let opts = { backend: global.backend } let opts = { backend: global.backend }
if (this._dtpPanel.checkIfVertical()) { if (this._dtpPanel.geom.vertical) {
opts.y1 = this._monitor.y opts.y1 = this._monitor.y
opts.y2 = this._monitor.y + this._monitor.height opts.y2 = this._monitor.y + this._monitor.height
opts.x1 = opts.x2 = this._monitor.x opts.x1 = opts.x2 = this._monitor.x
@@ -352,26 +366,77 @@ export const Intellihide = class {
} }
_checkMousePointer(x, y) { _checkMousePointer(x, y) {
let position = this._dtpPanel.geom.position
if ( if (
!this._panelBox.hover && !this._pressureBarrier &&
!this._hover &&
!Main.overview.visible && !Main.overview.visible &&
((position == St.Side.TOP && y <= this._monitor.y + 1) || this._pointerIn(x, y, 1, 'intellihide-use-pointer-limit-size')
(position == St.Side.BOTTOM &&
y >= this._monitor.y + this._monitor.height - 1) ||
(position == St.Side.LEFT && x <= this._monitor.x + 1) ||
(position == St.Side.RIGHT &&
x >= this._monitor.x + this._monitor.width - 1)) &&
x >= this._monitor.x &&
x < this._monitor.x + this._monitor.width &&
y >= this._monitor.y &&
y < this._monitor.y + this._monitor.height
) { ) {
this._hover = true
this._queueUpdatePanelPosition(true) this._queueUpdatePanelPosition(true)
} else if (this._panelBox.visible) {
let keepRevealedOnHover = SETTINGS.get_boolean(
'intellihide-revealed-hover',
)
let fixedOffset = keepRevealedOnHover
? this._dtpPanel.geom.outerSize + this._dtpPanel.geom.topOffset
: 1
let hover = this._pointerIn(
x,
y,
fixedOffset,
'intellihide-revealed-hover-limit-size',
)
if (hover == this._hover) return
this._hoveredOut = !hover
this._hover = hover
this._queueUpdatePanelPosition()
} }
} }
_pointerIn(x, y, fixedOffset, limitSizeSetting) {
let geom = this._dtpPanel.geom
let position = geom.position
let varCoordX1 = this._monitor.x
let varCoordY1 = this._monitor.y + geom.gsTopPanelHeight // if vertical, ignore the original GS panel if present
let varOffset = {}
if (geom.dockMode && SETTINGS.get_boolean(limitSizeSetting)) {
let alloc = this._dtpPanel.allocation
if (!geom.dynamic) {
// when fixed, use the panel clipcontainer which is positioned
// relative to the stage itself
varCoordX1 = geom.x
varCoordY1 = geom.y
varOffset[this._dtpPanel.varCoord.c2] =
alloc[this._dtpPanel.varCoord.c2] - alloc[this._dtpPanel.varCoord.c1]
} else {
// when dynamic, the panel clipcontainer spans the whole monitor edge
// and the panel is positioned relatively to the clipcontainer
varOffset[this._dtpPanel.varCoord.c1] =
alloc[this._dtpPanel.varCoord.c1]
varOffset[this._dtpPanel.varCoord.c2] =
alloc[this._dtpPanel.varCoord.c2]
}
}
return (
((position == St.Side.TOP && y <= this._monitor.y + fixedOffset) ||
(position == St.Side.BOTTOM &&
y >= this._monitor.y + this._monitor.height - fixedOffset) ||
(position == St.Side.LEFT && x <= this._monitor.x + fixedOffset) ||
(position == St.Side.RIGHT &&
x >= this._monitor.x + this._monitor.width - fixedOffset)) &&
x >= varCoordX1 + (varOffset.x1 || 0) &&
x < varCoordX1 + (varOffset.x2 || this._monitor.width) &&
y >= varCoordY1 + (varOffset.y1 || 0) &&
y < varCoordY1 + (varOffset.y2 || this._monitor.height)
)
}
_queueUpdatePanelPosition(fromRevealMechanism) { _queueUpdatePanelPosition(fromRevealMechanism) {
if ( if (
!fromRevealMechanism && !fromRevealMechanism &&
@@ -405,7 +470,7 @@ export const Intellihide = class {
Main.overview.visibleTarget || Main.overview.visibleTarget ||
this._dtpPanel.taskbar.previewMenu.opened || this._dtpPanel.taskbar.previewMenu.opened ||
this._dtpPanel.taskbar._dragMonitor || this._dtpPanel.taskbar._dragMonitor ||
this._panelBox.get_hover() || this._hover ||
(this._dtpPanel.geom.position == St.Side.TOP && (this._dtpPanel.geom.position == St.Side.TOP &&
Main.layoutManager.panelBox.get_hover()) || Main.layoutManager.panelBox.get_hover()) ||
this._checkIfGrab() this._checkIfGrab()
@@ -425,34 +490,23 @@ export const Intellihide = class {
return !mouseBtnIsPressed return !mouseBtnIsPressed
} }
if (!SETTINGS.get_boolean('intellihide-hide-from-windows')) { if (!this._hidesFromWindows()) {
return this._panelBox.hover return this._hover
} }
return !this._windowOverlap return !this._windowOverlap
} }
_checkIfGrab() { _checkIfGrab() {
let isGrab let grabActor = global.stage.get_grab_actor()
let sourceActor = grabActor?._sourceActor || grabActor
if (GrabHelper._grabHelperStack) let isGrab =
// gnome-shell < 42 sourceActor &&
isGrab = GrabHelper._grabHelperStack.some( (sourceActor == Main.layoutManager.dummyCursor ||
(gh) => gh._owner == this._dtpPanel.panel, this._dtpPanel.statusArea.quickSettings?.menu.actor.contains(
) sourceActor,
else if (global.stage.get_grab_actor) { ) ||
// gnome-shell >= 42 this._dtpPanel.panel.contains(sourceActor))
let grabActor = global.stage.get_grab_actor()
let sourceActor = grabActor?._sourceActor || grabActor
isGrab =
sourceActor &&
(sourceActor == Main.layoutManager.dummyCursor ||
this._dtpPanel.statusArea.quickSettings?.menu.actor.contains(
sourceActor,
) ||
this._dtpPanel.panel.contains(sourceActor))
}
if (isGrab) if (isGrab)
//there currently is a grab on a child of the panel, check again soon to catch its release //there currently is a grab on a child of the panel, check again soon to catch its release
@@ -471,52 +525,62 @@ export const Intellihide = class {
this._dtpPanel.taskbar._shownInitially = false this._dtpPanel.taskbar._shownInitially = false
} }
this._animatePanel(0, immediate) this._animatePanel(
0,
immediate,
() => (this._dtpPanel.taskbar._shownInitially = true),
)
} }
_hidePanel(immediate) { _hidePanel(immediate) {
let position = this._dtpPanel.geom.position let position = this._dtpPanel.geom.position
let size = let size = this._panelBox[this._dtpPanel.geom.vertical ? 'width' : 'height']
this._panelBox[
position == St.Side.LEFT || position == St.Side.RIGHT
? 'width'
: 'height'
]
let coefficient = let coefficient =
position == St.Side.TOP || position == St.Side.LEFT ? -1 : 1 position == St.Side.TOP || position == St.Side.LEFT ? -1 : 1
this._animatePanel(size * coefficient, immediate) this._animatePanel(size * coefficient, immediate)
} }
_animatePanel(destination, immediate) { _animatePanel(destination, immediate, onComplete) {
if (destination === this._animationDestination) return if (destination === this._animationDestination) return
Utils.stopAnimations(this._panelBox) Utils.stopAnimations(this._panelBox)
this._animationDestination = destination this._animationDestination = destination
let update = () =>
this._timeoutsHandler.add([
T3,
POST_ANIMATE_MS,
() => {
Main.layoutManager._queueUpdateRegions()
this._queueUpdatePanelPosition()
},
])
if (immediate) { if (immediate) {
this._panelBox[this._translationProp] = destination this._panelBox[this._translationProp] = destination
this._panelBox.visible = !destination this._panelBox.visible = !destination
update()
} else if (destination !== this._panelBox[this._translationProp]) { } else if (destination !== this._panelBox[this._translationProp]) {
let delay = 0
if (destination != 0 && this._hoveredOut)
delay = INTELLIHIDE_CLOSE_DELAY * 0.001
else if (destination == 0)
delay = INTELLIHIDE_REVEAL_DELAY * 0.001
let tweenOpts = { let tweenOpts = {
//when entering/leaving the overview, use its animation time instead of the one from the settings //when entering/leaving the overview, use its animation time instead of the one from the settings
time: Main.overview.visible time: Main.overview.visible
? SIDE_CONTROLS_ANIMATION_TIME ? SIDE_CONTROLS_ANIMATION_TIME
: INTELLIHIDE_ANIMATION_TIME * 0.001, : INTELLIHIDE_ANIMATION_TIME * 0.001,
//only delay the animation when hiding the panel after the user hovered out //only delay the animation when hiding the panel after the user hovered out
delay: delay,
destination != 0 && this._hoveredOut
? INTELLIHIDE_CLOSE_DELAY * 0.001
: 0,
transition: 'easeOutQuad', transition: 'easeOutQuad',
onComplete: () => { onComplete: () => {
this._panelBox.visible = !destination this._panelBox.visible = !destination
Main.layoutManager._queueUpdateRegions() onComplete ? onComplete() : null
this._timeoutsHandler.add([ update()
T3,
POST_ANIMATE_MS,
() => this._queueUpdatePanelPosition(),
])
}, },
} }

View File

@@ -71,7 +71,7 @@ export const Overview = class {
this._signalsHandler.add([ this._signalsHandler.add([
SETTINGS, SETTINGS,
['changed::panel-sizes'], ['changed::stockgs-keep-dash', 'changed::panel-sizes'],
() => this.toggleDash(), () => this.toggleDash(),
]) ])
} }
@@ -91,7 +91,7 @@ export const Overview = class {
toggleDash(visible) { toggleDash(visible) {
if (visible === undefined) { if (visible === undefined) {
visible = false visible = SETTINGS.get_boolean('stockgs-keep-dash')
} }
let visibilityFunc = visible ? 'show' : 'hide' let visibilityFunc = visible ? 'show' : 'hide'
@@ -121,7 +121,7 @@ export const Overview = class {
let { transitioning, finalState, progress } = let { transitioning, finalState, progress } =
overviewControls._stateAdjustment.getStateTransitionParams() overviewControls._stateAdjustment.getStateTransitionParams()
let size = let size =
focusedPanel.geom[focusedPanel.checkIfVertical() ? 'w' : 'h'] * focusedPanel.geom[focusedPanel.geom.vertical ? 'w' : 'h'] *
(transitioning (transitioning
? Math.abs((finalState != 0 ? 0 : 1) - progress) ? Math.abs((finalState != 0 ? 0 : 1) - progress)
: 1) : 1)

View File

@@ -82,10 +82,12 @@ const SHOW_SHOWDESKTOP_DELAY = 1000
const SHOW_SHOWDESKTOP_TIME = 200 const SHOW_SHOWDESKTOP_TIME = 200
const MIN_PANEL_SIZE = 22 const MIN_PANEL_SIZE = 22
export const GS_PANEL_SIZE = 32
export const Panel = GObject.registerClass( export const Panel = GObject.registerClass(
{}, {},
class Panel extends St.Widget { class Panel extends St.Widget {
_init(panelManager, monitor, panelBox, isStandalone) { _init(panelManager, monitor, clipContainer, panelBox, isStandalone) {
super._init({ super._init({
style_class: 'zorintaskbarPanel', style_class: 'zorintaskbarPanel',
layout_manager: new Clutter.BinLayout(), layout_manager: new Clutter.BinLayout(),
@@ -99,6 +101,7 @@ export const Panel = GObject.registerClass(
this.panelStyle = new PanelStyle.PanelStyle() this.panelStyle = new PanelStyle.PanelStyle()
this.monitor = monitor this.monitor = monitor
this.clipContainer = clipContainer
this.panelBox = panelBox this.panelBox = panelBox
// when the original gnome-shell top panel is kept, all panels are "standalone", // when the original gnome-shell top panel is kept, all panels are "standalone",
@@ -172,6 +175,18 @@ export const Panel = GObject.registerClass(
this.statusArea = Main.panel.statusArea this.statusArea = Main.panel.statusArea
this.menuManager = Main.panel.menuManager this.menuManager = Main.panel.menuManager
this.panel._toggleMenu = (indicator) => {
if (
!indicator ||
(!this.intellihide.enabled && !indicator.mapped) ||
!indicator.reactive
)
return
this.intellihide.revealAndHold(0, true)
Object.getPrototypeOf(this.panel)._toggleMenu(indicator)
}
panelBoxes.forEach((p) => (this[p] = Main.panel[p])) panelBoxes.forEach((p) => (this[p] = Main.panel[p]))
;['activities', systemMenuInfo.name, 'dateMenu'].forEach((b) => { ;['activities', systemMenuInfo.name, 'dateMenu'].forEach((b) => {
let container = this.statusArea[b].container let container = this.statusArea[b].container
@@ -347,7 +362,7 @@ export const Panel = GObject.registerClass(
this.panelStyle.enable(this) this.panelStyle.enable(this)
if (this.checkIfVertical()) { if (this.geom.vertical) {
this._signalsHandler.add([ this._signalsHandler.add([
this.panelBox, this.panelBox,
'notify::visible', 'notify::visible',
@@ -375,8 +390,10 @@ export const Panel = GObject.registerClass(
this.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS) this.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS)
if (!Main.layoutManager._startingUp) if (!Main.layoutManager._startingUp)
GLib.idle_add(GLib.PRIORITY_LOW, () => { this._waitResetGeomId = GLib.idle_add(GLib.PRIORITY_LOW, () => {
this._waitResetGeomId = 0
this._resetGeometry() this._resetGeometry()
return GLib.SOURCE_REMOVE return GLib.SOURCE_REMOVE
}) })
} }
@@ -387,6 +404,11 @@ export const Panel = GObject.registerClass(
this._timeoutsHandler.destroy() this._timeoutsHandler.destroy()
this._signalsHandler.destroy() this._signalsHandler.destroy()
if (this._waitResetGeomId) {
GLib.source_remove(this._waitResetGeomId)
this._waitResetGeomId = 0
}
this.panel.remove_child(this.taskbar.actor) this.panel.remove_child(this.taskbar.actor)
if (this.intellihide) { if (this.intellihide) {
@@ -456,8 +478,14 @@ export const Panel = GObject.registerClass(
}) })
} }
if (this.statusArea.quickSettings?.menu) {
this.statusArea.quickSettings.menu._arrowSide = St.Side.TOP
this.statusArea.quickSettings.menu._arrowAlignment = 0
}
this._setShowDesktopButton(false) this._setShowDesktopButton(false)
delete this.panel._toggleMenu
delete Utils.getIndicators( delete Utils.getIndicators(
this.statusArea[systemMenuName]._volumeOutput, this.statusArea[systemMenuName]._volumeOutput,
)._dtpIgnoreScroll )._dtpIgnoreScroll
@@ -504,13 +532,11 @@ export const Panel = GObject.registerClass(
} }
checkIfVertical() { checkIfVertical() {
let position = this.getPosition() return this.geom.vertical
return position == St.Side.LEFT || position == St.Side.RIGHT
} }
getOrientation() { getOrientation() {
return this.checkIfVertical() ? 'vertical' : 'horizontal' return this.geom.vertical ? 'vertical' : 'horizontal'
} }
updateElementPositions() { updateElementPositions() {
@@ -591,7 +617,7 @@ export const Panel = GObject.registerClass(
} }
_bindSettingsChanges() { _bindSettingsChanges() {
let isVertical = this.checkIfVertical() let isVertical = this.geom.vertical
this._signalsHandler.add( this._signalsHandler.add(
[ [
@@ -706,7 +732,7 @@ export const Panel = GObject.registerClass(
this.taskbar.resetAppIcons(true) this.taskbar.resetAppIcons(true)
this.dynamicTransparency.updateExternalStyle() this.dynamicTransparency.updateExternalStyle()
if (this.checkIfVertical()) { if (this.geom.vertical) {
this.showAppsIconWrapper.realShowAppsIcon.toggleButton.set_width( this.showAppsIconWrapper.realShowAppsIcon.toggleButton.set_width(
this.geom.innerSize, this.geom.innerSize,
) )
@@ -715,7 +741,8 @@ export const Panel = GObject.registerClass(
} }
getGeometry() { getGeometry() {
let isVertical = this.checkIfVertical() let position = this.getPosition()
let vertical = position == St.Side.LEFT || position == St.Side.RIGHT
let scaleFactor = Utils.getScaleFactor() let scaleFactor = Utils.getScaleFactor()
let panelBoxTheme = this.panelBox.get_theme_node() let panelBoxTheme = this.panelBox.get_theme_node()
let sideMargins = let sideMargins =
@@ -724,7 +751,6 @@ export const Panel = GObject.registerClass(
let topBottomMargins = let topBottomMargins =
panelBoxTheme.get_padding(St.Side.TOP) + panelBoxTheme.get_padding(St.Side.TOP) +
panelBoxTheme.get_padding(St.Side.BOTTOM) panelBoxTheme.get_padding(St.Side.BOTTOM)
let position = this.getPosition()
let panelLength = PanelSettings.getPanelLength( let panelLength = PanelSettings.getPanelLength(
SETTINGS, SETTINGS,
this.monitor.index, this.monitor.index,
@@ -752,11 +778,11 @@ export const Panel = GObject.registerClass(
SETTINGS.get_boolean('stockgs-keep-top-panel') && SETTINGS.get_boolean('stockgs-keep-top-panel') &&
Main.layoutManager.primaryMonitor == this.monitor Main.layoutManager.primaryMonitor == this.monitor
) { ) {
gsTopPanelHeight = Main.layoutManager.panelBox.height gsTopPanelHeight = GS_PANEL_SIZE
topOffset = position == St.Side.TOP ? gsTopPanelHeight : 0 topOffset = position == St.Side.TOP ? gsTopPanelHeight : 0
} }
if (isVertical) { if (vertical) {
if (!SETTINGS.get_boolean('group-apps')) { if (!SETTINGS.get_boolean('group-apps')) {
// add window title width and side padding of _dtpIconContainer when vertical // add window title width and side padding of _dtpIconContainer when vertical
innerSize = outerSize += innerSize = outerSize +=
@@ -800,13 +826,13 @@ export const Panel = GObject.registerClass(
if (length < 1) { if (length < 1) {
// fixed size, less than 100%, so adjust start coordinate // fixed size, less than 100%, so adjust start coordinate
if (!isVertical && anchor == Pos.MIDDLE) if (!vertical && anchor == Pos.MIDDLE)
x += (this.monitor.width - w - sideMargins) * 0.5 x += (this.monitor.width - w - sideMargins) * 0.5
else if (isVertical && anchor == Pos.MIDDLE) else if (vertical && anchor == Pos.MIDDLE)
y += (this.monitor.height - h - topBottomMargins) * 0.5 y += (this.monitor.height - h - topBottomMargins) * 0.5
else if (!isVertical && anchor == Pos.END) else if (!vertical && anchor == Pos.END)
x += this.monitor.width - w - sideMargins x += this.monitor.width - w - sideMargins
else if (isVertical && anchor == Pos.END) else if (vertical && anchor == Pos.END)
y += this.monitor.height - h - topBottomMargins y += this.monitor.height - h - topBottomMargins
} }
@@ -824,7 +850,9 @@ export const Panel = GObject.registerClass(
fixedPadding, fixedPadding,
varPadding, varPadding,
topOffset, // only if gnome-shell top panel is present and position is TOP topOffset, // only if gnome-shell top panel is present and position is TOP
gsTopPanelHeight, // only if gnome-shell top panel is present
position, position,
vertical,
dynamic, dynamic,
dockMode, dockMode,
} }
@@ -1112,12 +1140,10 @@ export const Panel = GObject.registerClass(
} }
_setPanelPosition() { _setPanelPosition() {
let clipContainer = this.panelBox.get_parent()
this.set_size(this.geom.w, this.geom.h) this.set_size(this.geom.w, this.geom.h)
clipContainer.set_position(this.geom.x, this.geom.y) this.clipContainer.set_position(this.geom.x, this.geom.y)
this._setVertical(this.panel, this.checkIfVertical()) this._setVertical(this.panel, this.geom.vertical)
// center the system menu popup relative to its panel button // center the system menu popup relative to its panel button
if (this.statusArea.quickSettings?.menu) { if (this.statusArea.quickSettings?.menu) {
@@ -1135,22 +1161,21 @@ export const Panel = GObject.registerClass(
](cssName) ](cssName)
}) })
this._setPanelClip(clipContainer) this._setPanelClip()
Main.layoutManager._updateHotCorners() Main.layoutManager._updateHotCorners()
Main.layoutManager._updatePanelBarrier(this) Main.layoutManager._updatePanelBarrier(this)
} }
_setPanelClip(clipContainer) { _setPanelClip() {
clipContainer = clipContainer || this.panelBox.get_parent()
this._timeoutsHandler.add([ this._timeoutsHandler.add([
T6, T6,
0, 0,
() => () =>
Utils.setClip( Utils.setClip(
clipContainer, this.clipContainer,
clipContainer.x, this.clipContainer.x,
clipContainer.y, this.clipContainer.y,
this.panelBox.width, this.panelBox.width,
this.panelBox.height, this.panelBox.height,
0, 0,
@@ -1193,7 +1218,7 @@ export const Panel = GObject.registerClass(
} }
} }
let params = this.checkIfVertical() let params = this.geom.vertical
? [stageY, 'y', 'height'] ? [stageY, 'y', 'height']
: [stageX, 'x', 'width'] : [stageX, 'x', 'width']
let dragWindow = this._getDraggableWindowForPosition.apply( let dragWindow = this._getDraggableWindowForPosition.apply(
@@ -1240,7 +1265,7 @@ export const Panel = GObject.registerClass(
} }
_onBoxActorAdded(box) { _onBoxActorAdded(box) {
if (this.checkIfVertical()) { if (this.geom.vertical) {
this._setVertical(box, true) this._setVertical(box, true)
} }
} }
@@ -1347,7 +1372,9 @@ export const Panel = GObject.registerClass(
!setClockText(datetimeParts) && !setClockText(datetimeParts) &&
!setClockText(time) !setClockText(time)
) { ) {
let timeParts = time.split('') // https://gitlab.gnome.org/GNOME/gnome-desktop/-/merge_requests/176
let timeSeparator = time.indexOf('') > 0 ? '' : ':'
let timeParts = time.split(timeSeparator)
if (!this._clockFormat) { if (!this._clockFormat) {
this._clockFormat = DESKTOPSETTINGS.get_string('clock-format') this._clockFormat = DESKTOPSETTINGS.get_string('clock-format')
@@ -1426,10 +1453,16 @@ export const Panel = GObject.registerClass(
} }
} }
_setShowDesktopButtonStyle() { _getDefaultLineColor(isBrightOverride) {
let rgb = this._getBackgroundBrightness() return (typeof isBrightOverride === 'undefined' &&
this._getBackgroundBrightness()) ||
isBrightOverride
? 'rgba(55, 55, 55, .2)' ? 'rgba(55, 55, 55, .2)'
: 'rgba(200, 200, 200, .2)' : 'rgba(200, 200, 200, .2)'
}
_setShowDesktopButtonStyle() {
let rgb = this._getDefaultLineColor()
for (let i = 0; i < this._showDesktopButton.get_children().length; i++) { for (let i = 0; i < this._showDesktopButton.get_children().length; i++) {
if (this._showDesktopButton.get_children()[i] == this._showDesktopButton.icon) { if (this._showDesktopButton.get_children()[i] == this._showDesktopButton.icon) {
@@ -1442,13 +1475,13 @@ export const Panel = GObject.registerClass(
this._showDesktopButton.add_child(this._showDesktopButton.icon) this._showDesktopButton.add_child(this._showDesktopButton.icon)
let buttonSize = SETTINGS.get_int('showdesktop-button-width') + 'px;' let buttonSize = SETTINGS.get_int('showdesktop-button-width') + 'px;'
let isVertical = this.checkIfVertical() let isVertical = this.geom.vertical
let buttonPadding = isVertical ? buttonSize + ' 0;' : '0 ' + buttonSize + ';' let buttonPadding = isVertical ? buttonSize + ' 0;' : '0 ' + buttonSize + ';'
this._showDesktopButton.set_style('padding: ' + buttonPadding + ';') this._showDesktopButton.set_style('padding: ' + buttonPadding + ';')
} else { } else {
let buttonSize = SETTINGS.get_int('showdesktop-button-width') + 'px;' let buttonSize = SETTINGS.get_int('showdesktop-button-width') + 'px;'
let isVertical = this.checkIfVertical() let isVertical = this.geom.vertical
let style = 'border: 0 solid ' + rgb + '; padding: 0;' let style = 'border: 0 solid ' + rgb + '; padding: 0;'
style += isVertical style += isVertical

View File

@@ -35,6 +35,7 @@ import * as Utils from './utils.js'
import * as DesktopIconsIntegration from './desktopIconsIntegration.js' import * as DesktopIconsIntegration from './desktopIconsIntegration.js'
import { DTP_EXTENSION, SETTINGS, tracker } from './extension.js' import { DTP_EXTENSION, SETTINGS, tracker } from './extension.js'
import Gio from 'gi://Gio'
import GLib from 'gi://GLib' import GLib from 'gi://GLib'
import GObject from 'gi://GObject' import GObject from 'gi://GObject'
import Clutter from 'gi://Clutter' import Clutter from 'gi://Clutter'
@@ -42,6 +43,7 @@ import Meta from 'gi://Meta'
import Shell from 'gi://Shell' import Shell from 'gi://Shell'
import St from 'gi://St' import St from 'gi://St'
import * as AppDisplay from 'resource:///org/gnome/shell/ui/appDisplay.js'
import * as BoxPointer from 'resource:///org/gnome/shell/ui/boxpointer.js' import * as BoxPointer from 'resource:///org/gnome/shell/ui/boxpointer.js'
import * as LookingGlass from 'resource:///org/gnome/shell/ui/lookingGlass.js' import * as LookingGlass from 'resource:///org/gnome/shell/ui/lookingGlass.js'
import * as Main from 'resource:///org/gnome/shell/ui/main.js' import * as Main from 'resource:///org/gnome/shell/ui/main.js'
@@ -66,6 +68,19 @@ export const PanelManager = class {
this.dtpPrimaryMonitor = Main.layoutManager.primaryMonitor // The real primary monitor should always have the main panel this.dtpPrimaryMonitor = Main.layoutManager.primaryMonitor // The real primary monitor should always have the main panel
this.proximityManager = new Proximity.ProximityManager() this.proximityManager = new Proximity.ProximityManager()
// g-s version 49 switched to clutter gestures
if (!AppDisplay.AppIcon.prototype._removeMenuTimeout)
AppDisplay.AppIcon.prototype._setPopupTimeout =
AppDisplay.AppIcon.prototype._removeMenuTimeout = this._emptyFunc
Main.layoutManager.findIndexForActor = (actor) =>
'_dtpIndex' in actor
? actor._dtpIndex
: Layout.LayoutManager.prototype.findIndexForActor.call(
Main.layoutManager,
actor,
)
if (this.dtpPrimaryMonitor) { if (this.dtpPrimaryMonitor) {
this.primaryPanel = this._createPanel( this.primaryPanel = this._createPanel(
this.dtpPrimaryMonitor, this.dtpPrimaryMonitor,
@@ -94,6 +109,8 @@ export const PanelManager = class {
if (reset) return if (reset) return
this._syncAppSwitcherWorkspaceIsolation()
this.notificationsMonitor = new NotificationsMonitor() this.notificationsMonitor = new NotificationsMonitor()
this._desktopIconsUsableArea = this._desktopIconsUsableArea =
@@ -115,14 +132,6 @@ export const PanelManager = class {
) )
Main.layoutManager._updateHotCorners() Main.layoutManager._updateHotCorners()
Main.layoutManager.findIndexForActor = (actor) =>
'_dtpIndex' in actor
? actor._dtpIndex
: Layout.LayoutManager.prototype.findIndexForActor.call(
Main.layoutManager,
actor,
)
if (Main.layoutManager._interfaceSettings) { if (Main.layoutManager._interfaceSettings) {
this._enableHotCornersId = Main.layoutManager._interfaceSettings.connect( this._enableHotCornersId = Main.layoutManager._interfaceSettings.connect(
'changed::enable-hot-corners', 'changed::enable-hot-corners',
@@ -159,19 +168,23 @@ export const PanelManager = class {
}, },
) )
this._injectionManager.overrideMethod( let activitiesChild = Main.panel.statusArea.activities.get_first_child()
Object.getPrototypeOf(
// WorkspaceDot in activities button if (activitiesChild?.constructor.name == 'WorkspaceIndicators') {
Main.panel.statusArea.activities.get_first_child().get_first_child(), this._injectionManager.overrideMethod(
), Object.getPrototypeOf(
'vfunc_get_preferred_width', // WorkspaceDot in activities button
(get_preferred_width) => activitiesChild.get_first_child(),
function (forHeight) { ),
return Utils.getBoxLayoutVertical(this.get_parent()) 'vfunc_get_preferred_width',
? [0, forHeight] (get_preferred_width) =>
: get_preferred_width.call(this, forHeight) function (forHeight) {
}, return Utils.getBoxLayoutVertical(this.get_parent())
) ? [0, forHeight]
: get_preferred_width.call(this, forHeight)
},
)
}
LookingGlass.LookingGlass.prototype._oldResize = LookingGlass.LookingGlass.prototype._oldResize =
LookingGlass.LookingGlass.prototype._resize LookingGlass.LookingGlass.prototype._resize
@@ -249,12 +262,19 @@ export const PanelManager = class {
}) })
}, },
], ],
[
SETTINGS,
'changed::isolate-workspaces',
this._syncAppSwitcherWorkspaceIsolation,
],
[ [
Utils.DisplayWrapper.getMonitorManager(), Utils.DisplayWrapper.getMonitorManager(),
'monitors-changed', 'monitors-changed',
async () => { async () => {
if (Main.layoutManager.primaryMonitor) { if (Main.layoutManager.primaryMonitor) {
await PanelSettings.setMonitorsInfo(SETTINGS) await PanelSettings.setMonitorsInfo(SETTINGS).catch((e) =>
console.log(e),
)
this._reset() this._reset()
} }
}, },
@@ -271,7 +291,7 @@ export const PanelManager = class {
this._adjustPanelMenuButton( this._adjustPanelMenuButton(
this._getPanelMenuButton(child.get_first_child()), this._getPanelMenuButton(child.get_first_child()),
this.primaryPanel.monitor, this.primaryPanel.monitor,
this.primaryPanel.getPosition(), this.primaryPanel.geom.position,
) )
}, },
]), ]),
@@ -310,10 +330,8 @@ export const PanelManager = class {
p.disable() p.disable()
let clipContainer = p.panelBox.get_parent() Main.layoutManager._untrackActor(p)
Main.layoutManager._untrackActor(p.panelBox) Main.layoutManager._untrackActor(p.panelBox)
Main.layoutManager.removeChrome(clipContainer)
if (p.isStandalone) { if (p.isStandalone) {
p.panelBox.destroy() p.panelBox.destroy()
@@ -322,14 +340,18 @@ export const PanelManager = class {
p.remove_child(p.panel) p.remove_child(p.panel)
p.panelBox.add_child(p.panel) p.panelBox.add_child(p.panel)
p.panelBox.set_position(clipContainer.x, clipContainer.y) p.panelBox.set_position(p.clipContainer.x, p.clipContainer.y)
clipContainer.remove_child(p.panelBox) delete p.panelBox._dtpIndex
p.clipContainer.remove_child(p.panelBox)
Main.layoutManager.addChrome(p.panelBox, { Main.layoutManager.addChrome(p.panelBox, {
affectsStruts: true, affectsStruts: true,
trackFullscreen: true, trackFullscreen: true,
}) })
} }
Main.layoutManager.removeChrome(p.clipContainer)
}) })
if (Main.layoutManager.primaryMonitor) { if (Main.layoutManager.primaryMonitor) {
@@ -385,6 +407,20 @@ export const PanelManager = class {
this._desktopIconsUsableArea = null this._desktopIconsUsableArea = null
} }
_syncAppSwitcherWorkspaceIsolation() {
// alt-tab menu
let appSwitcherSettings = new Gio.Settings({
schema_id: 'org.gnome.shell.app-switcher',
})
appSwitcherSettings.set_boolean(
'current-workspace-only',
SETTINGS.get_boolean('isolate-workspaces'),
)
}
_emptyFunc() {}
_setDesktopIconsMargins() { _setDesktopIconsMargins() {
this._desktopIconsUsableArea?.resetMargins() this._desktopIconsUsableArea?.resetMargins()
this.allPanels.forEach((p) => { this.allPanels.forEach((p) => {
@@ -635,23 +671,37 @@ export const PanelManager = class {
Main.layoutManager.addChrome(clipContainer, { affectsInputRegion: false }) Main.layoutManager.addChrome(clipContainer, { affectsInputRegion: false })
clipContainer.add_child(panelBox) clipContainer.add_child(panelBox)
Main.layoutManager.trackChrome(panelBox, {
trackFullscreen: true,
affectsStruts: true,
affectsInputRegion: true,
})
panel = new Panel.Panel(this, monitor, panelBox, isStandalone) panel = new Panel.Panel(
this,
monitor,
clipContainer,
panelBox,
isStandalone,
)
panelBox.add_child(panel) panelBox.add_child(panel)
panel.enable() panel.enable()
panelBox._dtpIndex = monitor.index panelBox._dtpIndex = monitor.index
panelBox.set_position(0, 0) panelBox.set_position(0, 0)
panelBox.set_width(-1)
if (panel.checkIfVertical) panelBox.set_width(-1) Main.layoutManager.trackChrome(panel, {
affectsInputRegion: true,
affectsStruts: false,
})
Main.layoutManager.trackChrome(panelBox, {
trackFullscreen: true,
affectsStruts: true,
})
panelBox._dtpIndex = monitor.index
panelBox.set_position(0, 0)
panelBox.set_width(-1)
this._findPanelMenuButtons(panelBox).forEach((pmb) => this._findPanelMenuButtons(panelBox).forEach((pmb) =>
this._adjustPanelMenuButton(pmb, monitor, panel.getPosition()), this._adjustPanelMenuButton(pmb, monitor, panel.geom.position),
) )
panel.taskbar.iconAnimator.start() panel.taskbar.iconAnimator.start()
@@ -670,7 +720,7 @@ export const PanelManager = class {
} }
_adjustPanelMenuButton(button, monitor, arrowSide) { _adjustPanelMenuButton(button, monitor, arrowSide) {
if (button) { if (button && button.menu) {
button.menu._boxPointer._dtpSourceActor = button.menu._boxPointer._dtpSourceActor =
button.menu._boxPointer.sourceActor button.menu._boxPointer.sourceActor
button.menu._boxPointer.sourceActor = button button.menu._boxPointer.sourceActor = button
@@ -895,7 +945,7 @@ function newUpdateHotCorners() {
global.zorinTaskbar.panels, global.zorinTaskbar.panels,
(p) => p.monitor.index == i, (p) => p.monitor.index == i,
) )
let panelPosition = panel ? panel.getPosition() : St.Side.BOTTOM let panelPosition = panel ? panel.geom.position : St.Side.BOTTOM
let panelTopLeft = let panelTopLeft =
panelPosition == St.Side.TOP || panelPosition == St.Side.LEFT panelPosition == St.Side.TOP || panelPosition == St.Side.LEFT
let monitor = this.monitors[i] let monitor = this.monitors[i]
@@ -949,9 +999,9 @@ function newUpdateHotCorners() {
corner.setBarrierSize = (size) => corner.setBarrierSize = (size) =>
Object.getPrototypeOf(corner).setBarrierSize.call( Object.getPrototypeOf(corner).setBarrierSize.call(
corner, corner,
Math.min(size, 32), Math.min(size, Panel.GS_PANEL_SIZE),
) )
corner.setBarrierSize(panel ? panel.geom.innerSize : 32) corner.setBarrierSize(panel ? panel.geom.innerSize : Panel.GS_PANEL_SIZE)
this.hotCorners.push(corner) this.hotCorners.push(corner)
} else { } else {
this.hotCorners.push(null) this.hotCorners.push(null)
@@ -984,7 +1034,7 @@ function newUpdatePanelBarrier(panel) {
let fixed1 = panel.monitor.y let fixed1 = panel.monitor.y
let fixed2 = panel.monitor.y + barrierSize let fixed2 = panel.monitor.y + barrierSize
if (panel.checkIfVertical()) { if (panel.geom.vertical) {
barriers._rightPanelBarrier.push( barriers._rightPanelBarrier.push(
panel.monitor.y + panel.monitor.height, panel.monitor.y + panel.monitor.height,
Meta.BarrierDirection.NEGATIVE_Y, Meta.BarrierDirection.NEGATIVE_Y,
@@ -1004,7 +1054,7 @@ function newUpdatePanelBarrier(panel) {
) )
} }
switch (panel.getPosition()) { switch (panel.geom.position) {
//values are initialized as St.Side.TOP //values are initialized as St.Side.TOP
case St.Side.BOTTOM: case St.Side.BOTTOM:
fixed1 = panel.monitor.y + panel.monitor.height - barrierSize fixed1 = panel.monitor.y + panel.monitor.height - barrierSize
@@ -1055,13 +1105,13 @@ function _newLookingGlassResize() {
(p) => p.monitor == Main.layoutManager.primaryMonitor, (p) => p.monitor == Main.layoutManager.primaryMonitor,
) )
let topOffset = let topOffset =
primaryMonitorPanel.getPosition() == St.Side.TOP primaryMonitorPanel.geom.position == St.Side.TOP
? primaryMonitorPanel.geom.outerSize + ? primaryMonitorPanel.geom.outerSize +
(SETTINGS.get_boolean('stockgs-keep-top-panel') (SETTINGS.get_boolean('stockgs-keep-top-panel')
? Main.layoutManager.panelBox.height ? Main.layoutManager.panelBox.height
: 0) + : 0) +
8 8
: 32 : Panel.GS_PANEL_SIZE
this._oldResize() this._oldResize()

View File

@@ -45,6 +45,7 @@ export var availableMonitors = []
export async function init(settings) { export async function init(settings) {
useCache = true useCache = true
cache = {}
await setMonitorsInfo(settings) await setMonitorsInfo(settings)
} }
@@ -203,7 +204,7 @@ export function setPanelElementPositions(settings, monitorIndex, value) {
setMonitorSetting(settings, 'panel-element-positions', monitorIndex, value) setMonitorSetting(settings, 'panel-element-positions', monitorIndex, value)
} }
export async function setMonitorsInfo(settings) { export function setMonitorsInfo(settings) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
try { try {
let monitorInfos = [] let monitorInfos = []
@@ -211,7 +212,6 @@ export async function setMonitorsInfo(settings) {
proxy.GetCurrentStateRemote((displayInfo, e) => { proxy.GetCurrentStateRemote((displayInfo, e) => {
if (e) return reject(`Error getting display state: ${e}`) if (e) return reject(`Error getting display state: ${e}`)
let gsPrimaryIndex = 0
let ids = {} let ids = {}
//https://gitlab.gnome.org/GNOME/mutter/-/blob/main/data/dbus-interfaces/org.gnome.Mutter.DisplayConfig.xml#L347 //https://gitlab.gnome.org/GNOME/mutter/-/blob/main/data/dbus-interfaces/org.gnome.Mutter.DisplayConfig.xml#L347
@@ -227,8 +227,6 @@ export async function setMonitorsInfo(settings) {
if (ids[id]) id = connector && !ids[connector] ? connector : i if (ids[id]) id = connector && !ids[connector] ? connector : i
if (primary) gsPrimaryIndex = i
monitorInfos.push({ monitorInfos.push({
id, id,
product, product,
@@ -240,7 +238,7 @@ export async function setMonitorsInfo(settings) {
ids[id] = 1 ids[id] = 1
}) })
_saveMonitors(settings, monitorInfos, gsPrimaryIndex) _saveMonitors(settings, monitorInfos)
resolve() resolve()
}) })
@@ -264,20 +262,14 @@ export async function setMonitorsInfo(settings) {
}) })
} }
function _saveMonitors(settings, monitorInfos, gsPrimaryIndex) { function _saveMonitors(settings, monitorInfos) {
/* Commented out as Zorin Taskbar always uses gnome-shell primary monitor /* Commented out as Zorin Taskbar always uses gnome-shell primary monitor
let keyPrimary = 'primary-monitor' let keyPrimary = 'primary-monitor'
let dtpPrimaryMonitor = settings.get_string(keyPrimary) let dtpPrimaryMonitor = settings.get_string(keyPrimary)
// convert previously saved index to monitor id // convert previously saved index to monitor id
if (dtpPrimaryMonitor.match(/^\d{1,2}$/) && monitorInfos[dtpPrimaryMonitor]) if (dtpPrimaryMonitor.match(/^\d{1,2}$/) && monitorInfos[dtpPrimaryMonitor])
dtpPrimaryMonitor = monitorInfos[dtpPrimaryMonitor].id settings.set_string(keyPrimary, monitorInfos[dtpPrimaryMonitor].id)
// default to gnome-shell primary monitor
if (!dtpPrimaryMonitor)
dtpPrimaryMonitor = monitorInfos[gsPrimaryIndex]?.id || 0
settings.set_string(keyPrimary, dtpPrimaryMonitor)
*/ */
availableMonitors = Object.freeze(monitorInfos) availableMonitors = Object.freeze(monitorInfos)

View File

@@ -144,16 +144,6 @@ function checkHotkeyPrefix(settings) {
settings.apply() settings.apply()
} }
function mergeObjects(main, bck) {
for (const prop in bck) {
if (!Object.hasOwn(main, prop) && Object.hasOwn(bck, prop)) {
main[prop] = bck[prop]
}
}
return main
}
const Preferences = class { const Preferences = class {
constructor(window, settings, gnomeInterfaceSettings, path) { constructor(window, settings, gnomeInterfaceSettings, path) {
// this._settings = ExtensionUtils.getSettings('org.gnome.shell.extensions.zorin-taskbar'); // this._settings = ExtensionUtils.getSettings('org.gnome.shell.extensions.zorin-taskbar');
@@ -890,6 +880,62 @@ const Preferences = class {
dialog.set_default_size(1, 1) dialog.set_default_size(1, 1)
}) })
// Panel border
/*this._settings.bind(
'trans-use-border',
this._builder.get_object('trans_border_switch'),
'active',
Gio.SettingsBindFlags.DEFAULT,
)
this._settings.bind(
'trans-use-border',
this._builder.get_object('trans_border_color_box'),
'sensitive',
Gio.SettingsBindFlags.DEFAULT,
)
this._settings.bind(
'trans-use-border',
this._builder.get_object('trans_border_width_box'),
'sensitive',
Gio.SettingsBindFlags.DEFAULT,
)
this._settings.bind(
'trans-border-use-custom-color',
this._builder.get_object('trans_border_color_switch'),
'active',
Gio.SettingsBindFlags.DEFAULT,
)
this._settings.bind(
'trans-border-use-custom-color',
this._builder.get_object('trans_border_color_colorbutton'),
'sensitive',
Gio.SettingsBindFlags.DEFAULT,
)
let rgba = new Gdk.RGBA()
rgba.parse(this._settings.get_string('trans-border-custom-color'))
this._builder.get_object('trans_border_color_colorbutton').set_rgba(rgba)
this._builder
.get_object('trans_border_color_colorbutton')
.connect('color-set', (button) => {
let rgba = button.get_rgba()
let css = rgba.to_string()
this._settings.set_string('trans-border-custom-color', css)
})
this._builder
.get_object('trans_border_width_spinbutton')
.set_value(this._settings.get_int('trans-border-width'))
this._builder
.get_object('trans_border_width_spinbutton')
.connect('value-changed', (widget) => {
this._settings.set_int('trans-border-width', widget.get_value())
})*/
this._settings.bind( this._settings.bind(
'intellihide', 'intellihide',
this._builder.get_object('intellihide_switch'), this._builder.get_object('intellihide_switch'),
@@ -906,18 +952,49 @@ const Preferences = class {
this._settings.bind( this._settings.bind(
'intellihide-hide-from-windows', 'intellihide-hide-from-windows',
this._builder.get_object('intellihide_window_hide_switch'), this._builder.get_object('intellihide_window_hide_button'),
'active', 'active',
Gio.SettingsBindFlags.DEFAULT, Gio.SettingsBindFlags.DEFAULT,
) )
this._settings.bind( this._settings.bind(
'intellihide-hide-from-windows', 'intellihide-hide-from-monitor-windows',
this._builder.get_object('intellihide_behaviour_options'), this._builder.get_object('intellihide_window_monitor_hide_button'),
'sensitive', 'active',
Gio.SettingsBindFlags.DEFAULT, Gio.SettingsBindFlags.DEFAULT,
) )
let setIntellihideBehaviorSensitivity = () => {
let overlappingButton = this._builder.get_object(
'intellihide_window_hide_button',
)
let hideFromMonitorWindows = this._settings.get_boolean(
'intellihide-hide-from-monitor-windows',
)
if (hideFromMonitorWindows) overlappingButton.set_active(false)
overlappingButton.set_sensitive(!hideFromMonitorWindows)
this._builder
.get_object('intellihide_behaviour_options')
.set_sensitive(
this._settings.get_boolean('intellihide-hide-from-windows') ||
hideFromMonitorWindows,
)
}
this._settings.connect(
'changed::intellihide-hide-from-windows',
setIntellihideBehaviorSensitivity,
)
this._settings.connect(
'changed::intellihide-hide-from-monitor-windows',
setIntellihideBehaviorSensitivity,
)
setIntellihideBehaviorSensitivity()
this._settings.bind( this._settings.bind(
'intellihide-behaviour', 'intellihide-behaviour',
this._builder.get_object('intellihide_behaviour_combo'), this._builder.get_object('intellihide_behaviour_combo'),
@@ -925,6 +1002,86 @@ const Preferences = class {
Gio.SettingsBindFlags.DEFAULT, Gio.SettingsBindFlags.DEFAULT,
) )
this._settings.bind(
'intellihide-use-pointer',
this._builder.get_object('intellihide_use_pointer_switch'),
'active',
Gio.SettingsBindFlags.DEFAULT,
)
this._settings.bind(
'intellihide-use-pointer-limit-size',
this._builder.get_object('intellihide_use_pointer_limit_button'),
'active',
Gio.SettingsBindFlags.DEFAULT,
)
this._settings.bind(
'intellihide-use-pointer',
this._builder.get_object('intellihide_use_pointer_limit_button'),
'sensitive',
Gio.SettingsBindFlags.DEFAULT,
)
this._settings.bind(
'intellihide-revealed-hover',
this._builder.get_object('intellihide_revealed_hover_switch'),
'active',
Gio.SettingsBindFlags.DEFAULT,
)
this._settings.bind(
'intellihide-use-pointer',
this._builder.get_object('intellihide_revealed_hover_switch'),
'sensitive',
Gio.SettingsBindFlags.DEFAULT,
)
this._settings.bind(
'intellihide-revealed-hover-limit-size',
this._builder.get_object('intellihide_revealed_hover_limit_button'),
'active',
Gio.SettingsBindFlags.DEFAULT,
)
this._settings.bind(
'intellihide-revealed-hover',
this._builder.get_object('intellihide_revealed_hover_limit_button'),
'sensitive',
Gio.SettingsBindFlags.DEFAULT,
)
this._settings.connect('changed::intellihide-use-pointer', () => {
if (!this._settings.get_boolean('intellihide-use-pointer')) {
this._settings.set_boolean('intellihide-revealed-hover', false)
this._settings.set_boolean('intellihide-use-pointer-limit-size', false)
this._settings.set_boolean('intellihide-use-pressure', false)
}
})
this._settings.connect('changed::intellihide-revealed-hover', () => {
if (!this._settings.get_boolean('intellihide-revealed-hover')) {
this._settings.set_boolean(
'intellihide-revealed-hover-limit-size',
false,
)
}
})
this._settings.bind(
'intellihide-use-pointer',
this._builder.get_object('intellihide_revealed_hover_options'),
'sensitive',
Gio.SettingsBindFlags.DEFAULT,
)
this._settings.bind(
'intellihide-use-pointer',
this._builder.get_object('intellihide_use_pressure_options'),
'sensitive',
Gio.SettingsBindFlags.DEFAULT,
)
this._settings.bind( this._settings.bind(
'intellihide-use-pressure', 'intellihide-use-pressure',
this._builder.get_object('intellihide_use_pressure_switch'), this._builder.get_object('intellihide_use_pressure_switch'),
@@ -1008,10 +1165,36 @@ const Preferences = class {
'intellihide-hide-from-windows', 'intellihide-hide-from-windows',
this._settings.get_default_value('intellihide-hide-from-windows'), this._settings.get_default_value('intellihide-hide-from-windows'),
) )
this._settings.set_value(
'intellihide-hide-from-monitor-windows',
this._settings.get_default_value(
'intellihide-hide-from-monitor-windows',
),
)
this._settings.set_value( this._settings.set_value(
'intellihide-behaviour', 'intellihide-behaviour',
this._settings.get_default_value('intellihide-behaviour'), this._settings.get_default_value('intellihide-behaviour'),
) )
this._settings.set_value(
'intellihide-use-pointer',
this._settings.get_default_value('intellihide-use-pointer'),
)
this._settings.set_value(
'intellihide-use-pointer-limit-size',
this._settings.get_default_value(
'intellihide-use-pointer-limit-size',
),
)
this._settings.set_value(
'intellihide-revealed-hover',
this._settings.get_default_value('intellihide-revealed-hover'),
)
this._settings.set_value(
'intellihide-revealed-hover-limit-size',
this._settings.get_default_value(
'intellihide-revealed-hover-limit-size',
),
)
this._settings.set_value( this._settings.set_value(
'intellihide-use-pressure', 'intellihide-use-pressure',
this._settings.get_default_value('intellihide-use-pressure'), this._settings.get_default_value('intellihide-use-pressure'),
@@ -1591,6 +1774,13 @@ const Preferences = class {
PanelSettings.getPanelLength(this._settings, this._currentMonitorIndex), PanelSettings.getPanelLength(this._settings, this._currentMonitorIndex),
) )
this._settings.bind(
'stockgs-keep-dash',
this._builder.get_object('stockgs_dash_switch'),
'active',
Gio.SettingsBindFlags.DEFAULT,
)
this._settings.bind( this._settings.bind(
'stockgs-keep-top-panel', 'stockgs-keep-top-panel',
this._builder.get_object('stockgs_top_panel_switch'), this._builder.get_object('stockgs_top_panel_switch'),
@@ -1665,7 +1855,7 @@ export default class ZorinTaskbarPreferences extends ExtensionPreferences {
}) })
// use default width or window // use default width or window
window.set_default_size(0, 625) window.set_default_size(600, 625)
new Preferences(window, window._settings, window._gnomeInterfaceSettings, this.path) new Preferences(window, window._settings, window._gnomeInterfaceSettings, this.path)
} }

View File

@@ -37,14 +37,23 @@ export const Mode = {
MAXIMIZED_WINDOWS: 2, MAXIMIZED_WINDOWS: 2,
} }
export class ProximityWatch { class ProximityRectWatch {
constructor(actor, monitorIndex, mode, xThreshold, yThreshold, handler) { constructor(rect, monitorIndex, mode, xThreshold, yThreshold, handler) {
this.actor = actor this.rect = rect
this.monitorIndex = monitorIndex this.monitorIndex = monitorIndex
this.overlap = false this.overlap = false
this.mode = mode this.mode = mode
this.threshold = [xThreshold, yThreshold] this.threshold = [xThreshold, yThreshold]
this.handler = handler this.handler = handler
}
destroy() {}
}
class ProximityActorWatch extends ProximityRectWatch {
constructor(actor, monitorIndex, mode, xThreshold, yThreshold, handler) {
super(null, monitorIndex, mode, xThreshold, yThreshold, handler)
this.actor = actor
this._allocationChangedId = actor.connect('notify::allocation', () => this._allocationChangedId = actor.connect('notify::allocation', () =>
this._updateWatchRect(), this._updateWatchRect(),
@@ -82,9 +91,14 @@ export const ProximityManager = class {
this._setFocusedWindow() this._setFocusedWindow()
} }
createWatch(actor, monitorIndex, mode, xThreshold, yThreshold, handler) { createWatch(watched, monitorIndex, mode, xThreshold, yThreshold, handler) {
let watch = new ProximityWatch( let constr =
actor, watched instanceof Mtk.Rectangle
? ProximityRectWatch
: ProximityActorWatch
let watch = new constr(
watched,
monitorIndex, monitorIndex,
mode, mode,
xThreshold, xThreshold,

View File

@@ -38,10 +38,6 @@
text-align: left; text-align: left;
} }
.zorintaskbarMainPanel .dash-item-container .show-apps .overview-icon {
color: #FFF;
}
#zorintaskbarTaskbar .dash-item-container .overview-tile:hover, #zorintaskbarTaskbar .dash-item-container .overview-tile:hover,
#zorintaskbarTaskbar .dash-item-container .overview-tile .dtp-container .overview-icon, #zorintaskbarTaskbar .dash-item-container .overview-tile .dtp-container .overview-icon,
.zorintaskbarMainPanel .dash-item-container .show-apps:hover .overview-icon { .zorintaskbarMainPanel .dash-item-container .show-apps:hover .overview-icon {
@@ -137,11 +133,12 @@
.preview-container, .preview-container,
#preview-menu { #preview-menu {
border-radius: 10px; border-radius: 15px;
} }
/* border radius, grrr no css variables in ST */ /* border radius, grrr no css variables in ST */
#uiGroup.br5 .zorintaskbarPanel.dock, #uiGroup.br5 .zorintaskbarPanel.dock,
#uiGroup.br5 .zorintaskbarPanel.dock .zorintaskbarMainPanel,
#uiGroup.br5 .show-apps, #uiGroup.br5 .show-apps,
#uiGroup.br5 .dtp-container, #uiGroup.br5 .dtp-container,
#uiGroup.br5 .dtp-dots-container { #uiGroup.br5 .dtp-dots-container {
@@ -154,6 +151,7 @@
} }
#uiGroup.br10 .zorintaskbarPanel.dock, #uiGroup.br10 .zorintaskbarPanel.dock,
#uiGroup.br10 .zorintaskbarPanel.dock .zorintaskbarMainPanel,
#uiGroup.br10 .show-apps, #uiGroup.br10 .show-apps,
#uiGroup.br10 .dtp-container, #uiGroup.br10 .dtp-container,
#uiGroup.br10 .dtp-dots-container { #uiGroup.br10 .dtp-dots-container {
@@ -166,6 +164,7 @@
} }
#uiGroup.br15 .zorintaskbarPanel.dock, #uiGroup.br15 .zorintaskbarPanel.dock,
#uiGroup.br15 .zorintaskbarPanel.dock .zorintaskbarMainPanel,
#uiGroup.br15 .show-apps, #uiGroup.br15 .show-apps,
#uiGroup.br15 .dtp-container, #uiGroup.br15 .dtp-container,
#uiGroup.br15 .dtp-dots-container { #uiGroup.br15 .dtp-dots-container {
@@ -178,6 +177,7 @@
} }
#uiGroup.br20 .zorintaskbarPanel.dock, #uiGroup.br20 .zorintaskbarPanel.dock,
#uiGroup.br20 .zorintaskbarPanel.dock .zorintaskbarMainPanel,
#uiGroup.br20 .show-apps, #uiGroup.br20 .show-apps,
#uiGroup.br20 .dtp-container, #uiGroup.br20 .dtp-container,
#uiGroup.br20 .dtp-dots-container { #uiGroup.br20 .dtp-dots-container {
@@ -190,6 +190,7 @@
} }
#uiGroup.br25 .zorintaskbarPanel.dock, #uiGroup.br25 .zorintaskbarPanel.dock,
#uiGroup.br25 .zorintaskbarPanel.dock .zorintaskbarMainPanel,
#uiGroup.br25 .show-apps, #uiGroup.br25 .show-apps,
#uiGroup.br25 .dtp-container, #uiGroup.br25 .dtp-container,
#uiGroup.br25 .dtp-dots-container { #uiGroup.br25 .dtp-dots-container {

View File

@@ -50,7 +50,7 @@ export var hotkeyAppNumbers = {}
export const DASH_ANIMATION_TIME = 0.2 // Dash.DASH_ANIMATION_TIME is now private export const DASH_ANIMATION_TIME = 0.2 // Dash.DASH_ANIMATION_TIME is now private
const DASH_ITEM_HOVER_TIMEOUT = 0.3 // Dash.DASH_ITEM_HOVER_TIMEOUT is now private const DASH_ITEM_HOVER_TIMEOUT = 0.3 // Dash.DASH_ITEM_HOVER_TIMEOUT is now private
export const MIN_ICON_SIZE = 4 export const MIN_ICON_SIZE = 4
export const APPICON_MARGIN = 6 export const APPICON_MARGIN = 4
export const APPICON_PADDING = 8 export const APPICON_PADDING = 8
const T1 = 'ensureAppIconVisibilityTimeout' const T1 = 'ensureAppIconVisibilityTimeout'
@@ -199,7 +199,7 @@ export const Taskbar = class extends EventEmitter {
this._labelShowing = false this._labelShowing = false
this.fullScrollView = 0 this.fullScrollView = 0
let isVertical = panel.checkIfVertical() let isVertical = panel.geom.vertical
this._box = Utils.createBoxLayout({ this._box = Utils.createBoxLayout({
vertical: isVertical, vertical: isVertical,
@@ -470,7 +470,7 @@ export const Taskbar = class extends EventEmitter {
// force a fixed label width to prevent the icons from "wiggling" when an animation runs // force a fixed label width to prevent the icons from "wiggling" when an animation runs
// (adding or removing an icon). When the taskbar is full, revert to a dynamic label width // (adding or removing an icon). When the taskbar is full, revert to a dynamic label width
// to allow them to resize and make room for new icons. // to allow them to resize and make room for new icons.
if (!this.dtpPanel.checkIfVertical() && !this.isGroupApps) { if (!this.dtpPanel.geom.vertical && !this.isGroupApps) {
let initial = this.fullScrollView let initial = this.fullScrollView
if ( if (
@@ -1054,7 +1054,7 @@ export const Taskbar = class extends EventEmitter {
this._shownInitially = false this._shownInitially = false
this._redisplay() this._redisplay()
if (geometryChange && this.dtpPanel.checkIfVertical()) { if (geometryChange) {
this.previewMenu._updateClip() this.previewMenu._updateClip()
} }
} }
@@ -1115,7 +1115,7 @@ export const Taskbar = class extends EventEmitter {
if (!this._settings.is_writable('favorite-apps')) if (!this._settings.is_writable('favorite-apps'))
return DND.DragMotionResult.NO_DROP return DND.DragMotionResult.NO_DROP
let isVertical = this.dtpPanel.checkIfVertical() let isVertical = this.dtpPanel.geom.vertical
if (!this._box.contains(source) && !source._dashItemContainer) { if (!this._box.contains(source) && !source._dashItemContainer) {
//not an appIcon of the taskbar, probably from the applications view //not an appIcon of the taskbar, probably from the applications view

View File

@@ -69,6 +69,16 @@ export const DynamicTransparency = class {
], ],
() => this._updateAlphaAndSet(), () => this._updateAlphaAndSet(),
], ],
[
SETTINGS,
[
'changed::trans-use-border',
'changed::trans-border-use-custom-color',
'changed::trans-border-custom-color',
'changed::trans-border-width',
],
() => this._updateBorderAndSet(),
],
[ [
SETTINGS, SETTINGS,
[ [
@@ -84,7 +94,7 @@ export const DynamicTransparency = class {
this._proximityManager.removeWatch(this._proximityWatchId) this._proximityManager.removeWatch(this._proximityWatchId)
if (SETTINGS.get_boolean('trans-use-dynamic-opacity')) { if (SETTINGS.get_boolean('trans-use-dynamic-opacity')) {
let isVertical = this._dtpPanel.checkIfVertical() let isVertical = this._dtpPanel.geom.vertical
let threshold = TRANS_DYNAMIC_DISTANCE let threshold = TRANS_DYNAMIC_DISTANCE
this._windowOverlap = false this._windowOverlap = false
@@ -109,8 +119,9 @@ export const DynamicTransparency = class {
this._updateColor(themeBackground) this._updateColor(themeBackground)
this._updateAlpha(themeBackground) this._updateAlpha(themeBackground)
this._updateBorder()
this._setBackground() this._setBackground()
this._setActorStyle() this._setBorder()
} }
_updateAlphaAndSet() { _updateAlphaAndSet() {
@@ -118,6 +129,11 @@ export const DynamicTransparency = class {
this._setBackground() this._setBackground()
} }
_updateBorderAndSet() {
this._updateBorder()
this._setBorder()
}
_updateColor(themeBackground) { _updateColor(themeBackground) {
this.backgroundColorRgb = themeBackground || this._getThemeBackground() this.backgroundColorRgb = themeBackground || this._getThemeBackground()
} }
@@ -136,6 +152,37 @@ export const DynamicTransparency = class {
} }
} }
_updateBorder() {
let rgba = this._dtpPanel._getDefaultLineColor(
Utils.checkIfColorIsBright(this.backgroundColorRgb),
) // supply parameter manually or else an exception (something is undefined) will arise
const isLineCustom = SETTINGS.get_boolean('trans-border-use-custom-color')
rgba = isLineCustom
? SETTINGS.get_string('trans-border-custom-color')
: rgba
const showBorder = SETTINGS.get_boolean('trans-use-border')
const borderWidth = SETTINGS.get_int('trans-border-width')
const position = this._dtpPanel.getPosition()
let borderPosition = ''
if (position == St.Side.LEFT) {
borderPosition = 'right'
}
if (position == St.Side.RIGHT) {
borderPosition = 'left'
}
if (position == St.Side.TOP) {
borderPosition = 'bottom'
}
if (position == St.Side.BOTTOM) {
borderPosition = 'top'
}
const style = `border: 0 solid ${rgba}; border-${borderPosition}-width:${borderWidth}px;`
this._borderStyle = showBorder ? style : ''
}
_setBackground() { _setBackground() {
this.currentBackgroundColor = Utils.getrgbaColor( this.currentBackgroundColor = Utils.getrgbaColor(
this.backgroundColorRgb, this.backgroundColorRgb,
@@ -149,11 +196,12 @@ export const DynamicTransparency = class {
) )
} }
_setActorStyle() { _setBorder() {
this._dtpPanel.panel.set_style( this._dtpPanel.panel.set_style(
'background: none; ' + 'background: none; ' +
'border-image: none; ' + 'border-image: none; ' +
'background-image: none; ' + 'background-image: none; ' +
this._borderStyle +
'transition-duration: 300ms;' 'transition-duration: 300ms;'
) )
} }

View File

@@ -48,7 +48,7 @@ const MIN_DIMENSION = 100
const FOCUSED_COLOR_OFFSET = 24 const FOCUSED_COLOR_OFFSET = 24
const FADE_SIZE = 36 const FADE_SIZE = 36
const PEEK_INDEX_PROP = '_dtpPeekInitialIndex' const PEEK_INDEX_PROP = '_dtpPeekInitialIndex'
const MARGIN_SIZE = 8 const MARGIN_SIZE = 4
const SHOW_WINDOW_PREVIEWS_TIMEOUT = 400 const SHOW_WINDOW_PREVIEWS_TIMEOUT = 400
const LEAVE_TIMEOUT = 250 const LEAVE_TIMEOUT = 250
@@ -82,12 +82,11 @@ export const PreviewMenu = GObject.registerClass(
this.currentAppIcon = null this.currentAppIcon = null
this._focusedPreview = null this._focusedPreview = null
this._peekedWindow = null this._peekedWindow = null
this._displayWorkspaces = false
this.allowCloseWindow = true this.allowCloseWindow = true
this.peekInitialWorkspaceIndex = -1 this.peekInitialWorkspaceIndex = -1
this.opened = false this.opened = false
this.isVertical = this._translationProp = 'translation_' + (geom.vertical ? 'x' : 'y')
geom.position == St.Side.LEFT || geom.position == St.Side.RIGHT
this._translationProp = 'translation_' + (this.isVertical ? 'x' : 'y')
this._translationDirection = this._translationDirection =
geom.position == St.Side.TOP || geom.position == St.Side.LEFT ? -1 : 1 geom.position == St.Side.TOP || geom.position == St.Side.LEFT ? -1 : 1
this._translationOffset = this._translationOffset =
@@ -107,13 +106,13 @@ export const PreviewMenu = GObject.registerClass(
y_align: y_align:
Clutter.ActorAlign[geom.position != St.Side.BOTTOM ? 'START' : 'END'], Clutter.ActorAlign[geom.position != St.Side.BOTTOM ? 'START' : 'END'],
}) })
this._box = Utils.createBoxLayout({ vertical: this.isVertical }) this._box = Utils.createBoxLayout({ vertical: geom.vertical })
this._scrollView = new St.ScrollView({ this._scrollView = new St.ScrollView({
name: 'zorintaskbarPreviewScrollview', name: 'zorintaskbarPreviewScrollview',
hscrollbar_policy: St.PolicyType.NEVER, hscrollbar_policy: St.PolicyType.NEVER,
vscrollbar_policy: St.PolicyType.NEVER, vscrollbar_policy: St.PolicyType.NEVER,
enable_mouse_scrolling: true, enable_mouse_scrolling: true,
y_expand: !this.isVertical, y_expand: !geom.vertical,
}) })
this._scrollView.add_child(this._box) this._scrollView.add_child(this._box)
@@ -313,6 +312,10 @@ export const PreviewMenu = GObject.registerClass(
return this.currentAppIcon return this.currentAppIcon
} }
shouldDisplayWorkspaceNumbers() {
return this._displayWorkspaces
}
_setReactive(reactive) { _setReactive(reactive) {
this._box.get_children().forEach((c) => (c.reactive = reactive)) this._box.get_children().forEach((c) => (c.reactive = reactive))
this.menu.reactive = reactive this.menu.reactive = reactive
@@ -350,6 +353,8 @@ export const PreviewMenu = GObject.registerClass(
let currentPreviews = this._box.get_children() let currentPreviews = this._box.get_children()
let l = Math.max(windows.length, currentPreviews.length) let l = Math.max(windows.length, currentPreviews.length)
this._setShouldDisplayWorkspaces(windows)
for (let i = 0; i < l; ++i) { for (let i = 0; i < l; ++i) {
if (currentPreviews[i] && windows[i]) { if (currentPreviews[i] && windows[i]) {
currentPreviews[i].assignWindow(windows[i], this.opened) currentPreviews[i].assignWindow(windows[i], this.opened)
@@ -395,6 +400,19 @@ export const PreviewMenu = GObject.registerClass(
preview.assignWindow(window, this.opened) preview.assignWindow(window, this.opened)
} }
_setShouldDisplayWorkspaces(windows) {
if (SETTINGS.get_boolean('isolate-workspaces'))
return (this._displayWorkspaces = false)
let workspaces = {
[Utils.getCurrentWorkspace().index()]: 1,
}
windows.forEach((w) => (workspaces[w.get_workspace().index()] = 1))
this._displayWorkspaces = Object.keys(workspaces).length > 1
}
_addCloseTimeout() { _addCloseTimeout() {
this._timeoutsHandler.add([ this._timeoutsHandler.add([
T2, T2,
@@ -418,9 +436,8 @@ export const PreviewMenu = GObject.registerClass(
_onScrollEvent(actor, event) { _onScrollEvent(actor, event) {
if (!event.is_pointer_emulated()) { if (!event.is_pointer_emulated()) {
let vOrh = this.isVertical ? 'v' : 'h' let vOrh = this.panel.geom.vertical ? 'v' : 'h'
let adjustment = let adjustment = this._scrollView[`${vOrh}adjustment`]
this._scrollView['get_' + vOrh + 'scroll_bar']().get_adjustment()
let increment = adjustment.step_increment let increment = adjustment.step_increment
let delta = increment let delta = increment
@@ -479,7 +496,7 @@ export const PreviewMenu = GObject.registerClass(
WINDOW_PREVIEW_PADDING * 2) * WINDOW_PREVIEW_PADDING * 2) *
scaleFactor scaleFactor
if (this.isVertical) { if (this.panel.geom.vertical) {
w = previewSize w = previewSize
this.clipHeight = this.panel.monitor.height this.clipHeight = this.panel.monitor.height
y = this.panel.monitor.y y = this.panel.monitor.y
@@ -503,7 +520,12 @@ export const PreviewMenu = GObject.registerClass(
panelBoxTheme.get_padding(St.Side.LEFT) - panelBoxTheme.get_padding(St.Side.LEFT) -
MARGIN_SIZE MARGIN_SIZE
} else if (geom.position == St.Side.TOP) { } else if (geom.position == St.Side.TOP) {
y = geom.y + panelSize - panelBoxTheme.get_padding(St.Side.BOTTOM) + MARGIN_SIZE y =
geom.y +
geom.topOffset +
panelSize -
panelBoxTheme.get_padding(St.Side.BOTTOM) +
MARGIN_SIZE
} else { } else {
//St.Side.BOTTOM //St.Side.BOTTOM
y = y =
@@ -537,7 +559,7 @@ export const PreviewMenu = GObject.registerClass(
previewsHeight < this.panel.monitor.height, previewsHeight < this.panel.monitor.height,
) )
if (this.isVertical) { if (this.panel.geom.vertical) {
y = y =
sourceAllocation.y1 + sourceAllocation.y1 +
appIconMargin - appIconMargin -
@@ -597,7 +619,7 @@ export const PreviewMenu = GObject.registerClass(
_getScrollAdjustmentValues() { _getScrollAdjustmentValues() {
let [value, , upper, , , pageSize] = let [value, , upper, , , pageSize] =
this._scrollView[ this._scrollView[
(this.isVertical ? 'v' : 'h') + 'adjustment' (this.panel.geom.vertical ? 'v' : 'h') + 'adjustment'
].get_values() ].get_values()
return [value, upper, pageSize] return [value, upper, pageSize]
@@ -622,7 +644,7 @@ export const PreviewMenu = GObject.registerClass(
'background-gradient-direction:' + 'background-gradient-direction:' +
this.panel.getOrientation() this.panel.getOrientation()
if (this.isVertical) { if (this.panel.geom.vertical) {
y = end ? this.panel.monitor.height - FADE_SIZE : 0 y = end ? this.panel.monitor.height - FADE_SIZE : 0
} else { } else {
x = end ? this.panel.monitor.width - FADE_SIZE : 0 x = end ? this.panel.monitor.width - FADE_SIZE : 0
@@ -635,8 +657,8 @@ export const PreviewMenu = GObject.registerClass(
style: fadeStyle, style: fadeStyle,
x: x, x: x,
y: y, y: y,
width: this.isVertical ? this.width : FADE_SIZE, width: this.panel.geom.vertical ? this.width : FADE_SIZE,
height: this.isVertical ? FADE_SIZE : this.height, height: this.panel.geom.vertical ? FADE_SIZE : this.height,
}) })
return fadeWidget return fadeWidget
@@ -650,7 +672,7 @@ export const PreviewMenu = GObject.registerClass(
if (!c.animatingOut) { if (!c.animatingOut) {
let [width, height] = c.getSize() let [width, height] = c.getSize()
if (this.isVertical) { if (this.panel.geom.vertical) {
previewsWidth = Math.max(width, previewsWidth) previewsWidth = Math.max(width, previewsWidth)
previewsHeight += height previewsHeight += height
} else { } else {
@@ -1306,7 +1328,7 @@ export const Preview = GObject.registerClass(
let size = SETTINGS.get_int('window-preview-size') * scaleFactor let size = SETTINGS.get_int('window-preview-size') * scaleFactor
let w, h let w, h
if (this._previewMenu.isVertical) { if (this._previewMenu.panel.geom.vertical) {
w = size w = size
h = (w * aspectRatio.y.size) / aspectRatio.x.size h = (w * aspectRatio.y.size) / aspectRatio.x.size
} else { } else {

View File

@@ -15,10 +15,38 @@
<object class="AdwPreferencesGroup"> <object class="AdwPreferencesGroup">
<child> <child>
<object class="AdwActionRow"> <object class="AdwActionRow">
<property name="title" translatable="yes">Only hide the panel when it is obstructed by windows</property> <property name="title" translatable="yes">Only hide the panel from windows</property>
<child> <child>
<object class="GtkSwitch" id="intellihide_window_hide_switch"> <object class="GtkBox">
<property name="valign">center</property> <property name="margin-end">10</property>
<child>
<object class="GtkCheckButton" id="intellihide_window_hide_button">
<property name="receives-default">False</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Overlapping</property>
<property name="name">4</property>
<property name="use-markup">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<child>
<object class="GtkCheckButton" id="intellihide_window_monitor_hide_button">
<property name="receives-default">False</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">On same monitor</property>
<property name="name">4</property>
<property name="use-markup">True</property>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>
@@ -44,7 +72,61 @@
<object class="AdwPreferencesGroup"> <object class="AdwPreferencesGroup">
<child> <child>
<object class="AdwActionRow"> <object class="AdwActionRow">
<property name="title" translatable="yes">Require pressure at the edge of the screen to reveal the panel</property> <property name="title" translatable="yes">Touching the monitor's edge with the pointer reveals the panel</property>
<child>
<object class="GtkSwitch" id="intellihide_use_pointer_switch">
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="margin-start">10</property>
<child>
<object class="GtkCheckButton" id="intellihide_use_pointer_limit_button">
<property name="receives-default">False</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Limit to panel length</property>
<property name="name">4</property>
<property name="use-markup">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="intellihide_revealed_hover_options">
<property name="title" translatable="yes">Hovering the panel area keeps the panel revealed</property>
<child>
<object class="GtkSwitch" id="intellihide_revealed_hover_switch">
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="margin-start">10</property>
<child>
<object class="GtkCheckButton" id="intellihide_revealed_hover_limit_button">
<property name="receives-default">False</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Limit to panel length</property>
<property name="name">4</property>
<property name="use-markup">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="intellihide_use_pressure_options">
<property name="title" translatable="yes">Require pressure at the edge of the monitor to reveal the panel</property>
<child> <child>
<object class="GtkSwitch" id="intellihide_use_pressure_switch"> <object class="GtkSwitch" id="intellihide_use_pressure_switch">
<property name="valign">center</property> <property name="valign">center</property>

View File

@@ -100,6 +100,17 @@
<child> <child>
<object class="AdwPreferencesGroup" id="finetune_group_gnome"> <object class="AdwPreferencesGroup" id="finetune_group_gnome">
<property name="title" translatable="yes">Gnome functionality</property> <property name="title" translatable="yes">Gnome functionality</property>
<child>
<object class="AdwActionRow">
<property name="subtitle" translatable="yes">(overview)</property>
<property name="title" translatable="yes">Keep original gnome-shell dash</property>
<child>
<object class="GtkSwitch" id="stockgs_dash_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child> <child>
<object class="AdwActionRow"> <object class="AdwActionRow">
<property name="title" translatable="yes">Keep original gnome-shell top panel</property> <property name="title" translatable="yes">Keep original gnome-shell top panel</property>

View File

@@ -69,7 +69,7 @@
<object class="AdwPreferencesGroup" id="position_group_on_monitor2"> <object class="AdwPreferencesGroup" id="position_group_on_monitor2">
<child> <child>
<object class="AdwActionRow"> <object class="AdwActionRow">
<property name="title" translatable="yes">Panel screen position</property> <property name="title" translatable="yes">Panel monitor position</property>
<child> <child>
<object class="GtkToggleButton" id="position_bottom_button"> <object class="GtkToggleButton" id="position_bottom_button">
<property name="active">True</property> <property name="active">True</property>

View File

@@ -14,6 +14,20 @@
<property name="step-increment">5</property> <property name="step-increment">5</property>
<property name="upper">100</property> <property name="upper">100</property>
</object> </object>
<!--<object class="GtkAdjustment" id="trans_border_opacity_adjustment">
<property name="upper">100</property>
<property name="step_increment">5</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="trans_border_width_adjustment">
<property name="lower">1</property>
<property name="upper">10</property>
<property name="step_increment">1</property>
<property name="page_increment">2</property>
</object>-->
<object class="AdwPreferencesPage" id="style"> <object class="AdwPreferencesPage" id="style">
<property name="icon-name">applications-graphics-symbolic</property> <property name="icon-name">applications-graphics-symbolic</property>
<property name="title" translatable="yes">Style</property> <property name="title" translatable="yes">Style</property>
@@ -133,6 +147,52 @@
</child> </child>
</object> </object>
</child> </child>
<!-- group dynamic trans4 -->
<!-- <child>
<object class="AdwPreferencesGroup" id="style_group_dynamic_trans4">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Panel border</property>
<child>
<object class="GtkSwitch" id="trans_border_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="trans_border_color_box">
<property name="title" translatable="yes">Override border color</property>
<child>
<object class="GtkColorButton" id="trans_border_color_colorbutton">
<property name="receives_default">True</property>
<property name="valign">center</property>
<property name="use_alpha">True</property>
</object>
</child>
<child>
<object class="GtkSwitch" id="trans_border_color_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="trans_border_width_box">
<property name="title" translatable="yes">Border thickness</property>
<child>
<object class="GtkSpinButton" id="trans_border_width_spinbutton">
<property name="valign">center</property>
<property name="text" translatable="yes">1</property>
<property name="adjustment">trans_border_width_adjustment</property>
</object>
</child>
</object>
</child>
</object>
</child>-->
</object> </object>
<object class="GtkAdjustment" id="global_border_radius_adjustment"> <object class="GtkAdjustment" id="global_border_radius_adjustment">
<property name="lower">0.33</property> <property name="lower">0.33</property>