Connect on-demand panel button to touch event

This commit is contained in:
Romain Vigier
2020-12-28 10:42:05 +01:00
parent 5c49dfa7eb
commit 296a49b55f
+2 -3
View File
@@ -184,9 +184,8 @@ var TimerOndemand = class {
this._button.update = () => { this._button.update = () => {
icon.gicon = this._getIconForTime(e.timer.time); icon.gicon = this._getIconForTime(e.timer.time);
}; };
buttonActor.connect('button-press-event', () => { buttonActor.connect('button-press-event', () => this._toggleTime());
this._toggleTime(); buttonActor.connect('touch-event', () => this._toggleTime());
});
main.panel.addToStatusArea('NightThemeSwitcherButton', this._button); main.panel.addToStatusArea('NightThemeSwitcherButton', this._button);
logDebug('Added On-demand Timer button to the panel.'); logDebug('Added On-demand Timer button to the panel.');
} }