aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material
Commit message (Collapse)AuthorAgeFilesLines
* Bump up all controls and templates imports to version 2.1J-P Nurmi2016-07-0846-116/+117
| | | | | | | | | | | | 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>
* Remove DialogButtonBox::flatJ-P Nurmi2016-06-301-1/+0
| | | | | | | | | | | | The Material Design allows mixing standard flat buttons with non-flat custom buttons. It is enough that the delegate provides flat standard buttons by default. It is better to not force all buttons to be flat, but let the user freely specify whether custom buttons are flat. This API has not yet been released, so it is still safe to remove. Change-Id: Iec400553ccefb47f20fb98d64919491d9bb27cbe Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-06-296-7/+7
|\ | | | | | | Change-Id: Ifd118c11fd6034d03b98c961313280b7098c5f84
| * Material: fix radiusJ-P Nurmi2016-06-276-7/+7
| | | | | | | | | | | | | | | | 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>
* | Add hover support to TextArea & TextFieldJ-P Nurmi2016-06-292-2/+2
| | | | | | | | | | | | Task-number: QTBUG-50003 Change-Id: Ie101ba8840fba2a7503da8de77d9cf2a3c91d562 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | ComboBox: make delegates respect hoverEnabled of the controlJ-P Nurmi2016-06-281-0/+1
| | | | | | | | | | | | | | | | The actual hover effects are coming in separate patches. Task-number: QTBUG-50003 Change-Id: I191cebf299998046a89b5653bd2858f65a7bca34 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Tumbler: add wrap propertyMitch Curtis2016-06-281-14/+9
| | | | | | | | | | | | | | | | | | [ChangeLog][Tumbler] Added wrap property to control whether or not tumbler wraps when it reaches the top and bottom. Change-Id: I27c543d98f7bc574bc5dc882a130abe0dcc13cea Task-number: QTBUG-53587 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Migrate to new scenegraphng APILaszlo Agocs2016-06-222-50/+24
| | | | | | | | | | | | Change-Id: I9b0c05edacd4e6f1be6f692e77476097d1f99bc0 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Add SwipeView::interactiveJ-P Nurmi2016-06-221-0/+1
| | | | | | | | | | | | | | | | | | [ChangeLog][SwipeView] Added interactive property for controlling whether swipe interaction is enabled. Task-number: QTBUG-54268 Change-Id: I1f03e4958defe52c8a15c808567424c85f07f8bd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Make import version 2.1 available for Material & UniversalJ-P Nurmi2016-06-211-0/+1
| | | | | | | | | | Change-Id: Ia3ab14fdb67e32907396329ab9034a429c7b536e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-06-201-1/+1
|\| | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickcontainer.cpp Change-Id: I7c41619a81b4fdd0d8ccaa4f0bb489a9b84e3865
| * 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>
* | Add QQuickContainer::increment|decrementCurrentIndex()J-P Nurmi2016-06-202-2/+2
| | | | | | | | | | | | | | | | | | [ChangeLog][Container] Added incrementCurrentIndex() and decrementCurrentIndex() methods for changing the current index without losing its property binding. Change-Id: Id44e0db5e3d0951eb77b0124a83c5eb3df898012 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add DialogButtonBoxJ-P Nurmi2016-06-152-0/+76
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls] Added DialogButtonBox to provide convenience for handling dialog buttons. DialogButtonBox is able to create a set of standard buttons with a single line of QML code, and provides convenient accepted() and rejected() signals. Task-number: QTBUG-51090 Change-Id: I9b3c6ba1b2836dadf9a2ac9086be1eba214e7c4d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-06-147-20/+39
|\| | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickslider.cpp Change-Id: Idefd7b77b1937d423ee2db5064ff09c36b240ef0
| * Material: fix elevation effect for Frame, GroupBox, Pane & TabBarJ-P Nurmi2016-06-134-2/+22
| | | | | | | | | | | | | | | | [ChangeLog][Material] Fixed (optional) elevation effects for Frame, GroupBox, Pane, and TabBar. Change-Id: Ic725049d7023175a6c00765fb85b944bc250c4c6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Material: increase ScrollBar's touch areaJ-P Nurmi2016-06-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | 8px is hard to hit on touch. A total padding of 16px, so a total size of 20px is still nowhere near the Material design minimum touch target size 48px, but that feels so massive area stealing touches on the screen edge that let's try something a little bit smaller first... Task-number: QTBUG-51527 Change-Id: I2d095d8aa851e99a406286640d2b835cac52c47f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Material: fix sliders to respect minimum touch target size 48pxJ-P Nurmi2016-06-132-8/+8
| | | | | | | | | | Change-Id: If3674854264b1941002c61bba7f42792ea50de68 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Sliders: fix implicit size calculationsJ-P Nurmi2016-06-132-10/+6
| | | | | | | | | | | | | | | | Background size was in the bindings twice: once without and once with paddings. Change-Id: I863d1fe29f1d79017bad410b31f961e4d1238e3b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-1136-173/+0
|\| | | | | | | Change-Id: If502b986cc8d6729ebea64cedfdf97b9b612e7c0
| * Material: remove qdoc markersJ-P Nurmi2016-06-0836-173/+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>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-015-11/+42
|\| | | | | | | | | | | | | | | | | | | | | Comparing colors in tst_material.qml works fine now. Conflicts: examples/quickcontrols2/gallery/qtquickcontrols2.conf tests/auto/material/data/tst_material.qml Task-number: QTBUG-53556 Change-Id: I59970442a09bd72bf0ce53fe838c560ca8daf325
| * Material: fix disabled and tristate CheckBoxJ-P Nurmi2016-05-311-5/+21
| | | | | | | | | | | | | | | | Somehow these changes went missing when CheckIndicator was introduced in bb06d89. It was probably a copy-paste from an outdated CheckBox.qml. Change-Id: I9e5f3801f627de71f80620b5615771f7730b906c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Material: prevent ElevationEffect access out of boundsJ-P Nurmi2016-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The elevation shadows are defined in a JS array for elevations between 0-24. Clamp the user-defined elevation number to prevent access out of bounds: Button { Material.elevation: 100 // ElevationEffect.qml: TypeError: // Cannot read property '0' of undefined } Change-Id: I6b5a915042081be54101fd700b52c8eea96aa05d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Material: fix the reset of primary and accentLiang Qi2016-05-261-2/+8
| | | | | | | | | | | | | | | | | | Also fix a test in dev(see 44ac831c). Done-with: J-P Nurmi <jpnurmi@qt.io> Task-number: QTBUG-53556 Change-Id: I0b156727b07ed8c135c4a7bb6bb31fb2b280d4ec Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * SpinBox: disable up and down indicators when appropriateMitch Curtis2016-05-243-3/+12
| | | | | | | | | | | | Change-Id: I6fbfde582723632c9b955a6e7ee380179b7b6a32 Task-number: QTBUG-53519 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Introduce a 'System' theme to the styles.Friedemann Kleint2016-05-262-2/+15
|/ | | | | | | | | | | | | | | | Setting the theme to System chooses either the light or dark theme based on the system theme colors. However, when reading the value of the theme property, the value is never System, but the actual theme. [ChangeLog][Controls][Material] Added Material.System theme enum value, that can be used to let the Material style choose either the light or dark theme based on the system theme colors. [ChangeLog][Controls][Universal] Added Universal.System theme enum value, that can be used to let the Universal style choose either the light or dark theme based on the system theme colors. Change-Id: Ibfc9f01953cb8322b64d59413cfbaef9d4bb28fd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/imports/controls/doc/qtlabscontrols.qdocconf src/imports/controls/doc/qtquickcontrols2.qdocconf src/imports/controls/material/qtlabsmaterialstyleplugin.cpp src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp src/imports/controls/qtlabscontrolsplugin.cpp src/imports/controls/qtquickcontrols2plugin.cpp src/imports/templates/qtlabstemplatesplugin.cpp src/imports/templates/qtquicktemplates2plugin.cpp Change-Id: I6159e681b77e4a0a293b6bd7fb11a46d58873da0
| * Cleanup QQmlExtensionInterface usageJ-P Nurmi2016-05-061-1/+1
| | | | | | | | | | | | | | | | Use the pre-defined macro. Change-Id: Ie2b5a93f0b6ed16276b80fcb9e118a49a055194c Task-number: QTBUG-53208 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Controls: update all paddings to relative value with paddingLiang Qi2016-05-194-14/+11
| | | | | | | | | | Change-Id: I7bf3a7fb9ca97e5c7ddf34f8f921d5d4be733861 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Don't use QFont::exactMatch() for fonts comparisonNikita Krupenko2016-05-181-3/+7
| | | | | | | | | | | | | | | | | | This function can return false even if the font found. Compare fonts by QFontInfo::family() instead. Change-Id: I519dd11ef7cba7395ca5b815d3973ddf585c439a Task-number: QTBUG-53377 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Make SwipeDelegate look like an ordinary delegateJ-P Nurmi2016-05-181-3/+10
| | | | | | | | | | | | | | | | | | | | | | Sync background colors with the ItemDelegate implementation of each style, so SwipeDelegate won't look out of place when mixed with other delegates like on the Delegates page in Gallery. Material and Universal styles need an extra Rectangle to fill the background, because their press colors etc. are translucent. Change-Id: If3bc545a2c12430f79cf538cf610bd2106f9660c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add support for flat ButtonsJ-P Nurmi2016-05-181-9/+5
| | | | | | | | | | | | | | Task-number: QTBUG-51054 Change-Id: Ib4b23b624bc34d16c5acc1568881b609d3fd64b8 Reviewed-by: Nikita Krupenko <krnekit@gmail.com> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: visualize Button::checked stateJ-P Nurmi2016-05-131-1/+1
| | | | | | | | | | | | | | | | It's not very well visible, but better than completely missing visuals. Task-number: QTBUG-53348 Change-Id: I16067bfb4f9f118ad5765f2831018b2fd89337f7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Menu: remove the extra marginsJ-P Nurmi2016-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Since 0935e65, popup margins are negative by default. 0px or larger margins have to be set to keep a popup within the window bounds. In the same change, Menu gained also default margins. This seemed ok with context menus positioned at mouse coordinates, but doesn't look so nice in the Gallery example where the options menu was pushed too far out of top right corner. This change restores the old behavior that menus are kept within the window bounds with 0 margins. Change-Id: Ib728c22ebbdc2b9fa2d402eb4d4a11a638331a02 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Popup: sync content padding with PaneJ-P Nurmi2016-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | Pane paddings were increased in 6322aed. Increase also Popup paddings for the same reason that 6px is a very small default padding on high DPI. This is well visible in the About dialog of the Gallery example, for instance, where the text is very near the popup edges. Change-Id: I7b9478a509936ace2ad540207ee18dac2cf10306 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: correct check indicator sizeNikita Krupenko2016-05-103-6/+8
| | | | | | | | | | | | | | In design guidelines it is 18x18. Change-Id: I922d96f3208475d2a248659ec384af510058186f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | ComboBox: restore the old popup behaviorJ-P Nurmi2016-05-101-1/+1
| | | | | | | | | | | | | | | | Make the Popup follow ComboBox outside the horizontal screen bounds. Setting an explicit width instead of implicit width does exactly this. Change-Id: I46f4e5e40d5012929badf39d50d70b9a7811f455 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Popup: use margins to determine whether to push inside window boundsJ-P Nurmi2016-05-102-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we were planning to introduce complex policy flags to make it possible to specify whether a Popup is allowed to go outside the screen or not. Using margins for that purpose avoids the need of introducing such dedicated API just for that. From now on, margins are used to determine whether a popup is pushed to fit inside the window bounds (margins removed), and implicit size is used to determined whether a popup is resized to fit inside the window. In other words, a popup with negative margins and no implicit size is allowed to move outside the window bounds. Change-Id: Ife1665755e4dae434751977ae3289eb1aa4f3c6d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: fix SwitchDelegate press colorJ-P Nurmi2016-05-103-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | Elevation is required to get a shadow for the indicator, but it also affects the press color, which is undesired. To avoid a darker press color than the other delegates have, elevate only the indicator instead of the whole delegate. Unfortunately, this results to two Material attached object instances for the delegate, so it must be blacklisted in tst_sanity... Change-Id: I8b607ba8f7493fd34a4bdc131a5bfdc5a39159ae Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: corrected height for delegatesNikita Krupenko2016-05-103-0/+8
| | | | | | | | | | | | | | Made delegate's height be 48 by default. Change-Id: Ic240474eb3a1137bf033d17af1e38230c89ccf29 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Material: fix flat button colorsNikita Krupenko2016-05-093-11/+11
| | | | | | | | | | | | | | | | As 251afe3eaac3367c5c659dddc1e8854f833d5112 changed the way, how button color are retrieved, use it for flat buttons too. Change-Id: I28448c597b027293b1acac22dad586e0e7156707 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Material: set correct ToolBar foreground color for built-in primariesJ-P Nurmi2016-05-093-0/+40
| | | | | | | | | | | | | | | | | | | | When the primary color is one of the predefined values, we can choose the appropriate light or dark foreground color according to: https://www.google.com/design/spec/style/color.html#color-color-palette Change-Id: I2a25211ec3bc091211ce58b809089acaa32cb960 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Nikita Krupenko <krnekit@gmail.com>
* | Material: use proper shade for light and dark themeNikita Krupenko2016-05-092-9/+17
| | | | | | | | | | Change-Id: I2c93887890113a0ba37ce967349458c4b296a9ed Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Material: emit paletteChanged() on background color changeNikita Krupenko2016-05-061-0/+1
| | | | | | | | | | | | | | | | After 251afe3eaac3367c5c659dddc1e8854f833d5112 button color now depends on the background color. Change-Id: I297bf77f1303c07c3fa03e55ac57d8fe3228da4d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Material: fix raised button color for dark themeNikita Krupenko2016-05-061-1/+1
| | | | | | | | | | | | | | | | In 251afe3eaac3367c5c659dddc1e8854f833d5112 it became the same as in light theme. Change-Id: Iba5017be5d87ce0d346bcfd1bcdb0371fe650593 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Material: mark internal darkerShade() function as staticNikita Krupenko2016-05-061-1/+1
| | | | | | | | | | Change-Id: I1d2e181f411e7337970669fc7a1bb3b8a37e1aed Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Material: remove obsolete imports of QtGraphicalEffectsNikita Krupenko2016-05-067-7/+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 implicitHeight to MenuItemNikita Krupenko2016-05-041-0/+1
| | | | | | | | | | Change-Id: I57dde9c0a35ccedace308dab4a1905770a4efde0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Material: Add proper elevation supportMichael Spencer2016-05-0422-114/+554
| | | | | | | | | | | | | | | | | | | | | | | | - 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>