aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/nativestyle/qstyle/qquickcommonstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/nativestyle/qstyle/qquickcommonstyle.cpp')
-rw-r--r--src/imports/nativestyle/qstyle/qquickcommonstyle.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/imports/nativestyle/qstyle/qquickcommonstyle.cpp b/src/imports/nativestyle/qstyle/qquickcommonstyle.cpp
index 0cb8e848..e8dadb9e 100644
--- a/src/imports/nativestyle/qstyle/qquickcommonstyle.cpp
+++ b/src/imports/nativestyle/qstyle/qquickcommonstyle.cpp
@@ -4694,6 +4694,22 @@ QFont QCommonStyle::font(QStyle::ControlElement element, const QStyle::State sta
return QGuiApplication::font();
}
+QMargins QCommonStyle::ninePatchMargins(QStyle::ControlElement ce, const QStyleOption *opt, const QSize &imageSize) const
+{
+ // By default, we just divide the image at the center
+ int w = imageSize.width() / 2;
+ int h = imageSize.height() / 2;
+ return QMargins(w, h, w, h);
+}
+
+QMargins QCommonStyle::ninePatchMargins(QStyle::ComplexControl cc, const QStyleOptionComplex *opt, const QSize &imageSize) const
+{
+ // By default, we just divide the image at the center
+ int w = imageSize.width() / 2;
+ int h = imageSize.height() / 2;
+ return QMargins(w, h, w, h);
+}
+
int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, QStyleHintReturn *hret) const
{
int ret = 0;