aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Material: update palette on primary/accent color changeNikita Krupenko2016-04-201-0/+47
| | | | | | Task-number: QTBUG-52631 Change-Id: Ib1649f44cdbc14770b1759ef7f4d7ea92f148cc1 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Material: use theme cursor in SpinBoxNikita Krupenko2016-04-131-0/+2
| | | | | Change-Id: I35c3a15d17a15945ccbfa5eeb4359c7c5be3facf Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Fix ScrollBars with paddingsJoni Poikelin2016-04-011-1/+17
| | | | | | | | | | 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>
* ComboBox: fix usage in an asynchronous LoaderJ-P Nurmi2016-03-231-0/+25
| | | | | | | | | | | | | 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>
* Popup: fix marginsJ-P Nurmi2016-03-211-0/+60
| | | | | | Change-Id: I09f974a00a5a2a8f14645ff5d9bfbd6bad03d324 Task-number: QTBUG-51990 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QQuickOverlay: fix background visibility for multiple modal popupsJ-P Nurmi2016-03-171-0/+40
| | | | | | | | | | | | 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>
* Change locale inheritance for popupsJ-P Nurmi2016-03-171-77/+159
| | | | | | | | | | 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>
* Material: corrected default, ToolButton and checkable controls fontsNikita Krupenko2016-03-161-4/+16
| | | | | | | | | 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>
* Store explicit and resolved font separatelyJ-P Nurmi2016-03-152-30/+90
| | | | | | | Change-Id: I80bd45244077cd75f24c4ca1af6485f4c6a23b39 Task-number: QTBUG-50984 Task-number: QTBUG-51696 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Change style inheritance for popupsJ-P Nurmi2016-03-152-2/+6
| | | | | | | | | | | | | | | | | | 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>
* Test Universal fontsJ-P Nurmi2016-03-111-0/+21
| | | | | | | Change-Id: I0daf4eb22d879e0b3e52ff16c9dd7b30a617001f Task-number: QTBUG-50984 Task-number: QTBUG-51696 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Test Material fontsJ-P Nurmi2016-03-111-0/+41
| | | | | | | Change-Id: Id80b0e851c82eecd6a8ae32f436b1a4bde0df40a Task-number: QTBUG-50984 Task-number: QTBUG-51696 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Fix popup fontsJ-P Nurmi2016-03-112-48/+64
| | | | | | | | | | | 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>
* Revert "QQuickControl: delayed the call of resolveFont()"J-P Nurmi2016-03-111-0/+2
| | | | | | | | | | | | | | | 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>
* tst_material/universal: use the appropriate styleJ-P Nurmi2016-03-116-0/+20
| | | | | | | | | | | | 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>
* Fix font comparisonsJ-P Nurmi2016-03-114-0/+192
| | | | | | | | | | | | | | | | | | | | 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>
* ComboBox: fix activationJ-P Nurmi2016-03-071-0/+35
| | | | | | | | | | 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>
* Implement accessibility support for Popup and MenuJ-P Nurmi2016-02-254-3/+43
| | | | | | Change-Id: I55067bb1cb9888be8e0e991fb73c9365d93d04f4 Task-number: QTBUG-51316 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Fix QQuickPopup to respect explicit sizeJ-P Nurmi2016-02-241-4/+25
| | | | | | | | | 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>
* RangeSlider: forward focus to the handlesJ-P Nurmi2016-02-241-0/+34
| | | | | | | | | | 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>
* Fix CalendarModel month indicesJ-P Nurmi2016-02-231-0/+115
| | | | | | Change-Id: I25c683cce19436d103d3225ad098daedf6212b64 Task-number: QTBUG-51108 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Extend tst_monthgridJ-P Nurmi2016-02-231-25/+55
| | | | | Change-Id: I8ec0828319e91df42c0bd9540953df7d431ef476 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Popup: use available size and paddings from the popup itemJ-P Nurmi2016-02-191-1/+274
| | | | | | | | | | | | | | | | 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>
* Controls: fix locale inheritance for popupsLiang Qi2016-02-191-0/+182
| | | | | | | | | 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>
* Controls: fix font inheritance for popupsLiang Qi2016-02-182-0/+230
| | | | | | | | | 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>
* SpinBox: fix JS callback accessJ-P Nurmi2016-02-151-0/+21
| | | | | | | | | | 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>
* Test and fix AbstractButton::pressAndHold()J-P Nurmi2016-02-121-4/+7
| | | | | | | | | | | 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>
* RangeSlider: choose the nearest handleJ-P Nurmi2016-02-091-15/+47
| | | | | | | | | 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>
* RangeSlider: fix stepSize handling when snapping is enabledJ-P Nurmi2016-02-081-0/+37
| | | | | | | | 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>
* Slider: fix stepSize handling when snapping is enabledJ-P Nurmi2016-02-081-0/+32
| | | | | | | | | | | 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>
* tst_applicationwindow: a temporary workaround to unblock CIJ-P Nurmi2016-01-301-0/+5
| | | | | Change-Id: Ia28054f5860bf65c87a0c8cfcc09f7c9a769c7cf Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add QQuickPopup::popupItem()J-P Nurmi2016-01-281-2/+2
| | | | | | | | | | | | | | 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>
* ComboBox: lazy load the popup contentJ-P Nurmi2016-01-281-1/+1
| | | | | | | | 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>
* QQuickApplicationWindow: resolve the default system theme fontJ-P Nurmi2016-01-282-1/+34
| | | | | Change-Id: I6927ee293e5126abc037a3eb9f86a67825732679 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* AbstractButton: remove the mouse params from signalsJ-P Nurmi2016-01-282-77/+1
| | | | | | | | 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>
* Replace Popup::pressed|releasedOutside with close policy flagsJ-P Nurmi2016-01-282-18/+69
| | | | | Change-Id: I3e09c4e2b6cbbe39bdf9e943905664e5dc1fe954 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add Popup::closePolicyJ-P Nurmi2016-01-284-0/+264
| | | | | Change-Id: Ie3d0f50a59aeaab36ec388af897cbf2596269ce3 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* ComboBox: add support for object arrayJ-P Nurmi2016-01-261-2/+45
| | | | | | | Change-Id: Ia43ba18cfd7ce9f5c4c28e239645320af5ba41e7 Task-number: QTBUG-50141 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Containers: use the implicit size of the contentItemJ-P Nurmi2016-01-254-10/+98
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* StackView: fix overly zealous child mouse event filterJ-P Nurmi2016-01-221-0/+39
| | | | | | | Change-Id: Ife8ec7e14f940068a809cdf7a715a1790cce3f66 Task-number: QTBUG-50305 Reviewed-by: Nikita Krupenko <krnekit@gmail.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Refactor PopupJ-P Nurmi2016-01-223-8/+8
| | | | | | | | | | | 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>
* Material: default primary to Indigo & accent to PinkJ-P Nurmi2016-01-201-2/+2
| | | | | | | | | | 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>
* Restore Material::primaryJ-P Nurmi2016-01-201-23/+63
| | | | | | | | | | | | | 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>
* Add PageJ-P Nurmi2016-01-181-0/+118
| | | | | | | | For page-specific headers & footers (ToolBars & TabBars). Change-Id: Ifafe9131655b74a14bc34cf69b4363013a9a2501 Task-number: QTBUG-50332 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Fix style inheritanceJ-P Nurmi2016-01-152-0/+76
| | | | | | Change-Id: I46f4ea38d21f0f6a22bd247e02fe92a5b0d0d454 Task-number: QTBUG-50470 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Improve Material & Universal warningsJ-P Nurmi2016-01-142-8/+8
| | | | | | | | | | | | | | | | | | 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>
* Material: add support for user-defined accent colorsJ-P Nurmi2016-01-141-13/+56
| | | | | | Change-Id: Ia88cfcb307d03977c45bff32ad2b1d290d183a57 Task-number: QTBUG-50178 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Fix style inheritance for popupsJ-P Nurmi2016-01-082-0/+56
| | | | | | Change-Id: I7bc36cb68e8d668fff2270e018de7eb1c71ccd20 Task-number: QTBUG-50347 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Don't skip test_indeterminate now that the bug is fixedMitch Curtis2016-01-081-1/+0
| | | | | Change-Id: If8810ae39fbfefdbf381a5fdefb25974f1f3925c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* tst_combobox: set size for the test caseJ-P Nurmi2016-01-071-0/+2
| | | | | | | | | 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>