mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 08:21:59 +02:00
Do not show mobile controls transition on launch
Start app with the correct controls layout instead of showing the "hide elapsed time" transition when started on mobile width. It is annoying. We cannot detect surface width during app widgets assembly, so update the controls revealers state on first surface update after window is mapped and only if running on mobile width. Otherwise do not do anything like before which will result in showing fully revealed controls (default).
This commit is contained in:
@@ -370,6 +370,18 @@ class ClapperButtonsRevealer extends Gtk.Revealer
|
||||
this.get_child().append(widget);
|
||||
}
|
||||
|
||||
revealInstantly(isReveal)
|
||||
{
|
||||
if(this.child_revealed === isReveal)
|
||||
return;
|
||||
|
||||
const initialDuration = this.transition_duration;
|
||||
|
||||
this.transition_duration = 0;
|
||||
this.reveal_child = isReveal;
|
||||
this.transition_duration = initialDuration;
|
||||
}
|
||||
|
||||
_setRotateClass(icon, isAdd)
|
||||
{
|
||||
const cssClass = 'halfrotate';
|
||||
@@ -388,7 +400,8 @@ class ClapperButtonsRevealer extends Gtk.Revealer
|
||||
|
||||
_onRevealChild(button)
|
||||
{
|
||||
this._setRotateClass(button.child, true);
|
||||
if(this.reveal_child !== this.child_revealed)
|
||||
this._setRotateClass(button.child, true);
|
||||
}
|
||||
|
||||
_onChildRevealed(button)
|
||||
|
Reference in New Issue
Block a user