aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/imagine
Commit message (Collapse)AuthorAgeFilesLines
* imagine/ScrollView.qml: cleanup unnecessary content size bindingsJ-P Nurmi2018-04-061-3/+0
| | | | | | | Missed in 92e75ae5. (Creator still has problems after a8766caf?) Change-Id: I41cee8bb26f09be7bbba233053302b15e4a60b79 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickPopupItem: inherit QQuickPaneJ-P Nurmi2018-04-063-9/+0
| | | | | Change-Id: Ia32f3004cf540f995344286683d754558369f279 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickControl: update baseline offset automaticallyJ-P Nurmi2018-04-0416-16/+0
| | | | | | | | | | | | ...unless explicitly defined. All buttons repeated the same binding. [ChangeLog][Controls][Control] Unless explicitly specified, baselineOffset is now automatically updated based on the top padding of the control and the baselineOffset of the contentItem. Styles no longer need to specify the baselineOffset in QML. Change-Id: I9c6f61371fee05a06b5dd31b27d8baf9da0bdeeb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-201-3/+4
|\ | | | | | | Change-Id: I69ada9110df30ea5f20710a2d1e6ac6b6a448b21
| * Imagine: make the QML files show up in Qt CreatorJ-P Nurmi2018-03-131-3/+4
| | | | | | | | | | | | | | | | Unlike all other styles, imagine.pro was not assigning QML_FILES to OTHER_FILES that makes the .qml files show up in Qt Creator. Change-Id: I7510e8db6ef606774983151da3bae089a4697e8c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickTheme::ScopeJ-P Nurmi2018-03-152-6/+6
| | | | | | | | | | | | | | | | | | | | | | Replace the old enums that were originally copied from QPlatformTheme, including irrelevant entries for DockWidget, MdiSubWindow, MessageBox, with a unified enum that will be matched to cover everything needed for theming fonts and palettes for Qt Quick Controls 2. Task-number: QTBUG-67062 Change-Id: Ia99d092f28c00210c0c7f24d4241eb5a5d9ceb5b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickTheme: cleanup the APIJ-P Nurmi2018-03-151-3/+3
| | | | | | | | | | | | Task-number: QTBUG-67062 Change-Id: Id2f821bd41b72f7bce9885295e89c322eb3332f4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Inherit QQuickPage from QQuickPaneJ-P Nurmi2018-03-091-3/+0
| | | | | | | | | | | | | | | | This allows us to remove a lot of duplicate code, and Page gets the same automatic content size calculation that was added to Pane. Change-Id: I98dc3a5070d61c1720dc11003bc4076aba481b3a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickPane: calculate content size in C++ unless explicitly definedJ-P Nurmi2018-03-094-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | No more need for the clumsy and slow contentWidth and contentHeight bindings in Pane and its derivatives. QmlBench on TX1: Pane: 26.4 -> 32.8 frames (~24%) Frame: 25.4 -> 31 frames (~22%) GroupBox: 28.6 -> 32 frames (~12%) Change-Id: I4ba1d46ba6328de2ee0955c241d4b090127f6b85 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Bump module versionsJ-P Nurmi2018-03-012-2/+2
| | | | | | | | | | Change-Id: Ifcb0b333769be58263ec5ed662520b97cfc2f79c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Bump import versionsJ-P Nurmi2018-03-0146-170/+170
| | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-02-273-3/+3
|\| | | | | | | | | | | | | Conflicts: tests/auto/controls/data/tst_dialogbuttonbox.qml Change-Id: I39ea99d988aaa7d1afd35d573cca44d009b859ce
| * Update versions in the docs and .prosJ-P Nurmi2018-02-262-2/+2
| | | | | | | | | | 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-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Bump QtQuick.Templates import versionsJ-P Nurmi2018-02-2342-42/+42
| | | | | | | | | | | | | | | | | | | | 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-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | 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-211-0/+1
|\| | | | | | | Change-Id: I6cc3095673bb459acef93e3da8a67c3819b70d3a
| * 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>
* | Merge remote-tracking branch 'origin/5.11' into devJ-P Nurmi2018-02-191-1/+1
|\| | | | | | | Change-Id: Id375217229c7f7dc7a8a2dc7edcfd56bbe403952
| * GroupBox: fix background y and height assignmentsMitch Curtis2018-02-161-1/+1
| | | | | | | | | | | | | | Use the more specific bottomPadding rather than padding. Change-Id: Ib8823d6d9b07eaea97479ef432df0868b1b5d37d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Add DialogButtonBox::buttonLayoutJ-P Nurmi2018-02-171-1/+1
| | | | | | | | | | | | | | | | [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-161-1/+1
| | | | | | | | | | | | | | | | | | | | 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-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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-151-2/+2
| | | | | | | | | | | | | | | | | | 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-153-8/+2
|\| | | | | | | Change-Id: Id3333e9bb67ced4c6dbae5845512fe1927a7b858
| * Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-122-2/+2
| |\ | | | | | | | | | Change-Id: I2934d3f51fea9626fd2d2512786eb297d9f7fe6c
| | * Editors: tweak placeholder text colorJ-P Nurmi2018-02-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-071-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-153-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | QQuickToolTip: add non-attached show() and hide() methodsYulong Bai2018-02-061-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | 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 devLiang Qi2018-01-208-43/+42
|\| | | | | | | Change-Id: I61d779eb40e3a278aa2ef429e014d351da34f80a
| * 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>
| * Imagine/ProgressBar: cleanup internal IDs for deferred executionJ-P Nurmi2018-01-181-15/+16
| | | | | | | | | | | | Task-number: QTBUG-50992 Change-Id: I1f31b23f3db23e5582b74b18ed643e8263d99142 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Imagine/BusyIndicator: cleanup internal IDs for deferred executionJ-P Nurmi2018-01-181-3/+3
| | | | | | | | | | | | Task-number: QTBUG-50992 Change-Id: Idee1a13355e36e9221b32cdf9b89b4090dcf87b4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Imagine/GroupBox: cleanup internal IDs for deferred executionJ-P Nurmi2018-01-181-5/+4
| | | | | | | | | | | | Task-number: QTBUG-50992 Change-Id: Ied6b4365d03fc1ef3ae3a69667f1cb1fc8cdb9ac Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Imagine/SpinBox: cleanup internal IDs for deferred executionJ-P Nurmi2018-01-181-4/+2
| | | | | | | | | | | | Task-number: QTBUG-50992 Change-Id: Iaabd561b2bd009d3db970f370eff6fa717164961 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Tumbler: qualify references to visibleItemCount with "control"Mitch Curtis2018-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | This code currently works, but we prefer to use control.<property> to access properties directly. A similar patch was done for the styles that were available in 5.9. Change-Id: Iff12162464daa6b10fa8d3f322e0e61632713d08 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devJ-P Nurmi2018-01-162-9/+8
|\| | | | | | | Change-Id: Ibd1490e8d958361e55ac272dff75c9361239958b
| * ComboBox: fix popup's deferred execution for the new stylesJ-P Nurmi2018-01-151-4/+4
| | | | | | | | | | | | | | | | Same as 3ec6d04d in 5.9, but for the new styles in 5.10. Task-number: QTBUG-50992 Change-Id: I211c0e6c0b290c1af310898f21850f9fad01b278 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Tumbler: cleanup internal IDsJ-P Nurmi2018-01-151-5/+4
| | | | | | | | | | | | | | | | Same as d61567f in 5.9, but for the new styles in 5.10. Task-number: QTBUG-50992 Change-Id: If47df3796eeadb997bfc76ce6dd6a3b14372ff2b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-098-54/+25
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf src/quicktemplates2/qquickabstractbutton_p.h Change-Id: I265cbd2ce51beaf2afef99292c2e2798dadb4ba3
| * Respect user font settings from qtquickcontrols2.conf fileMitch Curtis2018-01-032-46/+4
| | | | | | | | | | | | | | | | | | | | | | | | Resolve the style's font against the font that the user set in the configuration file, rather than only using the style's font. This patch also removes all of the fonts which were identical and replaces them with a single font. Task-number: QTBUG-65500 Change-Id: I284b0d75ac3ad5bf7123bbd13bbfe85d25145483 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Imagine: cleanup unnecessary property assignmentsJ-P Nurmi2017-12-205-8/+0
| | | | | | | | | | Change-Id: Iea84dc48b2807f336ff0b4c191fe5ec744cb1dd9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Update plugins.qmltypes for stylesJ-P Nurmi2017-12-131-0/+21
| | | | | | | | | | | | Change-Id: I19202b23a3027c7a24e15be2b929e9fc02aed044 Reviewed-by: Marco Benelli <marco.benelli@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devJ-P Nurmi2017-11-061334-7/+72
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quickcontrols2/qquickchecklabel.cpp src/quickcontrols2/qquickchecklabel_p.h src/quickcontrols2/qquickmnemoniclabel_p.h src/quicktemplates2/qquickbuttongroup_p.h src/quicktemplates2/qquickspinbox.cpp src/quicktemplates2/qquickswipedelegate.cpp Change-Id: I1278b78dcaf25be5698f34751193b83dc951eb3c
| * Imagine: round Slider handle position to avoid artefactsMitch Curtis2017-11-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The handle can be positioned "between" pixels, leading to unpleasant results: https://imgur.com/a/GKItw Round the position to avoid this. Doesn't seem to be an issue for other styles that use Qt Quick primitives rather than images. Change-Id: Iddb21e37ff777de433b3fa2a68e640db9a4b369a Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Imagine: enable caching for image lookupsv5.10.0-beta3J-P Nurmi2017-10-261-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | File system lookups are somewhat expensive, so cache the results to avoid repetitive lookups. The default cache size of 500 is a rough estimate based on that the default assets have 300+ images per scale factor. Caching image lookups gives an average of 20% performance improvement in qmlbench: control before after improvement ---------------------------------------------- busyindicator 29 32 1.10344827586207 button 53 60 1.13207547169811 checkbox 51 60 1.17647058823529 combobox 39 44 1.12820512820513 dial 110 147 1.33636363636364 itemdelegate 54 61 1.12962962962963 label 143 152 1.06293706293706 menuitem 26 34 1.30769230769231 progressbar 13 15 1.15384615384615 radiobutton 52 59 1.13461538461538 scrollbar 37 62 1.67567567567568 scrollview 78 121 1.55128205128205 slider 31 40 1.29032258064516 spinbox 75 85 1.13333333333333 switch 35 43 1.22857142857143 textarea 80 88 1.1 textfield 56 63 1.125 tumbler 126 128 1.01587301587302 ---------------------------------------------- average 1.2102967624703 Caching can be disabled by setting an environment variable: QT_QUICK_CONTROLS_IMAGINE_CACHE=0 but this is not advertised in the docs for the time being. It is there to help debugging, should anything go wrong with caching. Change-Id: I1119f3d8186bc9a51cc174b06fed02ed9e1fb70c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * 9-patch export plugin for SketchJ-P Nurmi2017-10-182-0/+43
| | | | | | | | | | | | | | | | This plugin crops upscaled 9-patch PNG assets when exported from Sketch, to ensure that 9-patch borders remain 1px wide when upscaled. Change-Id: Iad46d75f37b76eecf64ac32fa38d2b9e9db8b34d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>