groupbars: add title and gradient rendering
This commit is contained in:
parent
1eb6cfd45c
commit
206ac000b9
3 changed files with 219 additions and 10 deletions
|
|
@ -2,6 +2,18 @@
|
|||
|
||||
#include "IHyprWindowDecoration.hpp"
|
||||
#include <deque>
|
||||
#include "../Texture.hpp"
|
||||
#include <string>
|
||||
|
||||
class CTitleTex {
|
||||
public:
|
||||
CTitleTex(CWindow* pWindow, const Vector2D& bufferSize);
|
||||
~CTitleTex();
|
||||
|
||||
CTexture tex;
|
||||
std::string szContent;
|
||||
CWindow* pWindowOwner = nullptr;
|
||||
};
|
||||
|
||||
class CHyprGroupBarDecoration : public IHyprWindowDecoration {
|
||||
public:
|
||||
|
|
@ -21,12 +33,21 @@ class CHyprGroupBarDecoration : public IHyprWindowDecoration {
|
|||
virtual SWindowDecorationExtents getWindowDecorationReservedArea();
|
||||
|
||||
private:
|
||||
SWindowDecorationExtents m_seExtents;
|
||||
SWindowDecorationExtents m_seExtents;
|
||||
|
||||
CWindow* m_pWindow = nullptr;
|
||||
CWindow* m_pWindow = nullptr;
|
||||
|
||||
Vector2D m_vLastWindowPos;
|
||||
Vector2D m_vLastWindowSize;
|
||||
Vector2D m_vLastWindowPos;
|
||||
Vector2D m_vLastWindowSize;
|
||||
|
||||
std::deque<CWindow*> m_dwGroupMembers;
|
||||
std::deque<CWindow*> m_dwGroupMembers;
|
||||
std::deque<std::unique_ptr<CTitleTex>> m_dpTitleTextures;
|
||||
|
||||
CTitleTex* textureFromTitle(const std::string&);
|
||||
void clearUnusedTextures();
|
||||
void invalidateTextures();
|
||||
|
||||
void refreshGradients();
|
||||
CTexture m_tGradientActive;
|
||||
CTexture m_tGradientInactive;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue