Add "pin" action to usercards and reply threads (#4692)

This commit is contained in:
Mm2PL
2023-07-01 16:38:55 +00:00
committed by GitHub
parent 61566e2f4f
commit f915eab1a2
7 changed files with 43 additions and 23 deletions
+7
View File
@@ -34,6 +34,10 @@ protected:
// lifetimeHack_ is used to check that the window hasn't been destroyed yet
std::shared_ptr<bool> lifetimeHack_;
// Toggles pin status updates action on focus loss, isPinned_ and the pin
// button pixmap
void togglePinned();
private:
// isMoving_ is set to true if the user is holding the left mouse button down and has moved the mouse a small amount away from the original click point (startPosDrag_)
bool isMoving_ = false;
@@ -47,6 +51,9 @@ private:
// dragTimer_ is called ~60 times per second once the user has initiated dragging
QTimer dragTimer_;
Button *pinButton_ = nullptr;
bool isPinned_ = false;
};
} // namespace chatterino