From 0addfd5d586c7850c1e470f24c6364e6305dfa08 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 2 Sep 2015 10:32:47 +0200 Subject: QQuickControl: add font property When the font of a QQuickControl subclass is set, it will propagate it to all children that are also derived from QQuickControl, as well as TextField and TextArea. Change-Id: I7c851f84b89609094d9a81d239ade0f0ac212985 Reviewed-by: J-P Nurmi --- src/controls/qquickcontrol_p_p.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/controls/qquickcontrol_p_p.h') diff --git a/src/controls/qquickcontrol_p_p.h b/src/controls/qquickcontrol_p_p.h index 273ca6c9..2861c067 100644 --- a/src/controls/qquickcontrol_p_p.h +++ b/src/controls/qquickcontrol_p_p.h @@ -69,6 +69,17 @@ public: void resizeBackground(); void resizeContent(); + void updateFont(const QFont &); + static void updateFontRecur(QQuickItem *item, const QFont &); + inline void setFont_helper(const QFont &f) { + if (font.resolve() == f.resolve() && font == f) + return; + updateFont(f); + } + void resolveFont(); + static QFont naturalControlFont(const QQuickItem *); + + QFont font; bool hasTopPadding; bool hasLeftPadding; bool hasRightPadding; -- cgit v1.2.3