Return correct hit-test values for title bar buttons on Windows (#4994)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2023-12-03 14:41:33 +01:00
committed by GitHub
parent 584a7c86fc
commit 812186dc4c
8 changed files with 381 additions and 38 deletions
+18
View File
@@ -23,6 +23,24 @@ public:
TitleBarButtonStyle getButtonStyle() const;
void setButtonStyle(TitleBarButtonStyle style_);
/// Simulate a `mouseEnter` event.
void ncEnter();
/// Simulate a `mouseLeave` event.
void ncLeave();
/// Simulate a `mouseMove` event.
/// @param at a local position relative to this widget
void ncMove(QPoint at);
/// Simulate a `mousePress` event with the left mouse button.
/// @param at a local position relative to this widget
void ncMousePress(QPoint at);
/// Simulate a `mouseRelease` event with the left mouse button.
/// @param at a local position relative to this widget
void ncMouseRelease(QPoint at);
protected:
void paintEvent(QPaintEvent *) override;