aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Editors: fix placeholder text alignmentJ-P Nurmi2017-01-1010-12/+165
| | | | | | | | | | | | | | | | | | The internal QQuickPlaceholderText creates an "implicit binding" to the editor's horizontalAlignment, meaning that the placeholder respects the editor's horizontal alignment when explicitly set, and otherwise determines the alignment from the placeholder text's visual direction. [ChangeLog][Controls][TextField] Fixed the horizontal alignment of the placeholder text in right-to-left UIs. [ChangeLog][Controls][TextArea] Fixed the horizontal alignment of the placeholder text in right-to-left UIs. Task-number: QTBUG-55999 Change-Id: If1a8596c35c1920874996277520f1c54430c5f69 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add ScrollBar::snapModeJ-P Nurmi2017-01-106-4/+74
| | | | | | | | | [ChangeLog][Controls][ScrollBar] Added snapMode property incremental or discrete scrolling. Task-number: QTBUG-56569 Change-Id: Id0d463b85063a62b7df6307af8fe8b203155a5de Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Revise QScrollBar internalsJ-P Nurmi2017-01-102-10/+48
| | | | | | | | Move the press/move/release/ungrab logic from mouse event handlers to QQuickScrollBarPrivate methods that can be re-used for touch events. Change-Id: Id0b0f225a4f86a9d9cc8b77c9253001dd6c40bf4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickTabBar: fix implicit size calculationJ-P Nurmi2017-01-106-39/+179
| | | | | | | | | | | | | | | | | | | | | Before, the implicit size of TabBar was calculated based on the content size of the ListView that TabBar uses internally. The problem was that ListView calculates the content size based on the explicit size of the items. There was a circular dependency, because TabBar resized the tabs to the size of the view. To avoid the circular dependency, TabBar now calculates the content size based on the total implicit size of the tabs. As before, explicit size is respected for tabs that have it set. [ChangeLog][Controls][TabBar] Added contentWidth and contentHeight properties that are automatically calculated based on the total size of the tab items, but can be manually overridden if desired. This fixes an issue that TabBar was not able to reliably calculate an implicit size, and could in certain scenarios enter an infinite loop due to a circular dependency between the items' sizes and the tabbar's size. Task-number: QTBUG-57858 Change-Id: Ie303cbc54247e87b0affc6bf32c7bf99acea4571 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-054-3/+9
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/quickcontrols2/quickcontrols2.pro Change-Id: If2f5e40487ba6515ba322f92380573727bdd6bc0
| * QQuickDial: account for when the wheel event is invertedJ-P Nurmi2017-01-051-1/+1
| | | | | | | | | | | | | | | | On macOS, the vertical scrolling with the wheel may be inverted, so we need to account for this when getting the y angle. Change-Id: Ia0f59beba905beff7b0cf12271a654c721bd5179 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * Account for when the wheel event is invertedAndy Shaw2017-01-041-1/+1
| | | | | | | | | | | | | | | | On macOS, the vertical scrolling with the wheel may be inverted, so we need to account for this when getting the y angle. Change-Id: Ie66b6ae68d2c733aaae5a837fc6f1a758a66cfb9 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Add screenshot snippets to OTHER_FILES to make them visible in CreatorJ-P Nurmi2017-01-021-0/+1
| | | | | | | | | | Change-Id: I6befd6e65a1abc38e0de4ed10abf41dad677744b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickMenu: fix Repeater supportJ-P Nurmi2017-01-021-1/+6
| | | | | | | | | | | | | | | | | | QQuickMenu had itemChildAdded() copied from QQuickContainer, but it did not actually install an item change listener on the content item so itemChildAdded() got never called. Change-Id: Idfe558c7055b9a3df124b1f009941c423ecef4bb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | qmldir: update the versions of the module dependenciesJ-P Nurmi2017-01-053-3/+3
| | | | | | | | | | Change-Id: Ia4675c1937df2bfa797bc8d0e34d4a9c58232588 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickDial: handle touch eventsJ-P Nurmi2017-01-032-0/+64
| | | | | | | | | | | | | | | | | | | | In comparison to handling synthesized mouse events, handling touch events has the advantage that it gives multi-touch support. That is, it is possible to move multiple dials at the same time, each handling its own touch point. Change-Id: Icabd971147f291fa4df00c6215c847d7976fda5f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Revise QQuickDial internalsJ-P Nurmi2017-01-031-36/+64
| | | | | | | | | | | | | | | | Move the press/move/release/ungrab logic from mouse event handlers to QQuickDialPrivate methods that can be re-used for touch events. Change-Id: I6e4594a3b532d6049117a37b0880e16cc22cb6cf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickDial: operate on floating point coordinatesJ-P Nurmi2017-01-031-14/+14
| | | | | | | | | | | | | | | | | | Store the press point as QPointF, and pass also QPointF to QQuickDialPrivate::positionAt(). This makes it easier to add touch event handling later. Change-Id: I256cc5039a7f52a0a04dffa800763898f321b100 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickRangeSlider: handle touch eventsJ-P Nurmi2017-01-032-25/+110
| | | | | | | | | | | | | | | | This makes it possible to interact with both handles and multiple sliders at the same time. Change-Id: Iba47b8ec31619b3dbec09dbc9ea176735f984e8b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Revise QQuickRangeSlider internalsJ-P Nurmi2017-01-031-95/+122
| | | | | | | | | | | | | | | | Move the press/move/release/ungrab logic from mouse event handlers to QQuickRangeSliderPrivate methods that can be re-used for touch events. Change-Id: I54a3ab8083b778e84759b14fbe74dd487bd8cf2e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickRangeSlider: operate on floating point coordinatesJ-P Nurmi2017-01-031-12/+12
| | | | | | | | | | | | | | | | Store the press point as QPointF, and pass also QPointF to positionAt(). This makes it easier to add touch event handling later. Change-Id: I9dfeb559cd623c6807cadfbf0e1ad00f62732884 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickSlider: handle touch eventsJ-P Nurmi2017-01-032-1/+61
| | | | | | | | | | | | | | | | | | | | In comparison to handling synthesized mouse events, handling touch events has the advantage that it gives multi-touch support. That is, it is possible to move multiple sliders at the same time, each handling its own touch point. Change-Id: I713307b0e6b5ee777496fc9ba68a5180d13a6aca Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Revise QQuickSlider internalsJ-P Nurmi2017-01-031-30/+59
| | | | | | | | | | | | | | | | Move the press/move/release/ungrab logic from mouse event handlers to QQuickSliderPrivate methods that can be re-used for touch events. Change-Id: Icfe4afc2974f07af17f2245723683233945026bd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickSlider: operate on floating point coordinatesJ-P Nurmi2017-01-031-10/+10
| | | | | | | | | | | | | | | | | | Store the press point as QPointF, and pass also QPointF to QQuickSliderPrivate::positionAt(). This makes it easier to add touch event handling later. Change-Id: I4555350002ff35cafe4d3260ba702b662286d1bd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add DelayButtonJ-P Nurmi2017-01-0219-1/+835
| | | | | | | | | | | | | | [ChangeLog][Controls][DelayButton] Added DelayButton. Change-Id: I94820dfb41ba9b90f0a29cda01ac476b54cf3de8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Revise QQuickAbstractButton internalsJ-P Nurmi2017-01-022-47/+74
| | | | | | | | | | | | | | | | Move the logic of press/move/release/cancel event handlers into methods in the private class, that can be reused or overridden from subclasses. Change-Id: Ie1f73e07c3389955c1d624e5b5a7e6bd240d0490 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-029-6/+8
|\| | | | | | | | | | | | | 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>
| * Material: Optimize "check" icon imagesKonstantin Ritt2016-12-283-0/+0
| | | | | | | | | | | | | | Size decrease: 7630 -> 6614 (bytes) Change-Id: I14eefbb60e0246dd260977acb01a79e4fb4c9584 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Material: set default ToolBar's spacing to 16Konstantin Ritt2016-12-281-0/+2
| | | | | | | | | | | | | | | | According to the Material design guidelines, it is an appropriate spacing value for most use cases Change-Id: Ie72c63b3ca2e1a5b7457a38b460cf2bc4acbecb2 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Bump style plugin dependencies to QtQuick.Controls 2.1Konstantin Ritt2016-12-283-3/+3
| | | | | | | | | | Change-Id: I316ec8deab791c0e8ebf0bbb9bb1a07e8aacad6b Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Doc: fix linking error to "Qt for OS X/macOS"J-P Nurmi2016-12-211-1/+1
| | | | | | | | | | Change-Id: I285ea1b331314c7b3927d7f8ab9f2c367e73ede5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SwipeDelegate: rename swipe.rebound to swipe.transitionJ-P Nurmi2016-12-216-29/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "rebound" name originates from Flickable::rebound, but for swipe delegate the transition is not only applied on release, but also when calling swipe.open() or swipe.close(). Therefore the "rebound" name feels a bit off in this context. Furthermore, this patch adds the missing docs and a changelog entry. [ChangeLog][Controls][SwipeDelegate] Added a swipe.transition property that holds the transition that is applied when a swipe is released, or swipe.open() or swipe.close() is called. Change-Id: Ic38ec850c64dd21b8d9deb08609172c6cb0f6d71 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickAbstractButton::buttonChange()J-P Nurmi2016-12-2112-44/+52
| | | | | | | | | | | | | | | | | | | | Merge the various virtuals to a single method that takes an enum value indicating the type of the change. This way we don't need to keep adding more and more virtuals, but can just extend the enum. The next in line is ButtonPressedChanged for the upcoming DelayButton. Change-Id: I40ebf170470790730217aba48c80daff8118dfba Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-12-209-0/+13
|\| | | | | | | | | | | | | | | Conflicts: src/imports/controls/material/DialogButtonBox.qml src/imports/controls/universal/DialogButtonBox.qml Change-Id: I16cbf9912a3526783c21a6f30996f83fce9e02c3
| * Merge remote-tracking branch 'origin/5.8.0' into 5.8J-P Nurmi2016-12-202-0/+2
| |\ | | | | | | | | | Change-Id: I8544063279de0ce12438e867e6b7767b00e72f11
| | * DialogButtonBox: add missing importv5.8.0-rc1J-P Nurmi2016-12-202-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | DialogButtonBox uses the Button-type from the QtQuick.Controls namespace, but did not import it. Change-Id: Ibe635461e280a8f8a78a52a2454fd8524a90a7e1 Task-number: QTBUG-57618 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Allow specifying a relative style path in qtquickcontrols2.confJ-P Nurmi2016-12-153-13/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The style path is resolved relative to the location of config file. Even though qtquickcontrols2.conf is normally located in the root of resources, Quick Designer uses QT_QUICK_CONTROLS_CONF to set a custom location for the preview, where the standard config location is not feasible. This patch extends the config and style lookup further by allowing to specify a relative path to a custom style for the Quick Designer preview. This is a cherry-pick of 5efd4b6a61498f0668d7367d620275367894140e, which fixes the style lookup so that QTBUG-57618 gets resolved. Change-Id: I7b656c42cb6aca0914ad20c94c7b527bea74cb16 Task-number: QTBUG-57618 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | StackView: don’t push duplicate itemsMitch Curtis2016-12-061-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | It doesn’t make sense to do this. Task-number: QTBUG-57266 Change-Id: I23f740356f2727a59aa0a68cb57d2c44edfb6046 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * | Remove unused doc imagesMitch Curtis2016-12-026-0/+0
| | | | | | | | | | | | | | | | | | | | | These controls have GIFs now. Change-Id: I5bb931666f169840ebdbe369c179c2d8ca612a21 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | | Doc: SwipeDelegate: document grouped signals with \qmlsignalJ-P Nurmi2016-12-201-29/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes them appear in the list of signals at the top of the documentation. The same was done for methods earlier. a506a0ac added the swipe.opened() and swipe.closed() signals but missed a changelog entry: [ChangeLog][Controls][SwipeDelegate] Added swipe.opened() and swipe.closed() signals, which are emitted when the delegate has been opened or closed by swipe, and the respective transition has finished. Change-Id: Iacd2befc691ab7ed8209736595d8ad98e86e637a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Add "Swipe to Remove" exampleJ-P Nurmi2016-12-201-1/+1
| | | | | | | | | | | | | | | Change-Id: Ibab960ddd073ddcdfbf2b6e4492882662c7021b5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Bump the QtQuick import versions in the stylesJ-P Nurmi2016-12-19147-147/+147
| | | | | | | | | | | | | | | | | | | | | Qt 5.9 == QtQuick 2.9 Change-Id: I7d4f749645011c4e78bdafe80824b83bd166e7c7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | qquickstackview_p.cpp: use correct includeLiang Qi2016-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qv4script_p.h is a temporary solution for qv4qmlcontext_p.h when qt5 meta repo doesn't have it. This amends ad20f3fc804d5aac9b727ce1ceda429264087218. Change-Id: I1d22ee63074842937bc7f72bca18a73e61964bb9 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | | qquickstackview_p.cpp: add missing includeJ-P Nurmi2016-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The actual header that should be included is qv4qmlcontext_p.h, but this is a new header in qtdeclarative that is not yet available in qt5 meta repo. Therefore we temporarily include another header to get an indirect include of qv4qmlcontext_p.h to fix the build break and get qt5 integrated. Change-Id: If12e5d7652a9710420f08fe4c6bff364f65656a4 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | SwipeDelegate: add swipe.opened() and swipe.closed() signalsJ-P Nurmi2016-12-142-32/+70
| | | | | | | | | | | | | | | | | | | | | | | | Emitted when the delegate has been opened or closed by swipe, _and_ the respective transition has finished. Change-Id: I8a242e24352d311fd8b41ceafd0a36619eff73f2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | SwipeDelegate: transition swipe.positionJ-P Nurmi2016-12-145-61/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the value of swipe.position jumped on mouse/touch release, or when open() or close() was called. Transitioning the swipe.position value smoothly to the target value makes it possible to use it as opacity/scale/etc. for the side items. Notice that this is backwards compatible with the old behavior. If no transition is set, the value jumps the same way it did before. In that case, Behavior on x makes the movement smooth. Task-number: QTBUG-57242 Change-Id: Id9c06b5b08fa73f2f575787e16dc6e20e4ccb545 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Material: prevent ripples from getting stuck in disabled stateJ-P Nurmi2016-12-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ripples don't trigger when the ripple item itself is disabled. This is used in SwipeDelegate to prevent ripples when a swipe is open. Now that swipe.position is transitioned, a release event comes before the swipe position reaches 0, so we must ensure that the wave exits even if it's not yet enabled. Change-Id: Ib4d58ff974262331898db2133e06624eb890f9ed Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Doc: tweak wording for the moved() signalsJ-P Nurmi2016-12-022-2/+2
| | | | | | | | | | | | | | | Change-Id: I932ed06617cf237c20a1473f4f4270898ad83337 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Add QQuickSpinBox::valueModified()J-P Nurmi2016-12-023-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another name candidate was valueEdited(), but it was left available in case we want to have the respective signal for text editing in the future. [ChangeLog][Controls][SpinBox] Added a valueModified() signal that is emitted whenever the value of a spin box has been interactively modified by the user by using either touch, mouse, wheel, or keys. Task-number: QTBUG-57203 Change-Id: I705c7e63d23235f51d401abf27f3458f8a5b0589 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Add AbstractButton::toggled() signalJ-P Nurmi2016-12-026-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][AbstractButton] Added a toggled() signal that is emitted whenever a checkable button is interactively toggled by the user by using either touch, mouse, or keys. Task-number: QTBUG-57203 Change-Id: If0b0d71d19cbed00f04d8a4309894a055c4254c6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-12-0110-114/+476
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/SpinBox.qml src/imports/controls/material/SpinBox.qml src/imports/controls/universal/SpinBox.qml tests/auto/controls/data/tst_swipedelegate.qml Change-Id: Ie1d1f487890f0a9f80a00df5e813e1d2e8303fe5
| * | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-12-011-0/+15
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/controls/data/tst_swipedelegate.qml Change-Id: I15bd0366f1ad0ce35f1dce6d790da6dd5f0221f9
| | * | SwipeDelegate: fix animations when releasing from a drag5.7Mitch Curtis2016-11-301-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9812a9c changed the order in which the pressed and position state is set. Before, when releasing after swiping, it would be: set pressed to false => set position After 9812a9c, it became: set position => set pressed to false The original order is necessary to ensure that animations can rely on being enabled *before* position changes, as their enabled expression typically looks something like this: enabled: !control.down This patch duplicates the contents of QQuickAbstractButton::mouseUngrabEvent() for now, with a TODO comment to ensure that it's moved into a private helper that we can call later on. Task-number: QTBUG-57350 Change-Id: I31af7a665fb2d0e37548df31560ed7bbb0c3cadb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * | | Allow specifying a relative style path in qtquickcontrols2.confJ-P Nurmi2016-11-303-13/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The style path is resolved relative to the location of config file. Even though qtquickcontrols2.conf is normally located in the root of resources, Quick Designer uses QT_QUICK_CONTROLS_CONF to set a custom location for the preview, where the standard config location is not feasible. This patch extends the config and style lookup further by allowing to specify a relative path to a custom style for the Quick Designer preview. Change-Id: Iad9c459421eefbf7a5bcbedfea59f5f16a1d3a39 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>