| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When creating the binding "contentItem.clip:" we
accidentally also created the contentItem before
the component was completed. Since the contentItem
of a ScrollView is a Flickable, it meant that we
ended up always creating an internal flickable
from QQuickScrollViewPrivate::ensureFlickable,
instead of using the Flickable child if there
was one. So this binding cannot be used.
Change-Id: I2e7ca63f64693adb1b524966fec82aef2b3fb658
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: I295f8677a1e0f13312acee9021ea862afb483435
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I1a06b5eae19367c5f44e5b4a002c4501dc470b5e
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Templates defines a number of C++-based QML types, most of those are
derived from QQuickItem. Therefore, it actually needs QtQuick although
it never explicitly imports QtQuick. In order for tools to figure that
out, declare the QtQuick dependency in the qmldir file.
Task-number: QTBUG-87164
Change-Id: I982b4ee57102ac62b0ee6e8559e34c5e203a7a0f
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
This allows qmllint to find them.
Change-Id: I33b8ad4b2a736d914e7522761c2e574e482b9460
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: I3042ad7543eefa3153db0e9eee1ae9186f7011d1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
8b534487044dfb3b464431ecb91ef4e0864af4ed made it so that the most
appropriate built-in style is chosen by default is no style is
specified. This breaks tests that assume the old behavior is still in
place.
Fix those tests to explicitly set the Basic style.
Task-number: QTBUG-86403
Change-Id: I6a51611741e2d0cb9109bb0221c2214a5c5179df
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On macOS (Big Sur), when a ScrollView has both a vertical
and a horizontal scrollbar, we should draw a corner item between
them so that they look 'connected'.
Since we don't have a way to draw that item using QStyle, we
simply grab a section of the center of a ScrollBar groove, and
use that to create a corner item.
Change-Id: I4e4df25b6769e810e6b046f6842f4424450fecb3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no apparent reason as to why we should let QCommonStyle
fill the background before it calls PE_FrameLineEdit in QMacStyle.
The NSTextField cell already draws the correct background, which
is supposede to be semi-transparent in dark-mode.
Therefore, just let PE_PanelLineEdit and PE_FrameLineEdit be
drawn the same way.
Change-Id: Iacd4f1b1802e1b0c2b96a92cf271b681c10b8cff
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
When not using nine patch scaling, we used to override minimumSize to
instead be the actual size of the item, since we use minimumSize to also be
the size of the image we draw. But this turns out to be confusing, especially
while debugging. So introduce a more explicit imageSize() function instead, and
leave minimumSize unchanged.
Change-Id: I8d3ec25603d430a94b124713fad01bf6d277bbe5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
Following fa8d021fa6fcb040fb702b6ffd2deee52a3b748a
Change-Id: Ifa08b5e1bceecb8657ce528eb315c19fa34a1e1f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: Ic281c99f5679a20a65216b98db4c6cb2bc5cbf8c
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
| |
On macOS the scrollbars are not transient. The contentItem of a ScrollView
should therefore be aligned to the side of the scrollbars, rather than
to the side of the ScrollView.
Change-Id: Ie58753d61c04c979270995deb6e3b2650fa643db
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On macOS, if a ScrollView has a clip set, we should clip the
contentItem as well. This because the scrollbars are semi-transparent
and non-transient (doesn't float on top), and in that case, the
contents will show through them. So we assume that if the
user sets a clip on the ScrollView, he want's to make sure
that the contents is not showing outside the area where the
contents are supposed to be.
Change-Id: I7fff89843c0db38ec1caa6d18464e964788743c1
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
The register_types() function was optimized away by the linker and the
imports would not be found.
Change-Id: I3d98602daf78996399630b7b1296cc5dc0d3da05
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This led to the following error:
qtbug86891_qml_plugin_import.cpp:7: undefined reference to
`qt_static_plugin_QtQuickControls2FusionStyleImpPlugin()'
Change-Id: I5ec6b5c47215944281ce570dcb70a89e1afe72d7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
If the sequence is empty then reset m_shortcutId to -1 so it does not
have a shortcut attached to it.
Change-Id: I16945950145d9d3ca7da73e998b28d64997501d0
Pick-to: 5.15
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
Setting the QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS variable
in the project ensures we ported away from old API calls.
Task-number: QTBUG-86815
Change-Id: I3ca1422448dbcadfdb3ed668ba4cfcddcb2d5b7e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
| |
Modify special case locations to use the new API as well.
Task-number: QTBUG-86815
Change-Id: I4a690095fcd4b1141550de86b6820ae2dd579429
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous commit changes the how the default style is set, and since
the tests all assumed that Basic was the default, we now need to
ensure it is explicitly set.
If we want to, we can revert this patch (or file-by-file) later and
ensure that these tests work with all styles. For now, just keep things
working as they used to.
Tests that use QTEST_QUICKCONTROLS_MAIN are not changed, as they
already run with all built-in styles.
Tests that don't use types that will cause issues,
like tst_qquickcolor, do not need to be changed.
tst_snippets can be run manually to produce screenshots, so we specify its
style in a qtquickcontrols2.conf file to allow it to be overridden by e.g.
application arguments (QQuickStyle::setStyle() takes precedence over all
other approaches of setting a style).
Change-Id: Ifae7e959f89a41a757c170272038fad139bba04f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][Styles] An appropriate built-in style is now used as the
default style if one is available for the target platform. For example,
when running a Qt Quick Controls application on macOS, the macOS style
will be used. On Android, the Material style will be used. When running
on e.g. an embedded device, where no native style is available, use the
Basic (formerly "Default") style.
Change-Id: Ie61d1a8a1a83fbeba63387c7ca3671084f47bc04
Fixes: QTBUG-86403
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
| |
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>
|