aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls
Commit message (Collapse)AuthorAgeFilesLines
* Bump import versionsJ-P Nurmi2018-03-01256-907/+907
| | | | | | | | QT_VERSION in qtbase has been updated. All the import numbers that now follow the Qt version can be updated. Change-Id: I4e9698201766b39807737c9e0279d36d4da686e2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use horizontal|verticalPaddingJ-P Nurmi2018-03-017-14/+7
| | | | | | | A follow-up commit to 13d56b5. Somehow these were missed. Change-Id: Ief9831797cdda81dd3430b0df0aed2a6050093ca Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-02-2720-61/+124
|\ | | | | | | | | | | | | Conflicts: tests/auto/controls/data/tst_dialogbuttonbox.qml Change-Id: I39ea99d988aaa7d1afd35d573cca44d009b859ce
| * Update plugins.qmltypesJ-P Nurmi2018-02-261-40/+103
| | | | | | | | | | Change-Id: I3b98e4c2159ba37b0b8d0ef5099b93308c84db11 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Update versions in the docs and .prosJ-P Nurmi2018-02-2616-18/+18
| | | | | | | | | | Change-Id: I5b4af1ddfe8c4583731f5a90082d803298bdf9bd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * DialogButtonBox: workaround implicit size calculation with one buttonv5.11.0-beta1J-P Nurmi2018-02-223-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there's only one button in the dialog button box, the Default and Universal styles resize the button to cover half of the button box. This works in typical scenarios when the dialog button box is assigned as a footer of a dialog, and thus, gets resized together with the dialog. However, if the dialog button box is placed into a layout, or otherwise not given an explicit size, the implicit size calculation loops until it reaches zero. 1) button box gets the implicit size of the content (one button) 2) button box resizes the button to cover half of the box width 3) button box re-calculates its implicit size => step 1 Avoid the problem by providing a reasonable hard-coded implicit size for this special case. Notice that this is just a temporary workaround to avoid the problem. This can be fixed properly in dev by providing separate contentWidth and contentHeight properties that cleanly propagate the content size to QML. Task-number: QTBUG-59719 Change-Id: I552e0824ae6bff26b570c699252a3e4f09bd3397 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Use horizontal|verticalPaddingJ-P Nurmi2018-02-2321-44/+22
| | | | | | | | | | Change-Id: I564bf29a859f29d83c94c4428737c0846c1baadb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Bump QtQuick.Templates import versionsJ-P Nurmi2018-02-23220-220/+220
| | | | | | | | | | | | | | | | | | | | Unlike the other imports that are waiting for a Qt version bump, QtQuick.Templates contains version 2.5 registrations and is therefore already available. Bump the template imports to make the newly added APIs available, so we can start using horizontal|verticalPadding. Change-Id: I651feeeeadcc9767904ca6f191e844a03b8ddea6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickTextArea: add placeholderTextColor propertyYulong Bai2018-02-215-15/+17
| | | | | | | | | | | | | | | | | | | | | | Add placeholderTextColor property for user convenience to customize the placeholderText color to fit the backgrounds. [ChangeLog][TextArea] Added placeholderTextColor property for user convenience to customize the placeholderText color to fit the backgrounds. Change-Id: Iea0233f909ca9cfe19d88f9bc24691aa35b5ab35 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devJ-P Nurmi2018-02-212-0/+8
|\| | | | | | | Change-Id: I6cc3095673bb459acef93e3da8a67c3819b70d3a
| * Material: fix ItemDelegate's vertical paddingJ-P Nurmi2018-02-201-0/+2
| | | | | | | | | | | | | | | | Sync with all other delegate types. This makes ItemDelegate less prone to losing 48px height as per the design guidelines. Change-Id: Idf4a097440236c35213ce1cb1e9709776fd8e95f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Imagine: declare missing QtGraphicalEffects dependencyJ-P Nurmi2018-02-201-0/+1
| | | | | | | | | | | | | | | | | | | | DelayButton and ProgressBar are using QtGraphicalEffects. The dependency must be declared in static builds: DelayButton.qml:41:1: module "QtGraphicalEffects" plugin "qtgraphicaleffectsplugin" not found Change-Id: Ic6774a2ebb85e6324ad6e9e222d15120c191a144 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Reset QQuickStyle when the QtQuick.Controls 2 plugin is unloadedJ-P Nurmi2018-02-201-0/+7
| | | | | | | | | | | | | | | | | | Cleanup global static data in QQuickStyle when the controls plugin is unloaded (qmlClearTypeRegistrations()). This ensures that the style is resolved as appropriate when the controls plugin is reloaded. Change-Id: Icebb835e057e6063e4fc0ca035c6836560bc7c14 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: use 8 px vertical padding for ItemDelegateMitch Curtis2018-02-213-8/+3
| | | | | | | | | | | | | | | | | | | | All of the other delegates also use 8 px vertical padding. This prevents ItemDelegate from being eager to grow to 49 pixels on certain platforms with slightly larger text heights, like macOS on a MacBook Pro. Change-Id: Id1d6e10af5f0e9c7e9e772bf1d667e32f97c17d7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Document the normal and dense Material style variantsMitch Curtis2018-02-214-0/+239
| | | | | | | | | | | | Task-number: QTBUG-51109 Change-Id: I02b7195652a439c184b5a6d7041c1995efd5bbcf Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Add Dense Material style variant for desktopMitch Curtis2018-02-1923-49/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current Material style is based on the mobile variant of the design, which is far too large for desktop applications. From https://material.io/guidelines/components/lists.html#lists-usage: "When the mouse and keyboard are the primary input methods, measurements may be condensed to accommodate denser layouts." This patch adds a dense variant of the style where most controls like buttons and delegates are smaller in height and use smaller font sizes. Note that the Material design guidelines seem to distinguish between mobile, desktop and dense measurements, where "dense" seems to be a specialization of desktop. We cannot afford to/do not see sense in maintaining three separate variants, so the dense variant will be the only desktop version of the Material style. [ChangeLog][Material] Added Dense variant of the Material style for use on desktop platforms. Some controls are slightly smaller in height and use smaller font sizes. The variant can be enabled by setting QT_QUICK_CONTROLS_MATERIAL_VARIANT to Dense or setting Variant=Dense in the qtquickcontrols.conf file. Task-number: QTBUG-51109 Change-Id: I11846b7f6e61f7b5dcf3c146b18c220234a73ef2 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | QQuickMaterialStyle: init the globals from the pluginMitch Curtis2018-02-193-74/+70
| | | | | | | | | | Change-Id: I83e754c145becb91cc0fc849434d4843ee24361f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devJ-P Nurmi2018-02-199-13/+37
|\| | | | | | | Change-Id: Id375217229c7f7dc7a8a2dc7edcfd56bbe403952
| * Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-181-0/+4
| |\ | | | | | | | | | Change-Id: I91f8b19e02b7350a2569ab14fe79fe809202e6a8
| | * 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>
| * | GroupBox: fix background y and height assignmentsMitch Curtis2018-02-166-11/+11
| | | | | | | | | | | | | | | | | | | | | Use the more specific bottomPadding rather than padding. Change-Id: Ib8823d6d9b07eaea97479ef432df0868b1b5d37d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * | Material: sync CheckDelegate's vertical padding with other delegatesMitch Curtis2018-02-161-2/+2
| | | | | | | | | | | | | | | Change-Id: I83e5d787d0706dc547a9d906fdafef97e838172f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * | Document how to position a popup in the center of the windowMitch Curtis2018-02-161-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was already in Overlay's docs, but not Popup's, so this patch moves the example to a .qdocinc and includes it in both places, creating a new Popup Positioning section in the process. Change-Id: I8e8438919fd849a8466b3a28133d22bb45f7dc19 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | | Material: specify the desired button layout in the styleJ-P Nurmi2018-02-173-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This eliminates an undesired dependency from QQuickMaterialTheme to QPlatformTheme. Task-number: QTBUG-51921 Change-Id: I43c8ab076118b85cf1ae6c85cf1ee5d3e7b8bc74 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Add DialogButtonBox::buttonLayoutJ-P Nurmi2018-02-175-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][DialogButtonBox] Added buttonLayout property that can be used to arrange the buttons. Change-Id: I9160e5df86a0c9444b45ed9f585c50166c145671 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | TextField: restore placeholder text color fixesJ-P Nurmi2018-02-163-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default values of the placeholder text colors were tweaked in b9584b1, but this was overridden by 77a693c that added a new placeholderTextColor property. Task-number: QTBUG-66176 Change-Id: I706388abdcc19a1c603e76353da79217076a2179 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | QQuickTextField: add placeholderTextColor propertyYulong Bai2018-02-155-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add placeholderTextColor property for user convenience to customize the placeholderText color to fit the backgrounds. [ChangeLog][TextField] Added placeholderTextColor property for user convenience to customize the placeholderText color to fit the backgrounds. Task-number: QTBUG-66260 Change-Id: I9755ea5ccf2ff416846bdf130dbd352892fd40a2 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | | Cleanup unnecessary explicit references to QPlatformThemeJ-P Nurmi2018-02-154-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickTheme is being separated from QPlatformTheme. Reduce references to QPlatformTheme to make the transition to QQuickTheme smoother. Task-number: QTBUG-51921 Change-Id: I6dbbe39bf0b465df16a88bcc26e2b2a32cc42c93 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.11' into devJ-P Nurmi2018-02-1516-112/+76
|\| | | | | | | | | | | Change-Id: Id3333e9bb67ced4c6dbae5845512fe1927a7b858
| * | Docs: update the version table for Qt 5.11J-P Nurmi2018-02-131-0/+5
| | | | | | | | | | | | | | | Change-Id: Ib653224d7e30b08ec80b148420717e7e9fec5e7a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Universal Dial: decrease handle size from 20 to 14Mitch Curtis2018-02-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The handle is not interactive; the whole dial is. As it is now, the handle looks way too big. Before and after this patch: https://imgur.com/a/HEbeh Change-Id: I5db93a3e792a2133f765f69566bdd871598ab3b0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * | Material Dial: decrease handle size from 14 to 10Mitch Curtis2018-02-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The handle is not interactive; the whole dial is. As it is now, the handle looks way too big. Before and after this patch: https://imgur.com/a/amhN3 Change-Id: I13c03085d25ee2eb01090825f6baa531409e02a0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * | QQuickUniversalStyle: init the globals from the pluginJ-P Nurmi2018-02-123-56/+51
| | | | | | | | | | | | | | | Change-Id: I9df13f980b565b4f846edc3bce8333b74f5366b9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-126-6/+6
| |\ \ | | | | | | | | | | | | Change-Id: I2934d3f51fea9626fd2d2512786eb297d9f7fe6c
| | * | Editors: tweak placeholder text colorJ-P Nurmi2018-02-056-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using 50% translucent palette.text, use 50% translucent TextField::color (which defaults to palette.text) to make the placeholder text color follow the text color when changed directly without changing the palette. In the future, the placeholder text color should be exposed as a separate property to give users full control. Task-number: QTBUG-66176 Change-Id: I57153ff676be6518f9b48cdbd7da4089daa36853 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | Fix memory leak in QQC2Simon Hausmann2018-02-075-46/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When repeatedly creating a QQuickView, loading a QML file that imports QQC2 and deleting the view again, we would leak memory that was allocated as a consequence of QML type registration in initializeEngine() callbacks that were called on every iteration. After the limitation of namespacing in the registerTypes() callback of QML module plugins has been lifted, we can move the type registrations into registerTypes() where they belong and which is called only once. Change-Id: I7e314663a69fd8c8529195b56c128b61392c0042 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io>
* | | | Promote QQuick(Proxy)Theme from libQQC2 to libQQT2J-P Nurmi2018-02-155-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickTheme needs to be part of libQtQuickTemplates to be able to provide dark and light palettes (and later, icons). Task-number: QTBUG-63331 Change-Id: If7d3d279a07b6daf6701a1d3cd3686bec1d094b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | Read :/qtquickcontrols2.conf in QQuickStylePluginJ-P Nurmi2018-02-1514-33/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickTheme is going to be promoted from libQQC2 to libQQT2 so that it can provide dark and light palettes (and later, icons). The first step is to refactor out the :/qtquickcontrols2.conf reading code, which cannot be in style-agnostic libQQT2. Read the conf file in QQuickStyle Plugin instead. The additional benefit is that we don't need duplicate name() methods for styles and their themes. Even though QQuickStyle Plugin's name handling is case-insensitive, QSetting is case-sensitive. Therefore all QQuickStylePlugin::name() overrides have been updated to use capital first letter. This name is used to lookup the correct section in :/qtquickcontrols2.conf. Task-number: QTBUG-63331 Change-Id: I07b1269d9dbc2c9568e6f22f2da75951fde7b669 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | Add Control::horizontal|verticalPaddingJ-P Nurmi2018-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common pattern for paddings: padding: X topPadding: Y bottomPadding: Y This pattern can be simplified by providing separate horizontalPadding and verticalPadding properties: padding: X horizontalPadding: Y The actual style changes will be applied separately. As a bonus, the size of QQuickControlPrivate can be reduced a bit since we can move the (has)top/left/right/bottomPadding members to ExtraData. [ChangeLog][Controls][Control] Added horizontalPadding and verticalPadding properties as a convenient way to set both left and right, or top and bottom paddings in one go. Change-Id: I3a93b6f9ab988d806b1f263e74b6bd6b5427fbbe Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | QQuickToolTip: add non-attached show() and hide() methodsYulong Bai2018-02-065-5/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usually there's only one global ToolTip instance providing attached show() and hide() methods, here we add non-attached ones which would be more flexible to meet different needs. [ChangeLog][ToolTip] Added non-attached show() and hide() methods to make it more flexible to meet certain requirements. Task-number: QTBUG-62890 Change-Id: I432bca202e16a27d0a5a732445242e78b2fb9c3f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into 5.11J-P Nurmi2018-01-313-1/+40
|\| | | | | | | | | | | Change-Id: I7c0333dbf959124f6cf5be7837a305b65c08d290
| * | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2018-01-312-1/+12
| |\| | | | | | | | | | Change-Id: I697f98d5214f487c915032d744ec593da05368a8
| | * 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>
| * | Doc: provide examples of setting Imagine pathMitch Curtis2018-01-241-0/+28
| | | | | | | | | | | | | | | | | | | | | Remove any ambiguity about how the paths might be specified. Change-Id: I004e13349a54ded9a41586a8f5a564731a821585 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-2013-48/+47
|\| | | | | | | | | | | Change-Id: I61d779eb40e3a278aa2ef429e014d351da34f80a
| * | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2018-01-184-4/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/Tumbler.qml src/quicktemplates2/qquicktumbler.cpp src/quicktemplates2/qquicktumbler_p.h src/quicktemplates2/qquicktumbler_p_p.h Change-Id: I8d50991183fe3c5b50a49e00f01bcd3049f5346c
| | * 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>
| * | Imagine/Switch(Delegate): cleanup internal IDs for deferred executionJ-P Nurmi2018-01-182-4/+6
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-50992 Change-Id: I621343bef562b4ed85202a0690a0cccfc0a053c5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Imagine/DelayButton: cleanup internal IDs for deferred executionJ-P Nurmi2018-01-181-11/+10
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-50992 Change-Id: I5f2708bc0e9f37232b10e2cd6f1c61ab779156e3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>