| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
In QQuickSlider, this was very noticeable for very short ranges (e.g.
a range less than 1). It also caused wrong rendering of the groove on
macOS style.
Change-Id: I8a88b2e107e543f5b0cef5a7093b94b08ebeb398
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
| |
Change-Id: Iab1f01a2cccad21e178aaf13ea21469a5ce98fea
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On macOS, the controls are semi-transparent. This means
that if you use a different color for e.g the window
background, all the controls will get a different
color too.
For this reason, we should avoid drawing a background
color for the GroupBox label. And to achieve that, we
need to override the default background set from
DefaultGroupBox, to use an Item instead of a Rectangle.
Change-Id: I60c496c19744763adb2ec683670c4a9c64cc32fa
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Depending on if you see the scroll bars as a part of the
contents, the background, or neither, they should respect
either padding, insets, or none of them. The styles that
use transient scrollbars see them partly as a part of the
contents (judging from their implementation), which means
that their width and height will respect padding, but
their position will not (they will always be glued to
the right or the bottom side of the control).
Letting width and height be affected by padding doesn't
work so well with non-transient scroll bars. In that
case the scroll bars should normally be "connected"
at the bottom-right edge. So change the code so that
the scrollbars ignore padding, and instead use the full
width and height of the control.
Change-Id: Ifa5a7708a51b3773a63ebdd50781eb3845be4744
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: Id90232eb8e3614901a1cc4c464453da52697982b
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
| |
Change-Id: I2bed937e04ac3f3b955b222572acd462d1e75ff1
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 63f73a2aee40f9bec5ef63fdd416877a6737110d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I1a885a9404a808b7eeb16583c459004f44f86aa4
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: Icbb8ceb8bdf12fb27591679870896b3d97826f30
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: If805588d7a0a7b1fbacf5e89c0706a1acc98907a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
It's not obvious how you can make a ScrollView resize the
content size in such a way that you're only allowed to scroll
in one direction (taking any scroll bars or padding into account).
So add a line the explains how you can do it.
Pick-to: 5.15
Change-Id: I2d4594d99eab2390d7a5f24710a7e381dbac4c2b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
Window is now part of the main QtQuick import, and the
compatibility import does not work with static builds.
Change-Id: Ib80f54250902f0728fb57d6d2579f95b3f425956
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: I99909c375c23952a890be301c8800d294adf3abb
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even if the value of transitionDuration never change, the QML
engine will still complain if you use the property in a
binding, saying that it's not notifyable. So to silence
the engine, make it CONSTANT.
Also, in macos/ScrollBar.qml, ensure we actually read
the transitionDuration from a styleitem (parent is
apparently not).
Change-Id: I58e89e8771dd645ecd8a0b75a7e3871845d270be
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
| |
DefaultProgressBar.qml doesn't have any property called "nativeIndicator".
Instead it should use "__nativeBackground".
Change-Id: I848f82a9e093476cb806ea7fc436238c281591ac
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The styleitem no longer has any property called
"insets". This was removed a long time ago in
favor of layoutRect (which will not affect
insets).
Change-Id: I460a5062711d03c01fc7de27aea7ac381068b951
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
| |
Change-Id: I58f63b22b97ba985f1e4287f20a65f9759257502
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
| |
As it stood, we would always show the scrollbar if its size was
less than 1.0. This is wrong, we should only do that if the policy
is also "AsNeeded".
Change-Id: I516219dc27e0c3ef80e0e7bc2e11b36a8836e22d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We almost always want to clip the flickable so that flickable
contents doesn't show up outside the scrollview. The only time
this is not really needed, is when the scrollview covers the whole
window and the scrollbars are transient. But for that corner case, if
this optimization is needed, the user can simply create his own flickable
child inside the scrollview, and control clipping on it explicit.
[ChangeLog][ScrollView] ScrollView now clips its contents by default.
Change-Id: I44bd7a8c397b90e14d0b9d5db8ec6523da205648
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|