| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of creating and setting the QQuickTheme instance from each
style plugin (e.g. QtQuickControls2MaterialStylePlugin), create the
QQuickTheme instance in QtQuickControls2Plugin when the style is
being resolved, and just pass the instance to be initialized by the
style plugin(s). This avoids the problem that QQuickTheme API was
virtual, and sub-classes created from plugins would have vtables
destroyed before the QQuickTheme was destroyed.
Task-number: QTBUG-67062
Task-number: QTBUG-68087
Change-Id: I19e9ced5296b708c2668c30163389cb3da6be7cf
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This allows us to add more themable attributes (on the side of fonts
and palettes) after the QQuickTheme API has been made public, because
it won't require adding virtuals. Only the resolve() method is virtual.
Task-number: QTBUG-67062
Change-Id: I6a5cc8d15aeaa5a9a0fe9b6d2591077f8822daac
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the old enums that were originally copied from QPlatformTheme,
including irrelevant entries for DockWidget, MdiSubWindow, MessageBox,
with a unified enum that will be matched to cover everything needed
for theming fonts and palettes for Qt Quick Controls 2.
Task-number: QTBUG-67062
Change-Id: Ia99d092f28c00210c0c7f24d4241eb5a5d9ceb5b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
SpinBox, Switch, and Tumbler were previously not available in
QPlatformTheme, but now we have our own enums so we can add them.
Task-number: QTBUG-67062
Change-Id: Ie99a49b464fbbd25051181b75d721f537b8e3a68
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current Material style is based on the mobile variant of the
design, which is far too large for desktop applications.
From https://material.io/guidelines/components/lists.html#lists-usage:
"When the mouse and keyboard are the primary input methods,
measurements may be condensed to accommodate denser layouts."
This patch adds a dense variant of the style where most controls like
buttons and delegates are smaller in height and use smaller font sizes.
Note that the Material design guidelines seem to distinguish between
mobile, desktop and dense measurements, where "dense" seems to be a
specialization of desktop. We cannot afford to/do not see sense in
maintaining three separate variants, so the dense variant will be the
only desktop version of the Material style.
[ChangeLog][Material] Added Dense variant of the Material style for use
on desktop platforms. Some controls are slightly smaller in height and
use smaller font sizes. The variant can be enabled by setting
QT_QUICK_CONTROLS_MATERIAL_VARIANT to Dense or setting Variant=Dense
in the qtquickcontrols.conf file.
Task-number: QTBUG-51109
Change-Id: I11846b7f6e61f7b5dcf3c146b18c220234a73ef2
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
|
|
| |
This eliminates an undesired dependency from QQuickMaterialTheme
to QPlatformTheme.
Task-number: QTBUG-51921
Change-Id: I43c8ab076118b85cf1ae6c85cf1ee5d3e7b8bc74
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MenuBar is an ordinary Item. It can be located basically anywhere, but
the idea is to introduce a new ApplicationWindow::menuBar property in a
follow-up commit. Currently the example snippets are using the header
property.
[ChangeLog][Controls][MenuBar] Introduced a MenuBar control.
Task-number: QTBUG-60350
Change-Id: Ie66dc457a3d8edbe8362fab2a591dc49442c95e2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It used macOS layout before, but now there is more appropriate layout
added to the QtGui.
[ChangeLog][Important Behavior Changes] DialogButtonBox with Material
theme now uses Android button layout.
Task-number: QTBUG-58060
Change-Id: I1caa56c532078e09c93c101ce5e6f562b7773c88
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Instead of using system button layout, use layout from macOS, which
better fits the Material Design guidelines and also used in the Android
QPA plugin.
Task-number: QTBUG-58060
Change-Id: I06381219b5f1ad0a32742487fd314a8017d82dfc
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
| |
Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I9a95bcd02a48528bc3e3315c7aa730a2d43bb002
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
| |
Change-Id: I48208fb6b5f7df6e1e824d36a256d9b1643cd16d
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I5318a61dbb699e2f251d218e614c1a2ff02d53a7
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
| |
Also set proper fonts for editable controls in Material theme.
Change-Id: I78b8f8597a653af593787e569d6ba5ee7bf182a9
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
According to Android sources, ToolButton has the same font, as other
buttons and checkable controls use default (system) font. Also, set
proper size for default font.
Change-Id: I355ab57ef476918bab346538fefbd6c0209d2221
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
| |
This allow to get proper fonts for most controls.
Change-Id: I4b43ce05b09c30f59dca7d23e8d890fa9dfb74ab
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Request Roboto or Noto if exists, fallback to the system font. Even if
we fallback to the system font, set the sizes appropriately. The latest
spec for tabs says that the font size 14sp (scaled px) and all caps.
https://www.google.com/design/spec/components/tabs.html#tabs-specs
Change-Id: I34ecadf21306921e2115630ea41771dfef627b48
Task-number: QTBUG-50971
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I37bd9dd933c2125dbe6d382bf6d0a6a46b31c1dd
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
* QQuickGroupBox: GroupBoxTitleFont
* QQuickTabButton: TabButtonFont
Change-Id: Ib2e58a95c49353536231cc93d28dba075629c59f
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
Change-Id: Ib3fe1809887bbcf3db1822c6eb0182e0181cf70f
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|