| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
While Qt Quick Templates does define the API for each type, it and
Qt Quick Controls are quite closely intertwined, and it doesn't serve
much value to have the porting guides separated.
Task-number: QTBUG-88158
Change-Id: I9d5ee403049a17da1dc5e45e7d26bbd6c7b5b986
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly broken links to types and
properties that are either dropped or
renamed.
Task-number: QTBUG-88141
Fixes: QTBUG-88141
Change-Id: I44789cdd1b8560a967b0b3868fd637deef488d88
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
QWindowsStyle did not add these margins because the layout did that.
(It had a 9 pixel margin all around it)
However, Qt Quick Controls2 expects that the contentPadding includes
that margin. We therefore change the subControlRect implementation
for (CC_GroupBox,SC_GroupBoxContents) to add those margins.
Change-Id: I953a49340dc085716b4e9ecf736a5438e7cc4bbd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
| |
There is no reason to calculate the image size
over and over. Just calculate imgSize once.
Change-Id: Idf49a64102de18ba535899d4a46085de79e7ca2f
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
If the size of the QImage we draw on hasn't changed between
subsequent calls to paintControlToImage, we can just
reuse the one we already got. This way we avoid creating
and throwing away images unnecessary.
Change-Id: Icf65bb8d9008a21e7114e588df46bc1e4cbdea97
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an extra debug flag that lets us distinguish
between general information, like geometry info, and
explicit debug statements. E.g when writing:
qqc2Debug() << "entering this block"
...you sometimes only want to print that line, and
not all the additional "noise" you also get if this
would print out general information.
Change-Id: I86f60557f7c9b08e24c3de55bd0d526e095c6104
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
| |
Change-Id: I5eb7441ce557773e5253d3ce623be637819bab0d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: I4e6c1b03915c33f6225c0fb7f86e6acb7715cd4d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
Many of the virtual functions should be const, as
they should not modify the state of the item.
Change-Id: I94a7f9ae56204c8f8f737911e15d81f82d8add83
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In dark mode, the slider handle is semi-transparent.
If we draw the handle and the groove separately like we do
today, the handle will end up _on top of_ the groove
rather than as a part of it. The result is that you will
see the groove behind the handle, which is wrong.
Since we already draw the groove with tick marks
without using a nine-patch image, we might as well draw
the handle at the same time. This will give us the
correct appearance.
Change-Id: Ie582f99450c824d6955e3c0783dad89ab41160ef
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current implementation doesn't work if drawing the
groove and the handle together. The reason is that we
transformed the CGContext as a way to flip the groove
when drawing the slider in inverted (upside down) mode,
which would also affect the position of the handle.
Since we don't have an inverted API in Slider, we can
simplify the code greatly in QStyle and remove all the
transformation code. If we are to support inverted mode
in the future, this can be achieved much easier by simply
setting the scale on the Slider (or the style item) to -1.
We also change the way we draw tick marks on both sides
of the slider to use the API in NSSliderCell directly
rather than manipulating the CGContext.
Change-Id: I882a9e7eb69944da590d9d6b5ffb85c1f960cdaf
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was observed on Button on Windows style, where the labels size
hint was a fractional number (e.g. 38.26). This got truncated by
QQuickStyleItem::contentSize(), which caused the content item to get
less space than it actually needed
It was only observed on Button, but it was likely to also happen
with other control types.
Change-Id: I50b98fa7d54e5be2cedeeaf60018367689f168cf
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
| |
-should be "look and feel"
Task-number: QTBUG-88010
Change-Id: I8fa72334a7fb0aab7e057422364966055ac39584
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
| |
Refactor the padding part, since there is
no reason to go through all the if-tests if
we don't use nine patch image scaling.
Change-Id: If89c13aec0e6de955f032145ee325974c7169d6c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
| |
Change-Id: I7f1fe2b07a6c22f02802b0fdc31917b398cbd770
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
| |
Cherry-picked from qtbase:873579d1579
Change-Id: Icb9ba3cabe9d5bd6670a6e4659701d06ff048d13
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
Cherry-picked from qtbase:6f850c080aac36
Change-Id: Ib6fd2ffa918a8bd5c4e7f0a3198eff36b3298f6d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
| |
Change-Id: If1481afbfbc2e655e2b09a232abb16aa2dd792fe
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
| |
Check if the control is visible before taking the time to
draw the image.
Change-Id: Icb64b85355e1341279a95e9035ae18d91c14d6a8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
QQuickStyleItem has been missing a proper
constructor that calls the constructur
of the base class. This patch will add one.
Change-Id: I7ba16b84a548bf8674723aa0d569b929111d07cf
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
slider.position is a number between 0 and 1. And when the
position is 1, styleOption.sliderPosition should be equal
to styleOption.maximum. So no reason to subtract "min" (which
is also not a normalized number).
Change-Id: I9f9ff2e112e224b3aa32bda12aa1963a6e74c6ca
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
| |
Change-Id: I59f64b3941bd0744bba6f6079b9ab3fc30063447
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
| |
Change-Id: I863764d6b3f957a92551d1cd51f2e69e980db9d3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It should return margin of 0 if
style()->subElementRect(XXXLayoutItem)
returned an invalid rect.
This means that we cannot rely on m_styleItemGeometry.layoutRect
blindly.
Change-Id: If6b5a40481c8199a63f3446abc9e7dd1c670d181
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
| |
Change-Id: I82c8cf3e637550cd458ac77f2cc4f6490dc11802
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
| |
Change-Id: Ic975da18b11fa3e9bc472dcc4c33d6ffcbc90519
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-86053
Change-Id: Ia2e3c3d0164550bb77b73edb3ef8f5e634e09ea7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|