aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
Commit message (Collapse)AuthorAgeFilesLines
* Doc: mention QT_QUICK_CONTROLS_CONF in conf docsMitch Curtis2018-02-121-0/+4
| | | | | Change-Id: I7f6d156d54a4c407853af5baa5bf59125ab35bde Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickPlatformMenu::open(): Scale target rectangleFriedemann Kleint2018-02-011-2/+4
| | | | | | | | The QPlatform* classes operate in native pixels. Task-number: QTBUG-55251 Change-Id: Ic9715bc062f7459054ed9735d133b1a5d05b60a2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Explain the benefits of customizing a control vs creating a styleMitch Curtis2018-01-191-1/+11
| | | | | | | | | | | Mention that customizing a control is nice because you don't need to start from scratch with a template. Add a third requirement for "Definition of a Style" that mentions that the top level item must be a template, and why. Change-Id: I4db4ec8311baed46fb45271d107204808ba42592 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Link to Customizing doc from Styling docMitch Curtis2018-01-191-0/+1
| | | | | | | These two things are closely related. Change-Id: I1b4586f7835af6bd9f82aaa6eeb75fe1ef6ba65d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Tumbler: qualify references to visibleItemCount with "control"Mitch Curtis2018-01-174-4/+4
| | | | | | | | This code currently works, but we prefer to use control.<property> to access properties directly. Change-Id: Ieba95bffdd0b0a9b33373524248d0ac06e9f2a3d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Tumbler: cleanup internal IDsJ-P Nurmi2018-01-113-17/+12
| | | | | | | | We can already cleanup the internal IDs even if Tumbler doesn't have deferred execution enabled. Change-Id: Ide9a0a6c6d1680c6df6b968b5702a6270fea3326 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: improve Style/FallbackStyle documentationMitch Curtis2018-01-041-2/+29
| | | | | | | | | Link to relevant documentation and add entries for the Controls section to the configuration file docs. Task-number: QTBUG-65445 Change-Id: I175866167e36403475520ea4de0cb299aae542d7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Document license and attribute third party codeKai Koehne2018-01-043-0/+45
| | | | | | | | | [ChangeLog][Third-Party Code] Document constants from AngularJS in src/imports/controls/material/ElevationEffect.qml Task-number: QTBUG-65409 Change-Id: Ibd0dcf643abe036f34cea364f267fde8510057ea Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix qmlRegisterType() for RoundButtonJ-P Nurmi2018-01-041-1/+1
| | | | | | | | | RoundButton was a new type in QQC2.1 (Qt 5.8). Even though passing a non-existent revision seems to be harmless, registerTypes() becomes easier to read when we distinguish between new types and new revisions. Change-Id: I682006570f63dd0b2cb2260740fb105619e61a28 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: cleanup the internal ID from BusyIndicatorJ-P Nurmi2017-12-223-4/+28
| | | | | | | | | | | Same as da27cace for the Default style. An internal ID in the OpacityAnimator element prevented deferred execution for the whole content item. Apply the same visibility trick in C++ to avoid having to use an ID in QML. Change-Id: I4b54bbe3044aff9603b1135ac25d7325e01fdff2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix and test deferred execution for Universal & MaterialJ-P Nurmi2017-12-224-12/+4
| | | | | Change-Id: I8ee27a0c65c9ce8c9cc48c6f59d2b34d02849be8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material ToolButton: fix round ripple for square buttonsJ-P Nurmi2017-12-221-1/+1
| | | | | | | | | | | | The condition for checking whether a tool button is square and thus, whether it should use a round ripple instead of a fill ripple, must be based on the size of the contents, not on the implicit size. This way, you get a round ripple for one-letter tool buttons but only if they are not stretched. Task-number: QTBUG-65052 Change-Id: I0d498dc65650f3b786b41e538748549d61f2b216 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Default: eliminate internal IDs in DelayButtonJ-P Nurmi2017-12-212-41/+25
| | | | | | | | | | | | | | | | An ID in the internal Text element prevented deferred execution for the whole content item. The ID was used for two reasons. First of all, it was used to propagate implicit size from the Text element to the root of the content item. Secondly, it was used to calculate clip areas to provide the same text in two different colors. This patch provides two internal C++ helpers, ItemGroup and ClippedText, that provide these functionalities without the need of using IDs in QML. At the same time we got rid of two wrapper Items and simplified some QML bindings, which results to a nice boost (18->22) in qmlbench on TX1. Task-number: QTBUG-65341 Change-Id: Icf9c09356cf5c0ed641bde537bee7291bd260057 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Default: cleanup the internal ID from BusyIndicatorJ-P Nurmi2017-12-203-4/+28
| | | | | | | | | | An internal ID in the OpacityAnimator element prevented deferred execution for the whole content item. Apply the same visibility trick in C++ to avoid having to use an ID in QML. Task-number: QTBUG-65341 Change-Id: Icb20e4ecc60d1093e849737799bb269f7f03097a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Default: cleanup and test internal IDsJ-P Nurmi2017-12-203-9/+4
| | | | | | | | | Remove the undesired internal IDs where easily possible, and add expected failures for the harder ones for now. Task-number: QTBUG-65341 Change-Id: I5964b2cb59652661c90141259c68b95c721cf6ca Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Examples: cleanup unnecessary/wrong property assignmentsJ-P Nurmi2017-12-209-11/+0
| | | | | Change-Id: Id7c65c9493c0e70512f3f2b167a091ece06ee5d8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Universal: cleanup unnecessary property assignmentsJ-P Nurmi2017-12-2011-20/+0
| | | | | Change-Id: I80c258ea21b4f6651e9c6e075357daabfb32d64b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: cleanup unnecessary property assignmentsJ-P Nurmi2017-12-2011-20/+0
| | | | | Change-Id: I1698392b1ef75b84d114cb19207729217abb4aed Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Default: cleanup unnecessary property assignmentsJ-P Nurmi2017-12-1911-20/+0
| | | | | | | | | QQuickText's default horizontal alignment is AlignLeft. There's no need to repeat the default. Furthermore, an empty QQuickText element does not do anything, so the "visible: control.text" binding seems bogus. Change-Id: I9461301606c45a3d889ad49e62356d38fcef6f87 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* SwipeView: fix slow swiping in large viewsJ-P Nurmi2017-12-192-0/+2
| | | | | | | | | | | Flickable has a default maximumFlickVelocity of 2500 regardless of its size. When SwipeView covers the whole screen and ends up being large, 2500 pixels per second is nowhere near enough. Calculate a suitable maximum flick velocity based on the size of the view. Task-number: QTBUG-62110 Change-Id: Iaf26f586f99e7635ea931a4e3060ad4dd480a011 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* ComboBox: use deferred executionJ-P Nurmi2017-12-143-9/+9
| | | | | | | | | | | | As a special case, ComboBox defers the execution of the popup until the popup is either accessed or made visible. This gives a nice boost in creation time benchmarks (20->25, ~25%). The old optimization of setting the delegate model only when the popup is visible is no longer needed. Task-number: QTBUG-50992 Change-Id: Ifeaceb759ab676bb54c6bc09dc97810eade72ca1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: mention indicator in customizing ComboBoxJ-P Nurmi2017-12-111-1/+1
| | | | | Change-Id: I24ae2872dd74c682e24dbeda563c0fa281ae5522 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update Quick Designer supportv5.9.3J-P Nurmi2017-11-1046-177/+1578
| | | | | | | Add a lot of missing controls and properties. Change-Id: I7c0ff3cc7fd7220e338d78cac575091ff12abf48 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Qt.labs.platform: declare and register enums to the meta systemJ-P Nurmi2017-11-064-3/+8
| | | | | | | | | To make them correctly available in QML so that they also work as signal arguments. Task-number: QTBUG-64259 Change-Id: I5fa00871f96357d924661c4b8af323a0f1748c9d Reviewed-by: Liang Qi <liang.qi@qt.io>
* Default: cleanup an unnecessary extra item from the backgroundJ-P Nurmi2017-10-271-9/+6
| | | | | | | | | | | The size (and position) of the background item is respected if explicitly defined, so the wrapper item is not needed. This does not reduce or simplify bindings, so the performance boost is not remarkable, but this can improve the qmlbench results by a frame or two depending on the hardware. ;) Change-Id: Ibd45cf02a3eb30b48b4af86e369a1db4cc5d3864 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix outdated FDL license headerKai Koehne2017-10-181-4/+4
| | | | | Change-Id: Ifbbc0695023d238f2066f3412e563fb663cdec74 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* QQuickPlatformDialog: fix clazy-qenumsJ-P Nurmi2017-10-101-1/+1
| | | | | Change-Id: I6b9e31919502fb2f47e4b3657302a745c9f85b23 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Platform: fix clazy-range-loop findingsJ-P Nurmi2017-10-103-11/+11
| | | | | | | Avoid accidental detach with C++11 range for loops. Change-Id: I2a105ef5a2505d26ee086974177f8f1e4040b522 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: add missing title customization for GroupBoxMitch Curtis2017-10-102-0/+8
| | | | | | Task-number: QTBUG-63618 Change-Id: I6a32158726e4425dc24c24f4f9dc9cc80aa462bf Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Doc: remove stray semicolons from SwipeDelegate snippetMitch Curtis2017-09-281-2/+2
| | | | | Change-Id: I859b61880da16f6c58967700b179f35df656ed77 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Default: improve TextField and TextArea stylingMitch Curtis2017-09-194-7/+12
| | | | | | | | | | - Remove top-level opacity assignments to allow full customization - Add more distinction between disable and placeholder text - Make disabled text more visible Task-number: QTBUG-62854 Change-Id: I2e8998fb739e4beda58978173173ca94a3759caf Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Doc: fix custom SpinBox snippetMitch Curtis2017-07-311-2/+2
| | | | | | | | The snippet fails when pasted to a file where its not the root item, so qualify the binding with the control's id. Change-Id: Ibd16beaddafb112d1d9ecfad6914021ca9bdeede Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix unused parameter errors in qwidgetplatform_p.hJason Erb2017-07-141-0/+6
| | | | | | | Task-number: QTBUG-61950 Change-Id: Idbc6bcc8f08dcccc50b409a055ab6c35e1f9aef8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Add color and styleColor to property editor for LabelThomas Hartmann2017-07-101-0/+24
| | | | | | Change-Id: Ie8ecc3874a61b29083e53441c3f484b94195ec46 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickMonthGrid: fix touch supportJ-P Nurmi2017-06-262-39/+40
| | | | | | | | | | | | QQuickMonthGrid lost its clicked() signal when multi-touch support was added to QQuickControl, because QQuickControl now accepts touch events and therefore QQuickMonthGrid no longer gets synthesized mouse events. Re-implement QQuickControlPrivate::handlePress/Move/Release/Ungrab() instead of QQuickControl::mouseXxxEvent() to gain multi-touch support. Task-number: QTBUG-61585 Change-Id: Ic6fb2ea0b43b2b44beb0d8fdd3335a20f7c028f6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* ScrollBar: fix flashing in Material & Universal stylesJ-P Nurmi2017-06-162-0/+2
| | | | | | | | | | | | | | | Ensure a suitable starting opacity for the inactive state transition. When calling increase() and decrease() from key-handlers, as the docs suggest, we flash the scrollbar by turning the active state on, and then back off immediately. If there is an opacity animation when the scrollbar becomes active (Material & Universal), the opacity animation is stopped right away, because the state changes back to inactive. This state changing trick worked only with the Default style, because it changes the opacity without animating when it becomes active. Change-Id: I4117de79c7145a710c0b6c43873ca2336b64e21e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make QtQuick.Controls::ButtonGroup a composite typeJ-P Nurmi2017-06-084-4/+49
| | | | | | | | | | | This is a backport (only the ButtonGroup part) of 1af7f8a59, which was already pushed to dev. The main motivator for the original patch was to cleanup the registration code, but this fixes also an issue with auto- completion in Qt Creator. Task-number: QTCREATORBUG-18321 Change-Id: I5e8e8122cb94c74f78445cce1a89f604634149b1 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* Doc: reorganize the style imagesJ-P Nurmi2017-06-0716-71/+40
| | | | | | Task-number: QTBUG-60995 Change-Id: I3083a7a2bb39d242f31a9c5d0bfed66dbdb88202 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* ComboBox: fix empty popup being shown after model is clearedMitch Curtis2017-05-313-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, ComboBox's popup is sized vertically in this way: implicitHeight: contentItem.implicitHeight Adding an item to a ComboBox with an empty model and then opening the popup results in the implicitHeight being used in the line below (in QQuickPopupPositioner::reposition()): QRectF rect(p->allowHorizontalMove ? p->x : popupItem->x(), p->allowVerticalMove ? p->y : popupItem->y(), !p->hasWidth && iw > 0 ? iw : w, !p->hasHeight && ih > 0 ? ih : h); An explicit height was never set on the popup, and ih (the implicitHeight of the popupItem) is greater than 0. This is fine. However, when a ComboBox's popup item grows large enough that it has to be resized to fit within the window, its explicit height is set. The problem occurs when the model is then cleared, as the implicit height of the popup item becomes 0. So, while "!p->hasHeight" is still true, "ih > 0" is not, and the explicit height of the popup item is used, which is still the previous "let's fill the entire height of the window" size. To fix this, we bind the height of the popup to a different expression: height: Math.min(contentItem.implicitHeight, control.Window.height - topMargin - bottomMargin) This ensures that the popup has a zero height when the ListView's implicitHeight is zero (i.e the model is empty), and a height that fits within the window in all other cases. Ideally, we'd have a maximumHeight property that controls this, but for 5.9, we have to fix it this way. Task-number: QTBUG-60684 Change-Id: Ied94c79bb7b0e693be34e9c7282d991f6f704770 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Doc: improve margin documentationMitch Curtis2017-05-312-140/+420
| | | | | | | | | | - Add margins to the Popup Layout diagram. - For each margin property, mention that margins are the distance between the popup edge and the window edge. - Link to Popup Layout from each margin property. Change-Id: I8226ea341f6825b7cfe67e1427ce853671e5a54e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Material: round ripple translation to avoid artifactsJ-P Nurmi2017-05-301-1/+1
| | | | | | Task-number: QTBUG-58646 Change-Id: Iae5777866099139ec850af8d2c6f5c095ef9f166 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Enable build time QML caching for the Material & Universal stylesJ-P Nurmi2017-05-202-0/+2
| | | | | | | | | | | | | We had troubles enabling Qt Quick Compiler support for these styles, because we wouldn't be able to select style-specific .qml files from the resources of an unloaded/uninstantiated plugin. Build-time QML caching doesn't seem to be a problem because the .qmlc files are not built into resources but are available on the file system. Task-number: QTBUG-58571 Change-Id: I93e7a82a72c4bcf3a92c7ca12186f24a22d4d342 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Enable the use of QML caching at build timeSimon Hausmann2017-05-192-0/+4
| | | | | | Task-number: QTBUG-58571 Change-Id: Ia6aeb27d4af695fcfc987e944c73d49364fd440e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Doc: add missing "is" to the Default style docsJ-P Nurmi2017-05-191-1/+1
| | | | | Change-Id: I85d28c1a0651317a684b2cc34f1f032e8221b27c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* qtquickcontrols2-styles.qdoc: align indentationJ-P Nurmi2017-05-191-1/+1
| | | | | Change-Id: I42bbc0f491653f45a19455a2e4c5afbd7be008ef Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* ApplicationWindow: fix access to revisioned members in base classesJ-P Nurmi2017-05-184-2/+5
| | | | | | | | | | | | | | | The inheritance hierarcy is: QWindow <- QQuickWindow <- QQuickWindowQmlImpl <- QQuickAppWindow Each base class has its own set of revisioned members. Import the revisioned members in the base classes to the templates/controls namespace by calling qmlRegisterRevision() with the revision of the base class and the respective templates/controls version. Task-number: QTBUG-60893 Change-Id: I6d91209dc5b2eb17c2b3845675a5ddbffb7e8b72 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* controls.pri: cleanup a superfluous backslashJ-P Nurmi2017-05-151-1/+1
| | | | | Change-Id: Ie762b157591f200624c4393246478edb67a9077e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: make the list of topic pages lighter to readJ-P Nurmi2017-05-151-9/+9
| | | | | Change-Id: I9b46b32f0f2dc48c45c4e83d44cdc8bf3fc56184 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Default: fix typo in RangeSlider::second.handleJ-P Nurmi2017-05-151-1/+1
| | | | | Change-Id: If09b6ecd7426ddfd5a80fc33acf17894bf9e7af5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix unresolved external symbols for -no-feature-shortcutStephan Binner2017-05-061-0/+8
| | | | | Change-Id: I3ddef9df6100b8837d1bdc81f3fd1dc7cf37babf Reviewed-by: J-P Nurmi <jpnurmi@qt.io>