Add transparent overlay window (#4746)

This commit is contained in:
nerix
2024-10-06 12:54:24 +02:00
committed by GitHub
parent 9ba7ef324d
commit afa8067a20
40 changed files with 1464 additions and 190 deletions
+4 -4
View File
@@ -18,6 +18,7 @@ struct Selection;
struct MessageLayoutContainer;
class MessageLayoutElement;
struct MessagePaintContext;
struct MessageLayoutContext;
enum class MessageElementFlag : int64_t;
using MessageElementFlags = FlagsEnum<MessageElementFlag>;
@@ -56,8 +57,7 @@ public:
MessageLayoutFlags flags;
bool layout(int width, float scale_, float imageScale,
MessageElementFlags flags, bool shouldInvalidateBuffer);
bool layout(const MessageLayoutContext &ctx, bool shouldInvalidateBuffer);
// Painting
MessagePaintResult paint(const MessagePaintContext &ctx);
@@ -112,11 +112,11 @@ public:
private:
// methods
void actuallyLayout(int width, MessageElementFlags flags);
void actuallyLayout(const MessageLayoutContext &ctx);
void updateBuffer(QPixmap *buffer, const MessagePaintContext &ctx);
// Create new buffer if required, returning the buffer
QPixmap *ensureBuffer(QPainter &painter, int width);
QPixmap *ensureBuffer(QPainter &painter, int width, bool clear);
// variables
const MessagePtr message_;