aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/universal/qquickuniversaltheme.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup unnecessary explicit references to QPlatformThemeJ-P Nurmi2018-02-151-3/+3
| | | | | | | | | QQuickTheme is being separated from QPlatformTheme. Reduce references to QPlatformTheme to make the transition to QQuickTheme smoother. Task-number: QTBUG-51921 Change-Id: I6dbbe39bf0b465df16a88bcc26e2b2a32cc42c93 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Read :/qtquickcontrols2.conf in QQuickStylePluginJ-P Nurmi2018-02-151-4/+7
| | | | | | | | | | | | | | | | | QQuickTheme is going to be promoted from libQQC2 to libQQT2 so that it can provide dark and light palettes (and later, icons). The first step is to refactor out the :/qtquickcontrols2.conf reading code, which cannot be in style-agnostic libQQT2. Read the conf file in QQuickStyle Plugin instead. The additional benefit is that we don't need duplicate name() methods for styles and their themes. Even though QQuickStyle Plugin's name handling is case-insensitive, QSetting is case-sensitive. Therefore all QQuickStylePlugin::name() overrides have been updated to use capital first letter. This name is used to lookup the correct section in :/qtquickcontrols2.conf. Task-number: QTBUG-63331 Change-Id: I07b1269d9dbc2c9568e6f22f2da75951fde7b669 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add support for configurable fontsJ-P Nurmi2017-05-311-2/+5
| | | | | | | | | | | | | | | | | | | | | | A style's default font is specified in qtquickcontrols2.conf in a "Font" group under the style's section. QSettings supports the following two alternative syntaxes: [Default] Font\Family=Open Sans Font\PixelSize=20 or [Default\Font] Family=Open Sans PixelSize=20 [ChangeLog][Controls] Added support for specifying the default font for different styles in qtquickcontrols2.conf. Change-Id: I54e1efb79a2913eab35174dbf09b6956fe740e28 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Replace QStringLiteral with QLatin1String in the proxy themesJ-P Nurmi2016-10-251-2/+2
| | | | | | | | | | | | This allows us, in theory, to test multiple styles in the same process by calling qmlClearTypeRegistrations() between each style test round. When QML types are cleared, QML plugins are unloaded, and the current style plugin's proxy platform theme is destroyed. It leads to a nasty crash if there are fonts stored in the Qt font database that have their family names stored in the read-only data of an unloaded plugin. Change-Id: I32a70077ac4502e16a753fb68f7efeef35d239b5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Don't use QFont::exactMatch() for fonts comparisonNikita Krupenko2016-05-181-1/+2
| | | | | | | | | This function can return false even if the font found. Compare fonts by QFontInfo::family() instead. Change-Id: I519dd11ef7cba7395ca5b815d3973ddf585c439a Task-number: QTBUG-53377 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Controls: update license headersJ-P Nurmi2016-04-141-2/+2
| | | | | | | This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. Change-Id: Ib653135662bfd353a73290539995e8e5be211587 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Themes: cache result of QFont::family()Anton Kudryavtsev2016-03-281-3/+4
| | | | | Change-Id: I5318a61dbb699e2f251d218e614c1a2ff02d53a7 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Cleanup QQuickProxyStyleJ-P Nurmi2016-03-181-4/+0
| | | | | | | | | | | Install and remove the proxy theme automatically to eliminate the need for TestTheme do it in tst_applicationwindow. Furthermore, fix some Qt coding conventions, align header guards, remove unneeded empty destructor, and add missing explicit keywords for one-parameter constructors and cleanup somemeaningless ones in paremeterless ctors. Change-Id: Ib95dad003e35e468e941f3a0d2be5b21323fcccd Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Universal: fix fontsJ-P Nurmi2016-02-091-3/+10
| | | | | | | | | Request Segoe if exists, fallback to the system font. Even if we fallback to the system font, set the sizes and weights appropriately. Change-Id: I6cd34efcb5e41171758ffb2fbab22dc9d52c95a4 Task-number: QTBUG-50971 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Replace QLatin1Literal occurrences with QStringLiteralKonstantin Ritt2015-12-161-2/+2
| | | | | Change-Id: I37bd9dd933c2125dbe6d382bf6d0a6a46b31c1dd Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* UniversalTheme: Fix typo in the system font family nameKonstantin Ritt2015-12-161-2/+2
| | | | | Change-Id: I5eefd75677a5762fed848c1e174211abd00bafba Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Use TabButtonFont and GroupBoxTitleFont from QPlatformThemeLiang Qi2015-12-101-9/+9
| | | | | | | | * QQuickGroupBox: GroupBoxTitleFont * QQuickTabButton: TabButtonFont Change-Id: Ib2e58a95c49353536231cc93d28dba075629c59f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Universal: move to QQuickProxyTheme way for font settingsLiang Qi2015-12-011-0/+71
Change-Id: I90d91ceaea245dc19d2c0de683cb7c1172e1042e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>