| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Use the actual type name instead of "type".
Change-Id: I081e226a2a6cda1dd5e5cf976629ceb63a9b8db1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
| |
This passes for me locally on both macOS and Linux.
Task-number: QTBUG-87018
Change-Id: I2d5f27f3f18e8c419485beb1714515b86723bb08
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some items, like the scrollbar handle, can scale
the handle down to 0 if no minimumSize is set. This
will truncate the image drawn by QStyle.
This patch will expose the minimum size read from
QStyle to the QML control. We can then set
ScrollBar.minimumSize to the correct value.
Change-Id: Ib87e3ca7ea661bf41ab8057941fec7364b606177
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Move the expression that finds the correct target for
TextArea from QML to C++. Keeping the code in QML
simply became to messy when trying to also detect
if a TextArea is inside a ScrollView.
Change-Id: I3906dd37df73eaceffd60413d2378db7eab5f1bb
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
| |
Change-Id: I334af68282a59099698e46020b0644318eae5cce
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
| |
Change-Id: Ie624d938c9e8ac31cde79068d6b8a741a5d53014
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
93dad2bf91d414a41c6e2c7db6c75171b4917d4d requires adaptation on
declarations.
Note the declarations should probably end up removed for Qt6.
Change-Id: I8aef41f9be32374506212a953aceecd1ddc75eae
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
QTouchEvent::touchPoints() is deprecated in qtbase as of
2692237bb1b0c0f50b7cc5d920eb8ab065063d47, and replaced with
QPointerEvent::points().
Change-Id: Ibe5722cf12526f47436921dcef8d3ed7e73cf4cd
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
cd669f1f216e54fa59eee77459d608a41f5df290 fixed these tests,
but I forgot to unblacklist them in that patch.
Task-number: QTBUG-87018
Change-Id: I50b4f571eb9b231449e320ad90da3a9d4ae59a88
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
Unlike the other functions, the x and y parameters do not currently
default to the center of the control if unspecified.
Change-Id: Ie6c5945c0b43f1ef0d79e76a96da18ea102a50e2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Value types must be lowercase. Fixes the following error:
Invalid QML element name "StyleMargins"; value type names must begin
with a lowercase letter
Change-Id: I2b0ff7ed60bd8844dec95fa57d196e868c1d671d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
So that we can unblock CI.
The failures need more time to be looked into.
Task-number: QTBUG-87018
Change-Id: I350a4100011127588077edecb73ae11078100940
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: I9078aa6393f88493d631d91ccf5d2809f3fa0a4f
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
| |
Add missing QML_FOREIGN and make it anonymous.
Change-Id: I031132924f8d1c7ad4965248aa6b336c42e172a0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-87018
Change-Id: I5f9318bd1cad0f760caf02b9066e729af3601098
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
Amends 0ef66bfacd15cd6101522dbb2ffab1ada6a0834b : both constructors need
to setAcceptTouchEvents(). Fixes tst_controls::Basic::Button::test_touch
Task-number: QTBUG-87018
Change-Id: If801bd594aa22659a3ca8bad8be04d5f480033be
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
There is a subtle shadow line at the exact button width, which becomes
visible for wide comboboxes. So move the margin one pixel to the left
so that we don't scale the image on top of the line.
Change-Id: I8780874fdd39178e7cf2fde24117589f222ea324
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
Amends 6115585477bea66d90acbbd8a25b898d121bd50e
Task-number: QTBUG-87018
Change-Id: I3c742bd8fc593f4d3a4f33104e708344fdafe3ec
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This could have been done since Qt 5.10. In Qt 6 it is now mandatory.
See qtdeclarative/1457df74f4c1d770e1e820de8cd082be1bd2489e and then
qtdeclarative/ab91e7fa02a562d80fd0747f28a60e00c3b45a01
Task-number: QTBUG-87018
Change-Id: Ia05b4524860e99465a3c0b43ecd6159d26b2e5b5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improve the debug implementation so that you don't need
to modify the application to get debug output. You
can now instead just do e.g:
QQC2_NATIVESTYLE_DEBUG="myButton output contentRect"
QQC2_NATIVESTYLE_DEBUG="combobox ninepatchmargins"
QQC2_NATIVESTYLE_DEBUG="all layoutrect"
Change-Id: I58cbcfb241bc0be20cae73735bc277d0662a476a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
| |
We now select the default style from the QQuickControls
plugin, so the removed code snippet is no longer needed.
Change-Id: I8117912d424ed7da87f81ce1f90f423a13545e54
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
| |
We don't want to hide the scrollbars on desktop when it's
not moving.
Change-Id: I6ce555b06a598560a7253e2b8e6db71405b9322b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch will add a focus frame to the macOS style.
We use one focus frame item that we move around according
to changes to the focus object.
It's normally the background delegate's responsibility to
draw a focus frame, so we take care to only draw the
native focus frame for controls with default delegates.
(to be consistent with the other styles)
Change-Id: Iaa7202675c1aad2fc19682563ac1afb6e686c105
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ScrollView.qml makes use of ScrollBar. While most of the
styles override ScrollBar.qml, almost none override
ScrollView.qml. This means that the ScrollView in
Basic style will be used, and that ScrollView will
always use it's own scrollbars, regardless if the
overridden style provides another ScrollBar.qml.
This patch will override ScrollView.qml for all the
internal styles so that the correct scrollbars will
be used.
Change-Id: I1d9ba17f225a82b2dfaae6caba6ac4519f79a705
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
Move the hover animation handling API from macOS ScrollBar down to
QQuickStyleItem.
Change-Id: I36c8b173a15d0f4e10a59b7f3ccfe635e05c73e7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
To be able to show a focus frame around a control
from QML, we need to know the control's geometry and radius.
For the geometry we can use the already existing layout rect.
But for the latter we need to add focusFrameRadius enums to
QStyle using the already existing pixel metric function.
Change-Id: I45619194766cccbf824d93073a4dcea3a0893fbe
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous patch fixed a memory leak, which in turn exposed an issue
caused by item change listeners not being removed before contentModel
is destroyed. QQuickMenuPrivate::itemParentChanged() then tried to
access that contentModel, resulting in a heap-use-after-free.
This patch fixes the issue by removing all menu items before the menu
is destroyed, ensuring that the change listeners are removed in time.
Pick-to: 5.15 5.12
Task-number: QTBUG-86851
Change-Id: I3dc0a251d7fd9c05c384de6472e73493b2d5b664
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Q_Q should not be used in a QObjectPrivate-derivative's constructor,
as q will be null at that stage. Instead, add QQuickMenuPrivate::init()
and create the contentModel there.
Pick-to: 5.15 5.12
Fixes: QTBUG-86851
Change-Id: Ia2a955e718cc0486af5a05e24fcfcb1c4bacb48d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
|
|
|
|
| |
Go trough the layout rects, and adjust them
so the look correct (by using nativestyle
manual test and PixelTool).
Change-Id: Idbd132b75fb2f87f8ff24cbe3a490ba6b3d2adc6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-86815
Change-Id: Ie0688d13b1787da3c1fc241a7d864aa014ca1d70
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
| |
We're no longer going to draw a static focus frame
from QStyle. Subsequent patches will add a dynamic
focus frame in combination with QML.
Change-Id: I08b13b4c51cab74cd1bc6ec66b879b49774ad267
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
Since all properties that we add to the QML style files will
bleed into the API of the control, prepend '__' to
nativeBackground to mark it as private.
Change-Id: I0cb474e054c3a3824985cf39b4bb675fb57b0696
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-84051
Change-Id: Ibfd1750b571f65bf76a3922f89510b6c6fd4eff9
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to split the uses of the Imagine style API out into
file-selected files. We set Imagine.path so that the default
assets are used for areas of the UI that are important to the
functioning of the example, as using custom assets here could
make it impossible to use the API if the assets were not
created correctly.
Change-Id: I2b6b683ffe65b7d573abf0ae793509a95417aead
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-82989
Change-Id: I5ce70afd395ecf0a0e91a70f19b2f1a04e1c1e6d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By allowing importing styles without first importing QtQuick.Controls,
which does runtime style selection.
[ChangeLog][Styles] It's now possible to select a style at compile-time
by importing that style explicitly instead of QtQuick.Controls. This
avoids the need to do run-time style selection and hence deploy the
QtQuick.Controls plugin with the application.
Change-Id: I666d6dc7727fffd2c7b05743855f2086f076465a
Fixes: QTBUG-86284
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This is necessary to support compile-time style selection. If we don't
do this, QtQuickControls2Plugin (which is now only used for run-time
style selection) will be loaded unnecessarily.
Task-number: QTBUG-86284
Change-Id: Id5338f147e3e97f25574ec98377d26b111f8341a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][Styles] The Default style was renamed to Basic to account
for the introduction of the platform styles (macOS, Windows), which
will be used by default (where possible) when no style is specified.
Fixes: QTBUG-85984
Task-number: QTBUG-68814
Task-number: QTBUG-86403
Change-Id: I22b3199c8662e4ee5d55a1be1a51c9856ac62376
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Qt 5, QtQuickControls2Plugin::registerTypes() was responsible for
calling initializeTheme() on each style plugin. Now that we delegate
more work to the QML engine, each style plugin calls initializeTheme()
via registerTypes().
To avoid fallback styles overwriting font and palette data set by the
current style, we need to check if the theme has been intialized before
calling initializeTheme(). To do this, we add a static
"themeInitialized" bool that QQuickStylePlugin sets to true after
calling intializeTheme() for the first time. It checks this value and
avoids calling intializeTheme() if it's true.
We also need to make QQuickStylePlugin ensure that the theme it's
initializing belongs to the current style.
Fixes: QTBUG-86303
Change-Id: Ie65e646677c78622829f4949c41cb79204cf5786
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In follow-up commits, QQuickStylePlugin will be reponsible for calling
QQuickStylePrivate::reset(), which may happen before
~QtQuickControls2Plugin is called. To avoid issues, we need to store
anything we need from QQuickStyle APIs so that we can be sure that it's
valid in QtQuickControls2Plugin::unregisterTypes().
This also avoids unnecessary calls to QQuickStyleSpec::resolve().
Change-Id: I7f659b432741b96ee58452c4867b7ecd12c6cfde
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
| |
QQuickStyleItemTextField didn't set a layoutRect. This was just
an oversight, and causes layout issues when trying to read it
to position the focus frame.
Change-Id: Ic959fd315da38e9700dc079c75993feca29c0c61
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQuickTextForeign was defined in both QQuick2Controls and
QQuickTemplates, causing linking to fail when building statically.
Since the type only exists to expose QML API, we just rename
one of the classes.
Change-Id: Id212602ada2f9eda3d7948474f600a954d26ddec
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
If the drawer does not see the press point then it was not open at the
time it was pressed. This ensures that when a touch is done on a button
to trigger the opening of a drawer it does not think it should be
closed due to the default close policy.
Pick-to: 5.15
Change-Id: I0d1b11341e659dc14554d0d72aac70199bbb99fa
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
Some controls needs more care, but that's for follow-up commits
Change-Id: Ia7afeccf06f2f12dbef1402bf5975807cad8adcb
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A ProgressBar is based on floating point numbers, meaning that
it can have e.g from == 0.5, to == 1.5, and value == 0.8.
A ProgressBar in QStyle on the other hand is integer-based. So
add some extra code to convert floats to ints before passing
the values to QStyle. But only do this for ranges smaller than
100, to ensure that we don't overflow ranges that are really large.
And let "to" start at 0 in case the range ends close to Number.MAX_VALUE.
Change-Id: I2707647911ee31c91b435697d4ae840b304c5c69
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QStyle doesn't calculate a sensible minimum implicit size for us, only
a implicit size that matches the size of the contents. This means that
if the contents is empty (e.g a TextField that has no text), the implicit
size will typically be smaller than what a sensible minimum should be.
Note that for widgets, a sensible preffered size is set from the widgets
themselves, and not QStyle. Which explains why the sizes we get from
QStyle can sometimes be too small.
Therefore, add a sensible minimum implicit size to all the controls
that suffers from this problem. We let QStyle continue to calculate
the actual minimum size given the contents as before (which will end
up as the StyleItem's implicit size), and instead fix the recommended
minimum size directly in the QML style files.
Change-Id: Ic4097776e40d0de64312e4099d7fe4c7fc1ca9d1
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
It is probably wrong enough to require a thorough rewrite. Given that it has
nuggest such as "There is currently no available solution for high-DPI support
in applications wishing to mix Qt Quick Controls and Qt Quick Controls",
starting from scratch seems best.
Change-Id: Id1ae9d0bc58da452457cbf4bcdebf658f74cb377
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
Also cleanup documentation, with the exception of the "High-DPI
Support in Qt Quick Controls" page, which needs to be either
removed or rewritten after some fact checking.
Change-Id: I3cdf1f8554f8f26627a9a5f17c2ee0038c933468
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: I99985639152688de3e7a116259bc56f54fc3c771
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
| |
Add it, and remove redundant virtual where it was used.
Change-Id: I7e0635f8d9eafbad49de63302a5b8f5cd25c0080
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|