mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-08 13:18:09 +03:00
improve edge changing animation
This commit is contained in:
parent
b35fa94307
commit
20a57f3c15
@ -34,6 +34,7 @@
|
||||
#include <QDebug>
|
||||
|
||||
// KDE
|
||||
#include <KWindowSystem>
|
||||
#include <KWayland/Client/plasmashell.h>
|
||||
#include <KWayland/Client/surface.h>
|
||||
|
||||
@ -364,6 +365,21 @@ void VisibilityManager::updateGhostWindowState()
|
||||
}
|
||||
}
|
||||
|
||||
void VisibilityManager::hide()
|
||||
{
|
||||
if (KWindowSystem::isPlatformX11()) {
|
||||
m_latteView->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
void VisibilityManager::show()
|
||||
{
|
||||
if (KWindowSystem::isPlatformX11()) {
|
||||
m_latteView->setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void VisibilityManager::raiseView(bool raise)
|
||||
{
|
||||
if (m_blockHiding)
|
||||
|
@ -104,6 +104,10 @@ public:
|
||||
//! called for windowTracker to reset values
|
||||
void activeWindowDraggingStarted();
|
||||
|
||||
public slots:
|
||||
Q_INVOKABLE void hide();
|
||||
Q_INVOKABLE void show();
|
||||
|
||||
signals:
|
||||
void mustBeShown();
|
||||
void mustBeHide();
|
||||
|
@ -311,6 +311,17 @@ Item{
|
||||
latteView.positioner.hideDockDuringLocationChangeFinished();
|
||||
}
|
||||
|
||||
function sendSlidingOutAnimationEnded() {
|
||||
latteView.visibility.hide();
|
||||
latteView.visibility.isHidden = true;
|
||||
|
||||
if (visibilityManager.debugMagager) {
|
||||
console.log("hiding animation ended...");
|
||||
}
|
||||
|
||||
sendHideDockDuringLocationChangeFinished();
|
||||
}
|
||||
|
||||
///test maskArea
|
||||
function updateMaskArea() {
|
||||
if (!latteView || blockUpdateMask) {
|
||||
@ -641,16 +652,13 @@ Item{
|
||||
}
|
||||
|
||||
onStopped: {
|
||||
latteView.visibility.isHidden = true;
|
||||
|
||||
if (manager.debugMagager) {
|
||||
console.log("hiding animation ended...");
|
||||
}
|
||||
|
||||
//! Trying to move the ending part of the signals at the end of editing animation
|
||||
if (!manager.inTempHiding) {
|
||||
updateMaskArea();
|
||||
manager.updateMaskArea();
|
||||
} else {
|
||||
sendHideDockDuringLocationChangeFinished();
|
||||
if (!editModeVisual.inEditMode) {
|
||||
manager.sendSlidingOutAnimationEnded();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -683,6 +691,8 @@ Item{
|
||||
}
|
||||
|
||||
onStarted: {
|
||||
latteView.visibility.show();
|
||||
|
||||
if (manager.debugMagager) {
|
||||
console.log("showing animation started...");
|
||||
}
|
||||
|
@ -414,8 +414,11 @@ Item{
|
||||
editVisual.animationSent = false;
|
||||
}
|
||||
|
||||
//! That part was at the end of the Containers sliding-out animation
|
||||
//! but it looks much better here
|
||||
|
||||
if (visibilityManager.inTempHiding) {
|
||||
visibilityManager.sendHideDockDuringLocationChangeFinished();
|
||||
visibilityManager.sendSlidingOutAnimationEnded();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user