8 Commits
68.2.3 ... 68.9

Author SHA1 Message Date
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
25 changed files with 5641 additions and 2883 deletions

View File

@@ -8,9 +8,12 @@ IMAGES = ./*
TOLOCALIZE = src/extension.js src/prefs.js src/appIcons.js src/taskbar.js
MSGSRC = $(wildcard po/*.po)
ifeq ($(strip $(DESTDIR)),)
INSTALLTYPE = local
INSTALLBASE = $(HOME)/.local/share/gnome-shell/extensions
else
INSTALLTYPE = system
INSTALLBASE = $(DESTDIR)/usr/share/gnome-shell/extensions
SHARE_PREFIX = $(DESTDIR)/usr/share
endif
INSTALLNAME = zorin-taskbar@zorinos.com
@@ -65,6 +68,12 @@ install-local: _build
rm -rf $(INSTALLBASE)/$(INSTALLNAME)
mkdir -p $(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
echo done

62
debian/changelog vendored
View File

@@ -1,3 +1,65 @@
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

View File

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

3970
po/ja.po

File diff suppressed because it is too large Load Diff

1158
po/pl.po

File diff suppressed because it is too large Load Diff

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>
<description>Style of the running indicator for the icon for applications which are not currently focused</description>
</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">
<default>false</default>
<summary>Keep top panel</summary>
@@ -149,6 +154,26 @@
<summary>Modified panel opacity</summary>
<description>Modified opacity for the panel when a window is near</description>
</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">
<default>false</default>
<summary>Intellihide</summary>
@@ -156,18 +181,39 @@
</key>
<key type="b" name="intellihide-hide-from-windows">
<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>
</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">
<default>'FOCUSED_WINDOWS'</default>
<summary>Intellihide behaviour</summary>
<description>Dictates how to intelligently hide the panel</description>
</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">
<default>false</default>
<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 type="b" name="intellihide-show-in-fullscreen">
<default>false</default>

View File

@@ -168,7 +168,7 @@ export const TaskbarAppIcon = GObject.registerClass(
})
this._dtpIconContainer = new St.Widget({
layout_manager: new Clutter.BinLayout(),
style: getIconContainerStyle(panel.checkIfVertical()),
style: getIconContainerStyle(panel.geom.vertical),
})
this.remove_child(this._iconContainer)
@@ -199,7 +199,7 @@ export const TaskbarAppIcon = GObject.registerClass(
this._container.add_child(this._dotsContainer)
this.set_child(this._container)
if (panel.checkIfVertical()) {
if (panel.geom.vertical) {
this.set_width(panel.geom.innerSize)
}
@@ -365,6 +365,11 @@ export const TaskbarAppIcon = GObject.registerClass(
_onDestroy() {
super._onDestroy()
if (this._updateIconIdleId) {
GLib.source_remove(this._updateIconIdleId)
this._updateIconIdleId = 0
}
this._timeoutsHandler.destroy()
this._signalsHandler.destroy()
@@ -395,18 +400,25 @@ export const TaskbarAppIcon = GObject.registerClass(
// 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
// 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.width, rect.height] = this.get_transformed_size()
;[rect.x, rect.y] = this.get_transformed_position()
;[rect.width, rect.height] = this.get_transformed_size()
let windows = this.window
? [this.window]
: this.getAppIconInterestingWindows(true)
windows.forEach(function (w) {
w.set_icon_geometry(rect)
let windows = this.window
? [this.window]
: this.getAppIconInterestingWindows(true)
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
let variableWidth =
!useFixedWidth ||
this.dtpPanel.checkIfVertical() ||
this.dtpPanel.geom.vertical ||
this.dtpPanel.taskbar.fullScrollView
this._windowTitle[maxLabelWidth > 0 ? 'show' : 'hide']()
@@ -621,7 +633,7 @@ export const TaskbarAppIcon = GObject.registerClass(
_setAppIconPadding() {
const padding = getIconPadding(this.dtpPanel)
const margin = Taskbar.APPICON_MARGIN
let vertical = this.dtpPanel.checkIfVertical()
let vertical = this.dtpPanel.geom.vertical
this.set_style(
`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)
this._menuManager.addMenu(this._menu)
}
this._menu.updateQuitText()
this._menu.updateQuitItems()
this.emit('menu-state-changed', true)
@@ -1599,7 +1611,6 @@ export function getInterestingWindows(app, monitor, isolateMonitors) {
if (
monitor &&
SETTINGS.get_boolean('multi-monitors') &&
(isolateMonitors || SETTINGS.get_boolean('isolate-monitors'))
) {
windows = windows.filter(function (w) {
@@ -1647,36 +1658,44 @@ export class TaskbarSecondaryMenu extends AppMenu.AppMenu {
this._enableFavorites = true
this._showSingleWindows = true
if (source.window)
this._quitAllItem = this.addAction('QuitAll', () =>
this._quitFromTaskbar(true),
)
// replace quit item
delete this._quitItem
this._quitItem = this.addAction(_('Quit'), () => this._quitFromTaskbar())
}
updateQuitText() {
let count = this.sourceActor.window
? 1
: getInterestingWindows(this._app, this.sourceActor.dtpPanel.monitor)
.length
updateQuitItems() {
let ungrouped = !!this.sourceActor.window
let quitText = _('Quit')
let count = getInterestingWindows(
this._app,
this.sourceActor.dtpPanel.monitor,
).length
let quitMultipleText = ngettext(
'Quit %d Window',
'Quit %d Windows',
count,
).format(count)
if (count > 0) {
let quitFromTaskbarMenuText = ''
if (count == 1) quitFromTaskbarMenuText = _('Quit')
else
quitFromTaskbarMenuText = ngettext(
'Quit %d Window',
'Quit %d Windows',
count,
).format(count)
if (ungrouped) {
this._quitAllItem.label.set_text(quitMultipleText)
this._quitAllItem.visible = count > 1
} else quitText = quitMultipleText
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 windows = this.sourceActor.window // ungrouped applications
? [this.sourceActor.window]
: getInterestingWindows(this._app, this.sourceActor.dtpPanel.monitor)
let windows =
!all && this.sourceActor.window // ungrouped applications
? [this.sourceActor.window]
: getInterestingWindows(this._app, this.sourceActor.dtpPanel.monitor)
if (windows.length == this._app.get_windows().length)
this._app.request_quit()
@@ -1708,7 +1727,7 @@ export function ItemShowLabel() {
let labelWidth = this.label.get_width()
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 xOffset = Math.floor((itemWidth - labelWidth) / 2)
@@ -1909,7 +1928,7 @@ export const ShowAppsIconWrapper = class extends EventEmitter {
*/
export const MyShowAppsIconMenu = class extends PopupMenu.PopupMenu {
constructor(actor, dtpPanel) {
super(actor, 0, dtpPanel.getPosition())
super(actor, 0, dtpPanel.geom.position)
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'
let panelManager
let startupCompleteHandler
let zorinDashDelayId = 0
export let DTP_EXTENSION = null
@@ -54,13 +53,17 @@ export default class ZorinTaskbarExtension extends Extension {
constructor(metadata) {
super(metadata)
this._realHasOverview = Main.sessionMode.hasOverview
//create an object that persists until gnome-shell is restarted, even if the extension is disabled
PERSISTENTSTORAGE = {}
}
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
SETTINGS = this.getSettings('org.gnome.shell.extensions.zorin-taskbar')
try {
@@ -94,16 +97,6 @@ export default class ZorinTaskbarExtension extends Extension {
// To remove later, try to map settings using monitor indexes to monitor ids
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()
let completeEnable = () => {
@@ -134,15 +127,20 @@ export default class ZorinTaskbarExtension extends Extension {
disable() {
if (zorinDashDelayId) GLib.Source.remove(zorinDashDelayId)
zorinDashDelayId = 0
panelManager.disable()
panelManager?.disable()
PanelSettings.clearCache()
DTP_EXTENSION = null
SETTINGS = null
TILINGSETTINGS = null
SHELLSETTINGS = null
DESKTOPSETTINGS = null
TERMINALSETTINGS = null
NOTIFICATIONSSETTINGS = null
panelManager = null
tracker = null
delete global.zorinTaskbar
@@ -150,12 +148,7 @@ export default class ZorinTaskbarExtension extends Extension {
AppIcons.resetRecentlyClickedApp()
if (startupCompleteHandler) {
Main.layoutManager.disconnect(startupCompleteHandler)
startupCompleteHandler = null
}
Main.sessionMode.hasOverview = this._realHasOverview
this._alreadyEnabled = false
}
resetGlobalStyles() {

View File

@@ -20,10 +20,10 @@
import Clutter from 'gi://Clutter'
import Meta from 'gi://Meta'
import Mtk from 'gi://Mtk'
import Shell from 'gi://Shell'
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 Main from 'resource:///org/gnome/shell/ui/main.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_ANIMATION_TIME = 200
const INTELLIHIDE_CLOSE_DELAY = 400
const INTELLIHIDE_REVEAL_DELAY = 0
const INTELLIHIDE_ENABLE_START_DELAY = 2000
//timeout intervals
@@ -90,10 +91,11 @@ export const Intellihide = class {
this._monitor = this._dtpPanel.monitor
this._animationDestination = -1
this._pendingUpdate = false
this._hover = false
this._hoveredOut = false
this._windowOverlap = false
this._translationProp =
'translation_' + (this._dtpPanel.checkIfVertical() ? 'x' : 'y')
'translation_' + (this._dtpPanel.geom.vertical ? 'x' : 'y')
this._panelBox.translation_y = 0
this._panelBox.translation_x = 0
@@ -101,9 +103,18 @@ export const Intellihide = class {
this._setTrackPanel(true)
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._panelBox.get_parent(),
watched,
this._dtpPanel.monitor.index,
Proximity.Mode[SETTINGS.get_string('intellihide-behaviour')],
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')
@@ -140,19 +152,19 @@ export const Intellihide = class {
disable(reset) {
this.enabled = false
this._hover = false
if (this._proximityWatchId) {
this._proximityManager.removeWatch(this._proximityWatchId)
}
this._setTrackPanel(false)
this._signalsHandler.destroy()
this._timeoutsHandler.destroy()
this._removeRevealMechanism()
this._revealPanel(!reset)
this._signalsHandler.destroy()
this._timeoutsHandler.destroy()
}
destroy() {
@@ -170,7 +182,7 @@ export const Intellihide = class {
)
}
revealAndHold(holdStatus) {
revealAndHold(holdStatus, immediate) {
if (
!this.enabled ||
(holdStatus == Hold.NOTIFY &&
@@ -179,7 +191,7 @@ export const Intellihide = class {
)
return
if (!this._holdStatus) this._revealPanel()
if (!this._holdStatus) this._revealPanel(immediate)
this._holdStatus |= holdStatus
@@ -202,6 +214,13 @@ export const Intellihide = class {
this.enable()
}
_hidesFromWindows() {
return (
SETTINGS.get_boolean('intellihide-hide-from-windows') ||
SETTINGS.get_boolean('intellihide-hide-from-monitor-windows')
)
}
_changeEnabledStatus() {
let intellihide = SETTINGS.get_boolean('intellihide')
let onlySecondary = SETTINGS.get_boolean('intellihide-only-secondary')
@@ -225,21 +244,19 @@ export const Intellihide = class {
[
this._dtpPanel.taskbar,
['menu-closed', 'end-drag'],
() => {
this._panelBox.sync_hover()
this._onHoverChanged()
},
() => this._queueUpdatePanelPosition(),
],
[
SETTINGS,
[
'changed::intellihide-use-pointer',
'changed::intellihide-use-pressure',
'changed::intellihide-hide-from-windows',
'changed::intellihide-behaviour',
'changed::intellihide-hide-from-monitor-windows',
'changed::intellihide-behaviour'
],
() => this.reset(),
],
[this._panelBox, 'notify::hover', () => this._onHoverChanged()],
[
this._dtpPanel.taskbar.previewMenu,
'open-state-changed',
@@ -261,22 +278,12 @@ export const Intellihide = class {
}
}
_onHoverChanged() {
this._hoveredOut = !this._panelBox.hover
this._queueUpdatePanelPosition()
}
_setTrackPanel(enable) {
let actorData = Utils.getTrackedActorData(this._panelBox)
actorData.affectsStruts = !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
Main.layoutManager._queueUpdateRegions()
@@ -299,19 +306,26 @@ export const Intellihide = class {
this._signalsHandler.add([
this._pressureBarrier,
'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() {
if (this._pointerWatch) {
PointerWatcher.getPointerWatcher()._removeWatch(this._pointerWatch)
this._pointerWatch = 0
}
if (this._pressureBarrier) {
@@ -326,7 +340,7 @@ export const Intellihide = class {
let position = this._dtpPanel.geom.position
let opts = { backend: global.backend }
if (this._dtpPanel.checkIfVertical()) {
if (this._dtpPanel.geom.vertical) {
opts.y1 = this._monitor.y
opts.y2 = this._monitor.y + this._monitor.height
opts.x1 = opts.x2 = this._monitor.x
@@ -352,26 +366,77 @@ export const Intellihide = class {
}
_checkMousePointer(x, y) {
let position = this._dtpPanel.geom.position
if (
!this._panelBox.hover &&
!this._pressureBarrier &&
!this._hover &&
!Main.overview.visible &&
((position == St.Side.TOP && y <= this._monitor.y + 1) ||
(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._pointerIn(x, y, 1, 'intellihide-use-pointer-limit-size')
) {
this._hover = 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) {
if (
!fromRevealMechanism &&
@@ -405,7 +470,7 @@ export const Intellihide = class {
Main.overview.visibleTarget ||
this._dtpPanel.taskbar.previewMenu.opened ||
this._dtpPanel.taskbar._dragMonitor ||
this._panelBox.get_hover() ||
this._hover ||
(this._dtpPanel.geom.position == St.Side.TOP &&
Main.layoutManager.panelBox.get_hover()) ||
this._checkIfGrab()
@@ -425,34 +490,23 @@ export const Intellihide = class {
return !mouseBtnIsPressed
}
if (!SETTINGS.get_boolean('intellihide-hide-from-windows')) {
return this._panelBox.hover
if (!this._hidesFromWindows()) {
return this._hover
}
return !this._windowOverlap
}
_checkIfGrab() {
let isGrab
if (GrabHelper._grabHelperStack)
// gnome-shell < 42
isGrab = GrabHelper._grabHelperStack.some(
(gh) => gh._owner == this._dtpPanel.panel,
)
else if (global.stage.get_grab_actor) {
// gnome-shell >= 42
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))
}
let grabActor = global.stage.get_grab_actor()
let sourceActor = grabActor?._sourceActor || grabActor
let isGrab =
sourceActor &&
(sourceActor == Main.layoutManager.dummyCursor ||
this._dtpPanel.statusArea.quickSettings?.menu.actor.contains(
sourceActor,
) ||
this._dtpPanel.panel.contains(sourceActor))
if (isGrab)
//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._animatePanel(0, immediate)
this._animatePanel(
0,
immediate,
() => (this._dtpPanel.taskbar._shownInitially = true),
)
}
_hidePanel(immediate) {
let position = this._dtpPanel.geom.position
let size =
this._panelBox[
position == St.Side.LEFT || position == St.Side.RIGHT
? 'width'
: 'height'
]
let size = this._panelBox[this._dtpPanel.geom.vertical ? 'width' : 'height']
let coefficient =
position == St.Side.TOP || position == St.Side.LEFT ? -1 : 1
this._animatePanel(size * coefficient, immediate)
}
_animatePanel(destination, immediate) {
_animatePanel(destination, immediate, onComplete) {
if (destination === this._animationDestination) return
Utils.stopAnimations(this._panelBox)
this._animationDestination = destination
let update = () =>
this._timeoutsHandler.add([
T3,
POST_ANIMATE_MS,
() => {
Main.layoutManager._queueUpdateRegions()
this._queueUpdatePanelPosition()
},
])
if (immediate) {
this._panelBox[this._translationProp] = destination
this._panelBox.visible = !destination
update()
} 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 = {
//when entering/leaving the overview, use its animation time instead of the one from the settings
time: Main.overview.visible
? SIDE_CONTROLS_ANIMATION_TIME
: INTELLIHIDE_ANIMATION_TIME * 0.001,
//only delay the animation when hiding the panel after the user hovered out
delay:
destination != 0 && this._hoveredOut
? INTELLIHIDE_CLOSE_DELAY * 0.001
: 0,
delay,
transition: 'easeOutQuad',
onComplete: () => {
this._panelBox.visible = !destination
Main.layoutManager._queueUpdateRegions()
this._timeoutsHandler.add([
T3,
POST_ANIMATE_MS,
() => this._queueUpdatePanelPosition(),
])
onComplete ? onComplete() : null
update()
},
}

View File

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

View File

@@ -82,10 +82,12 @@ const SHOW_SHOWDESKTOP_DELAY = 1000
const SHOW_SHOWDESKTOP_TIME = 200
const MIN_PANEL_SIZE = 22
export const GS_PANEL_SIZE = 32
export const Panel = GObject.registerClass(
{},
class Panel extends St.Widget {
_init(panelManager, monitor, panelBox, isStandalone) {
_init(panelManager, monitor, clipContainer, panelBox, isStandalone) {
super._init({
style_class: 'zorintaskbarPanel',
layout_manager: new Clutter.BinLayout(),
@@ -99,6 +101,7 @@ export const Panel = GObject.registerClass(
this.panelStyle = new PanelStyle.PanelStyle()
this.monitor = monitor
this.clipContainer = clipContainer
this.panelBox = panelBox
// 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.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]))
;['activities', systemMenuInfo.name, 'dateMenu'].forEach((b) => {
let container = this.statusArea[b].container
@@ -347,7 +362,7 @@ export const Panel = GObject.registerClass(
this.panelStyle.enable(this)
if (this.checkIfVertical()) {
if (this.geom.vertical) {
this._signalsHandler.add([
this.panelBox,
'notify::visible',
@@ -375,8 +390,10 @@ export const Panel = GObject.registerClass(
this.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS)
if (!Main.layoutManager._startingUp)
GLib.idle_add(GLib.PRIORITY_LOW, () => {
this._waitResetGeomId = GLib.idle_add(GLib.PRIORITY_LOW, () => {
this._waitResetGeomId = 0
this._resetGeometry()
return GLib.SOURCE_REMOVE
})
}
@@ -387,6 +404,11 @@ export const Panel = GObject.registerClass(
this._timeoutsHandler.destroy()
this._signalsHandler.destroy()
if (this._waitResetGeomId) {
GLib.source_remove(this._waitResetGeomId)
this._waitResetGeomId = 0
}
this.panel.remove_child(this.taskbar.actor)
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)
delete this.panel._toggleMenu
delete Utils.getIndicators(
this.statusArea[systemMenuName]._volumeOutput,
)._dtpIgnoreScroll
@@ -504,13 +532,11 @@ export const Panel = GObject.registerClass(
}
checkIfVertical() {
let position = this.getPosition()
return position == St.Side.LEFT || position == St.Side.RIGHT
return this.geom.vertical
}
getOrientation() {
return this.checkIfVertical() ? 'vertical' : 'horizontal'
return this.geom.vertical ? 'vertical' : 'horizontal'
}
updateElementPositions() {
@@ -591,7 +617,7 @@ export const Panel = GObject.registerClass(
}
_bindSettingsChanges() {
let isVertical = this.checkIfVertical()
let isVertical = this.geom.vertical
this._signalsHandler.add(
[
@@ -706,7 +732,7 @@ export const Panel = GObject.registerClass(
this.taskbar.resetAppIcons(true)
this.dynamicTransparency.updateExternalStyle()
if (this.checkIfVertical()) {
if (this.geom.vertical) {
this.showAppsIconWrapper.realShowAppsIcon.toggleButton.set_width(
this.geom.innerSize,
)
@@ -715,7 +741,8 @@ export const Panel = GObject.registerClass(
}
getGeometry() {
let isVertical = this.checkIfVertical()
let position = this.getPosition()
let vertical = position == St.Side.LEFT || position == St.Side.RIGHT
let scaleFactor = Utils.getScaleFactor()
let panelBoxTheme = this.panelBox.get_theme_node()
let sideMargins =
@@ -724,7 +751,6 @@ export const Panel = GObject.registerClass(
let topBottomMargins =
panelBoxTheme.get_padding(St.Side.TOP) +
panelBoxTheme.get_padding(St.Side.BOTTOM)
let position = this.getPosition()
let panelLength = PanelSettings.getPanelLength(
SETTINGS,
this.monitor.index,
@@ -752,11 +778,11 @@ export const Panel = GObject.registerClass(
SETTINGS.get_boolean('stockgs-keep-top-panel') &&
Main.layoutManager.primaryMonitor == this.monitor
) {
gsTopPanelHeight = Main.layoutManager.panelBox.height
gsTopPanelHeight = GS_PANEL_SIZE
topOffset = position == St.Side.TOP ? gsTopPanelHeight : 0
}
if (isVertical) {
if (vertical) {
if (!SETTINGS.get_boolean('group-apps')) {
// add window title width and side padding of _dtpIconContainer when vertical
innerSize = outerSize +=
@@ -800,13 +826,13 @@ export const Panel = GObject.registerClass(
if (length < 1) {
// 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
else if (isVertical && anchor == Pos.MIDDLE)
else if (vertical && anchor == Pos.MIDDLE)
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
else if (isVertical && anchor == Pos.END)
else if (vertical && anchor == Pos.END)
y += this.monitor.height - h - topBottomMargins
}
@@ -824,7 +850,9 @@ export const Panel = GObject.registerClass(
fixedPadding,
varPadding,
topOffset, // only if gnome-shell top panel is present and position is TOP
gsTopPanelHeight, // only if gnome-shell top panel is present
position,
vertical,
dynamic,
dockMode,
}
@@ -1112,12 +1140,10 @@ export const Panel = GObject.registerClass(
}
_setPanelPosition() {
let clipContainer = this.panelBox.get_parent()
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
if (this.statusArea.quickSettings?.menu) {
@@ -1135,22 +1161,21 @@ export const Panel = GObject.registerClass(
](cssName)
})
this._setPanelClip(clipContainer)
this._setPanelClip()
Main.layoutManager._updateHotCorners()
Main.layoutManager._updatePanelBarrier(this)
}
_setPanelClip(clipContainer) {
clipContainer = clipContainer || this.panelBox.get_parent()
_setPanelClip() {
this._timeoutsHandler.add([
T6,
0,
() =>
Utils.setClip(
clipContainer,
clipContainer.x,
clipContainer.y,
this.clipContainer,
this.clipContainer.x,
this.clipContainer.y,
this.panelBox.width,
this.panelBox.height,
0,
@@ -1193,7 +1218,7 @@ export const Panel = GObject.registerClass(
}
}
let params = this.checkIfVertical()
let params = this.geom.vertical
? [stageY, 'y', 'height']
: [stageX, 'x', 'width']
let dragWindow = this._getDraggableWindowForPosition.apply(
@@ -1240,7 +1265,7 @@ export const Panel = GObject.registerClass(
}
_onBoxActorAdded(box) {
if (this.checkIfVertical()) {
if (this.geom.vertical) {
this._setVertical(box, true)
}
}
@@ -1347,7 +1372,9 @@ export const Panel = GObject.registerClass(
!setClockText(datetimeParts) &&
!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) {
this._clockFormat = DESKTOPSETTINGS.get_string('clock-format')
@@ -1426,10 +1453,16 @@ export const Panel = GObject.registerClass(
}
}
_setShowDesktopButtonStyle() {
let rgb = this._getBackgroundBrightness()
_getDefaultLineColor(isBrightOverride) {
return (typeof isBrightOverride === 'undefined' &&
this._getBackgroundBrightness()) ||
isBrightOverride
? 'rgba(55, 55, 55, .2)'
: 'rgba(200, 200, 200, .2)'
}
_setShowDesktopButtonStyle() {
let rgb = this._getDefaultLineColor()
for (let i = 0; i < this._showDesktopButton.get_children().length; i++) {
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)
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 + ';'
this._showDesktopButton.set_style('padding: ' + buttonPadding + ';')
} else {
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;'
style += isVertical

View File

@@ -35,6 +35,7 @@ import * as Utils from './utils.js'
import * as DesktopIconsIntegration from './desktopIconsIntegration.js'
import { DTP_EXTENSION, SETTINGS, tracker } from './extension.js'
import Gio from 'gi://Gio'
import GLib from 'gi://GLib'
import GObject from 'gi://GObject'
import Clutter from 'gi://Clutter'
@@ -42,6 +43,7 @@ import Meta from 'gi://Meta'
import Shell from 'gi://Shell'
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 LookingGlass from 'resource:///org/gnome/shell/ui/lookingGlass.js'
import * as Main from 'resource:///org/gnome/shell/ui/main.js'
@@ -66,6 +68,11 @@ export const PanelManager = class {
this.dtpPrimaryMonitor = Main.layoutManager.primaryMonitor // The real primary monitor should always have the main panel
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
if (this.dtpPrimaryMonitor) {
this.primaryPanel = this._createPanel(
this.dtpPrimaryMonitor,
@@ -94,6 +101,8 @@ export const PanelManager = class {
if (reset) return
this._syncAppSwitcherWorkspaceIsolation()
this.notificationsMonitor = new NotificationsMonitor()
this._desktopIconsUsableArea =
@@ -159,19 +168,23 @@ export const PanelManager = class {
},
)
this._injectionManager.overrideMethod(
Object.getPrototypeOf(
// WorkspaceDot in activities button
Main.panel.statusArea.activities.get_first_child().get_first_child(),
),
'vfunc_get_preferred_width',
(get_preferred_width) =>
function (forHeight) {
return Utils.getBoxLayoutVertical(this.get_parent())
? [0, forHeight]
: get_preferred_width.call(this, forHeight)
},
)
let activitiesChild = Main.panel.statusArea.activities.get_first_child()
if (activitiesChild?.constructor.name == 'WorkspaceIndicators') {
this._injectionManager.overrideMethod(
Object.getPrototypeOf(
// WorkspaceDot in activities button
activitiesChild.get_first_child(),
),
'vfunc_get_preferred_width',
(get_preferred_width) =>
function (forHeight) {
return Utils.getBoxLayoutVertical(this.get_parent())
? [0, forHeight]
: get_preferred_width.call(this, forHeight)
},
)
}
LookingGlass.LookingGlass.prototype._oldResize =
LookingGlass.LookingGlass.prototype._resize
@@ -249,12 +262,19 @@ export const PanelManager = class {
})
},
],
[
SETTINGS,
'changed::isolate-workspaces',
this._syncAppSwitcherWorkspaceIsolation,
],
[
Utils.DisplayWrapper.getMonitorManager(),
'monitors-changed',
async () => {
if (Main.layoutManager.primaryMonitor) {
await PanelSettings.setMonitorsInfo(SETTINGS)
await PanelSettings.setMonitorsInfo(SETTINGS).catch((e) =>
console.log(e),
)
this._reset()
}
},
@@ -271,7 +291,7 @@ export const PanelManager = class {
this._adjustPanelMenuButton(
this._getPanelMenuButton(child.get_first_child()),
this.primaryPanel.monitor,
this.primaryPanel.getPosition(),
this.primaryPanel.geom.position,
)
},
]),
@@ -310,10 +330,8 @@ export const PanelManager = class {
p.disable()
let clipContainer = p.panelBox.get_parent()
Main.layoutManager._untrackActor(p)
Main.layoutManager._untrackActor(p.panelBox)
Main.layoutManager.removeChrome(clipContainer)
if (p.isStandalone) {
p.panelBox.destroy()
@@ -322,14 +340,18 @@ export const PanelManager = class {
p.remove_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, {
affectsStruts: true,
trackFullscreen: true,
})
}
Main.layoutManager.removeChrome(p.clipContainer)
})
if (Main.layoutManager.primaryMonitor) {
@@ -385,6 +407,20 @@ export const PanelManager = class {
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() {
this._desktopIconsUsableArea?.resetMargins()
this.allPanels.forEach((p) => {
@@ -638,20 +674,29 @@ export const PanelManager = class {
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)
panel.enable()
Main.layoutManager.trackChrome(panel, {
affectsInputRegion: true,
affectsStruts: false,
})
panelBox._dtpIndex = monitor.index
panelBox.set_position(0, 0)
if (panel.checkIfVertical) panelBox.set_width(-1)
panelBox.set_width(-1)
this._findPanelMenuButtons(panelBox).forEach((pmb) =>
this._adjustPanelMenuButton(pmb, monitor, panel.getPosition()),
this._adjustPanelMenuButton(pmb, monitor, panel.geom.position),
)
panel.taskbar.iconAnimator.start()
@@ -895,7 +940,7 @@ function newUpdateHotCorners() {
global.zorinTaskbar.panels,
(p) => p.monitor.index == i,
)
let panelPosition = panel ? panel.getPosition() : St.Side.BOTTOM
let panelPosition = panel ? panel.geom.position : St.Side.BOTTOM
let panelTopLeft =
panelPosition == St.Side.TOP || panelPosition == St.Side.LEFT
let monitor = this.monitors[i]
@@ -949,9 +994,9 @@ function newUpdateHotCorners() {
corner.setBarrierSize = (size) =>
Object.getPrototypeOf(corner).setBarrierSize.call(
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)
} else {
this.hotCorners.push(null)
@@ -984,7 +1029,7 @@ function newUpdatePanelBarrier(panel) {
let fixed1 = panel.monitor.y
let fixed2 = panel.monitor.y + barrierSize
if (panel.checkIfVertical()) {
if (panel.geom.vertical) {
barriers._rightPanelBarrier.push(
panel.monitor.y + panel.monitor.height,
Meta.BarrierDirection.NEGATIVE_Y,
@@ -1004,7 +1049,7 @@ function newUpdatePanelBarrier(panel) {
)
}
switch (panel.getPosition()) {
switch (panel.geom.position) {
//values are initialized as St.Side.TOP
case St.Side.BOTTOM:
fixed1 = panel.monitor.y + panel.monitor.height - barrierSize
@@ -1055,13 +1100,13 @@ function _newLookingGlassResize() {
(p) => p.monitor == Main.layoutManager.primaryMonitor,
)
let topOffset =
primaryMonitorPanel.getPosition() == St.Side.TOP
primaryMonitorPanel.geom.position == St.Side.TOP
? primaryMonitorPanel.geom.outerSize +
(SETTINGS.get_boolean('stockgs-keep-top-panel')
? Main.layoutManager.panelBox.height
: 0) +
8
: 32
: Panel.GS_PANEL_SIZE
this._oldResize()

View File

@@ -45,6 +45,7 @@ export var availableMonitors = []
export async function init(settings) {
useCache = true
cache = {}
await setMonitorsInfo(settings)
}
@@ -203,7 +204,7 @@ export function setPanelElementPositions(settings, monitorIndex, value) {
setMonitorSetting(settings, 'panel-element-positions', monitorIndex, value)
}
export async function setMonitorsInfo(settings) {
export function setMonitorsInfo(settings) {
return new Promise((resolve, reject) => {
try {
let monitorInfos = []
@@ -211,7 +212,6 @@ export async function setMonitorsInfo(settings) {
proxy.GetCurrentStateRemote((displayInfo, e) => {
if (e) return reject(`Error getting display state: ${e}`)
let gsPrimaryIndex = 0
let ids = {}
//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 (primary) gsPrimaryIndex = i
monitorInfos.push({
id,
product,
@@ -240,7 +238,7 @@ export async function setMonitorsInfo(settings) {
ids[id] = 1
})
_saveMonitors(settings, monitorInfos, gsPrimaryIndex)
_saveMonitors(settings, monitorInfos)
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
let keyPrimary = 'primary-monitor'
let dtpPrimaryMonitor = settings.get_string(keyPrimary)
// convert previously saved index to monitor id
if (dtpPrimaryMonitor.match(/^\d{1,2}$/) && monitorInfos[dtpPrimaryMonitor])
dtpPrimaryMonitor = monitorInfos[dtpPrimaryMonitor].id
// default to gnome-shell primary monitor
if (!dtpPrimaryMonitor)
dtpPrimaryMonitor = monitorInfos[gsPrimaryIndex]?.id || 0
settings.set_string(keyPrimary, dtpPrimaryMonitor)
settings.set_string(keyPrimary, monitorInfos[dtpPrimaryMonitor].id)
*/
availableMonitors = Object.freeze(monitorInfos)

View File

@@ -144,16 +144,6 @@ function checkHotkeyPrefix(settings) {
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 {
constructor(window, settings, gnomeInterfaceSettings, path) {
// this._settings = ExtensionUtils.getSettings('org.gnome.shell.extensions.zorin-taskbar');
@@ -890,6 +880,62 @@ const Preferences = class {
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(
'intellihide',
this._builder.get_object('intellihide_switch'),
@@ -906,18 +952,49 @@ const Preferences = class {
this._settings.bind(
'intellihide-hide-from-windows',
this._builder.get_object('intellihide_window_hide_switch'),
this._builder.get_object('intellihide_window_hide_button'),
'active',
Gio.SettingsBindFlags.DEFAULT,
)
this._settings.bind(
'intellihide-hide-from-windows',
this._builder.get_object('intellihide_behaviour_options'),
'sensitive',
'intellihide-hide-from-monitor-windows',
this._builder.get_object('intellihide_window_monitor_hide_button'),
'active',
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(
'intellihide-behaviour',
this._builder.get_object('intellihide_behaviour_combo'),
@@ -925,6 +1002,86 @@ const Preferences = class {
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(
'intellihide-use-pressure',
this._builder.get_object('intellihide_use_pressure_switch'),
@@ -1008,10 +1165,36 @@ const Preferences = class {
'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(
'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(
'intellihide-use-pressure',
this._settings.get_default_value('intellihide-use-pressure'),
@@ -1591,6 +1774,13 @@ const Preferences = class {
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(
'stockgs-keep-top-panel',
this._builder.get_object('stockgs_top_panel_switch'),

View File

@@ -37,14 +37,23 @@ export const Mode = {
MAXIMIZED_WINDOWS: 2,
}
export class ProximityWatch {
constructor(actor, monitorIndex, mode, xThreshold, yThreshold, handler) {
this.actor = actor
class ProximityRectWatch {
constructor(rect, monitorIndex, mode, xThreshold, yThreshold, handler) {
this.rect = rect
this.monitorIndex = monitorIndex
this.overlap = false
this.mode = mode
this.threshold = [xThreshold, yThreshold]
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._updateWatchRect(),
@@ -82,9 +91,14 @@ export const ProximityManager = class {
this._setFocusedWindow()
}
createWatch(actor, monitorIndex, mode, xThreshold, yThreshold, handler) {
let watch = new ProximityWatch(
actor,
createWatch(watched, monitorIndex, mode, xThreshold, yThreshold, handler) {
let constr =
watched instanceof Mtk.Rectangle
? ProximityRectWatch
: ProximityActorWatch
let watch = new constr(
watched,
monitorIndex,
mode,
xThreshold,

View File

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

View File

@@ -199,7 +199,7 @@ export const Taskbar = class extends EventEmitter {
this._labelShowing = false
this.fullScrollView = 0
let isVertical = panel.checkIfVertical()
let isVertical = panel.geom.vertical
this._box = Utils.createBoxLayout({
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
// (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.
if (!this.dtpPanel.checkIfVertical() && !this.isGroupApps) {
if (!this.dtpPanel.geom.vertical && !this.isGroupApps) {
let initial = this.fullScrollView
if (
@@ -1054,7 +1054,7 @@ export const Taskbar = class extends EventEmitter {
this._shownInitially = false
this._redisplay()
if (geometryChange && this.dtpPanel.checkIfVertical()) {
if (geometryChange) {
this.previewMenu._updateClip()
}
}
@@ -1115,7 +1115,7 @@ export const Taskbar = class extends EventEmitter {
if (!this._settings.is_writable('favorite-apps'))
return DND.DragMotionResult.NO_DROP
let isVertical = this.dtpPanel.checkIfVertical()
let isVertical = this.dtpPanel.geom.vertical
if (!this._box.contains(source) && !source._dashItemContainer) {
//not an appIcon of the taskbar, probably from the applications view

View File

@@ -52,7 +52,7 @@ export const DynamicTransparency = class {
}
updateExternalStyle() {
this._setBackground()
this._setStyle()
}
_bindSignals() {
@@ -69,6 +69,16 @@ export const DynamicTransparency = class {
],
() => 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,
[
@@ -84,7 +94,7 @@ export const DynamicTransparency = class {
this._proximityManager.removeWatch(this._proximityWatchId)
if (SETTINGS.get_boolean('trans-use-dynamic-opacity')) {
let isVertical = this._dtpPanel.checkIfVertical()
let isVertical = this._dtpPanel.geom.vertical
let threshold = TRANS_DYNAMIC_DISTANCE
this._windowOverlap = false
@@ -109,13 +119,20 @@ export const DynamicTransparency = class {
this._updateColor(themeBackground)
this._updateAlpha(themeBackground)
this._setBackground()
this._setActorStyle()
this._updateBorder()
this._updateBackground()
this._setStyle()
}
_updateAlphaAndSet() {
this._updateAlpha()
this._setBackground()
this._updateBackground()
this._setStyle()
}
_updateBorderAndSet() {
this._updateBorder()
this._setStyle()
}
_updateColor(themeBackground) {
@@ -136,25 +153,53 @@ export const DynamicTransparency = class {
}
}
_setBackground() {
_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 : ''
}
_updateBackground() {
this.currentBackgroundColor = Utils.getrgbaColor(
this.backgroundColorRgb,
this.alpha,
)
let transition = 'transition-duration: 300ms;'
this._dtpPanel.set_style(
'background-color: ' + this.currentBackgroundColor + transition,
)
this._backgroundStyle = `background-color: ${this.currentBackgroundColor}`
}
_setActorStyle() {
_setStyle() {
const transition = 'transition-duration: 300ms;'
this._dtpPanel.panel.set_style(
'background: none; ' +
'border-image: none; ' +
'background-image: none; ' +
'transition-duration: 300ms;'
transition +
this._backgroundStyle +
this._borderStyle,
)
}

View File

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

View File

@@ -15,10 +15,38 @@
<object class="AdwPreferencesGroup">
<child>
<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>
<object class="GtkSwitch" id="intellihide_window_hide_switch">
<property name="valign">center</property>
<object class="GtkBox">
<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>
</child>
</object>
@@ -44,7 +72,61 @@
<object class="AdwPreferencesGroup">
<child>
<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>
<object class="GtkSwitch" id="intellihide_use_pressure_switch">
<property name="valign">center</property>

View File

@@ -100,6 +100,17 @@
<child>
<object class="AdwPreferencesGroup" id="finetune_group_gnome">
<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>
<object class="AdwActionRow">
<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">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Panel screen position</property>
<property name="title" translatable="yes">Panel monitor position</property>
<child>
<object class="GtkToggleButton" id="position_bottom_button">
<property name="active">True</property>

View File

@@ -14,6 +14,20 @@
<property name="step-increment">5</property>
<property name="upper">100</property>
</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">
<property name="icon-name">applications-graphics-symbolic</property>
<property name="title" translatable="yes">Style</property>
@@ -133,6 +147,52 @@
</child>
</object>
</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 class="GtkAdjustment" id="global_border_radius_adjustment">
<property name="lower">0.33</property>