2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Add some helper methods to effect wrappers.

Add and use similar methods to WidgetSlideWrap and WidgetFadeWrap:
[show|hide|toggle]Fast() and [show|hide|toggle]Animated().
This commit is contained in:
John Preston
2017-03-15 18:10:18 +03:00
parent fed20435ad
commit 1027bd431a
16 changed files with 80 additions and 131 deletions

View File

@@ -1612,7 +1612,7 @@ void MainWidget::switchToPanelPlayer() {
if (_playerUsingPanel) return;
_playerUsingPanel = true;
_player->slideUp();
_player->hideAnimated();
_playerVolume.destroyDelayed();
_playerPlaylist->hideIgnoringEnterEvents();
@@ -1626,7 +1626,7 @@ void MainWidget::switchToFixedPlayer() {
if (!_player) {
createPlayer();
} else {
_player->slideDown();
_player->showAnimated();
if (!_playerVolume) {
_playerVolume.create(this);
_player->entity()->volumeWidgetCreated(_playerVolume);
@@ -1643,7 +1643,7 @@ void MainWidget::closeBothPlayers() {
_playerUsingPanel = false;
_player.destroyDelayed();
} else {
_player->slideUp();
_player->hideAnimated();
}
_playerVolume.destroyDelayed();
@@ -1667,7 +1667,7 @@ void MainWidget::createPlayer() {
} else {
_player->hideFast();
if (_player) {
_player->slideDown();
_player->showAnimated();
_playerHeight = _contentScrollAddToY = _player->contentHeight();
updateControlsGeometry();
}