renderer: add popup fade-in-out (#11313)

Adds xdg popup fade-in and fade-out
This commit is contained in:
Vaxry 2025-08-03 13:44:50 +02:00 committed by GitHub
parent 77068c781d
commit 855d103aef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 169 additions and 6 deletions

View file

@ -4,6 +4,7 @@
#include "Subsurface.hpp"
#include "../helpers/signal/Signal.hpp"
#include "../helpers/memory/Memory.hpp"
#include "../helpers/AnimatedVariable.hpp"
class CXDGPopupResource;
@ -21,6 +22,7 @@ class CPopup {
SP<CWLSurface> getT1Owner();
Vector2D coordsRelativeToParent();
Vector2D coordsGlobal();
PHLMONITOR getMonitor();
Vector2D size();
@ -45,6 +47,10 @@ class CPopup {
WP<CPopup> m_self;
bool m_mapped = false;
// fade in-out
PHLANIMVAR<float> m_alpha;
bool m_fadingOut = false;
private:
CPopup() = default;
@ -82,6 +88,7 @@ class CPopup {
void reposition();
void recheckChildrenRecursive();
void sendScale();
void fullyDestroy();
Vector2D localToGlobal(const Vector2D& rel);
Vector2D t1ParentCoords();