aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/nativestyle/items/qquickstyleitem.h
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-10-09 16:38:02 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-10-12 14:48:56 +0200
commitd956d1062479d0af914c96ac615d2aa2a35be4cd (patch)
tree84d0791e078e795e9b4aedc853595fb254b79bc5 /src/imports/nativestyle/items/qquickstyleitem.h
parent3a9f84fb3750f200d0817ed8b44ac2844cd04dda (diff)
Native style: add a function imageSize() rather than overriding minimumSize
When not using nine patch scaling, we used to override minimumSize to instead be the actual size of the item, since we use minimumSize to also be the size of the image we draw. But this turns out to be confusing, especially while debugging. So introduce a more explicit imageSize() function instead, and leave minimumSize unchanged. Change-Id: I8d3ec25603d430a94b124713fad01bf6d277bbe5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/nativestyle/items/qquickstyleitem.h')
-rw-r--r--src/imports/nativestyle/items/qquickstyleitem.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/imports/nativestyle/items/qquickstyleitem.h b/src/imports/nativestyle/items/qquickstyleitem.h
index ece2572d..0834662c 100644
--- a/src/imports/nativestyle/items/qquickstyleitem.h
+++ b/src/imports/nativestyle/items/qquickstyleitem.h
@@ -215,7 +215,8 @@ public:
QQuickStyleMargins contentPadding() const;
QQuickStyleMargins layoutMargins() const;
- QSize minimumSize();
+ QSize minimumSize() const;
+ QSize imageSize() const;
qreal focusFrameRadius() const;
Q_INVOKABLE virtual QFont styleFont(QQuickItem *control);