Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
582b8b280b | ||
|
|
ded853bdc2 | ||
|
|
216d932ccc | ||
|
|
f6c8dd38ce |
9
Makefile
9
Makefile
@@ -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
|
||||
|
||||
|
||||
24
debian/changelog
vendored
24
debian/changelog
vendored
@@ -1,3 +1,27 @@
|
||||
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
|
||||
|
||||
@@ -149,6 +149,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 +176,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>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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,8 +53,6 @@ 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 = {}
|
||||
}
|
||||
@@ -94,16 +91,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,28 +121,25 @@ export default class ZorinTaskbarExtension extends Extension {
|
||||
|
||||
disable() {
|
||||
if (zorinDashDelayId) GLib.Source.remove(zorinDashDelayId)
|
||||
zorinDashDelayId = 0
|
||||
|
||||
panelManager.disable()
|
||||
panelManager?.disable()
|
||||
|
||||
DTP_EXTENSION = null
|
||||
SETTINGS = null
|
||||
TILINGSETTINGS = null
|
||||
SHELLSETTINGS = null
|
||||
DESKTOPSETTINGS = null
|
||||
TERMINALSETTINGS = null
|
||||
NOTIFICATIONSSETTINGS = null
|
||||
panelManager = null
|
||||
tracker = null
|
||||
|
||||
delete global.zorinTaskbar
|
||||
|
||||
this.disableGlobalStyles()
|
||||
|
||||
AppIcons.resetRecentlyClickedApp()
|
||||
|
||||
if (startupCompleteHandler) {
|
||||
Main.layoutManager.disconnect(startupCompleteHandler)
|
||||
startupCompleteHandler = null
|
||||
}
|
||||
|
||||
Main.sessionMode.hasOverview = this._realHasOverview
|
||||
}
|
||||
|
||||
resetGlobalStyles() {
|
||||
|
||||
@@ -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()
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
101
src/panel.js
101
src/panel.js
@@ -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
|
||||
|
||||
@@ -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'
|
||||
@@ -94,6 +95,8 @@ export const PanelManager = class {
|
||||
|
||||
if (reset) return
|
||||
|
||||
this._syncAppSwitcherWorkspaceIsolation()
|
||||
|
||||
this.notificationsMonitor = new NotificationsMonitor()
|
||||
|
||||
this._desktopIconsUsableArea =
|
||||
@@ -159,19 +162,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 +256,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 +285,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 +324,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 +334,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 +401,18 @@ 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'),
|
||||
)
|
||||
}
|
||||
|
||||
_setDesktopIconsMargins() {
|
||||
this._desktopIconsUsableArea?.resetMargins()
|
||||
this.allPanels.forEach((p) => {
|
||||
@@ -638,20 +666,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 +932,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 +986,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 +1021,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 +1041,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 +1092,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()
|
||||
|
||||
|
||||
@@ -203,7 +203,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 +211,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 +226,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 +237,7 @@ export async function setMonitorsInfo(settings) {
|
||||
ids[id] = 1
|
||||
})
|
||||
|
||||
_saveMonitors(settings, monitorInfos, gsPrimaryIndex)
|
||||
_saveMonitors(settings, monitorInfos)
|
||||
|
||||
resolve()
|
||||
})
|
||||
@@ -264,20 +261,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)
|
||||
|
||||
211
src/prefs.js
211
src/prefs.js
@@ -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'),
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -142,6 +142,7 @@
|
||||
|
||||
/* 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 +155,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 +168,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 +181,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 +194,7 @@
|
||||
}
|
||||
|
||||
#uiGroup.br25 .zorintaskbarPanel.dock,
|
||||
#uiGroup.br25 .zorintaskbarPanel.dock .zorintaskbarMainPanel,
|
||||
#uiGroup.br25 .show-apps,
|
||||
#uiGroup.br25 .dtp-container,
|
||||
#uiGroup.br25 .dtp-dots-container {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,26 +153,55 @@ 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,
|
||||
)
|
||||
console.log('Set DTP Panel style to', this._dtpPanel.panel.get_style())
|
||||
}
|
||||
|
||||
_getThemeBackground(reload) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user