aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-08-273-3/+14
|\ | | | | | | | | | | | | | | Conflicts: src/imports/controls/TabBar.qml src/imports/controls/material/TabBar.qml Change-Id: I290091558f7ae94d44be2a117b16867dddb53cb3
| * TabBar: improve the behavior of flickable tabsJ-P Nurmi2016-08-252-2/+13
| | | | | | | | | | | | | | | | | | | | | | When using flickable tabs, make sure the next or previous tab is a bit visible to make it clear that there are more tabs and ensure that the content is not flickable when there is less content than available size. Change-Id: I231ac8e99007103517ff49e747282af43cc6f8ea Task-number: QTBUG-55129 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix typo in deployment documentationMitch Curtis2016-08-241-1/+1
| | | | | | | | | | Change-Id: If80bbdc82efed0451c27650d59c2bee5ad44c765 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Init QQuickStyle's base URL to avoid creating temp QQmlEngineJ-P Nurmi2016-08-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Initialize the base URL from QtQuickControls2Plugin::registerTypes() to avoid creating an unnecessary temporary instance of QQmlEngine. It was used to list all known import paths, which were scanned for the requested style folder. Now that we pass the base URL, the built-in styles (a name without path to the style) can be looked up straight from the base path. Change-Id: I0d68d4c5bb90a4ab89660b5ce97f6433aeefc1ff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add MenuSeparator and ToolSeparator to Differences doc pageMitch Curtis2016-08-241-0/+6
| | | | | | | | | | Change-Id: Ica132eeac20a5d276abfb7d74eba07d638ba288e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Remove 'No hover effects' note from qtquickcontrols2-differences.qdocMitch Curtis2016-08-241-3/+1
| | | | | | | | | | | | | | This is no longer true. Change-Id: I70b36cfaf96be1d332e801499ca23de144df76ac Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-08-239-74/+119
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/material/qquickmaterialstyle.cpp src/imports/controls/universal/qquickuniversalstyle.cpp src/quicktemplates2/qquickpopup_p_p.h src/quicktemplates2/qquicktooltip.cpp tests/auto/auto.pro Change-Id: I88b347dd85278e14f7b2ca468e30648c6432b6f2
| * Document that style attributes set in QML have precedence over settingsMitch Curtis2016-08-192-2/+4
| | | | | | | | | | Change-Id: I88fbebfc672d4c8d398a45b5dfe0c61fa307a9e7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Universal: document the attached style propertiesMitch Curtis2016-08-192-0/+10
| | | | | | | | | | Change-Id: I390d3f9107f9e38e755f98060f74d63becba60cb Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Universal: ensure setting background/foreground worksMitch Curtis2016-08-191-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add HasGlobalForeground and HasGlobalBackground. These are set to true when a foreground/background color is specified via settings (qtquickcontrols2.conf file or environment variables), and then used to initialize each attached style object's m_hasForeground and m_hasBackground property. - Add tst_qquickuniversalstyleconf auto test to ensure that global settings are respected. Task-number: QTBUG-55366 Change-Id: I7a8b219506f9528c4ae323bd890b418ba056ed23 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Universal: rename DefaultX variables to GlobalXMitch Curtis2016-08-191-20/+20
| | | | | | | | | | | | | | | | | | For example, DefaultAccent will become GlobalAccent. This better reflects the reality that these are not true defaults because they can be overridden by settings and makes it easier to read the code. Change-Id: I2a7afa3ec8fd6db620d054b6e1f6860b2d3e1d02 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Material: document the attached style propertiesMitch Curtis2016-08-192-0/+15
| | | | | | | | | | Change-Id: I8349ec366c75b9480533bb9b61a3748e09e9560e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Material: ensure setting background/foreground worksMitch Curtis2016-08-191-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add hasGlobalForeground and hasGlobalBackground. These are set to true when a foreground/background color is specified via settings (qtquickcontrols2.conf file or environment variables), and then used to initialize each attached style object's m_hasForeground and m_hasBackground property. - Add tst_qquickmaterialstyleconf auto test to ensure that global settings are respected. Change-Id: I436773e355c6d470215fb9cfe8fbff402d2979d9 Task-number: QTBUG-55366 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Material: rename defaultX variables to globalXMitch Curtis2016-08-191-43/+43
| | | | | | | | | | | | | | | | | | For example, defaultPrimary will become globalPrimary. This better reflects the reality that these are not true defaults because they can be overridden by settings and makes it easier to read the code. Change-Id: Idf09e5b0c6a2d91663730c00e3d32f2be49e15c6 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * ComboBox: make delegates respect the popup widthJ-P Nurmi2016-08-183-3/+3
| | | | | | | | | | | | Task-number: QTBUG-55050 Change-Id: I25e84d15ebb61f88cc92ab570471969ec5971c10 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-175-14/+64
|\| | | | | | | Change-Id: I8172f493c5747db2c9e728b026ff267bff2e3427
| * Doc: add an example how to create a flickable tab barJ-P Nurmi2016-08-112-0/+50
| | | | | | | | | | | | Change-Id: Iad89f8d46b44ca2634d3f8ecd52431654ae5d7ac Task-number: QTBUG-55129 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Universal: fix editors in dark themeJ-P Nurmi2016-08-112-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | There is no reason to force ChromeDisabledLowColor when having active focus. ChromeDisabledLowColor is the same color than light theme's BaseHighColor. Universal's foreground color is mapped to BaseHighColor, so we can simply use Universal.foreground to retain the old behavior _and_ get a working foreground color when explicitly turned to a dark editor. Task-number: QTBUG-52738 Change-Id: I2687a3df17985c5ad897f8fd80d808fa27ea918d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Material: fix multiple BusyIndicator instancesJ-P Nurmi2016-08-101-10/+12
| | | | | | | | | | | | | | | | | | | | Cannot use local static variables to store the values of the last round, because the values must be stored per instance, not shared between all busy indicators. Task-number: QTBUG-54472 Change-Id: Ibb088b077ff8e23b1376e04a0329f001211574f7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Doc: fix qdoc warnings in the Material style internalsJ-P Nurmi2016-08-133-15/+15
| | | | | | | | | | | | | | | | Don't use qdoc syntax for the internals that are not supposed to be in the docs. Change-Id: I2abd61e50b89ed5c800364ce5732f85dda9d54b9 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Material: restore ToolButton checked stateJ-P Nurmi2016-08-111-2/+3
| | | | | | | | | | | | Task-number: QTBUG-54917 Change-Id: Ib236d818fdc1582277e7a9fe367e9c92ff8648a1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add ComboBox::flatJ-P Nurmi2016-08-115-14/+23
| | | | | | | | | | | | | | | | | | [ChangeLog][ComboBox] Added a flat property that provides more suitable looks for using ComboBox in a ToolBar. Task-number: QTBUG-54935 Change-Id: Id458a078486aeac5d542a57f3ed247d63d25e95c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: fix ToolButton's inappropriately round hover effectMitch Curtis2016-08-101-1/+1
| | | | | | | | | | | | | | | | | | The Material style ToolButton's round hover effect was indecently exposing itself. It should only be visible when the text (i.e contentItem) is not very wide. Change-Id: Ie40b5cf02356a7b444187470e1c6e68252895140 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Restore version 2.0 for the .impl importsJ-P Nurmi2016-08-103-30/+32
| | | | | | | | | | | | | | | | | | | | | | It's a bit of extra hassle, but the type registration can be done so that we keep the old version available to avoid deliberately breaking apps that have had to import .impl to gain access to the internal goodies. For example, someone may have made a copy of one of the controls as our documentation suggests. :) Change-Id: I5308d7e74ecebf69da7fe9c6912380f72c3c9a2b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-08-091-0/+3
|\| | | | | | | | | | | | | Conflicts: src/imports/controls/material/ComboBox.qml Change-Id: Ie517a07a63cd74ce2d506a68ee24060dce977bf7
| * Material ComboBox: fix white text on white backgroundMitch Curtis2016-08-091-0/+3
| | | | | | | | | | | | Task-number: QTBUG-54935 Change-Id: I3be56bb67a7decf11434de64343f25af3a59bd1f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/devJ-P Nurmi2016-08-094-41/+107
|\ \
| * | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-08-094-41/+107
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickpage.cpp Change-Id: I4c8b62fb1d7c20c6d3c870eb47e0402a20051098
| | * Add SwipeDelegate to Delegate Controls documentationMitch Curtis2016-08-081-0/+7
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-55174 Change-Id: I28397af09d6d4134a59449c76f15ec9a65cd9b4e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| | * Fix attached property linking for Material styleMitch Curtis2016-08-042-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | Both styles' documentation pages were using e.g. "accent-attached-prop", causing one to unintentionally link to the other. Change-Id: I19bf79781fd4a771ff7ddffeadf71e936d1a7b82 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| | * Document Material.Shade and the related parameter of Material.color()Mitch Curtis2016-08-042-4/+57
| | | | | | | | | | | | | | | | | | Change-Id: Id6c4e2051587129d5f76d000be5786bb560efa3f Task-number: QTBUG-54269 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| | * Add a link to style usage docs from individual pagesMitch Curtis2016-08-032-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | There is a "Related Information" link already, but that's at the bottom of the page. Change-Id: If8fd83ea240eb146e5781b697ad924071aba4156 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | | Restructure the docs to separate the experimental labs QML typesJ-P Nurmi2016-08-0916-330/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Including the experimental Qt Labs Calendar docs to qqc2.qdocconf leads to Qt Creator's help contents being mixed with QML types from both modules. Move the Qt Labs Calendar to its own .qdocconf the same way it's done for Qt Labs Platform, and just link to both from the index page. This also ensures that the index-search offers "Calendar" from "Qt Quick Controls (1)" and "Qt Labs Calendar" instead of "Qt Quick Controls 2". Change-Id: Iaf5e7df6d3013657c774d65bf76fb7bc2f80aa71 Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
* | Add MenuSeparatorMitch Curtis2016-07-2513-0/+332
| | | | | | | | | | | | | | | | | | [ChangeLog][Controls] Added MenuSeparator to visually distinguish between groups of items in a menu. Change-Id: I7a52910b19633ed1188c90ca56c92346a28d4d5c Task-number: QTBUG-54862 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Universal: determine the default hoverEnabled value from QStyleHintsJ-P Nurmi2016-07-2220-0/+40
| | | | | | | | | | | | Change-Id: I76857a7ea88db3d47415580a83fa4431b732a0f2 Task-number: QTBUG-50003 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: determine the default hoverEnabled value from QStyleHintsJ-P Nurmi2016-07-2220-0/+40
| | | | | | | | | | | | Task-number: QTBUG-50003 Change-Id: I4809638c7ddaa4ca6fb99dbc734edb3641ecea05 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Update plugins.qmltypes for templates and controlsJ-P Nurmi2016-07-222-400/+471
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For src/imports/templates, simply running 'make qmltypes' does the job. With src/imports/controls, we must help qmlplugindump a bit: - pass the correct dependencies in a JSON file (or else qmlimportscanner will find .impl imports, which qmlplugindump will fail to import as stand-alone modules) - merge with the plugins.qmltypes from templates to achieve proper type hierarchy The full command for dumping QtQuick.Controls 2.1 types, also seen at the top of src/imports/controls/plugins.qmltypes: qmlplugindump -nonrelocatable QtQuick.Controls 2.1 \ -merge ../templates/plugins.qmltypes \ -dependencies dependencies.json Change-Id: I2d8a24e47e70dd8dd27a2f48fe640faeea8761e2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: fix ripple wave position on mouse ungrab / button cancelJ-P Nurmi2016-07-211-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickMaterialRipple compared the anchor item to QQuickWindow's mouseGrabberItem to ensure that only mouse-pressed buttons would use the press point, whereas key-pressed buttons would use the center point. However, this does not work in case the mouse grab was stolen: when first pressing an ItemDelegate and then dragging the containing ListView, the ripple wave would always appear from the center point, not from the press point as it should. Since QQuickAbstractButton::keyPressEvent() sets the press point as the center of the control, the mouseGrabberItem check can be simply removed. Change-Id: Ic24e5e80c9d849f3fe2684013dd40b004ef55b57 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: cleanup the ripple color bindingJ-P Nurmi2016-07-211-1/+1
| | | | | | | | | | | | | | | | The binding was copied from Button, and 'control.checked' condition was accidentally left there. Such property doesn't exist in ComboBox. Change-Id: I11b56e2da997ab2519a63527f58faff3d1bb4d8b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: rename ripple color propertiesJ-P Nurmi2016-07-2117-25/+25
| | | | | | | | | | | | | | They are no longer specific to CheckBoxes, but used in most controls. Change-Id: I404aeab706479d0b666529ebdb09caa6b8085cae Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Doc: use the new .pro syntax for RESOURCESJ-P Nurmi2016-07-211-12/+3
| | | | | | | | | | | | | | | | A .qrc file is no longer mandatory. One can list resources directly in the RESOURCES variable. Change-Id: I172b6cfa0a16c3296794888bd2f40a4273739c32 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add ToolSeparatorMitch Curtis2016-07-2119-0/+463
| | | | | | | | | | | | | | | | | | | | ToolSeparator is used to visually distinguish between groups of items in a toolbar by separating them with a line. It can be used in horizontal or vertical toolbars. Task-number: QTBUG-54862 Change-Id: Ie68e680510428ad19e7f80268063af07b61100eb Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | QQuickMaterialStyle: cleanup several unused colorsJ-P Nurmi2016-07-212-90/+5
| | | | | | | | | | | | | | | | | | These are no longer used now that the hovered and focused states are visualized by the ripple background, and the pressed state by the ripple waves and the elevation shadow. Change-Id: Ia2d315c2d8b31e4fcd77534f6128584b9daeb8d8 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>
* | Material: add missing ripple effect to SwipeDelegateJ-P Nurmi2016-07-202-3/+18
| | | | | | | | | | | | Task-number: QTBUG-54764 Change-Id: Ie04c93a823745b6d0a85e0c80c91d4e7f77f6fcd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: remove double press effect from delegatesJ-P Nurmi2016-07-206-7/+6
| | | | | | | | | | | | | | | | The press effect is visualized by the ripple background, so we don't need to adjust the control background color when pressed. Change-Id: Ic3acea4591d59f3045004b7e85a5b5bb9044c9f2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: revise Button visualsJ-P Nurmi2016-07-202-27/+15
| | | | | | | | | | | | | | | | | | | | | | Pressed buttons were way too dark, and ripples weren't even visible for highlighted buttons. Now that we have ripples, we don't need to use so many different color shades to present various button states. Also, visualize the checked state with a little accented bar like the Android ToggleButton does. Change-Id: Id717b658bfe70ba211e4da5a6addc6e10a2df3e5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-07-202-5/+33
|\| | | | | | | Change-Id: Idf19dd882ba3015be2afda6988cac1e95a4912fa
| * ComboBox: add custom popup example snippetJ-P Nurmi2016-07-191-3/+30
| | | | | | | | | | Change-Id: I9e393d3db42ba21ee2e1cd231bb91fd55bcace46 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * differences.qdoc: clarify Button.qml exampleMitch Curtis2016-07-191-2/+3
| | | | | | | | | | | | | | | | import "controls" was supposed to refer to a directory named "controls". Change-Id: I6e977354fa1ce01b1c14dda378d077b1003cb21a Reviewed-by: J-P Nurmi <jpnurmi@qt.io>