mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
@@ -389,6 +389,11 @@
|
||||
<summary>Intellihide close delay</summary>
|
||||
<description>The delay (ms) before hiding the panel</description>
|
||||
</key>
|
||||
<key type="i" name="intellihide-reveal-delay">
|
||||
<default>0</default>
|
||||
<summary>Intellihide reveal delay</summary>
|
||||
<description>The delay (ms) before revealing the panel</description>
|
||||
</key>
|
||||
<key type="s" name="intellihide-key-toggle-text">
|
||||
<default>"<Super>i"</default>
|
||||
<summary>Keybinding toggle intellihide</summary>
|
||||
|
||||
@@ -508,16 +508,20 @@ export const Intellihide = class {
|
||||
this._panelBox.visible = !destination
|
||||
update()
|
||||
} else if (destination !== this._panelBox[this._translationProp]) {
|
||||
let delay = 0
|
||||
|
||||
if (destination != 0 && this._hoveredOut)
|
||||
delay = SETTINGS.get_int('intellihide-close-delay') * 0.001
|
||||
else if (destination == 0)
|
||||
delay = SETTINGS.get_int('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
|
||||
: SETTINGS.get_int('intellihide-animation-time') * 0.001,
|
||||
//only delay the animation when hiding the panel after the user hovered out
|
||||
delay:
|
||||
destination != 0 && this._hoveredOut
|
||||
? SETTINGS.get_int('intellihide-close-delay') * 0.001
|
||||
: 0,
|
||||
delay,
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: () => {
|
||||
this._panelBox.visible = !destination
|
||||
|
||||
23
src/prefs.js
23
src/prefs.js
@@ -1714,6 +1714,15 @@ const Preferences = class {
|
||||
this._settings.set_int('intellihide-animation-time', widget.get_value())
|
||||
})
|
||||
|
||||
this._builder
|
||||
.get_object('intellihide_reveal_delay_spinbutton')
|
||||
.set_value(this._settings.get_int('intellihide-reveal-delay'))
|
||||
this._builder
|
||||
.get_object('intellihide_reveal_delay_spinbutton')
|
||||
.connect('value-changed', (widget) => {
|
||||
this._settings.set_int('intellihide-reveal-delay', widget.get_value())
|
||||
})
|
||||
|
||||
this._builder
|
||||
.get_object('intellihide_close_delay_spinbutton')
|
||||
.set_value(this._settings.get_int('intellihide-close-delay'))
|
||||
@@ -1747,6 +1756,12 @@ 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'),
|
||||
@@ -1819,6 +1834,14 @@ const Preferences = class {
|
||||
.get_object('intellihide_close_delay_spinbutton')
|
||||
.set_value(this._settings.get_int('intellihide-close-delay'))
|
||||
|
||||
this._settings.set_value(
|
||||
'intellihide-reveal-delay',
|
||||
this._settings.get_default_value('intellihide-reveal-delay'),
|
||||
)
|
||||
this._builder
|
||||
.get_object('intellihide_reveal_delay_spinbutton')
|
||||
.set_value(this._settings.get_int('intellihide-reveal-delay'))
|
||||
|
||||
this._settings.set_value(
|
||||
'intellihide-enable-start-delay',
|
||||
this._settings.get_default_value(
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
<property name="step-increment">10</property>
|
||||
<property name="upper">4000</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="intellihide_reveal_delay_adjustment">
|
||||
<property name="lower">0</property>
|
||||
<property name="page-increment">100</property>
|
||||
<property name="step-increment">10</property>
|
||||
<property name="upper">4000</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="intellihide_enable_hide_delay_adjustment">
|
||||
<property name="page-increment">100</property>
|
||||
<property name="step-increment">10</property>
|
||||
@@ -229,6 +235,21 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">Delay before revealing the panel (ms)</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="intellihide_reveal_delay_spinbutton">
|
||||
<property name="adjustment">intellihide_reveal_delay_adjustment</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="text">10</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="value">10</property>
|
||||
<property name="width-chars">4</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">Delay before enabling intellihide on start (ms)</property>
|
||||
|
||||
Reference in New Issue
Block a user