mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-15 00:34:05 +09:00
Fix secondary shortcut overlay active when disabling while shown
This commit is contained in:
@@ -871,7 +871,7 @@
|
||||
<summary>Prefix to use for hotkeys</summary>
|
||||
<description>You can choose between Super or SuperAlt as the prefix for hotkeys.</description>
|
||||
</key>
|
||||
<key type="b" name="overlay-on-secondary-switch">
|
||||
<key type="b" name="shortcut-overlay-on-secondary">
|
||||
<default>false</default>
|
||||
<summary>Show overlay on secondary monitors</summary>
|
||||
</key>
|
||||
|
||||
@@ -430,14 +430,17 @@ export const Overview = class {
|
||||
[SETTINGS, 'changed::hot-keys', this._checkHotkeysOptions.bind(this)],
|
||||
[
|
||||
SETTINGS,
|
||||
'changed::hotkeys-overlay-combo',
|
||||
[
|
||||
'changed::hotkeys-overlay-combo',
|
||||
'changed::shortcut-overlay-on-secondary',
|
||||
],
|
||||
() => {
|
||||
if (
|
||||
SETTINGS.get_boolean('hot-keys') &&
|
||||
SETTINGS.get_string('hotkeys-overlay-combo') === 'ALWAYS'
|
||||
)
|
||||
this._toggleHotkeysNumberOverlay(true)
|
||||
else this._toggleHotkeysNumberOverlay(false)
|
||||
else this._toggleHotkeysNumberOverlay(false, true)
|
||||
},
|
||||
],
|
||||
[SETTINGS, 'changed::shortcut-num-keys', () => this._resetHotkeys()],
|
||||
@@ -493,11 +496,11 @@ export const Overview = class {
|
||||
])
|
||||
}
|
||||
|
||||
_toggleHotkeysNumberOverlay(show) {
|
||||
_toggleHotkeysNumberOverlay(show, reset) {
|
||||
// this.taskbar is the primary taskbar
|
||||
this.taskbar.toggleHotkeysNumberOverlay(show)
|
||||
|
||||
if (SETTINGS.get_boolean('overlay-on-secondary-switch')) {
|
||||
if (reset || SETTINGS.get_boolean('shortcut-overlay-on-secondary')) {
|
||||
// on secondary panels, show the overlay on icons matching the ones
|
||||
// found on the primary panel (see Taksbar.hotkeyAppNumbers)
|
||||
this._panelManager.allPanels.forEach((p) => {
|
||||
|
||||
@@ -2789,7 +2789,7 @@ const Preferences = class {
|
||||
})
|
||||
|
||||
this._settings.bind(
|
||||
'overlay-on-secondary-switch',
|
||||
'shortcut-overlay-on-secondary',
|
||||
this._builder.get_object('overlay_on_secondary_switch'),
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT,
|
||||
@@ -3075,7 +3075,7 @@ const Preferences = class {
|
||||
if (!scaleInfo.manualConnect) connectValueChanged(scaleObj, scaleInfo)
|
||||
|
||||
scaleObj.set_format_value_func((scale, value) => {
|
||||
return `${value} ${scaleInfo.unit || 'px'}`
|
||||
return `${value * (factor || 1)} ${scaleInfo.unit || 'px'}`
|
||||
})
|
||||
|
||||
// Corrent for rtl languages
|
||||
|
||||
Reference in New Issue
Block a user