aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/SpinBox.qml
Commit message (Collapse)AuthorAgeFilesLines
* Remove all version numbers from QML importsMitch Curtis2020-08-261-4/+4
| | | | | | | | | As of Qt 6, the latest version will be used by default. This saves us a lot of effort in terms of version bumps. Task-number: QTBUG-82922 Change-Id: I74eba8185ec3ccc75bc293d4b2ea87d59e2d9928 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Tie minor version of all imports to Qt's minor versionMitch Curtis2018-11-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes all Qt Quick Controls 2 imports match the current Qt minor version, which is 12 as of this patch. It also updates all other Qt Quick imports to match. This will also make future version bumps easier as all version numbers in existing code/docs will match. The following commands were used to verify that no old versions remain: for i in `seq 0 11`; do git grep "import QtGraphicalEffects.*1.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick 2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Layouts 1.$i$"; done for i in `seq 0 5`; do git grep "import QtQuick.Controls.*2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Templates 2.$i as T$"; done [ChangeLog] From Qt 5.12 onwards, all import versions in Qt Quick Controls 2 follow the same minor version as Qt's minor version number. For example, the import version for Qt 5.12 is: "import QtQuick.Controls 2.12". Change-Id: I6d87573f20912e041d9c3b7c773cc7bf7b152ec3 Fixes: QTBUG-71095 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Replace Material.buttonHeight with Material.touchTargetJ-P Nurmi2018-04-251-5/+5
| | | | | | | | | | | | The visual height of a Material design Button is 36px in the normal variant, and 32px in the dense variant. The Button has 6px vertical insets to gain 48px touch target height. Rename the old buttonHeight property as touchTarget to make room for the visual buttonHeight that is needed when porting Button to use the newly introduced background insets. Change-Id: Ic2932f71ca75a626ff5e9b0ce9930e1b3f24cf00 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Take background insets into accountJ-P Nurmi2018-04-231-1/+1
| | | | | | Task-number: QTBUG-60156 Change-Id: I11f59a67f5a319ac5a4eae9b8ccea5d16a983de2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* SpinBox: add up|down.implicitIndicatorWidth|HeightJ-P Nurmi2018-04-181-4/+4
| | | | | | | | | [ChangeLog][Controls][SpinBox] Added up.implicitIndicatorWidth, up.implicitIndicatorHeight, down.implicitIndicatorWidth, and down.implicitIndicatorHeight properties. Change-Id: I2cdc4e95f8cc3f0e47ce3b24346781f44809eecd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use implicitContentWidth and implicitContentHeightJ-P Nurmi2018-04-131-1/+1
| | | | | | | A simple search'n'replace change without hidden functional changes. Change-Id: I11c76846028665e66dfc6b4359adb33f77cd88ae Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use implicitBackgroundWidth and implicitBackgroundHeightJ-P Nurmi2018-04-121-2/+2
| | | | | | | A simple search'n'replace change without hidden functional changes. Change-Id: I8e42f8ad30977630005529094eea726efa15a26d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickControl: update baseline offset automaticallyJ-P Nurmi2018-04-041-1/+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>
* Bump import versionsJ-P Nurmi2018-03-011-3/+3
| | | | | | | | 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>
* Bump QtQuick.Templates import versionsJ-P Nurmi2018-02-231-1/+1
| | | | | | | | | | 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>
* Add Dense Material style variant for desktopMitch Curtis2018-02-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add QQuickSpinBox::displayTextJ-P Nurmi2017-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allows styles to create a simple binding to display the textual value instead of calling the textFromValue() JS-function. Furthermore, this allows us to do the text<->value conversion in C++ using QLocale by default, unless custom textFromValue and/or valueFromText JS-functions are provided. Before: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_spinbox.qml 100 frames 100 frames 99 frames Average: 99.6667 frames; using samples; MedianAll=100; StdDev=0.57735, CoV=0.00579281 After: running: qmlbench/benchmarks/auto/creation/quick.controls2/delegates_spinbox.qml 152 frames 150 frames 151 frames Average: 151 frames; using samples; MedianAll=151; StdDev=1, CoV=0.00662252 Change-Id: I66a5ebaf685d2c30613b58099724e6e7bbe00504 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Bump import versionsMitch Curtis2017-09-191-4/+4
| | | | | | | | This brings all QtQuick 2.x and QtQuick.Controls.x 2.x imports in src/ up to 2.11 and 2.4, respectively. Change-Id: Ica2413b85f5da62a495a5d1b02ea54a9a92c0ecb Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Bump QtQuick 2.9 imports to 2.10Mitch Curtis2017-09-061-1/+1
| | | | | Change-Id: I274146911cd8a204fcbf439da9259b0a38c8092e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Update the import statements 2.2->2.3J-P Nurmi2017-03-011-3/+3
| | | | | Change-Id: Ifa2a4cb46f0fc7db75b468a67000c979bf44848c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-111-1/+1
|\ | | | | | | Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
| * Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | | | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-021-2/+2
|\| | | | | | | | | | | | | Conflicts: src/imports/platform/qquickplatformmenuitem.cpp Change-Id: I4d399aa81a31112edf6030b52ba5d68828f9729d
| * Material|SpinBox: Fix trivial C&P typoKonstantin Ritt2016-12-281-2/+2
| | | | | | | | | | Change-Id: I8bdd973f69ae246220b58a312f5d82d9134f35f6 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * SpinBox: fix input method hints to get the appropriate VKBJ-P Nurmi2016-11-291-1/+1
| | | | | | | | | | | | | | | | SpinBox operates on integers. Task-number: QTBUG-56837 Change-Id: Ib77cded8c4483fa78816d004692cacb3532deedd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Bump the QtQuick import versions in the stylesJ-P Nurmi2016-12-191-1/+1
| | | | | | | | | | | | | | Qt 5.9 == QtQuick 2.9 Change-Id: I7d4f749645011c4e78bdafe80824b83bd166e7c7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SpinBox: add inputMethodHints and inputMethodComposingJ-P Nurmi2016-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Needed for controlling the input method. Editors and editable ComboBox have these also. [ChangeLog][Controls][SpinBox] Added inputMethodHints and inputMethodComposing properties for controlling the input method when using editable spin boxes. Task-number: QTBUG-56837 Change-Id: I1df21341c9a10c1baa1eaa259a5bbab7145e87c8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Update import versions in src/import/controls - part IIJ-P Nurmi2016-11-231-1/+1
| | | | | | | | | | | | | | The templates imports were missed in fb7c9541, sorry. Change-Id: I9742f1a86b01083ae1b7c6ae48b43098be8385c5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Update import versions in src/import/controlsJ-P Nurmi2016-11-231-2/+2
| | | | | | | | | | Change-Id: Ic6cd0450a13b965578a0ab8f590270f4e52ffca6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-11-171-5/+5
|\| | | | | | | | | | | | | | | Conflicts: src/quickcontrols2/qquickstyle.cpp src/quicktemplates2/qquickslider.cpp Change-Id: Ie12132690680706def6f516334a6ef0ba27336b3
| * Material: de-couple foreground and primaryTextColorJ-P Nurmi2016-11-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | In order to get the ComboBox colors right, it must be possible to query the original primary text color value. It was very convenient to make Material.primaryTextColor return custom Material.foreground colors, because that way we didn't have to touch our QML files, but this approach is no longer usable. Task-number: QTBUG-57167 Change-Id: Iee003e96112b919dc7c84a906e4f5691b0f2a6ab Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: share the CursorDelegateJ-P Nurmi2016-10-281-25/+2
|/ | | | | | | | Duplicate code in TextField, TextArea, and SpinBox. The next one is editable ComboBox. Change-Id: Ibbd054d2f945f4964ee0007f9e9dc8a9450902e9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make hoverEnabled propagate to childrenJ-P Nurmi2016-10-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Hover effects can be sometimes a bit disturbing. This change makes it possible to conveniently disable hover effects for a tree of controls in one go. For example, to disable hover effects for a page including its header, footer, and all list items: Page { hoverEnabled: false header: ... footer: ... ListView { delegate: ... } } [ChangeLog][Controls][Important Behavior Changes] Control::hoverEnabled has been made to inherit to children, to make it possible to disable hover effects for a tree of controls in one place. Change-Id: Ia87144f2cc04957a32f89d3313816b91d97db635 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-10-071-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-disabled.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-normal.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-checked.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-disabled.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-focused.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-normal.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-disabled.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-first-handle-focused.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-normal.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-second-handle-focused.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-second-handle.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-explicit.qml src/quicktemplates2/qquickmenu.cpp tests/auto/controls/data/tst_buttongroup.qml tests/auto/controls/data/tst_swipedelegate.qml Change-Id: Ib6042a0ad716f557927e7412d17ea8957d06c015
| * Material Style: Fix cursorFlashTimeKai Uwe Broulik2016-10-041-1/+1
| | | | | | | | | | | | | | | | The flash time is the time used to display, invert and restore the caret display. This means, the interval for turning it on and off needs to be halved. Change-Id: I5c258aad10efab6c2c30d176ccae84ee6f8cb9b3 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Update all QtQuick imports in src/imports/controlsJ-P Nurmi2016-10-041-1/+1
| | | | | | | | | | | | | | | | | | Most were importing 2.6, some 2.4, and some 2.7. Use consistently the latest available Qt Quick version 2.8. This can be easily tracked to the corresponding Qt version. Change-Id: Ic231b3cc0cb5d2d5cf806fe11c4ff3fd557d09e0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: determine the default hoverEnabled value from QStyleHintsJ-P Nurmi2016-07-221-0/+2
| | | | | | | | | | | | Task-number: QTBUG-50003 Change-Id: I4809638c7ddaa4ca6fb99dbc734edb3641ecea05 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: rename ripple color propertiesJ-P Nurmi2016-07-211-2/+2
| | | | | | | | | | | | | | They are no longer specific to CheckBoxes, but used in most controls. Change-Id: I404aeab706479d0b666529ebdb09caa6b8085cae Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: add missing ripple effect to SpinBox buttonsJ-P Nurmi2016-07-201-12/+24
| | | | | | | | | | | | Task-number: QTBUG-54764 Change-Id: Ie038161264c989853b2b6ec0bfceb09a1cd1195c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Bump up all controls and templates imports to version 2.1J-P Nurmi2016-07-081-3/+3
|/ | | | | | | | | | | | Controls must import templates version 2.1 in order to "inherit" 1-revisioned properties, methods, and signals. So far, this has been done case by case, but it's less error prone and more clear to change them all. For example, if you ever see a source file pasted/linked somewhere, it's easy to identify the version it belongs to. Change-Id: I41609ec1a22bc05ac3e79f953a147ca42d9e0786 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: fix radiusJ-P Nurmi2016-06-271-2/+2
| | | | | | | | There's barely any visual difference, but follow the Material Design specs that use 2dp corner radius. Change-Id: I9f1462eeb89c2462abb07a76949710d11881c4ce Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make Material style SpinBox text respect enabled stateMitch Curtis2016-06-201-1/+1
| | | | | | Task-number: QTBUG-54207 Change-Id: Ic4a871147bde046d402dac1fe25913abfa8da0ba Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Material: remove qdoc markersJ-P Nurmi2016-06-081-10/+0
| | | | | | | | | | | | | The original plan was to include the default implementation (of all styles, if we could make the snippets collapsiple) in the customization docs. Since the default implementations tend to include internal types, in the end we went the other way and wrote dedicated example snippets for the customization docs. Therefore these markers no longer server a purpose, but just add unnecessary extra bytes for the QML parser to read. Change-Id: Ic511d7ce7a032429626ee75517d69d21b21412a3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* SpinBox: disable up and down indicators when appropriateMitch Curtis2016-05-241-3/+3
| | | | | | Change-Id: I6fbfde582723632c9b955a6e7ee380179b7b6a32 Task-number: QTBUG-53519 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Material: remove obsolete imports of QtGraphicalEffectsNikita Krupenko2016-05-061-1/+0
| | | | | | | They are no needed anymore, as shadow implemented by an ElevationEffect. Change-Id: I75deb8fba69c96dfb82fc400ac24da543497a635 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Material: Add proper elevation supportMichael Spencer2016-05-041-6/+6
| | | | | | | | | | | | - Added an ElevationEffect component based on elevation shadows from Angular Material - Use it on Button, ToolBar, ComboBox, Drawer, Pane, Popup, Menu, and Switch - Add an elevation property to the Material attached object - Update the button colors based on the elevation property Change-Id: I5152e1a56bdcb1016cc4f945a16ef510e0cdece6 Task-number: QTBUG-51276 Reviewed-by: Nikita Krupenko <krnekit@gmail.com> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* import Qt.labs.controls 1.0 => QtQuick.Controls 2.0J-P Nurmi2016-04-211-2/+2
| | | | | | | | | Docs, resources, .metainfo and plugins.qmltypes will be updated in follow up commits. Change-Id: I4438c5bfb8802bff0fa15c56431cfd288f179861 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* import Qt.labs.templates 1.0 => QtQuick.Templates 2.0J-P Nurmi2016-04-211-1/+1
| | | | | | | | | | | | | | Even though there never was such thing is QtQuick.Templates 1.0, we'll use version 2.0 to keep it in sync with QtQuick.Controls 2.0 (next step). The templates define (and in the future, revision) the API of the controls, so the two must have the same version or it will get messy. Docs and plugins.qmltypes will be updated in follow up commits. Change-Id: Idc2e76f32f348ba35eb4b1fa167c6868300aa910 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7J-P Nurmi2016-04-201-0/+25
|\
| * Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-04-201-0/+25
| |\ | | | | | | | | | Change-Id: Ia8879787703c32db44119b25be10adc83adc40bb
| | * Material: use theme cursor in SpinBoxNikita Krupenko2016-04-131-0/+25
| | | | | | | | | | | | | | | Change-Id: I35c3a15d17a15945ccbfa5eeb4359c7c5be3facf Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | | Material: increase size and paddings for SpinBoxNikita Krupenko2016-04-201-11/+20
|/ / | | | | | | | | | | Task-number: QTBUG-51254 Change-Id: I2844d9cbe03e7fdda88e358b2f01586ca48f180c Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Controls: update license headersJ-P Nurmi2016-04-141-2/+2
| | | | | | | | | | | | | | This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. Change-Id: Ib653135662bfd353a73290539995e8e5be211587 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Add SpinBox::editable propertyJ-P Nurmi2016-02-231-0/+1
|/ | | | | | | | | | The default value is false, which is more mobile/embedded/touch friendly choice, and will be also in line with ComboBox::editable when it gets introduced sometime in the future. Change-Id: Iaaad8f5533100c2d5c4b49d1ef8ee849cf31feff Task-number: QTBUG-51114 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Material SpinBox: stretch the underlineJ-P Nurmi2016-01-181-1/+1
| | | | | | | | | | When there's a relatively wide SpinBox with value "0", the underline was not stretched to cover the empty area, just the value. This change makes the underline stretch to make the buttons look more connected to the value. Change-Id: Idf2c61a7a1a5bbbbce946bd53f04524e21507819 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>