core/window: add implicit size properties to window types

This commit is contained in:
outfoxxed 2025-05-12 19:42:46 -07:00
parent ead9141aca
commit 6a8284dae3
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
10 changed files with 140 additions and 57 deletions

View file

@ -12,10 +12,10 @@ class ProxyFloatingWindow: public ProxyWindowBase {
public:
explicit ProxyFloatingWindow(QObject* parent = nullptr): ProxyWindowBase(parent) {}
// Setting geometry while the window is visible makes the content item shrinks but not the window
// Setting geometry while the window is visible makes the content item shrink but not the window
// which is awful so we disable it for floating windows.
void setWidth(qint32 width) override;
void setHeight(qint32 height) override;
void trySetWidth(qint32 implicitWidth) override;
void trySetHeight(qint32 implicitHeight) override;
};
///! Standard toplevel operating system window that looks like any other application.
@ -36,6 +36,12 @@ public:
[[nodiscard]] bool isBackingWindowVisible() const override;
void setVisible(bool visible) override;
[[nodiscard]] qint32 implicitWidth() const override;
void setImplicitWidth(qint32 implicitWidth) override;
[[nodiscard]] qint32 implicitHeight() const override;
void setImplicitHeight(qint32 implicitHeight) override;
[[nodiscard]] qint32 width() const override;
void setWidth(qint32 width) override;