diff options
author | Nikita Krupenko <krnekit@gmail.com> | 2016-03-19 21:02:24 +0200 |
---|---|---|
committer | Nikita Krupenko <krnekit@gmail.com> | 2016-03-19 19:29:23 +0000 |
commit | 63ed62258c2ed10e209c9c28848cd90f5aca174c (patch) | |
tree | 736d3b4d08debfa710923839c6720dd18e2a3c58 /src/imports/controls/material/qquickmaterialtheme.cpp | |
parent | c50119d6ee5f239ecadce93d188d08dd55024620 (diff) |
Use fonts from theme for editable controls
Also set proper fonts for editable controls in Material theme.
Change-Id: I78b8f8597a653af593787e569d6ba5ee7bf182a9
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/material/qquickmaterialtheme.cpp')
-rw-r--r-- | src/imports/controls/material/qquickmaterialtheme.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/imports/controls/material/qquickmaterialtheme.cpp b/src/imports/controls/material/qquickmaterialtheme.cpp index afe6bf65..8fdc912c 100644 --- a/src/imports/controls/material/qquickmaterialtheme.cpp +++ b/src/imports/controls/material/qquickmaterialtheme.cpp @@ -53,6 +53,7 @@ QQuickMaterialTheme::QQuickMaterialTheme(QPlatformTheme *theme) buttonFont.setFamily(font.family()); itemViewFont.setFamily(font.family()); menuItemFont.setFamily(font.family()); + editorFont.setFamily(font.family()); } systemFont.setPixelSize(14); @@ -65,6 +66,8 @@ QQuickMaterialTheme::QQuickMaterialTheme(QPlatformTheme *theme) itemViewFont.setWeight(QFont::Medium); menuItemFont.setPixelSize(16); + + editorFont.setPixelSize(16); } const QFont *QQuickMaterialTheme::font(QPlatformTheme::Font type) const @@ -79,6 +82,8 @@ const QFont *QQuickMaterialTheme::font(QPlatformTheme::Font type) const case QPlatformTheme::MenuItemFont: case QPlatformTheme::ComboMenuItemFont: return &menuItemFont; + case QPlatformTheme::EditorFont: + return &editorFont; default: return &systemFont; } |