| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Task-number: QTBUG-52631
Change-Id: Ib1649f44cdbc14770b1759ef7f4d7ea92f148cc1
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
| |
Change-Id: I35c3a15d17a15945ccbfa5eeb4359c7c5be3facf
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
Padding was not taken into account when calculating the new position,
which caused there to be small offset between the mouse press and the
resulting handle position by the amount of padding used.
Task-number: QTBUG-52233
Change-Id: Ibd8c4375b030a27a6124aefc4bc9af570d14d3a9
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following comment in QQmlDelegateModel::object() helped to find
a solution ie. using createdItem() instead of initItem():
If asynchronous is true or the component is being loaded asynchronously due
to an ancestor being loaded asynchronously, item() may return 0. In this
case createdItem() will be emitted when the item is available. [...]
Change-Id: If3bf8e60834534ca07c8db8f502f4f11969057e8
Task-number: QTBUG-51972
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
| |
Change-Id: I09f974a00a5a2a8f14645ff5d9bfbd6bad03d324
Task-number: QTBUG-51990
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea of the "modalPopups > 1" check was to avoid calling QQmlProperty::write(),
but it missed the fact that one modal popup might be still closing while a new modal
popup is already opened. Thus, there's temporarily 2 modal popups visible, and we
must transition the overlay background according to the state of the last shown modal
popup.
Change-Id: If25d83ccaa5adc29a9bc8d660f41fb66f90fb167
Task-number: QTBUG-51916
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
The last one in the series of making Popup inherit its properties from
the parent window instead of the parent item. The same change was done
for font and style already.
Change-Id: I7024cce13f501e92024e9110e87ed33bbae6533d
Task-number: QTBUG-50984
Reviewed-by: Mitch Curtis <mitch.curtis@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>
|
|
|
|
|
|
|
| |
Change-Id: I80bd45244077cd75f24c4ca1af6485f4c6a23b39
Task-number: QTBUG-50984
Task-number: QTBUG-51696
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The decision to make popups inherit theme & accent from its parent item
was driven by ComboBox. However, in many cases it has an undesired side
effect, so we've changed Popup to inherit its style attributes from the
parent window instead, just like we did for fonts. The only exception
to this is ComboBox, where the popup is an integral part of the control.
This special case is now handled in the respective style implementation.
A concrete example is that we can now specify dark theme by default for
Material style ToolBar to get a better matching light text against the
colorful background. In Gallery, this won't effect the options menu,
which is a child of a ToolButton. The menu retains light theme along the
rest of the application.
Change-Id: Ibdc8fcf5b5fa258d853410a9b40368472424a8c6
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
| |
Change-Id: I0daf4eb22d879e0b3e52ff16c9dd7b30a617001f
Task-number: QTBUG-50984
Task-number: QTBUG-51696
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
| |
Change-Id: Id80b0e851c82eecd6a8ae32f436b1a4bde0df40a
Task-number: QTBUG-50984
Task-number: QTBUG-51696
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This is a partial revert of a405919. This change makes popups inherit
the window font instead of the parent item font.
Change-Id: Ie360e3831aadbd167859e17d381edf3a28945300
Task-number: QTBUG-50984
Task-number: QTBUG-51696
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 3cba8b19c4e67cbcd6977bf141d7ddf2e54aae85.
The change was done to implement font inheritance for popups,
but it broke theme fonts for other controls. Since the former
was a mistake (see comments in the linked bug report), it's
best to revert back to what worked with theme fonts.
Change-Id: I863765c5061b02607cfe04a848ff39e3243bd25f
Task-number: QTBUG-50984
Task-number: QTBUG-51696
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main purpose of these tests were to test the attached property
and its inheritance, so it didn't matter which particular style was
active while running the tests. However, it simply looks better if
they run with the appropriate style, and this also allows us to add
style-specific tests (such as font attributes).
Change-Id: I827f26e469bce3445ffe7e24d6299bcfb587d849
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When inheritance of explicitly set font attributes is involved, it is
important to compare the resolve mask in addition to comparing the
attribute values to avoid losing the information whether a specific
attribute is set explicitly.
For example, QFont::operator==() returns true for two fonts that
are both bold regardless of whether only one of them has explicit
weight set. Therefore, setFont() must not ignore fonts resolve mask.
Furthermore, the fontChanged() notifier must be emitted only if the
actual attribute values change, not if only the resolve mask changes.
Change-Id: I2eb7a071c0eaecd2f8d2f6074c4ce6ed6764a6e9
Task-number: QTBUG-50984
Task-number: QTBUG-51696
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
The highlighted index is always -1 when the popup is hidden. Thus, when
pressing enter/return, it should only activate the highlighted index
when the popup is visible to avoid setting the current index to -1.
Change-Id: I7a66e347bf2e4b62a67eb39b119ca1de299f16ef
Task-number: QTBUG-51645
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
| |
Change-Id: I55067bb1cb9888be8e0e991fb73c9365d93d04f4
Task-number: QTBUG-51316
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Don't resize the popup (clamping to its implicit size) unless
the popup really has to be resized in order to fit the screen.
Change-Id: I81201b77a1001ac22291ede1fc685f7208ff2916
Task-number: QTBUG-51322
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
The active focus ends up to RangeSlider when using forceActiveFocus()
or QML KeyNavigation. We must forward the focus to one of the handles,
because RangeSlider handles key events for the focused handle. If
neither handle has active focus, RangeSlider doesn't do anything.
Change-Id: I61a53d0c7203fad64306b54c1f96093bd9312416
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
| |
Change-Id: I25c683cce19436d103d3225ad098daedf6212b64
Task-number: QTBUG-51108
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I8ec0828319e91df42c0bd9540953df7d431ef476
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that the internal popup item inherits Control, which already
provides these features, we may use them directly instead of re-doing
them in Popup.
NOTE: QQuickMenu code has lots of direct references to the content
item, which used to be stored in QQuickPopupPrivate, which is the
base class of QQuickMenuPrivate. Now that the content item is stored
by QQuickPopupItem instead, the direct references don't work. Thus,
as a temporary solution to avoid this patch growing large, we'll
store the content item in QQuickMenuPrivate.
Change-Id: I80a16d34432131a4326c1b6ae54419470be53f96
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
QQuickPopup is a QObject, not a QQuickControl. Then need to make
QQuickPopup::popupItem() inherit its locale from QQuickPopup::parentItem().
Task-number: QTBUG-50984
Change-Id: Ie5908f86a154502962d6406dd4067b46cc527de7
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
QQuickPopup is a QObject, not a QQuickControl. Then need to make
QQuickPopup::popupItem() inherit its font from QQuickPopup::parentItem().
Task-number: QTBUG-50984
Change-Id: I7f417474172b533b744eb668a0476cdcbabba868
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
Avoid calling an uninitialized JS callback. This is a regression caused
by lazy creation of the JS callbacks in 1f146d9.
Change-Id: I1816b491ada0509c5664cffbcaa32ca987095b31
Task-number: QTBUG-51114
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Using the same auto test that already exists for TextField and TextArea
nicely exposed some difference in the behavior:
- the signal wasn't canceled on second press
- the signal was canceled right away on any tiny move. now it allows
the same little threshold than TextField and TextArea
Change-Id: I6b9bd19c614b36dd0ec7b232f821af3aa929d02a
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
The handles were hard to touch. This change makes it choose the nearest
handle, so that the interaction becomes similar to what Slider has.
Change-Id: Ie94eeed6a8466f44e8eee0ce0ba0a45cfb3f6924
Task-number: QTBUG-50972
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Same as the recent fix for Slider. The step size needs to
be normalized when added to or subtracted from the position.
Change-Id: I490d105f88db361fb0e1888017e1717e9d79e4c8
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The value range and step size are configurable, whereas position is
always in the range [0.0..1.0]. The snap handling was applying step
size to the position as is, without taking the value range into
account. Thus, snapping worked correctly only for the default
[0.0..1.0] value range, which happens to match with the position range.
Change-Id: If2f48d36c95554de25598d507842576a49e643b9
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ia28054f5860bf65c87a0c8cfcc09f7c9a769c7cf
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even though I didn't want to expose this, because I'm still hoping we
could make QQuickPopup inherit QQuickControl in the future, the fact
that QQuickPopupPrivate::get(popup)->popupItem was used in so many
places is a good indicator that accessing the popup item is often
required when dealing with popups. In any case, this is C++ only API
and not exposed to QML, so it's not that big deal... and we can
always deprecate it later and make it return "this" should the item
plans come true.
Change-Id: I6b99a499327d838ee61eae70f8ebf8e77f00ae39
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
On my Linux box, the creation time of ComboBox { model: 100 } goes
down from ~4ms to 0.9ms.
Change-Id: I8c3d8233d961c0b895581ba347d6789063a587a3
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I6927ee293e5126abc037a3eb9f86a67825732679
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
If we ever want to expose these, the name would be something else
than "mouse"... :)
Change-Id: Ie9dad16e84708059fd0b43d4764925db7b014d64
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I3e09c4e2b6cbbe39bdf9e943905664e5dc1fe954
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ie3d0f50a59aeaab36ec388af897cbf2596269ce3
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
| |
Change-Id: Ia43ba18cfd7ce9f5c4c28e239645320af5ba41e7
Task-number: QTBUG-50141
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The result of:
Frame {
ColumnLayout {
RadioButton { text: "First" }
RadioButton { text: "Second" }
RadioButton { text: "Third" }
}
}
is now identical to:
Frame {
contentItem: ColumnLayout {
RadioButton { text: "First" }
RadioButton { text: "Second" }
RadioButton { text: "Third" }
}
}
Change-Id: I823b2259dabb66db0dddef41ea396f7ac1000a82
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
| |
Change-Id: Ife8ec7e14f940068a809cdf7a715a1790cce3f66
Task-number: QTBUG-50305
Reviewed-by: Nikita Krupenko <krnekit@gmail.com>
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Added relevant properties to make it almost like a Control: x, y,
width, height, padding, background... This change makes popup use
an internal item where the style/user-supplied contentItem and
background are re-parented. This way we can provide a default style
(background) for Popup.
Change-Id: I3e7933562464c5c852e4ba4bc37d9ac25691c714
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
These colors are used as an example in the Google Material Design
Guidelines, and as defaults in Android Studio app templates.
Change-Id: I6236e4fd388817e05e22ec0b7aadedb3fae68fa1
Task-number: QTBUG-50330
Reviewed-by: Nikita Krupenko <krnekit@gmail.com>
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea was that users would simply configure a different accent color
for the toolbar, but the only way to do this is in code, which creates
a hard dependency to the material style. A separate primary color makes
it possible to configure both colors in :/qtlabscontrols.conf, which
nicely avoids style specific dependencies.
Change-Id: Ia5ad92b57f9aea32e16e9260117e8d32b3356556
Task-number: QTBUG-50329
Reviewed-by: Nikita Krupenko <krnekit@gmail.com>
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
For page-specific headers & footers (ToolBars & TabBars).
Change-Id: Ifafe9131655b74a14bc34cf69b4363013a9a2501
Task-number: QTBUG-50332
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
| |
Change-Id: I46f4ea38d21f0f6a22bd247e02fe92a5b0d0d454
Task-number: QTBUG-50470
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
QQuickMaterialStyle: unknown accent "foo"
After:
qrc:/main.qml:28:9: QML CheckBox: unknown Material.accent value: foo
Furthermore, before invalid values in :/qtlabscontrols.conf were silently
ignored. Now it gives a clear warning:
:/qtlabscontrols.conf: unknown Material theme value: foo
Change-Id: I0be4eb26ffe23643e282197dc76a091801ab2f4d
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
| |
Change-Id: Ia88cfcb307d03977c45bff32ad2b1d290d183a57
Task-number: QTBUG-50178
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
| |
Change-Id: I7bc36cb68e8d668fff2270e018de7eb1c71ccd20
Task-number: QTBUG-50347
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: If8810ae39fbfefdbf381a5fdefb25974f1f3925c
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Should help with the warning that sometimes appears in the CI:
QWARN : tst_styles(material)::UnknownTestFunc() QWindowsWindow::setGeometry: Unable to set geometry 0x0+66+112 on QQuickView/'tst_combobox'. Resulting geometry: 124x0+66+112 (frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 0x0, maximum size: 16777215x16777215).
Change-Id: I913ae09dfad4d1ef914ed589466ede6d62bece79
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|