aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* SwipeView: add horizontal and vertical properties for convenienceJ-P Nurmi2017-03-292-0/+37
| | | | | | | | | [ChangeLog][Controls][SwipeView] Added horizontal and vertical properties to make it more convenient to create orientation-dependent bindings in styles. Change-Id: Ica62436006f0ce33e2b567f6191df71c01454394 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* ScrollIndicator: add horizontal and vertical properties for convenienceJ-P Nurmi2017-03-283-0/+38
| | | | | | | | | [ChangeLog][Controls][ScrollIndicator] Added horizontal and vertical properties to make it more convenient to create orientation-dependent bindings in styles. Change-Id: I8670456bb84387af99440ba25ab652c07ec1cb29 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* ScrollBar: add horizontal and vertical properties for convenienceJ-P Nurmi2017-03-283-0/+38
| | | | | | | | | [ChangeLog][Controls][ScrollBar] Added horizontal and vertical properties to make it more convenient to create orientation-dependent bindings in styles. Change-Id: Id48d17021b663f00d242ffbde06b76407b832f81 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* RangeSlider: add horizontal and vertical properties for convenienceJ-P Nurmi2017-03-286-63/+87
| | | | | | | | | [ChangeLog][Controls][RangeSlider] Added horizontal and vertical properties to make it more convenient to create orientation-dependent bindings in styles. Change-Id: Iac2ae7d4d701cf9516521923cf27416d76dfba5c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Slider: add horizontal and vertical properties for convenienceJ-P Nurmi2017-03-287-52/+79
| | | | | | | | | [ChangeLog][Controls][Slider] Added horizontal and vertical properties to make it more convenient to create orientation-dependent bindings in styles. Change-Id: Iec3332f873e482590ab4f0cca08323c905527c77 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* AbstractButton: add display propertyMitch Curtis2017-03-2812-1/+157
| | | | | | | | | | | | | | This property allows control over how icons and text are displayed within buttons, without having to implement custom delegates. It is also necessary for the upcoming Action type. [ChangeLog][Controls][AbstractButton] Added display property to allow control over how icons and text are displayed within buttons, without having to implement custom delegates. Task-number: QTBUG-49820 Change-Id: Ie924e2c54ed49961fd40129999875c8175606ecd Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Button: add support for iconsMitch Curtis2017-03-244-27/+87
| | | | | | Task-number: QTBUG-49820 Change-Id: I7f2a72a4ef199d31b2b0041fdad42cfeb15f7b54 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* AbstractButton: add support for iconsMitch Curtis2017-03-246-2/+99
| | | | | | | | | | | | | | | | | | | | | This patch adds the following properties to AbstractButton: - icon.name - icon.source - icon.width - icon.height - icon.color Derived types implement the behavior behind these properties using the new private IconImage type. [ChangeLog][Controls][AbstractButton] Added support for icons. The following properties are now available for derived types to use: icon.name, icon.source, icon.width, icon.height, icon.color. Task-number: QTBUG-49820 Change-Id: I3b5e4eaac390543deef60883e13539646a6bb060 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickDisplayLayout: call layout on child item implicit size changesMitch Curtis2017-03-231-0/+2
| | | | | | | | | This is necessary when the layout has an explicit size larger than its implicit size, and hence child item implicit size changes don't trigger geometryChanged() (where layout() is called). Change-Id: Ieacebff50503c101358e1dd6fda85ac495120af7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickDisplayLayout: only use spacing if the image's width is > 0Mitch Curtis2017-03-221-2/+2
| | | | | Change-Id: I4b6b36da99633d5f9eebf090c5f0d8a3d2829e12 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickAttachedObject: add pimpl supportJ-P Nurmi2017-03-222-0/+8
| | | | | | | | Allow passing QObjectPrivate, so sub classes can use pimpl if they want, like the old QQuickPalette implementation already does... Change-Id: I48b6256bf63cb91697753ba9b5644c649574fdb0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickAttachedObject: align attaching and detachingJ-P Nurmi2017-03-222-11/+28
| | | | | | | | | | At construction time it was casting the parent to an item and falling back to popup if it wasn't an item, but at destruction time it was only doing the item cast. Unify the two so that both paths are tested when detaching too. Change-Id: Ic94d7686600d3502e195ded2d7007cb0fef76764 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickPopup: reset the popup item pointer on destructionJ-P Nurmi2017-03-221-0/+1
| | | | | | | | To ensure null instead of dangling pointer if the popup item gets accessed by QQuickAttachedObject during the popup's destruction. Change-Id: I55d04133f11f5a10a395c104d9db5db8db8f842f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickIconImage: only call updateIcon() when necessaryMitch Curtis2017-03-221-1/+1
| | | | | | | | Unconditionally updating the icon was causing binding loops when changing the spacing of a Button with icons. Change-Id: Ie8511afea7ebc365a28f954091d9cc22883d2e40 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Rename QQuickStyleAttached to QQuickAttachedObjectJ-P Nurmi2017-03-227-118/+118
| | | | | | | | | This is becoming a generic recursive attached object type that can be used for palettes too, which are planned to be used for the upcoming image-based style. Change-Id: I693d307ea16e73540ec9519b2ab18a314ff44272 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Move isDarkTheme() to QQuickStylePrivateJ-P Nurmi2017-03-225-28/+24
| | | | | | | | | QQuickStyleAttached is being generalized to a recursive attached object type that can be used for palettes too, which are planned to be used for the upcoming image-based style. Change-Id: I4c1d25624ee11bb0ec6cd5ee2656c36e622e2139 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Move settings from QQuickStyleAttached to QQuickStylePrivateJ-P Nurmi2017-03-226-29/+26
| | | | | | | | | | The settings were added before QQuickStyle(Private) existed. Now QQuickStyle(Private) is a lot more logical place for the settings that are not specific to the attached style attributes only, but can be also determine which style is used etc. Change-Id: I7bc432c330d58ab501b51b0ee8eaf24697155324 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix the order in qquickcontrol.cppJ-P Nurmi2017-03-222-127/+129
| | | | | | | | | It's more pleasant to work with, when the methods are in the same order they are declared. This makes also the refactoring tools in Qt Creator work correctly. Change-Id: If7e3a851ffba3f736706b74942a34098e70c0e25 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix the order in qquickapplicationwindow.cppJ-P Nurmi2017-03-221-22/+23
| | | | | | | | | It's more pleasant to work with, when the methods are in the same order they are declared. This makes also the refactoring tools in Qt Creator work correctly. Change-Id: I4065ace56728d2675c96cbf1e137930a969ca22e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickDisplayLayout: test that spacing is correct with only icon/textMitch Curtis2017-03-211-2/+5
| | | | | | | The effective spacing when either the icon or the text is null is 0. Change-Id: I5ce2388a17be5e86d3461b5c23f1c3996779b52f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Add QQuickDisplayLayoutMitch Curtis2017-03-175-0/+645
| | | | | | | | | This class lays out an icon and text in various configurations, depending on the display property. Task-number: QTBUG-49820 Change-Id: I2ace443e6cb134a1032b0b79378abd2179916133 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Add private Color singletonMitch Curtis2017-03-164-1/+131
| | | | | | | This will be used by various styles. Change-Id: I50b22c1fab04e7fd8fb1fe0b74630c721b6f8c6f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Add IconImageJ-P Nurmi2017-03-085-0/+391
| | | | | | | | This adds an internal helper item that will be used for showing icons on various controls (in follow-up commits). Change-Id: I792b423737023ba663211371f82fedb2b92857bb Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* qquickmenuitem.cpp: move defaultFont()J-P Nurmi2017-03-021-5/+5
| | | | | | | | It was placed after the constructor. Move it after properties to keep the same order as declared in the header. Change-Id: I91584f80a5a7eee139393f635b7465f5795c2332 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update the import statements 2.2->2.3J-P Nurmi2017-03-01152-394/+394
| | | | | Change-Id: Ifa2a4cb46f0fc7db75b468a67000c979bf44848c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-01267-1044/+1251
|\ | | | | | | Change-Id: Ia4c692552e6573b33b2e0f6b43b2a482a78ad970
| * Make QQuickStyleSelector::select() more robustJ-P Nurmi2017-03-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While debugging QTBUG-59026, I found out that QLocale::name() is empty with the "C" locale. Because the empty locale name was used as a selector in QQuickStyleSelector, it ended up registering QML types using URLs that contained a double slash (empty locale selector matched): QtQuick/Controls.2/Material//RadioButton.qml At the same time, the QML engine imported implicitly internal QML types constructing the URLs directly based on the location on the file system without a double slash: QtQuick/Controls.2/Material/RadioIndicator.qml As a result, the same QML module ended up having types registered from two different URLs, which is not allowed. This change simply prevents both problems. First of all, if the locale name is empty for any reason, it won't be added anymore to the list of selectors. Furthermore, the final selected URL is normalized to avoid redundant dashes. Task-number: QTBUG-59026 Change-Id: I19b890451aaddfe4277bb6b26bc3c1394a75a704 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix QQuickStackViewPrivate::startTransition()J-P Nurmi2017-02-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This seems like a mistake that slipped in when popTransition(), pushTransition() and replaceTransition() were merged in acecb06. Only immediate push/pop/replace operations were affected, where the animations were force-completed by hand. In this scenario it was always passing the pop transitions for completion, even if the current operation was push or replace. Change-Id: I6a940953feaefe6643ddae26c070856a66bf6c10 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Add missing includesJ-P Nurmi2017-02-243-0/+3
| | | | | | | | | | | | | | Found while doing a -no-accessibility build. Change-Id: I9772316eed3d544b21926970371a590ef2c15bef Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Port from QT_NO_ACCESSIBILITY to QT_CONFIG(accessibility)J-P Nurmi2017-02-2481-124/+124
| | | | | | | | | | Change-Id: I03deebff661746d49e537af5b1c8899b938efb0d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Port from QT_NO_CURSOR to QT_CONFIG(cursor)J-P Nurmi2017-02-244-4/+4
| | | | | | | | | | Change-Id: If7dd96ed25b1183586b903503b160fdeaef1ccea Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Update license headers to silence qtqa/tst_license warningsJ-P Nurmi2017-02-24154-723/+671
| | | | | | | | | | | | | | | | | | | | Sync with the qtbase/header.XXX. The license headers were matching qtbase/header.XXX-OLD, which makes qtqa/tst_license flood warnings: Old license being used for foo.qdoc Change-Id: I199bf303a2d648e0d5f7bc01cb0814a5f945eeff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * ApplicationWindow: fix typoJ-P Nurmi2017-02-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was meant to be called contentData, as the getter is called, but the part in the Q_PROPERTY macro that specifies the name of the property contained "data" in place of "contentData". [ChangeLog][Controls][ApplicationWindow] The data-property has been renamed to contentData, as it was documented. Notice that a data-property still exists in QML Window, but is no longer overshadowed in ApplicationWindow. Task-number: QTBUG-58932 Change-Id: I5251d42f5ae5ef6d04d87c3f8d20d7adbefe1eb5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Material: remove color animation on various controls' backgroundMitch Curtis2017-02-244-25/+0
| | | | | | | | | | | | | | | | | | This resulted in the background becoming very dark when toggling between enabled/disabled or editable/read-only states. Task-number: QTBUG-58828 Change-Id: I710fa97aefd26e490a219ba99833d5bfe47f2133 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * QQuickStackView: fix pop/replace exit leakJ-P Nurmi2017-02-243-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickStackView did not keep track of the element that was exiting the view during a pop/replace exit transition, but it was expecting viewItemTransitionFinished() to be called and cleaned up the element there. If a pop/replace exit transition was running at the destruction time, QQuickStackView did not clean up the element at all (because it had been already removed from the internal stack of elements) and thus the transition was left running. Task-number: QTBUG-59034 Change-Id: I3cd7c761fab79574b9a7cc849788f36765def45b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Prevent StackView filtering of UngrabMouse eventMichael Dippold2017-02-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | Currently the StackView is filtering the UngrabMouse event during transitions. If a MouseArea is still in the pressed state during this time it will forever be in the pressed state as the ungrab event is filtered. Task-number: QTBUG-59098 Change-Id: I7effdad6a36b64336b4770a1dca61ba47998b787 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * QQuickPopup: ensure that the cursor is correct when overlapping itemsMitch Curtis2017-02-201-0/+3
| | | | | | | | | | | | | | | | | | | | When a popup is over an item that has a different cursor (such as a TextField), the cursor incorrectly took on that shape, because QQuickPopup didn’t have an explicitly set cursor. Task-number: QTBUG-58810 Change-Id: I4df6dd725cac027b2c30fe69ad81d9cd7e622c15 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Platform: respect the configurable features in Qt Widgetsv5.9.0-alpha1J-P Nurmi2017-02-102-19/+88
| | | | | | | | | | | | Change-Id: I4a0696e4f897a378e3944c7948ba00e5f2038f5d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Cancel incubation of replaced/destroyed delegatesJ-P Nurmi2017-02-1016-96/+23
| | | | | | | | | | | | | | | | Resolves the "Object destroyed during incubation" issues. Task-number: QTBUG-50992 Change-Id: Ie58c958dafbf915da7494dac25351be98106c6ea Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Provide more context for the configurable feature descriptionsJ-P Nurmi2017-02-082-3/+3
| | | | | | | | | | Change-Id: I962d8150583cc1637cbb8d6fb7399b8f408b186e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Fix -no-feature-shortcut buildJ-P Nurmi2017-02-074-4/+12
| | | | | | | | | | Change-Id: If567b99889b40528150834c3319cdfec8e5b229e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Respect the "Quick Designer support" featureJ-P Nurmi2017-02-071-1/+1
| | | | | | | | | | Change-Id: Ibebff13b92d2ad9335de872f0b70ae3f43051061 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Make styles configurable featuresJ-P Nurmi2017-02-065-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ./configure [...] Qt Quick Controls 2: Styles ................................. Default Material Universal Supports both syntaxes: -(no-)style-[material|universal] -(no-)feature-quickcontrols2-[material|universal] Change-Id: I011cc38e5752d2c718376ca7493940271920b3e1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Add "hover support" configure featureJ-P Nurmi2017-02-0615-6/+151
| | | | | | | | | | | | | | | | | | | | ./configure -no-feature-quicktemplates2-hover [...] Qt Quick Templates 2: Hover support .......................... no Change-Id: I0509a1a9ac3ffe2cbfe4f2016ce0345708860b84 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Doc: move Control::contentItem snippet to match backgroundMitch Curtis2017-02-031-9/+9
| | | | | | | | | | Change-Id: I46ff0f20bbdde131d4206a970ce60c76d491f24b Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Doc: add missing information to "Attached properties" sectionMitch Curtis2017-02-021-15/+61
| | | | | | | | | | | | | | | | | | A lot of details were left out, which makes it hard to follow along. Task-number: QTBUG-56013 Change-Id: Ia21dd43e0d6e260463a2a91b28c248b962dd3401 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Tumbler requires ListView and PathViewJ-P Nurmi2017-02-024-7/+31
| | | | | | | | | | Change-Id: Ieb40f536cc5d68fdf13075df2c9b3e09d5077de3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Unify the include convention for private headersJ-P Nurmi2017-02-247-10/+10
| | | | | | | | | | Change-Id: Ic4d48f68dfedaa93dd69740cb22dff1113d7dc37 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Update the QML module versions from 2.2 to 2.3J-P Nurmi2017-02-2013-15/+15
| | | | | | | | | | Change-Id: Iefb73973e7950246cd364dbb7e47dc096508e4d4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickIcon::colorJ-P Nurmi2017-02-202-1/+31
| | | | | | | | | | | | | | | | | | This will be used by the built-in styles to visualize various states (gray when disabled, accent color when active...) and can be also set or overridden by the users. Change-Id: I293348415d7e66dea163190cdf35d60ce5407b5b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>