Do bounds-checking on more windows (#4797)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -27,14 +27,15 @@ class BaseWindow : public BaseWidget
|
||||
public:
|
||||
enum Flags {
|
||||
None = 0,
|
||||
EnableCustomFrame = 1,
|
||||
Frameless = 2,
|
||||
TopMost = 4,
|
||||
DisableCustomScaling = 8,
|
||||
FramelessDraggable = 16,
|
||||
DontFocus = 32,
|
||||
Dialog = 64,
|
||||
DisableLayoutSave = 128,
|
||||
EnableCustomFrame = 1 << 0,
|
||||
Frameless = 1 << 1,
|
||||
TopMost = 1 << 2,
|
||||
DisableCustomScaling = 1 << 3,
|
||||
FramelessDraggable = 1 << 4,
|
||||
DontFocus = 1 << 5,
|
||||
Dialog = 1 << 6,
|
||||
DisableLayoutSave = 1 << 7,
|
||||
BoundsCheckOnShow = 1 << 8,
|
||||
};
|
||||
|
||||
enum ActionOnFocusLoss { Nothing, Delete, Close, Hide };
|
||||
@@ -57,6 +58,12 @@ public:
|
||||
|
||||
void moveTo(QPoint point, widgets::BoundsChecking mode);
|
||||
|
||||
/**
|
||||
* Moves the window to the given point and does bounds checking according to `mode`
|
||||
* Depending on the platform, either the move or the show will take place first
|
||||
**/
|
||||
void showAndMoveTo(QPoint point, widgets::BoundsChecking mode);
|
||||
|
||||
float scale() const override;
|
||||
float qtFontScale() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user