Merge lp:~tpeeters/ubuntu-ui-toolkit/fix-header-ap-landing into lp:ubuntu-ui-toolkit

Proposed by Tim Peeters
Status: Superseded
Proposed branch: lp:~tpeeters/ubuntu-ui-toolkit/fix-header-ap-landing
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 19519 lines (+13595/-1705)
235 files modified
components.api (+148/-83)
debian/changelog (+101/-0)
debian/control (+24/-0)
debian/libubuntugestures-dev.install (+28/-0)
debian/libubuntugestures.install (+1/-0)
documentation/overview.qdoc (+7/-0)
examples/ubuntu-ui-toolkit-gallery/About.qml (+2/-3)
examples/ubuntu-ui-toolkit-gallery/BottomEdgePage.qml (+158/-14)
examples/ubuntu-ui-toolkit-gallery/Gallery.pro (+1/-0)
examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml (+8/-8)
examples/ubuntu-ui-toolkit-gallery/ListItemWithLabel.qml (+1/-1)
examples/ubuntu-ui-toolkit-gallery/MainPage.qml (+106/-85)
examples/ubuntu-ui-toolkit-gallery/Sections.qml (+7/-1)
examples/ubuntu-ui-toolkit-gallery/SwipeAreaPage.qml (+144/-0)
examples/ubuntu-ui-toolkit-gallery/Template.qml (+18/-7)
examples/ubuntu-ui-toolkit-gallery/TemplateRow.qml (+1/-1)
examples/ubuntu-ui-toolkit-gallery/WidgetsModel.qml (+7/-2)
examples/ubuntu-ui-toolkit-gallery/gallery (+2/-2)
examples/ubuntu-ui-toolkit-gallery/gallery-logging.config (+5/-0)
examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.pro (+3/-2)
export_modules_dir.sh (+4/-2)
features/ubuntu_qml_plugin.prf (+14/-0)
features/ubuntu_qt_module.prf (+22/-0)
gallery.sh (+0/-2)
src/Ubuntu/Components/1.2/DraggingArea.qml (+2/-2)
src/Ubuntu/Components/1.2/MainViewBase.qml (+4/-4)
src/Ubuntu/Components/1.2/Slider.qml (+0/-1)
src/Ubuntu/Components/1.2/TextArea.qml (+1/-2)
src/Ubuntu/Components/1.2/mathUtils.js (+0/-61)
src/Ubuntu/Components/1.2/scrollbarUtils.js (+0/-129)
src/Ubuntu/Components/1.3/AdaptivePageLayout.qml (+82/-8)
src/Ubuntu/Components/1.3/AnimatedItem.qml (+2/-3)
src/Ubuntu/Components/1.3/AppHeader.qml (+0/-1)
src/Ubuntu/Components/1.3/BottomEdgeHint.qml (+0/-155)
src/Ubuntu/Components/1.3/Button.qml (+0/-1)
src/Ubuntu/Components/1.3/CheckBox.qml (+0/-1)
src/Ubuntu/Components/1.3/DraggingArea.qml (+1/-0)
src/Ubuntu/Components/1.3/OptionSelector.qml (+0/-1)
src/Ubuntu/Components/1.3/Page.qdoc (+0/-132)
src/Ubuntu/Components/1.3/Page.qml (+100/-5)
src/Ubuntu/Components/1.3/PageHeader.qml (+90/-18)
src/Ubuntu/Components/1.3/PageStack.qml (+18/-0)
src/Ubuntu/Components/1.3/PageTreeNode.qml (+0/-6)
src/Ubuntu/Components/1.3/PageWrapper.qml (+2/-2)
src/Ubuntu/Components/1.3/ProgressBar.qml (+0/-1)
src/Ubuntu/Components/1.3/PullToRefresh.qml (+0/-1)
src/Ubuntu/Components/1.3/Scrollbar.qml (+0/-1)
src/Ubuntu/Components/1.3/Sections.qml (+0/-1)
src/Ubuntu/Components/1.3/Slider.qml (+3/-4)
src/Ubuntu/Components/1.3/TabBar.qml (+0/-1)
src/Ubuntu/Components/1.3/TextArea.qml (+9/-2)
src/Ubuntu/Components/1.3/TextCursor.qml (+0/-1)
src/Ubuntu/Components/1.3/TextField.qml (+14/-2)
src/Ubuntu/Components/1.3/TextInputPopover.qml (+0/-1)
src/Ubuntu/Components/1.3/Toolbar.qml (+0/-1)
src/Ubuntu/Components/1.3/ToolbarButton.qml (+0/-1)
src/Ubuntu/Components/1.3/mathUtils.js (+0/-61)
src/Ubuntu/Components/ComponentModule.pro (+1/-6)
src/Ubuntu/Components/ListItems/1.3/ItemSelector.qml (+0/-1)
src/Ubuntu/Components/ListItems/1.3/ProgressionVisual.qml (+0/-1)
src/Ubuntu/Components/Pickers/1.3/DatePicker.qml (+0/-1)
src/Ubuntu/Components/Pickers/1.3/Dialer.qml (+0/-1)
src/Ubuntu/Components/Pickers/1.3/DialerHand.qml (+0/-1)
src/Ubuntu/Components/Pickers/1.3/Picker.qml (+0/-1)
src/Ubuntu/Components/Pickers/1.3/PickerDelegate.qml (+0/-1)
src/Ubuntu/Components/Popups/1.2/Dialog.qml (+4/-1)
src/Ubuntu/Components/Popups/1.3/Dialog.qml (+4/-2)
src/Ubuntu/Components/Popups/1.3/Popover.qml (+0/-1)
src/Ubuntu/Components/Popups/1.3/SheetBase.qml (+0/-1)
src/Ubuntu/Components/Styles/1.3/PageHeaderStyle.qml (+1/-1)
src/Ubuntu/Components/Styles/Styles.pro (+0/-4)
src/Ubuntu/Components/Themes/Ambiance/1.2/OptionSelectorStyle.qml (+1/-0)
src/Ubuntu/Components/Themes/Ambiance/1.2/ScrollbarStyle.qml (+88/-11)
src/Ubuntu/Components/Themes/Ambiance/1.3/ActionBarStyle.qml (+2/-2)
src/Ubuntu/Components/Themes/Ambiance/1.3/ActivityIndicatorStyle.qml (+1/-1)
src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeHintStyle.qml (+149/-0)
src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeStyle.qml (+118/-0)
src/Ubuntu/Components/Themes/Ambiance/1.3/OptionSelectorStyle.qml (+1/-0)
src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml (+10/-0)
src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeaderStyle.qml (+10/-3)
src/Ubuntu/Components/Themes/Ambiance/1.3/ScrollbarStyle.qml (+88/-11)
src/Ubuntu/Components/Themes/Ambiance/1.3/scrollbarUtils.js (+0/-139)
src/Ubuntu/Components/Themes/Ambiance/Ambiance.pro (+5/-1)
src/Ubuntu/Components/Themes/Ambiance/qmldir (+2/-1)
src/Ubuntu/Components/plugin/gestures/CandidateInactivityTimer.cpp (+46/-0)
src/Ubuntu/Components/plugin/gestures/CandidateInactivityTimer.h (+52/-0)
src/Ubuntu/Components/plugin/gestures/damper.cpp (+24/-0)
src/Ubuntu/Components/plugin/gestures/damper.h (+89/-0)
src/Ubuntu/Components/plugin/gestures/ubuntugesturesqmlglobal.h (+24/-0)
src/Ubuntu/Components/plugin/gestures/ucswipearea.cpp (+958/-0)
src/Ubuntu/Components/plugin/gestures/ucswipearea.h (+98/-0)
src/Ubuntu/Components/plugin/gestures/ucswipearea_p.h (+157/-0)
src/Ubuntu/Components/plugin/i18n.cpp (+6/-0)
src/Ubuntu/Components/plugin/plugin.cpp (+12/-1)
src/Ubuntu/Components/plugin/plugin.pri (+22/-4)
src/Ubuntu/Components/plugin/privates/threelabelsslot_p.cpp (+3/-3)
src/Ubuntu/Components/plugin/quickutils.cpp (+2/-1)
src/Ubuntu/Components/plugin/quickutils.h (+8/-0)
src/Ubuntu/Components/plugin/ucabstractbutton.cpp (+1/-0)
src/Ubuntu/Components/plugin/ucaction.h (+6/-5)
src/Ubuntu/Components/plugin/ucbottomedge.cpp (+1077/-0)
src/Ubuntu/Components/plugin/ucbottomedge.h (+120/-0)
src/Ubuntu/Components/plugin/ucbottomedge_p.h (+112/-0)
src/Ubuntu/Components/plugin/ucbottomedgehint.cpp (+410/-0)
src/Ubuntu/Components/plugin/ucbottomedgehint.h (+100/-0)
src/Ubuntu/Components/plugin/ucbottomedgeregion.cpp (+253/-0)
src/Ubuntu/Components/plugin/ucbottomedgeregion.h (+78/-0)
src/Ubuntu/Components/plugin/ucbottomedgestyle.cpp (+65/-0)
src/Ubuntu/Components/plugin/ucbottomedgestyle.h (+60/-0)
src/Ubuntu/Components/plugin/ucheader.cpp (+7/-2)
src/Ubuntu/Components/plugin/ucimportversionchecker_p.cpp (+58/-0)
src/Ubuntu/Components/plugin/ucimportversionchecker_p.h (+34/-0)
src/Ubuntu/Components/plugin/uclabel.cpp (+1/-8)
src/Ubuntu/Components/plugin/uclabel.h (+1/-2)
src/Ubuntu/Components/plugin/uclistitem.cpp (+64/-10)
src/Ubuntu/Components/plugin/uclistitem.h (+4/-0)
src/Ubuntu/Components/plugin/uclistitem_p.h (+1/-0)
src/Ubuntu/Components/plugin/uclistitemlayout.cpp (+20/-11)
src/Ubuntu/Components/plugin/uclistitemlayout.h (+2/-1)
src/Ubuntu/Components/plugin/ucmathutils.cpp (+80/-0)
src/Ubuntu/Components/plugin/ucmathutils.h (+40/-0)
src/Ubuntu/Components/plugin/ucqquickimageextension.cpp (+1/-1)
src/Ubuntu/Components/plugin/ucslotslayout.cpp (+10/-2)
src/Ubuntu/Components/plugin/ucslotslayout.h (+3/-2)
src/Ubuntu/Components/plugin/ucstyleditembase.cpp (+53/-39)
src/Ubuntu/Components/plugin/ucstyleditembase.h (+18/-4)
src/Ubuntu/Components/plugin/ucstyleditembase_p.h (+7/-3)
src/Ubuntu/Components/plugin/uctheme.cpp (+36/-49)
src/Ubuntu/Components/plugin/uctheme.h (+7/-4)
src/Ubuntu/Components/plugin/ucthemingextension.cpp (+122/-139)
src/Ubuntu/Components/plugin/ucthemingextension.h (+11/-56)
src/Ubuntu/Components/plugin/ucubuntushape.cpp (+27/-23)
src/Ubuntu/Components/plugin/ucubuntushape.h (+8/-4)
src/Ubuntu/Components/plugin/unixsignalhandler_p.cpp (+1/-1)
src/Ubuntu/Components/plugin/unixsignalhandler_p.h (+1/-1)
src/Ubuntu/Components/qmldir (+0/-6)
src/Ubuntu/Test/UbuntuTestCase.qml (+5/-0)
src/Ubuntu/Test/plugin/plugin.pri (+4/-2)
src/Ubuntu/Test/plugin/testplugin.cpp (+10/-0)
src/Ubuntu/Test/plugin/ucmousetouchadaptor.cpp (+198/-0)
src/Ubuntu/Test/plugin/ucmousetouchadaptor.h (+60/-0)
src/Ubuntu/Test/plugin/uctestcase.cpp (+2/-1)
src/Ubuntu/Test/plugin/uctestcase.h (+1/-1)
src/Ubuntu/Test/plugin/uctestextras.cpp (+141/-3)
src/Ubuntu/Test/plugin/uctestextras.h (+13/-1)
src/Ubuntu/UbuntuGestures/UbuntuGestures.pro (+31/-0)
src/Ubuntu/UbuntuGestures/candidateinactivitytimer.cpp (+46/-0)
src/Ubuntu/UbuntuGestures/candidateinactivitytimer.h (+51/-0)
src/Ubuntu/UbuntuGestures/debughelpers.cpp (+95/-0)
src/Ubuntu/UbuntuGestures/debughelpers.h (+31/-0)
src/Ubuntu/UbuntuGestures/pool.h (+132/-0)
src/Ubuntu/UbuntuGestures/timer.cpp (+152/-0)
src/Ubuntu/UbuntuGestures/timer.h (+117/-0)
src/Ubuntu/UbuntuGestures/timesource.cpp (+47/-0)
src/Ubuntu/UbuntuGestures/timesource.h (+62/-0)
src/Ubuntu/UbuntuGestures/touchownershipevent.cpp (+35/-0)
src/Ubuntu/UbuntuGestures/touchownershipevent.h (+50/-0)
src/Ubuntu/UbuntuGestures/touchregistry.cpp (+520/-0)
src/Ubuntu/UbuntuGestures/touchregistry.h (+206/-0)
src/Ubuntu/UbuntuGestures/ubuntugesturesglobal.h (+23/-0)
src/Ubuntu/UbuntuGestures/unownedtouchevent.cpp (+39/-0)
src/Ubuntu/UbuntuGestures/unownedtouchevent.h (+45/-0)
src/src.pro (+18/-4)
sync.profile (+29/-0)
tests/apicheck/apicheck.cpp (+103/-60)
tests/apicheck/test/Extinct/Animals/test.qml (+2/-1)
tests/apicheck/test/components.api (+1/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_actionbar.py (+2/-2)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_flickable.py (+3/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py (+2/-14)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py (+41/-5)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py (+0/-14)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_sections.py (+2/-4)
tests/license/checklicense.sh (+1/-1)
tests/qmlapicheck.sh (+1/-1)
tests/tests.pro (+1/-1)
tests/unit/add_makecheck.pri (+1/-1)
tests/unit/add_qmlmakecheck.pri (+1/-1)
tests/unit/runtest.sh (+2/-0)
tests/unit/tst_components/tst_math_utils.qml (+63/-0)
tests/unit_x11/add_makecheck.pri (+1/-1)
tests/unit_x11/add_qmlmakecheck.pri (+1/-1)
tests/unit_x11/test-include.pri (+1/-1)
tests/unit_x11/tst_bottomedge/AddCustomRegionOnCompleted.qml (+41/-0)
tests/unit_x11/tst_bottomedge/AddCustomRegionOwnedByOtherBottomEdge.qml (+39/-0)
tests/unit_x11/tst_bottomedge/AddCustomRegionUsingDataProperty.qml (+33/-0)
tests/unit_x11/tst_bottomedge/AddCustomRegionUsingRegionsProperty.qml (+33/-0)
tests/unit_x11/tst_bottomedge/AlternateDefaultRegionContent.qml (+53/-0)
tests/unit_x11/tst_bottomedge/AlternateRegionContent.qml (+47/-0)
tests/unit_x11/tst_bottomedge/AutoCollapseInPageHeader.qml (+45/-0)
tests/unit_x11/tst_bottomedge/AutoCollapseInPageWithPageHeader.qml (+44/-0)
tests/unit_x11/tst_bottomedge/BottomEdgeInItem.qml (+36/-0)
tests/unit_x11/tst_bottomedge/ClearCustomRegions.qml (+42/-0)
tests/unit_x11/tst_bottomedge/Defaults.qml (+28/-0)
tests/unit_x11/tst_bottomedge/DifferentSizes.qml (+34/-0)
tests/unit_x11/tst_bottomedge/LastItem.qml (+46/-0)
tests/unit_x11/tst_bottomedge/LeanActiveRegionChange.qml (+45/-0)
tests/unit_x11/tst_bottomedge/OverlappingRegions.qml (+46/-0)
tests/unit_x11/tst_bottomedge/ShorterBottomEdge.qml (+39/-0)
tests/unit_x11/tst_bottomedge/UncoveredByRegion.qml (+48/-0)
tests/unit_x11/tst_bottomedge/tst_bottomedge.cpp (+854/-0)
tests/unit_x11/tst_bottomedge/tst_bottomedge.pro (+24/-0)
tests/unit_x11/tst_components/tst_bottomedgehint.qml (+188/-20)
tests/unit_x11/tst_components/tst_focus.qml (+4/-3)
tests/unit_x11/tst_components/tst_header.qml (+54/-2)
tests/unit_x11/tst_components/tst_listitem_extras.qml (+81/-0)
tests/unit_x11/tst_components/tst_multicolumnheader.qml (+113/-36)
tests/unit_x11/tst_components/tst_pageheader.qml (+73/-3)
tests/unit_x11/tst_components/tst_pagestack.qml (+29/-20)
tests/unit_x11/tst_components/tst_slotslayout.qml (+30/-1)
tests/unit_x11/tst_components/tst_textinput_common.qml (+22/-1)
tests/unit_x11/tst_components/tst_textinput_common13.qml (+70/-1)
tests/unit_x11/tst_deprecated_theme_engine/tst_deprecated_theme_engine.cpp (+1/-1)
tests/unit_x11/tst_subtheming/OtherVersion.qml (+25/-0)
tests/unit_x11/tst_subtheming/StyledItemAppThemeFallback.qml (+0/-24)
tests/unit_x11/tst_subtheming/StyledItemAppThemeVersioned.qml (+0/-1)
tests/unit_x11/tst_subtheming/StyledItemFallback.qml (+0/-24)
tests/unit_x11/tst_subtheming/StyledItemV12.qml (+4/-4)
tests/unit_x11/tst_subtheming/StyledItemV13.qml (+0/-1)
tests/unit_x11/tst_subtheming/tst_subtheming.cpp (+45/-33)
tests/unit_x11/tst_subtheming/tst_subtheming.pro (+2/-3)
tests/unit_x11/tst_swipearea/DownwardsLauncher.qml (+72/-0)
tests/unit_x11/tst_swipearea/GestureTest.cpp (+140/-0)
tests/unit_x11/tst_swipearea/GestureTest.h (+92/-0)
tests/unit_x11/tst_swipearea/LeftwardsLauncher.qml (+76/-0)
tests/unit_x11/tst_swipearea/RightwardsLauncher.qml (+76/-0)
tests/unit_x11/tst_swipearea/UpwardsLauncher.qml (+76/-0)
tests/unit_x11/tst_swipearea/tst_swipearea.cpp (+1305/-0)
tests/unit_x11/tst_swipearea/tst_swipearea.pro (+13/-0)
tests/unit_x11/tst_swipearea/tst_swipearea.qml (+77/-0)
tests/unit_x11/tst_touchregistry/tst_TouchRegistry.cpp (+915/-0)
tests/unit_x11/tst_touchregistry/tst_touchregistry.pro (+6/-0)
tests/unit_x11/unit_x11.pro (+4/-1)
ubuntu-sdk.pro (+4/-6)
ubuntu-ui-toolkit-launcher/launcher.cpp (+4/-3)
To merge this branch: bzr merge lp:~tpeeters/ubuntu-ui-toolkit/fix-header-ap-landing
Reviewer Review Type Date Requested Status
Ubuntu SDK team Pending
Review via email: mp+279781@code.launchpad.net

Description of the change

Fix several header CPO related issues.

To post a comment you must log in.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'components.api'
--- components.api 2015-10-15 14:17:25 +0000
+++ components.api 2015-12-07 14:19:44 +0000
@@ -31,7 +31,7 @@
31 Real31 Real
32 String32 String
33Ubuntu.Components.ActionBar 1.3: StyledItem33Ubuntu.Components.ActionBar 1.3: StyledItem
34 readonly property Action actions34 property list<Action> actions
35 property Component delegate35 property Component delegate
36 property int numberOfSlots36 property int numberOfSlots
37Ubuntu.Components.Styles.ActionBarStyle 1.3: Item37Ubuntu.Components.Styles.ActionBarStyle 1.3: Item
@@ -41,7 +41,7 @@
41 property url overflowIconSource41 property url overflowIconSource
42 property string overflowText42 property string overflowText
43Ubuntu.Components.ActionContext 1.0 0.1: QtObject43Ubuntu.Components.ActionContext 1.0 0.1: QtObject
44 default readonly property Action actions44 default property list<Action> actions
45 property bool active45 property bool active
46 function addAction(Action action)46 function addAction(Action action)
47 function removeAction(Action action)47 function removeAction(Action action)
@@ -54,15 +54,15 @@
54 function trigger()54 function trigger()
55 property string text55 property string text
56Ubuntu.Components.ActionList 1.0 0.1: QtObject56Ubuntu.Components.ActionList 1.0 0.1: QtObject
57 readonly property Action actions57 property list<Action> actions
58 default readonly property Action children58 default property list<Action> children
59Ubuntu.Components.ActionList 1.3: QtObject59Ubuntu.Components.ActionList 1.3: QtObject
60 readonly property Action actions60 property list<Action> actions
61 default readonly property Action children61 default property list<Action> children
62Ubuntu.Components.ActionManager 1.0 0.1: QtObject62Ubuntu.Components.ActionManager 1.0 0.1: QtObject
63 default readonly property Action actions63 default property list<Action> actions
64 readonly property ActionContext globalContext64 readonly property ActionContext globalContext
65 readonly property ActionContext localContexts65 property list<ActionContext> localContexts
66 signal quit()66 signal quit()
67 function addAction(Action action)67 function addAction(Action action)
68 function removeAction(Action action)68 function removeAction(Action action)
@@ -84,7 +84,7 @@
84 property bool running84 property bool running
85Ubuntu.Components.AdaptivePageLayout 1.3: PageTreeNode85Ubuntu.Components.AdaptivePageLayout 1.3: PageTreeNode
86 readonly property int columns86 readonly property int columns
87 readonly property PageColumnsLayout layouts87 property list<PageColumnsLayou> layouts
88 function var addPageToCurrentColumn(var sourcePage, var page, var properties)88 function var addPageToCurrentColumn(var sourcePage, var page, var properties)
89 function var addPageToNextColumn(var sourcePage, var page, var properties)89 function var addPageToNextColumn(var sourcePage, var page, var properties)
90 function var removePages(var page)90 function var removePages(var page)
@@ -155,7 +155,7 @@
155 property bool required155 property bool required
156 property QStringList valueNames156 property QStringList valueNames
157Ubuntu.Components.Arguments 1.0 0.1: QtObject157Ubuntu.Components.Arguments 1.0 0.1: QtObject
158 default readonly property Argument arguments158 default property list<Argument> arguments
159 property Argument defaultArgument159 property Argument defaultArgument
160 readonly property bool error160 readonly property bool error
161 readonly property string errorMessage161 readonly property string errorMessage
@@ -175,11 +175,61 @@
175 property var icon175 property var icon
176 property bool iconFrame176 property bool iconFrame
177 property bool progression177 property bool progression
178Ubuntu.Components.BottomEdgeHint 1.3: Item178Ubuntu.Components.BottomEdge 1.3: StyledItem
179 property string iconName179 readonly property BottomEdgeRegion activeRegion
180 property url iconSource180 property Component contentComponent
181 readonly property Item contentItem
182 property url contentUrl
183 readonly property DragDirection dragDirection
184 readonly property double dragProgress
185 readonly property BottomEdgeHint hint
186 signal dragProgressChanged(double dragProgress)
187 signal dragDirectionChanged(BottomEdge.DragDirection direction)
188 signal statusChanged(BottomEdge.Status status)
189 signal contentChanged(url url)
190 signal contentComponentChanged(Component component)
191 signal activeRegionChanged(BottomEdgeRegion activeRegion)
192 signal commitStarted()
193 signal commitCompleted()
194 signal collapseStarted()
195 signal collapseCompleted()
196 function commit()
197 function collapse()
198 property list<BottomEdgeRegion> regions
199 readonly property Status status
200Ubuntu.Components.BottomEdge.DragDirection: Enum
201 Downwards
202 Undefined
203 Upwards
204Ubuntu.Components.BottomEdge.Status: Enum
205 Committed
206 Hidden
207 Revealed
208Ubuntu.Components.BottomEdgeHint 1.3: ActionItem
209 property int deactivateTimeout
210 property Flickable flickable
181 signal clicked()211 signal clicked()
182 property string text212 property Status status
213 readonly property SwipeArea swipeArea
214Ubuntu.Components.BottomEdgeHint.Status: Enum
215 Active
216 Hidden
217 Inactive
218 Locked
219Ubuntu.Components.BottomEdgeRegion 1.3: QtObject
220 property Component contentComponent
221 property url contentUrl
222 property bool enabled
223 property double from
224 signal entered()
225 signal exited()
226 signal dragEnded()
227 property double to
228Ubuntu.Components.Styles.BottomEdgeStyle 1.3: Item
229 property Item contentItem
230 property Item panel
231 property Animation panelAnimation
232 property double revealThreshold
183Ubuntu.Components.Button 1.0 0.1: AbstractButton233Ubuntu.Components.Button 1.0 0.1: AbstractButton
184 property color color234 property color color
185 property QFont font235 property QFont font
@@ -221,14 +271,14 @@
221Ubuntu.Components.ColorUtils 0.1 1.0271Ubuntu.Components.ColorUtils 0.1 1.0
222Ubuntu.Components.ComboButton 1.1: Button272Ubuntu.Components.ComboButton 1.1: Button
223 property double collapsedHeight273 property double collapsedHeight
224 default readonly property QtObject comboList274 default property list<QtObject> comboList
225 readonly property double comboListHeight275 readonly property double comboListHeight
226 property color dropdownColor276 property color dropdownColor
227 property bool expanded277 property bool expanded
228 property double expandedHeight278 property double expandedHeight
229Ubuntu.Components.ComboButton 1.3: Button279Ubuntu.Components.ComboButton 1.3: Button
230 property double collapsedHeight280 property double collapsedHeight
231 default readonly property QtObject comboList281 default property list<QtObject> comboList
232 readonly property double comboListHeight282 readonly property double comboListHeight
233 property color dropdownColor283 property color dropdownColor
234 property bool expanded284 property bool expanded
@@ -318,7 +368,7 @@
318 signal closeClicked()368 signal closeClicked()
319 signal doneClicked()369 signal doneClicked()
320Ubuntu.Components.Pickers.Dialer 1.0 0.1: StyledItem370Ubuntu.Components.Pickers.Dialer 1.0 0.1: StyledItem
321 readonly property QtObject centerContent371 property list<QtObject> centerContent
322 readonly property Item centerItem372 readonly property Item centerItem
323 property double handSpace373 property double handSpace
324 readonly property var hands374 readonly property var hands
@@ -327,7 +377,7 @@
327 property double minimumValue377 property double minimumValue
328 property double size378 property double size
329Ubuntu.Components.Pickers.Dialer 1.3: StyledItem379Ubuntu.Components.Pickers.Dialer 1.3: StyledItem
330 readonly property QtObject centerContent380 property list<QtObject> centerContent
331 readonly property Item centerItem381 readonly property Item centerItem
332 property double handSpace382 property double handSpace
333 readonly property var hands383 readonly property var hands
@@ -339,18 +389,18 @@
339 readonly property Dialer dialer389 readonly property Dialer dialer
340 property DialerHandGroup hand390 property DialerHandGroup hand
341 readonly property int index391 readonly property int index
342 default readonly property QtObject overlay392 default property list<QtObject> overlay
343 property double value393 property double value
344Ubuntu.Components.Pickers.DialerHand 1.3: StyledItem394Ubuntu.Components.Pickers.DialerHand 1.3: StyledItem
345 readonly property Dialer dialer395 readonly property Dialer dialer
346 property DialerHandGroup hand396 property DialerHandGroup hand
347 readonly property int index397 readonly property int index
348 default readonly property QtObject overlay398 default property list<QtObject> overlay
349 property double value399 property double value
350Ubuntu.Components.Popups.Dialog 1.0 0.1: PopupBase400Ubuntu.Components.Popups.Dialog 1.0 0.1: PopupBase
351 property Item caller401 property Item caller
352 property double callerMargin402 property double callerMargin
353 default readonly property QtObject contents403 default property list<QtObject> contents
354 property double edgeMargins404 property double edgeMargins
355 property bool modal405 property bool modal
356 property Item pointerTarget406 property Item pointerTarget
@@ -359,34 +409,16 @@
359Ubuntu.Components.Popups.Dialog 1.3: PopupBase409Ubuntu.Components.Popups.Dialog 1.3: PopupBase
360 property Item caller410 property Item caller
361 property double callerMargin411 property double callerMargin
362 default readonly property QtObject contents412 default property list<QtObject> contents
363 property double edgeMargins413 property double edgeMargins
364 property bool modal414 property bool modal
365 property Item pointerTarget415 property Item pointerTarget
366 property string text416 property string text
367 property string title417 property string title
368Ubuntu.Components.ListItems.Divider 1.0 0.1: QQuickImageBase418Ubuntu.Components.ListItems.Divider 1.0 0.1: QQuickImageBase
369 property FillMode fillMode
370 property HAlignment horizontalAlignment
371 signal horizontalAlignmentChanged(HAlignment alignment)
372 signal verticalAlignmentChanged(VAlignment alignment)
373 signal mipmapChanged(bool )
374 property bool mipmap
375 readonly property double paintedHeight
376 readonly property double paintedWidth
377 property VAlignment verticalAlignment
378Ubuntu.Components.ListItems.Divider 1.3: QQuickImageBase419Ubuntu.Components.ListItems.Divider 1.3: QQuickImageBase
379 property FillMode fillMode
380 property HAlignment horizontalAlignment
381 signal horizontalAlignmentChanged(HAlignment alignment)
382 signal verticalAlignmentChanged(VAlignment alignment)
383 signal mipmapChanged(bool )
384 property bool mipmap
385 readonly property double paintedHeight
386 readonly property double paintedWidth
387 property VAlignment verticalAlignment
388Ubuntu.Components.ListItems.Empty 1.0 0.1: AbstractButton420Ubuntu.Components.ListItems.Empty 1.0 0.1: AbstractButton
389 readonly property Item backgroundIndicator421 property list<Item> backgroundIndicator
390 property bool confirmRemoval422 property bool confirmRemoval
391 readonly property ThinDivider divider423 readonly property ThinDivider divider
392 property bool highlightWhenPressed424 property bool highlightWhenPressed
@@ -398,7 +430,7 @@
398 readonly property string swipingState430 readonly property string swipingState
399 readonly property bool waitingConfirmationForRemoval431 readonly property bool waitingConfirmationForRemoval
400Ubuntu.Components.ListItems.Empty 1.3: AbstractButton432Ubuntu.Components.ListItems.Empty 1.3: AbstractButton
401 readonly property Item backgroundIndicator433 property list<Item> backgroundIndicator
402 property bool confirmRemoval434 property bool confirmRemoval
403 readonly property ThinDivider divider435 readonly property ThinDivider divider
404 property bool highlightWhenPressed436 property bool highlightWhenPressed
@@ -510,7 +542,7 @@
510 XxSmall542 XxSmall
511Ubuntu.Layouts.Layouts 1.0 0.1: Item543Ubuntu.Layouts.Layouts 1.0 0.1: Item
512 readonly property string currentLayout544 readonly property string currentLayout
513 readonly property ConditionalLayout layouts545 property list<ConditionalLayout> layouts
514Ubuntu.Components.ListItem 1.3 1.2: StyledItem546Ubuntu.Components.ListItem 1.3 1.2: StyledItem
515 property Action action547 property Action action
516 property color color548 property color color
@@ -523,18 +555,19 @@
523 property color highlightColor555 property color highlightColor
524 readonly property bool highlighted556 readonly property bool highlighted
525 property ListItemActions leadingActions557 property ListItemActions leadingActions
526 readonly property Item listItemChildren558 property list<Item> listItemChildren
527 default readonly property QtObject listItemData559 default property list<QtObject> listItemData
528 signal clicked()560 signal clicked()
529 signal pressAndHold()561 signal pressAndHold()
530 signal contentMovementStarted()562 signal contentMovementStarted()
531 signal contentMovementEnded()563 signal contentMovementEnded()
532 property bool selectMode564 property bool selectMode
533 property bool selected565 property bool selected
566 property bool swipeEnabled 1.3
534 property ListItemActions trailingActions567 property ListItemActions trailingActions
535Ubuntu.Components.ListItemActions 1.2: QtObject568Ubuntu.Components.ListItemActions 1.2: QtObject
536 readonly property Action actions569 property list<Action> actions
537 default readonly property QtObject data570 default property list<QtObject> data
538 property Component delegate571 property Component delegate
539Ubuntu.Components.ListItemDrag 1.2: QtObject572Ubuntu.Components.ListItemDrag 1.2: QtObject
540 property bool accept573 property bool accept
@@ -572,27 +605,31 @@
572 Second605 Second
573Ubuntu.Components.MainView 1.0 0.1: MainViewBase606Ubuntu.Components.MainView 1.0 0.1: MainViewBase
574 property bool automaticOrientation607 property bool automaticOrientation
575 default readonly property QtObject contentsItem608 default property list<QtObject> contentsItem
576 property bool useDeprecatedToolbar609 property bool useDeprecatedToolbar
577Ubuntu.Components.MainView 1.2: MainViewBase610Ubuntu.Components.MainView 1.2: MainViewBase
578 property bool automaticOrientation611 property bool automaticOrientation
579 default readonly property QtObject contentsItem612 default property list<QtObject> contentsItem
580Ubuntu.Components.MainView 1.3: MainViewBase613Ubuntu.Components.MainView 1.3: MainViewBase
581 property bool automaticOrientation614 property bool automaticOrientation
582 default readonly property QtObject contentsItem615 default property list<QtObject> contentsItem
583Ubuntu.Components.MathUtils 0.1 1.0 1.3616Ubuntu.Components.MathUtils 1.0 0.1: QtObject singleton
617 function double clamp(double x, double min, double max)
618 function double lerp(double delta, double from, double to)
619 function double projectValue(double x, double xmin, double xmax, double ymin, double ymax)
620 function double clampAndProject(double x, double xmin, double xmax, double ymin, double ymax)
584Ubuntu.Components.MimeData 1.0 0.1: QtObject621Ubuntu.Components.MimeData 1.0 0.1: QtObject
585 property color color622 property color color
586 property var data623 property var data
587 readonly property QStringList formats624 readonly property QStringList formats
588 property string html625 property string html
589 property string text626 property string text
590 property QList<QUrl> urls627 property list<url> urls
591Ubuntu.Components.Mouse 1.0 0.1: QtObject628Ubuntu.Components.Mouse 1.0 0.1: QtObject
592 readonly property Qt.MouseButtons acceptedButtons629 readonly property Qt.MouseButtons acceptedButtons
593 property int clickAndHoldThreshold630 property int clickAndHoldThreshold
594 property bool enabled631 property bool enabled
595 readonly property Item forwardTo632 property list<Item> forwardTo
596 readonly property bool hoverEnabled633 readonly property bool hoverEnabled
597 signal pressed(QQuickMouseEvent mouse, Item host)634 signal pressed(QQuickMouseEvent mouse, Item host)
598 signal released(QQuickMouseEvent mouse, Item host)635 signal released(QQuickMouseEvent mouse, Item host)
@@ -606,12 +643,15 @@
606Ubuntu.Components.Mouse.Priority: Enum643Ubuntu.Components.Mouse.Priority: Enum
607 AfterItem644 AfterItem
608 BeforeItem645 BeforeItem
646Ubuntu.Test.MouseTouchAdaptor 1.0: QtObject singleton
647 property bool enabled
648 signal enabledChanged(bool value)
609Ubuntu.Components.ListItems.MultiValue 1.0 0.1: Base649Ubuntu.Components.ListItems.MultiValue 1.0 0.1: Base
610 property var values650 property var values
611Ubuntu.Components.ListItems.MultiValue 1.3: Base651Ubuntu.Components.ListItems.MultiValue 1.3: Base
612 property var values652 property var values
613Ubuntu.Components.Object 1.0 0.1: QtObject653Ubuntu.Components.Object 1.0 0.1: QtObject
614 default readonly property QtObject children654 default property list<QtObject> children
615Ubuntu.Components.OptionSelector 1.0 0.1: Empty655Ubuntu.Components.OptionSelector 1.0 0.1: Empty
616 property bool colourImage656 property bool colourImage
617 property double containerHeight657 property double containerHeight
@@ -665,11 +705,11 @@
665 readonly property bool rotating705 readonly property bool rotating
666 property bool transitionEnabled706 property bool transitionEnabled
667Ubuntu.Components.Page 1.0 0.1: PageTreeNode707Ubuntu.Components.Page 1.0 0.1: PageTreeNode
668 readonly property Action actions708 property list<Action> actions
669 property Flickable flickable709 property Flickable flickable
670 property string title710 property string title
671 property Item tools711 property Item tools
672Ubuntu.Components.Page 1.1: Page712Ubuntu.Components.Page 1.1: Page10
673 readonly property PageHeadConfiguration head713 readonly property PageHeadConfiguration head
674Ubuntu.Components.Page 1.3: PageTreeNode714Ubuntu.Components.Page 1.3: PageTreeNode
675 property Flickable flickable715 property Flickable flickable
@@ -682,17 +722,17 @@
682 property double minimumWidth722 property double minimumWidth
683 property double preferredWidth723 property double preferredWidth
684Ubuntu.Components.PageColumnsLayout 1.3: QtObject724Ubuntu.Components.PageColumnsLayout 1.3: QtObject
685 default readonly property PageColumn data725 default property list<PageColum> data
686 property bool when726 property bool when
687Ubuntu.Components.PageHeadConfiguration 1.1: Object727Ubuntu.Components.PageHeadConfiguration 1.1: Object
688 readonly property Action actions728 property list<Action> actions
689 property Action backAction729 property Action backAction
690 property Item contents730 property Item contents
691 property color foregroundColor731 property color foregroundColor
692 property string preset732 property string preset
693 readonly property PageHeadSections sections733 readonly property PageHeadSections sections
694Ubuntu.Components.PageHeadConfiguration 1.3: Object734Ubuntu.Components.PageHeadConfiguration 1.3: Object
695 readonly property Action actions735 property list<Action> actions
696 property Action backAction736 property Action backAction
697 property Item contents737 property Item contents
698 property Flickable flickable738 property Flickable flickable
@@ -707,17 +747,17 @@
707 property var model747 property var model
708 property int selectedIndex748 property int selectedIndex
709Ubuntu.Components.PageHeadSections 1.3: QtObject749Ubuntu.Components.PageHeadSections 1.3: QtObject
710 readonly property Action actions750 property list<Action> actions
711 property bool enabled751 property bool enabled
712 property var model752 property var model
713 property int selectedIndex753 property int selectedIndex
714Ubuntu.Components.PageHeadState 1.1: State754Ubuntu.Components.PageHeadState 1.1: State
715 readonly property Action actions755 property list<Action> actions
716 property Action backAction756 property Action backAction
717 property Item contents757 property Item contents
718 property PageHeadConfiguration head758 property PageHeadConfiguration head
719Ubuntu.Components.PageHeadState 1.3: State759Ubuntu.Components.PageHeadState 1.3: State
720 readonly property Action actions760 property list<Action> actions
721 property Action backAction761 property Action backAction
722 property Item contents762 property Item contents
723 property PageHeadConfiguration head763 property PageHeadConfiguration head
@@ -742,7 +782,9 @@
742 property int textSize782 property int textSize
743Ubuntu.Components.PageHeader 1.3: Header783Ubuntu.Components.PageHeader 1.3: Header
744 property Item contents784 property Item contents
785 property Item extension
745 readonly property ActionBar leadingActionBar786 readonly property ActionBar leadingActionBar
787 property list<Action> navigationActions
746 readonly property Sections sections788 readonly property Sections sections
747 property string title789 property string title
748 readonly property ActionBar trailingActionBar790 readonly property ActionBar trailingActionBar
@@ -799,7 +841,7 @@
799 property int align841 property int align
800 property bool animate842 property bool animate
801 readonly property bool animating843 readonly property bool animating
802 default readonly property QtObject contents844 default property list<QtObject> contents
803 property int hideTimeout845 property int hideTimeout
804 property double hintSize846 property double hintSize
805 property bool locked847 property bool locked
@@ -813,7 +855,7 @@
813 property int align855 property int align
814 property bool animate856 property bool animate
815 readonly property bool animating857 readonly property bool animating
816 default readonly property QtObject contents858 default property list<QtObject> contents
817 property int hideTimeout859 property int hideTimeout
818 property double hintSize860 property double hintSize
819 property bool locked861 property bool locked
@@ -854,7 +896,7 @@
854 property bool autoClose896 property bool autoClose
855 property Item caller897 property Item caller
856 property double callerMargin898 property double callerMargin
857 default readonly property QtObject container899 default property list<QtObject> container
858 property double contentHeight900 property double contentHeight
859 property double contentWidth901 property double contentWidth
860 property double edgeMargins902 property double edgeMargins
@@ -866,7 +908,7 @@
866 property bool autoClose908 property bool autoClose
867 property Item caller909 property Item caller
868 property double callerMargin910 property double callerMargin
869 default readonly property QtObject container911 default property list<QtObject> container
870 property double contentHeight912 property double contentHeight
871 property double contentWidth913 property double contentWidth
872 property double edgeMargins914 property double edgeMargins
@@ -935,9 +977,8 @@
935Ubuntu.Components.Scrollbar 1.3: StyledItem977Ubuntu.Components.Scrollbar 1.3: StyledItem
936 property int align978 property int align
937 property Flickable flickableItem979 property Flickable flickableItem
938Ubuntu.Components.ScrollbarUtils 0.1 1.0
939Ubuntu.Components.Sections 1.3: StyledItem980Ubuntu.Components.Sections 1.3: StyledItem
940 readonly property Action actions981 property list<Action> actions
941 property var model982 property var model
942 property int selectedIndex983 property int selectedIndex
943Ubuntu.Components.ServiceProperties 1.1: QtObject984Ubuntu.Components.ServiceProperties 1.1: QtObject
@@ -958,13 +999,13 @@
958 Inactive999 Inactive
959 Synchronizing1000 Synchronizing
960Ubuntu.Components.Popups.SheetBase 1.0 0.1: PopupBase1001Ubuntu.Components.Popups.SheetBase 1.0 0.1: PopupBase
961 default readonly property QtObject container1002 default property list<QtObject> container
962 property double contentsHeight1003 property double contentsHeight
963 property double contentsWidth1004 property double contentsWidth
964 property bool modal1005 property bool modal
965 property string title1006 property string title
966Ubuntu.Components.Popups.SheetBase 1.3: PopupBase1007Ubuntu.Components.Popups.SheetBase 1.3: PopupBase
967 default readonly property QtObject container1008 default property list<QtObject> container
968 property double contentsHeight1009 property double contentsHeight
969 property double contentsWidth1010 property double contentsWidth
970 property bool modal1011 property bool modal
@@ -1040,6 +1081,7 @@
1040 property bool ignoreUnknownProperties1081 property bool ignoreUnknownProperties
1041Ubuntu.Components.StyledItem 1.3 1.3 1.1 1.0 0.1: Item1082Ubuntu.Components.StyledItem 1.3 1.3 1.1 1.0 0.1: Item
1042 property bool activeFocusOnPress 1.31083 property bool activeFocusOnPress 1.3
1084 signal activeFocusOnTabChanged2() 1.3
1043 function bool requestFocus(Qt.FocusReason reason) 1.31085 function bool requestFocus(Qt.FocusReason reason) 1.3
1044 function bool requestFocus() 1.31086 function bool requestFocus() 1.3
1045 property Component style1087 property Component style
@@ -1049,6 +1091,26 @@
1049 property string subText1091 property string subText
1050Ubuntu.Components.ListItems.Subtitled 1.3: Base1092Ubuntu.Components.ListItems.Subtitled 1.3: Base
1051 property string subText1093 property string subText
1094Ubuntu.Components.SwipeArea 1.3: Item
1095 property Direction direction
1096 readonly property double distance
1097 readonly property bool dragging
1098 property bool immediateRecognition
1099 signal directionChanged(Direction direction)
1100 signal draggingChanged(bool dragging)
1101 signal pressedChanged(bool pressed)
1102 signal distanceChanged(double distance)
1103 signal touchPositionChanged(QPointF position)
1104 signal immediateRecognitionChanged(bool immediateRecognition)
1105 readonly property bool pressed
1106 readonly property QPointF touchPosition
1107Ubuntu.Components.SwipeArea.Direction: Enum
1108 Downwards
1109 Horizontal
1110 Leftwards
1111 Rightwards
1112 Upwards
1113 Vertical
1052Ubuntu.Components.SwipeEvent 1.2: QtObject1114Ubuntu.Components.SwipeEvent 1.2: QtObject
1053 property QPointF content1115 property QPointF content
1054 readonly property QPointF from1116 readonly property QPointF from
@@ -1094,14 +1156,14 @@
1094 readonly property Tab selectedTab1156 readonly property Tab selectedTab
1095 property int selectedTabIndex1157 property int selectedTabIndex
1096 property TabBar tabBar1158 property TabBar tabBar
1097 default readonly property QtObject tabChildren1159 default property list<QtObject> tabChildren
1098Ubuntu.Components.Tabs 1.3: PageTreeNode1160Ubuntu.Components.Tabs 1.3: PageTreeNode
1099 readonly property int count1161 readonly property int count
1100 readonly property Item currentPage1162 readonly property Item currentPage
1101 readonly property Tab selectedTab1163 readonly property Tab selectedTab
1102 property int selectedTabIndex1164 property int selectedTabIndex
1103 property TabBar tabBar1165 property TabBar tabBar
1104 default readonly property QtObject tabChildren1166 default property list<QtObject> tabChildren
1105Ubuntu.Test.TestExtras 1.0: QtObject singleton1167Ubuntu.Test.TestExtras 1.0: QtObject singleton
1106 function string openGLflavor()1168 function string openGLflavor()
1107 function string cpuArchitecture()1169 function string cpuArchitecture()
@@ -1115,6 +1177,10 @@
1115 function touchMove(int touchId, Item item, Qt.point point)1177 function touchMove(int touchId, Item item, Qt.point point)
1116 function touchDrag(int touchId, Item item, Qt.point from, Qt.point delta, int steps)1178 function touchDrag(int touchId, Item item, Qt.point from, Qt.point delta, int steps)
1117 function touchDrag(int touchId, Item item, Qt.point from, Qt.point delta)1179 function touchDrag(int touchId, Item item, Qt.point from, Qt.point delta)
1180 function mouseDrag(Item item, Qt.point from, Qt.point delta, Qt.MouseButton button, Qt.KeyboardModifiers stateKey, int steps, int delay)
1181 function mouseDrag(Item item, Qt.point from, Qt.point delta, Qt.MouseButton button, Qt.KeyboardModifiers stateKey, int steps)
1182 function mouseDrag(Item item, Qt.point from, Qt.point delta, Qt.MouseButton button, Qt.KeyboardModifiers stateKey)
1183 function mouseDrag(Item item, Qt.point from, Qt.point delta, Qt.MouseButton button)
1118 readonly property bool touchPresent1184 readonly property bool touchPresent
1119Ubuntu.Components.TextArea 1.0 0.1: StyledItem1185Ubuntu.Components.TextArea 1.0 0.1: StyledItem
1120 property bool autoExpand1186 property bool autoExpand
@@ -1284,10 +1350,10 @@
1284 property bool persistentSelection1350 property bool persistentSelection
1285 property string placeholderText1351 property string placeholderText
1286 property var popover1352 property var popover
1287 readonly property QtObject primaryItem1353 property list<QtObject> primaryItem
1288 property bool readOnly1354 property bool readOnly
1289 property int renderType1355 property int renderType
1290 readonly property QtObject secondaryItem1356 property list<QtObject> secondaryItem
1291 property bool selectByMouse1357 property bool selectByMouse
1292 readonly property string selectedText1358 readonly property string selectedText
1293 property color selectedTextColor1359 property color selectedTextColor
@@ -1345,10 +1411,10 @@
1345 property bool persistentSelection1411 property bool persistentSelection
1346 property string placeholderText1412 property string placeholderText
1347 property var popover1413 property var popover
1348 readonly property QtObject primaryItem1414 property list<QtObject> primaryItem
1349 property bool readOnly1415 property bool readOnly
1350 property int renderType1416 property int renderType
1351 readonly property QtObject secondaryItem1417 property list<QtObject> secondaryItem
1352 property bool selectByMouse1418 property bool selectByMouse
1353 readonly property string selectedText1419 readonly property string selectedText
1354 property color selectedTextColor1420 property color selectedTextColor
@@ -1363,7 +1429,6 @@
1363 property string name1429 property string name
1364 property QtObject palette1430 property QtObject palette
1365 readonly property ThemeSettings parentTheme1431 readonly property ThemeSettings parentTheme
1366 property ushort version
1367Ubuntu.Components.ListItems.ThinDivider 1.0 0.1: Rectangle1432Ubuntu.Components.ListItems.ThinDivider 1.0 0.1: Rectangle
1368Ubuntu.Components.ListItems.ThinDivider 1.3: Rectangle1433Ubuntu.Components.ListItems.ThinDivider 1.3: Rectangle
1369Ubuntu.Components.ToolbarButton 1.0 0.1: StyledItem1434Ubuntu.Components.ToolbarButton 1.0 0.1: StyledItem
@@ -1384,13 +1449,13 @@
1384 property string text1449 property string text
1385Ubuntu.Components.ToolbarItems 1.0 0.1: Item1450Ubuntu.Components.ToolbarItems 1.0 0.1: Item
1386 property Item back1451 property Item back
1387 default readonly property QtObject contents1452 default property list<QtObject> contents
1388 property bool locked1453 property bool locked
1389 property bool opened1454 property bool opened
1390 property Item pageStack1455 property Item pageStack
1391Ubuntu.Components.ToolbarItems 1.3: Item1456Ubuntu.Components.ToolbarItems 1.3: Item
1392 property Item back1457 property Item back
1393 default readonly property QtObject contents1458 default property list<QtObject> contents
1394 property bool locked1459 property bool locked
1395 property bool opened1460 property bool opened
1396 property Item pageStack1461 property Item pageStack
@@ -1400,7 +1465,6 @@
1400Ubuntu.Components.UCFontUtils 1.0 0.1: QtObject1465Ubuntu.Components.UCFontUtils 1.0 0.1: QtObject
1401 function double sizeToPixels(string size)1466 function double sizeToPixels(string size)
1402 function double modularScale(string size)1467 function double modularScale(string size)
1403UCItemAttached: QtObject
1404UCListItemDivider: Item1468UCListItemDivider: Item
1405 property color colorFrom1469 property color colorFrom
1406 property color colorTo1470 property color colorTo
@@ -1531,6 +1595,7 @@
1531 function var typeString(var string)1595 function var typeString(var string)
1532 function var warningFormat(var line, var column, var message)1596 function var warningFormat(var line, var column, var message)
1533 function var waitForHeaderAnimation(var mainView)1597 function var waitForHeaderAnimation(var mainView)
1598 readonly property QuickTestUtil testUtil
1534Ubuntu.Components.UriHandler 1.0 0.1: QtObject singleton1599Ubuntu.Components.UriHandler 1.0 0.1: QtObject singleton
1535 signal opened(QStringList uris)1600 signal opened(QStringList uris)
1536Ubuntu.Components.ListItems.ValueSelector 1.0 0.1: Empty1601Ubuntu.Components.ListItems.ValueSelector 1.0 0.1: Empty
@@ -1551,12 +1616,12 @@
1551 property var values1616 property var values
1552Ubuntu.Components.ViewItems 1.2: QtObject1617Ubuntu.Components.ViewItems 1.2: QtObject
1553 property bool dragMode1618 property bool dragMode
1554 property QList<int> expandedIndices1619 property list<int> expandedIndices
1555 property int expansionFlags1620 property int expansionFlags
1556 signal dragUpdated(ListItemDrag event)1621 signal dragUpdated(ListItemDrag event)
1557 signal expandedIndicesChanged(QList<int> indices)1622 signal expandedIndicesChanged(list<int> indices)
1558 property bool selectMode1623 property bool selectMode
1559 property QList<int> selectedIndices1624 property list<int> selectedIndices
1560Ubuntu.Components.ViewItems.ExpansionFlag: Enum1625Ubuntu.Components.ViewItems.ExpansionFlag: Enum
1561 CollapseOnOutsidePress1626 CollapseOnOutsidePress
1562 Exclusive1627 Exclusive
15631628
=== modified file 'debian/changelog'
--- debian/changelog 2015-12-01 14:27:38 +0000
+++ debian/changelog 2015-12-07 14:19:44 +0000
@@ -1,3 +1,104 @@
1ubuntu-ui-toolkit (1.3.1740+16.04.20151205-0ubuntu1) UNRELEASED; urgency=medium
2
3 [ Zoltán Balogh ]
4 * Enable building the UITK tests in any case.
5 * Remove Q_Q(UCStyledItemBase) because of unused variable warning.
6 * Resolve Trusty specific compiler issue not resolving QPointer data on
7 connections.
8 * Use only the object name when selecting sections and labels in tests.
9
10 [Zsombor Egri ]
11 * Update BottomEdge with UI/UX agreed during the sprint. Fixes LP: #1368811.
12 * BottomEdge component. Fixes LP: #1368811.
13 * Remove build failure on Xenial caused by deprecated Qt functions.
14 * Fix BottomEdgeHint consumes activeFocusOnPress handling. Fixes LP: #1517777
15 * Migrate DirectionalDragArea from Unity8, named as SwipeArea. Original code
16 (from lp:unity8) by: Daniel d'Andrada <daniel.dandrada@canonical.com>.
17 * Delete QQuickView when the application quits. Fixing segfault caused by the
18 dangling objects in GestireDetector.
19 * BottomEdgeHint API changes, deprecating state property, introducing locked
20 property to drive visuals lock and click handling.
21 * Fixing CheckBox and Switch getting checked property altered after clicked()
22 signal is emitted. Fixes LP: #1510919.
23 * Add ListItem.swipeEnabled property to block swiping when overlay MouseArea
24 is used to drag content. Fixes swiping when leading/trailing actions list
25 is empty. Fixes LP: #1500409, LP: #1500416.
26 * Follow the new design in BottomEdgeHint.
27 * Provide import version information for StyledItem and remove theme.version
28 obsolete property.
29 * Use QQuickItemChangeListener to listen parent changes, skipping the meta
30 object model. Convert UCThemingExtension into a Q_INTERFACE so object_cast<>
31 can work with it saving the need to memorise on an item whether it is an
32 extended item or not.
33
34 [ Benjamin Zeller ]
35 * Avoid unnecessary updates for i18n strings.
36 * "MathUtils.clamp, min value should not be bigger than the max value".
37 Fixes LP: #1520557.
38 * Move MathUtils to Cpp.
39
40 [ Loïc Molinari ]
41 * UbuntuShape - Fixed deprecation logging issues.
42 * This fix prevents logging a deprecation warning for "image", "color" and
43 "gradientColor" properties when the import version is less than 1.3. The
44 logging of properties used internally (through the old image wrapper) have
45 been removed too since the user might not even have used them.
46 Fixes LP: #1519414.
47
48 [ Christian Dywan ]
49 * Enable gallery target in qmake.
50 * Don't set activeFocusOnPress on TextField but on child only.
51 Fixes LP: #1486274, LP: #1513897.
52 * Make runtest.sh work out of the box again.
53 * Explicitly handle keyboard anchoring in dialog foreground.
54 Fixes LP: #1376763.
55 * Remove GestureDetector in favor of SwipeArea in BottomEdgeHint. Also make
56 possible to assign Action to the component. Fixes LP: #1517771, LP: #1517798
57 * Enforce !activeFocusOnPress on TextField primary/secondaryItem.
58 Fixes LP: #1513897.
59 * Only run ActivityIndicator if visible. Fixes LP: #1513450.
60 * Use wait_select_single for _get_button in Popover CPO.
61 * Include composite types in .api again.
62 * More forgiving QML plugin/ version discovery.
63 * Update toolkit and gallery po templates. Fixes LP: #1512924.
64 * Improve handling of list types in apicheck.
65 * Smaller handlers, entirely draggable caret. Fixes LP: #1450222.
66 * Special-case leaked QQuickImageBase properties. Fixes LP: #1473890.
67 * Don't use UniqueConnection in the image extension
68 * Sync the height of the Page header with the other subheaders in the
69 AdaptivePageLayout.
70
71 [ Tim Peeters ]
72 * Add extension property to PageHeader.
73 * Don't set the header.moving property when flickable contents height changes
74 but the header does not actually move. Fixes LP: #1514143.
75 * Fix the icon color in the AppHeader. Fixes LP: #1515593.
76 * Use PageHeader in the UITK gallery.
77 * Ensure PageHeader style works properly with run-time theme changes.
78 * Add a back action to the Page.header automatically in PageStack and
79 AdaptivePageLayout.
80 * Add a navigationActions property to PageHeader.
81 * Fix links to Page in the documentation.
82
83 [ Florian Boucault ]
84 * DraggingArea: import Ubuntu.Components so that MathUtils is available and
85 no warning is output.
86
87 [ Brendan Donegan ]
88 * Account for presence of OSK in Flickable helpers and add a test for the same
89
90 [ Andrea Bernabei ]
91 * ListItemLayout: set QML context of the predefined labels. Fixes lp1514173.
92 Fixes LP: #1514173.
93
94 [ Timo Jyrinki ]
95 * Change HandlerType from int[2] to QVector<int> to make it work with Qt 5.5
96 Fixes LP: #1484004, LP: #1450346
97 * Workaround 'emit' declaration in Qt 5.5 Fixes LP: #1507910
98 * Build depend on libxkbcommon-dev Fixes LP: #1508447
99
100 -- Zoltán Balogh <zoltan@bakter.hu> Sat, 05 Dec 2015 12:22:04 +0200
101
1ubuntu-ui-toolkit (1.3.1705+16.04.20151120.1-0ubuntu2) xenial; urgency=medium102ubuntu-ui-toolkit (1.3.1705+16.04.20151120.1-0ubuntu2) xenial; urgency=medium
2103
3 * Rebuild against Qt 5.5.1.104 * Rebuild against Qt 5.5.1.
4105
=== modified file 'debian/control'
--- debian/control 2015-10-09 08:23:09 +0000
+++ debian/control 2015-12-07 14:19:44 +0000
@@ -9,6 +9,7 @@
9 python3:any,9 python3:any,
10 qml-module-qtgraphicaleffects | libqt5qml-graphicaleffects,10 qml-module-qtgraphicaleffects | libqt5qml-graphicaleffects,
11 libinput-dev,11 libinput-dev,
12 libxkbcommon-dev,
12 qtbase5-dev,13 qtbase5-dev,
13 qtbase5-private-dev,14 qtbase5-private-dev,
14 qttools5-dev-tools,15 qttools5-dev-tools,
@@ -73,6 +74,7 @@
73 suru-icon-theme,74 suru-icon-theme,
74 ttf-ubuntu-font-family,75 ttf-ubuntu-font-family,
75 ubuntu-ui-toolkit-theme (= ${binary:Version}),76 ubuntu-ui-toolkit-theme (= ${binary:Version}),
77 libubuntugestures (= ${binary:Version}),
76 ${misc:Depends},78 ${misc:Depends},
77 ${shlibs:Depends},79 ${shlibs:Depends},
78Conflicts: qt-components-ubuntu80Conflicts: qt-components-ubuntu
@@ -84,6 +86,28 @@
84 .86 .
85 This package contains the Ubuntu Components QML plugin.87 This package contains the Ubuntu Components QML plugin.
8688
89
90Package: libubuntugestures
91Architecture: any
92Multi-Arch: same
93Pre-Depends: dpkg (>= 1.15.6~), ${misc:Pre-Depends}
94Depends: ${misc:Depends},
95 ${shlibs:Depends},
96Description: Ubuntu gestures library - SwipeArea
97 Ubuntu gestures library with SwipeArea
98
99Package: libubuntugestures-dev
100Architecture: any
101Multi-Arch: same
102Pre-Depends: dpkg (>= 1.15.6~), ${misc:Pre-Depends}
103Depends: ${misc:Depends},
104 ${shlibs:Depends},
105Description: Ubuntu gestures library development files
106 This package contains the development files for
107 Ubuntu gestures library with SwipeArea
108
109
110
87Package: ubuntu-ui-toolkit-theme111Package: ubuntu-ui-toolkit-theme
88Architecture: any112Architecture: any
89Multi-Arch: foreign113Multi-Arch: foreign
90114
=== added file 'debian/libubuntugestures-dev.install'
--- debian/libubuntugestures-dev.install 1970-01-01 00:00:00 +0000
+++ debian/libubuntugestures-dev.install 2015-12-07 14:19:44 +0000
@@ -0,0 +1,28 @@
1usr/include/*/qt5/UbuntuGestures/ubuntugesturesglobal.h
2usr/include/*/qt5/UbuntuGestures/CandidateInactivityTimer
3usr/include/*/qt5/UbuntuGestures/TouchOwnershipEvent
4usr/include/*/qt5/UbuntuGestures/UbuntuGestures
5usr/include/*/qt5/UbuntuGestures/pool.h
6usr/include/*/qt5/UbuntuGestures/unownedtouchevent.h
7usr/include/*/qt5/UbuntuGestures/DebugHelpers
8usr/include/*/qt5/UbuntuGestures/debughelpers.h
9usr/include/*/qt5/UbuntuGestures/touchownershipevent.h
10usr/include/*/qt5/UbuntuGestures/touchregistry.h
11usr/include/*/qt5/UbuntuGestures/UbuntuGesturesDepends
12usr/include/*/qt5/UbuntuGestures/timesource.h
13usr/include/*/qt5/UbuntuGestures/TimeSource
14usr/include/*/qt5/UbuntuGestures/timer.h
15usr/include/*/qt5/UbuntuGestures/UnownedTouchEvent
16usr/include/*/qt5/UbuntuGestures/TouchRegistry
17usr/include/*/qt5/UbuntuGestures/Pool
18usr/include/*/qt5/UbuntuGestures/ubuntugesturesversion.h
19usr/include/*/qt5/UbuntuGestures/Timer
20usr/include/*/qt5/UbuntuGestures/candidateinactivitytimer.h
21usr/include/*/qt5/UbuntuGestures/UbuntuGesturesVersion
22usr/lib/*/libUbuntuGestures.prl
23usr/lib/*/libUbuntuGestures.la
24usr/lib/*/libUbuntuGestures.so
25usr/lib/*/pkgconfig/UbuntuGestures.pc
26usr/lib/*/qt5/mkspecs/modules/qt_lib_UbuntuGestures.pri
27usr/lib/*/qt5/mkspecs/modules/qt_lib_UbuntuGestures_private.pri
28
029
=== added file 'debian/libubuntugestures.install'
--- debian/libubuntugestures.install 1970-01-01 00:00:00 +0000
+++ debian/libubuntugestures.install 2015-12-07 14:19:44 +0000
@@ -0,0 +1,1 @@
1usr/lib/*/libUbuntuGestures.so.*
02
=== modified file 'documentation/overview.qdoc'
--- documentation/overview.qdoc 2015-04-15 06:40:40 +0000
+++ documentation/overview.qdoc 2015-12-07 14:19:44 +0000
@@ -37,6 +37,13 @@
37 \endcode37 \endcode
38 \annotatedlist ubuntu38 \annotatedlist ubuntu
3939
40 \part Gestures
41 Available through:
42 \code
43 import Ubuntu.Components 1.3
44 \endcode
45 \annotatedlist ubuntu-gestures
46
40 \part List views, list items47 \part List views, list items
41 Components with standardized view items, with conditional actions, multiselect48 Components with standardized view items, with conditional actions, multiselect
42 and reordering support on scrollable views. Replaces the Ubuntu.Components.ListItems49 and reordering support on scrollable views. Replaces the Ubuntu.Components.ListItems
4350
=== modified file 'examples/ubuntu-ui-toolkit-gallery/About.qml'
--- examples/ubuntu-ui-toolkit-gallery/About.qml 2015-09-24 19:36:36 +0000
+++ examples/ubuntu-ui-toolkit-gallery/About.qml 2015-12-07 14:19:44 +0000
@@ -30,9 +30,8 @@
30 anchors.fill: parent30 anchors.fill: parent
31 color: theme.palette.normal.background31 color: theme.palette.normal.background
32 }32 }
33 head {33 header: PageHeader {
34 title: i18n.tr('About...')34 title: i18n.tr("About...")
35 foregroundColor: theme.palette.selected.foregroundText
36 }35 }
3736
38 Column {37 Column {
3938
=== renamed file 'examples/ubuntu-ui-toolkit-gallery/BottomEdgeHint.qml' => 'examples/ubuntu-ui-toolkit-gallery/BottomEdgePage.qml'
--- examples/ubuntu-ui-toolkit-gallery/BottomEdgeHint.qml 2015-08-11 14:14:50 +0000
+++ examples/ubuntu-ui-toolkit-gallery/BottomEdgePage.qml 2015-12-07 14:19:44 +0000
@@ -17,22 +17,166 @@
17import QtQuick 2.417import QtQuick 2.4
18import Ubuntu.Components 1.318import Ubuntu.Components 1.3
1919
20Page {20Template {
21 id: page
22 header: PageHeader {
23 title: i18n.tr("Bottom Edge")
24 trailingActionBar.actions: [
25 bottomEdge.hint.action
26 ]
27 }
28
21 TemplateSection {29 TemplateSection {
22 title: "Bottom Edge Hint"30 title: "BottomEdgeHint"
23 className: "BottomEdgeHint"31 className: "BottomEdgeHint"
2432
25 anchors {33 TemplateRow {
26 top: parent.top34 title: i18n.tr("On clicked")
27 left: parent.left35 Row {
28 right: parent.right36 spacing: units.gu(1)
29 margins: units.gu(2)37 CheckBox {
30 }38 id: contentToLayout
31 }39 text: i18n.tr("push content into the layout")
3240 enabled: bottomEdge.hint.status >= BottomEdgeHint.Active
33 BottomEdgeHint {41 }
34 iconName: "stock_message"42 Label {
35 text: "Compose a new message"43 text: contentToLayout.text
36 onClicked: state = "Hidden"44 anchors.verticalCenter: contentToLayout.verticalCenter
45 }
46 }
47 }
48 }
49
50 TemplateSection {
51 title: "BottomEdge"
52 className: "BottomEdge"
53
54 TemplateRow {
55 title: i18n.tr("Top")
56 Slider {
57 id: bottomEdgeHeight
58 maximumValue: page.height
59 value: bottomEdge.height
60 onValueChanged: bottomEdge.height = value
61 }
62 }
63
64 TemplateRow {
65 title: i18n.tr("Regions")
66 Slider {
67 id: regionCount
68 width: units.gu(20)
69 maximumValue: 3.0
70 live: true
71 }
72 }
73 Repeater {
74 id: regionConfig
75 model: regionCount.value.toFixed(0)
76 TemplateRow {
77 title: i18n.tr("Region #%1").arg(index)
78 property int regionIndex: index
79 Repeater {
80 model: ["from", "to"]
81 Row {
82 spacing: units.gu(2)
83 Label {
84 text: i18n.tr(modelData)
85 }
86 TextField {
87 id: regionFrom
88 text: bottomEdge.regions[regionIndex][modelData]
89 validator: DoubleValidator {bottom: 0.0; top: 1.0; decimals: 2; locale: "d.d"}
90 inputMethodHints: Qt.ImhPreferNumbers | Qt.ImhFormattedNumbersOnly
91 width: units.gu(7)
92 hasClearButton: false
93 errorHighlight: true
94 onAccepted: bottomEdge.regions[regionIndex][modelData] = text
95 onTextChanged: {
96 if (regionFrom.acceptableInput) {
97 bottomEdge.regions[regionIndex][modelData] = parseFloat(text);
98 }
99 }
100 onActiveFocusChanged: if (activeFocus) selectAll()
101 }
102 }
103 }
104 }
105 }
106 }
107
108 BottomEdge {
109 id: bottomEdge
110 // make sure it doesn't land inside the flickable
111 parent: page
112 // hint
113 hint {
114 action: Action {
115 text: "Demo content"
116 iconName: "stock_message"
117 onTriggered: bottomEdge.commit()
118 }
119 flickable: page.flickable
120 }
121 contentComponent: bottomEdgeContent
122
123 onCommitCompleted: {
124 if (contentToLayout.checked && contentToLayout.enabled) {
125 page.pageStack.addPageToCurrentColumn(page, contentComponent);
126 collapse();
127 }
128 }
129
130 regions: [
131 BottomEdgeRegion {
132 objectName: "CustomRegion1"
133 enabled: regionConfig.model >= 1
134 to: 0.3
135 property color baseColor: UbuntuColors.lightGrey
136 },
137 BottomEdgeRegion {
138 objectName: "CustomRegion2"
139 enabled: regionConfig.model >= 2
140 from: 0.3
141 to: 0.6
142 },
143 BottomEdgeRegion {
144 objectName: "CustomRegion3"
145 enabled: regionConfig.model >= 3
146 from: 0.6
147 },
148 // default region, mimics the default setup
149 BottomEdgeRegion {
150 objectName: "DefaultRegion"
151 enabled: regionConfig.model <= 0
152 from: 0.3
153 }
154 ]
155
156 Component {
157 id: bottomEdgeContent
158 Page {
159 height: bottomEdge.height
160 header: PageHeader {
161 title: {
162 var state = "UNDEFINED";
163 switch (bottomEdge.status) {
164 case BottomEdge.Hidden: state = "Hidden"; break;
165 case BottomEdge.Revealed: state = "Revealed"; break;
166 case BottomEdge.Committed: state = "Committed"; break;
167 }
168 return bottomEdge.activeRegion
169 ? i18n.tr("Within region '%1', status: %2").arg(bottomEdge.activeRegion.objectName).arg(state)
170 : i18n.tr("Not in any active region, status: %1").arg(state);
171 }
172 }
173 Rectangle {
174 anchors.fill: parent
175 anchors.margins: units.gu(1)
176 color: bottomEdge.activeRegion && bottomEdge.activeRegion.hasOwnProperty("baseColor") ?
177 bottomEdge.activeRegion.baseColor : Qt.rgba(0.5, 1, bottomEdge.dragProgress, 1)
178 }
179 }
180 }
37 }181 }
38}182}
39183
=== added file 'examples/ubuntu-ui-toolkit-gallery/Gallery.pro'
--- examples/ubuntu-ui-toolkit-gallery/Gallery.pro 1970-01-01 00:00:00 +0000
+++ examples/ubuntu-ui-toolkit-gallery/Gallery.pro 2015-12-07 14:19:44 +0000
@@ -0,0 +1,1 @@
1TARGET = $$PWD/gallery
02
=== modified file 'examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml'
--- examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml 2015-09-30 21:14:25 +0000
+++ examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml 2015-12-07 14:19:44 +0000
@@ -28,7 +28,7 @@
2828
29 ListItem {29 ListItem {
30 id: addressbookListItem30 id: addressbookListItem
31 height: addressbookLayout.height31 height: addressbookLayout.height + (divider.visible ? divider.height : 0)
3232
33 ListItemLayout {33 ListItemLayout {
34 id: addressbookLayout34 id: addressbookLayout
@@ -48,7 +48,7 @@
4848
49 ListItem {49 ListItem {
50 id: addressbookDetailsListItem50 id: addressbookDetailsListItem
51 height: addressbookDetailsLayout.height + divider.height51 height: addressbookDetailsLayout.height + (divider.visible ? divider.height : 0)
52 ListItemLayout {52 ListItemLayout {
53 id: addressbookDetailsLayout53 id: addressbookDetailsLayout
5454
@@ -73,7 +73,7 @@
73 ListItem {73 ListItem {
74 id: telegramContactsListItem74 id: telegramContactsListItem
7575
76 height: telegramContactsLayout.height76 height: telegramContactsLayout.height + (divider.visible ? divider.height : 0)
7777
78 ListItemLayout {78 ListItemLayout {
79 id: telegramContactsLayout79 id: telegramContactsLayout
@@ -92,7 +92,7 @@
9292
93 ListItem {93 ListItem {
94 id: systemSettings194 id: systemSettings1
95 height: systemSettings1_layout.height95 height: systemSettings1_layout.height + (divider.visible ? divider.height : 0)
9696
97 ListItemLayout {97 ListItemLayout {
98 id: systemSettings1_layout98 id: systemSettings1_layout
@@ -110,7 +110,7 @@
110110
111 ListItem {111 ListItem {
112 id: systemSettings2112 id: systemSettings2
113 height: systemSettings2_layout.height113 height: systemSettings2_layout.height + (divider.visible ? divider.height : 0)
114114
115 ListItemLayout {115 ListItemLayout {
116 id: systemSettings2_layout116 id: systemSettings2_layout
@@ -129,7 +129,7 @@
129129
130 ListItem {130 ListItem {
131 id: systemSettings3131 id: systemSettings3
132 height: systemSettings3_layout.height132 height: systemSettings3_layout.height + (divider.visible ? divider.height : 0)
133133
134 ListItemLayout {134 ListItemLayout {
135 id: systemSettings3_layout135 id: systemSettings3_layout
@@ -157,7 +157,7 @@
157 spacing: 0157 spacing: 0
158158
159 ListItem {159 ListItem {
160 height: customLabelsLayout.height160 height: customLabelsLayout.height + (divider.visible ? divider.height : 0)
161161
162 ListItemLayout {162 ListItemLayout {
163 id: customLabelsLayout163 id: customLabelsLayout
@@ -220,7 +220,7 @@
220220
221 ListItem {221 ListItem {
222 id: dialerHistoryListItem222 id: dialerHistoryListItem
223 height: dialerHistoryLayout.height223 height: dialerHistoryLayout.height + (divider.visible ? divider.height : 0)
224224
225 ListItemLayout {225 ListItemLayout {
226 id: dialerHistoryLayout226 id: dialerHistoryLayout
227227
=== modified file 'examples/ubuntu-ui-toolkit-gallery/ListItemWithLabel.qml'
--- examples/ubuntu-ui-toolkit-gallery/ListItemWithLabel.qml 2015-09-28 12:26:13 +0000
+++ examples/ubuntu-ui-toolkit-gallery/ListItemWithLabel.qml 2015-12-07 14:19:44 +0000
@@ -20,7 +20,7 @@
20ListItem {20ListItem {
21 property alias title: layout.title21 property alias title: layout.title
2222
23 height: layout.height23 height: layout.height + (divider.visible ? divider.height : 0)
24 onPressAndHold: selectMode = !selectMode24 onPressAndHold: selectMode = !selectMode
2525
26 ListItemLayout { id: layout }26 ListItemLayout { id: layout }
2727
=== modified file 'examples/ubuntu-ui-toolkit-gallery/MainPage.qml'
--- examples/ubuntu-ui-toolkit-gallery/MainPage.qml 2015-09-30 05:59:49 +0000
+++ examples/ubuntu-ui-toolkit-gallery/MainPage.qml 2015-12-07 14:19:44 +0000
@@ -21,37 +21,54 @@
21 id: mainPage21 id: mainPage
22 title: "Ubuntu UI Toolkit"22 title: "Ubuntu UI Toolkit"
2323
24 head.actions: [24 header: PageHeader {
25 Action {25 title: mainPage.title
26 text: i18n.tr('Right to Left')26 flickable: layout.columns === 1 ? widgetList : null
27 iconName: 'flash-on'27 trailingActionBar.actions: [
28 visible: !gallery.rtl28 Action {
29 onTriggered: gallery.rtl = !gallery.rtl29 text: i18n.tr('Right to Left')
30 },30 iconName: 'flash-on'
31 Action {31 visible: !gallery.rtl
32 text: i18n.tr('Left to Right')32 onTriggered: gallery.rtl = !gallery.rtl
33 iconName: 'flash-off'33 },
34 visible: gallery.rtl34 Action {
35 onTriggered: gallery.rtl = !gallery.rtl35 text: i18n.tr('Left to Right')
36 },36 iconName: 'flash-off'
37 Action {37 visible: gallery.rtl
38 text: i18n.tr('Use dark theme')38 onTriggered: gallery.rtl = !gallery.rtl
39 iconName: 'torch-on'39 },
40 visible: gallery.theme.name == 'Ubuntu.Components.Themes.Ambiance'40 Action {
41 onTriggered: gallery.theme.name = 'Ubuntu.Components.Themes.SuruDark'41 text: i18n.tr('Use dark theme')
42 },42 iconName: 'torch-on'
43 Action {43 visible: gallery.theme.name == 'Ubuntu.Components.Themes.Ambiance'
44 text: i18n.tr('Use light theme')44 onTriggered: gallery.theme.name = 'Ubuntu.Components.Themes.SuruDark'
45 iconName: 'torch-off'45 },
46 visible: gallery.theme.name == 'Ubuntu.Components.Themes.SuruDark'46 Action {
47 onTriggered: gallery.theme.name = 'Ubuntu.Components.Themes.Ambiance'47 text: i18n.tr('Use light theme')
48 },48 iconName: 'torch-off'
49 Action {49 visible: gallery.theme.name == 'Ubuntu.Components.Themes.SuruDark'
50 text: i18n.tr('About')50 onTriggered: gallery.theme.name = 'Ubuntu.Components.Themes.Ambiance'
51 iconName: "info"51 },
52 onTriggered: mainPage.pageStack.addPageToCurrentColumn(mainPage, Qt.resolvedUrl("About.qml"))52 Action {
53 }53 id: aboutAction
54 ]54 text: i18n.tr('About')
55 iconName: "info"
56 onTriggered: mainPage.pageStack.addPageToCurrentColumn(mainPage, Qt.resolvedUrl("About.qml"))
57 },
58 Action {
59 text: i18n.tr("Deactivate mouse")
60 iconName: "non-starred"
61 visible: QuickUtils.mouseAttached
62 onTriggered: QuickUtils.mouseAttached = false
63 },
64 Action {
65 text: i18n.tr("Activate mouse")
66 iconName: "starred"
67 visible: !QuickUtils.mouseAttached
68 onTriggered: QuickUtils.mouseAttached = true
69 }
70 ]
71 }
5572
56 onActiveChanged: {73 onActiveChanged: {
57 if (layout.columns < 2) {74 if (layout.columns < 2) {
@@ -62,59 +79,63 @@
62 }79 }
63 }80 }
6481
65 Rectangle {82 UbuntuListView {
66 color: Qt.rgba(0.0, 0.0, 0.0, 0.01)83 id: widgetList
67 anchors.fill: parent84 objectName: "widgetList"
6885 anchors {
69 UbuntuListView {86 fill: parent
70 id: widgetList87 topMargin: mainPage.header.flickable ? 0 : mainPage.header.height
71 objectName: "widgetList"88 }
72 anchors.fill: parent89
73 model: WidgetsModel {}90 model: WidgetsModel {}
74 currentIndex: -191 currentIndex: -1
7592
76 onCurrentIndexChanged: openPage()93 onCurrentIndexChanged: openPage()
7794
78 function openPage() {95 function openPage() {
79 if (!mainPage.active || currentIndex < 0) return;96 if (!mainPage.active || currentIndex < 0) return;
80 var modelData = model.get(currentIndex);97 var modelData = model.get(currentIndex);
81 var source = Qt.resolvedUrl(modelData.source);98 var source = Qt.resolvedUrl(modelData.source);
82 mainPage.pageStack.addPageToNextColumn(mainPage, source, {title: modelData.label});99 mainPage.pageStack.addPageToNextColumn(mainPage, source, {title: modelData.label});
83 }100 }
84101
85 delegate: ListItem {102 delegate: ListItem {
86 objectName: model.objectName103 objectName: model.objectName
87 contentItem {104 contentItem {
88 anchors.leftMargin: units.gu(2)105 anchors.leftMargin: units.gu(2)
89 anchors.rightMargin: units.gu(2)106 anchors.rightMargin: units.gu(2)
90 }107 }
91 enabled: source != ""108 enabled: source != ""
92 // Used by Autopilot109 // Used by Autopilot
93 property string text: label110 property string text: label
94 onClicked: widgetList.currentIndex = index111 onClicked: widgetList.currentIndex = index
95 Label {112 Label {
96 id: labelItem113 id: labelItem
97 anchors {114 anchors {
98 fill: parent115 fill: parent
99 rightMargin: units.gu(4)116 rightMargin: units.gu(4)
100 }117 }
101 text: label118 text: label
102 verticalAlignment: Text.AlignVCenter119 verticalAlignment: Text.AlignVCenter
103 }120 }
104 Icon {121 Icon {
105 name: "next"122 name: "next"
106 width: units.gu(2)123 width: units.gu(2)
107 height: units.gu(2)124 height: units.gu(2)
108 anchors {125 anchors {
109 verticalCenter: parent.verticalCenter126 verticalCenter: parent.verticalCenter
110 right: parent.right127 right: parent.right
111 }128 }
112 }129 }
113 }130 }
114 highlight: Rectangle {131 highlight: Rectangle {
115 color: theme.palette.selected.background132 color: theme.palette.selected.background
116 }133 }
117 highlightMoveDuration: 0134 highlightMoveDuration: 0
118 }135 }
136
137 BottomEdgeHint {
138 flickable: widgetList
139 action: aboutAction
119 }140 }
120}141}
121142
=== modified file 'examples/ubuntu-ui-toolkit-gallery/Sections.qml'
--- examples/ubuntu-ui-toolkit-gallery/Sections.qml 2015-07-03 16:19:59 +0000
+++ examples/ubuntu-ui-toolkit-gallery/Sections.qml 2015-12-07 14:19:44 +0000
@@ -19,7 +19,13 @@
1919
20Template {20Template {
21 objectName: "sectionsTemplate"21 objectName: "sectionsTemplate"
22 head.sections.model: ["first", "second", "third"]22 id: sectionsTemplate
23
24 header: PageHeader {
25 title: sectionsTemplate.title
26 sections.model: ["first", "second", "third"]
27 }
28
23 TemplateSection {29 TemplateSection {
24 title: "Sections"30 title: "Sections"
25 className: "Sections"31 className: "Sections"
2632
=== added file 'examples/ubuntu-ui-toolkit-gallery/SwipeAreaPage.qml'
--- examples/ubuntu-ui-toolkit-gallery/SwipeAreaPage.qml 1970-01-01 00:00:00 +0000
+++ examples/ubuntu-ui-toolkit-gallery/SwipeAreaPage.qml 2015-12-07 14:19:44 +0000
@@ -0,0 +1,144 @@
1/*
2 * Copyright 2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19
20Template {
21 objectName: "SwipeAreaTemplate"
22 scrollable: !(upwards.dragging | downwards.dragging |
23 rightwards.dragging | leftwards.dragging)
24
25 TemplateSection {
26 className: "SwipeArea"
27
28 TemplateRow {
29 title: i18n.tr("Upwards")
30 Rectangle {
31 width: units.gu(40)
32 height: units.gu(20)
33 color: theme.palette.normal.foreground
34
35 SwipeArea {
36 id: upwards
37 direction: SwipeArea.Upwards
38 anchors {
39 left: parent.left
40 right: parent.right
41 bottom: parent.bottom
42 }
43 height: units.gu(4)
44 Label {
45 text: i18n.tr("Upwards")
46 color: theme.palette.normal.foregroundText
47 anchors {
48 centerIn: parent
49 verticalCenterOffset: parent.dragging ? -parent.distance : 0
50 }
51 }
52 }
53 }
54 }
55
56 TemplateRow {
57 title: i18n.tr("Downwards")
58 Rectangle {
59 width: units.gu(40)
60 height: units.gu(20)
61 color: theme.palette.normal.foreground
62
63 SwipeArea {
64 id: downwards
65 direction: SwipeArea.Downwards
66 anchors {
67 left: parent.left
68 right: parent.right
69 top: parent.top
70 }
71 height: units.gu(5)
72 Label {
73 text: i18n.tr("Downwards")
74 color: theme.palette.normal.foregroundText
75 anchors {
76 centerIn: parent
77 verticalCenterOffset: parent.dragging ? parent.distance : 0
78 }
79 }
80 }
81 }
82 }
83
84 TemplateRow {
85 title: i18n.tr("Rightwards")
86 Rectangle {
87 width: units.gu(40)
88 height: units.gu(20)
89 color: theme.palette.normal.foreground
90
91 SwipeArea {
92 id: rightwards
93 direction: SwipeArea.Rightwards
94 anchors {
95 left: parent.left
96 top: parent.top
97 bottom: parent.bottom
98 }
99 width: units.gu(5)
100
101 Label {
102 text: i18n.tr("Rightwards")
103 rotation: -90
104 color: theme.palette.normal.foregroundText
105 anchors {
106 centerIn: parent
107 horizontalCenterOffset: parent.dragging ? parent.distance : 0
108 }
109 }
110 }
111 }
112 }
113
114 TemplateRow {
115 title: i18n.tr("Leftwards")
116 Rectangle {
117 width: units.gu(40)
118 height: units.gu(20)
119 color: theme.palette.normal.foreground
120
121 SwipeArea {
122 id: leftwards
123 direction: SwipeArea.Leftwards
124 anchors {
125 right: parent.right
126 top: parent.top
127 bottom: parent.bottom
128 }
129 width: units.gu(5)
130
131 Label {
132 text: i18n.tr("Leftwards")
133 rotation: 90
134 color: theme.palette.normal.foregroundText
135 anchors {
136 centerIn: parent
137 horizontalCenterOffset: parent.dragging ? -parent.distance : 0
138 }
139 }
140 }
141 }
142 }
143 }
144}
0145
=== modified file 'examples/ubuntu-ui-toolkit-gallery/Template.qml'
--- examples/ubuntu-ui-toolkit-gallery/Template.qml 2015-07-16 09:12:55 +0000
+++ examples/ubuntu-ui-toolkit-gallery/Template.qml 2015-12-07 14:19:44 +0000
@@ -20,20 +20,31 @@
20Page {20Page {
21 id: template21 id: template
2222
23 default property alias content: layout.children23 default property alias content: column.children
24 property alias spacing: layout.spacing24 property alias spacing: column.spacing
25 property alias scrollable: flickable.interactive
26 readonly property alias flickable: flickable
27
28 header: PageHeader {
29 title: template.title
30 flickable: layout.columns === 1 ? flickable : null
31 onFlickableChanged: exposed = true;
32 }
2533
26 Flickable {34 Flickable {
27 id: flickable35 id: flickable
28 objectName: "TemplateFlickable"36 objectName: "TemplateFlickable"
29 anchors.fill: parent37 anchors {
30 anchors.topMargin: units.gu(2)38 fill: parent
31 anchors.bottomMargin: units.gu(2)39 topMargin: template.header.flickable ? units.gu(2) :
32 contentHeight: layout.height40 units.gu(2) + template.header.height
41 bottomMargin: units.gu(2)
42 }
43 contentHeight: column.height
33 interactive: contentHeight > height44 interactive: contentHeight > height
3445
35 Column {46 Column {
36 id: layout47 id: column
37 spacing: units.gu(6)48 spacing: units.gu(6)
38 anchors.left: parent.left49 anchors.left: parent.left
39 anchors.right: parent.right50 anchors.right: parent.right
4051
=== modified file 'examples/ubuntu-ui-toolkit-gallery/TemplateRow.qml'
--- examples/ubuntu-ui-toolkit-gallery/TemplateRow.qml 2015-04-25 08:18:45 +0000
+++ examples/ubuntu-ui-toolkit-gallery/TemplateRow.qml 2015-12-07 14:19:44 +0000
@@ -26,7 +26,7 @@
26 default property alias content: contentRow.children26 default property alias content: contentRow.children
2727
28 height: Math.max(contentRow.height, label.height)28 height: Math.max(contentRow.height, label.height)
29 width: parent.width29 width: parent ? parent.width : 0
3030
31 Label {31 Label {
32 id: label32 id: label
3333
=== modified file 'examples/ubuntu-ui-toolkit-gallery/WidgetsModel.qml'
--- examples/ubuntu-ui-toolkit-gallery/WidgetsModel.qml 2015-09-25 17:05:53 +0000
+++ examples/ubuntu-ui-toolkit-gallery/WidgetsModel.qml 2015-12-07 14:19:44 +0000
@@ -102,9 +102,14 @@
102 source: "CrossFadeImage.qml"102 source: "CrossFadeImage.qml"
103 }103 }
104 ListElement {104 ListElement {
105 objectName: "swipeAreaElement"
106 label: "SwipeArea"
107 source: "SwipeAreaPage.qml"
108 }
109 ListElement {
105 objectName: "bottomEdgeHintElement"110 objectName: "bottomEdgeHintElement"
106 label: "Bottom Edge Hint"111 label: "Bottom Edge"
107 source: "BottomEdgeHint.qml"112 source: "BottomEdgePage.qml"
108 }113 }
109114
110 ListElement {115 ListElement {
111116
=== modified file 'examples/ubuntu-ui-toolkit-gallery/gallery'
--- examples/ubuntu-ui-toolkit-gallery/gallery 2015-09-14 14:10:37 +0000
+++ examples/ubuntu-ui-toolkit-gallery/gallery 2015-12-07 14:19:44 +0000
@@ -1,6 +1,6 @@
1#!/bin/bash1#!/bin/bash
22
3. `dirname $0`/../../build_paths.inc3. `dirname ${BASH_SOURCE[0]}`/../../export_modules_dir.sh || exit 1
44
5SCRIPT_DIRECTORY=`dirname $0`5SCRIPT_DIRECTORY=`dirname $0`
6$BUILD_DIR/ubuntu-ui-toolkit-launcher/ubuntu-ui-toolkit-launcher $@ $SCRIPT_DIRECTORY/ubuntu-ui-toolkit-gallery.qml6QT_LOGGING_CONF=$SCRIPT_DIRECTORY/gallery-logging.config $BUILD_DIR/ubuntu-ui-toolkit-launcher/ubuntu-ui-toolkit-launcher $@ $SCRIPT_DIRECTORY/ubuntu-ui-toolkit-gallery.qml
77
=== added file 'examples/ubuntu-ui-toolkit-gallery/gallery-logging.config'
--- examples/ubuntu-ui-toolkit-gallery/gallery-logging.config 1970-01-01 00:00:00 +0000
+++ examples/ubuntu-ui-toolkit-gallery/gallery-logging.config 2015-12-07 14:19:44 +0000
@@ -0,0 +1,5 @@
1[Rules]
2libubuntugestures.TouchRegistry.debug=false
3ubuntu.components.SwipeArea.debug=false
4ubuntu.components.SwipeArea.ActiveTouchInfo.debug=false
5ubuntu.components.BottomEdge.debug=false
06
=== modified file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.pro'
--- examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.pro 2015-06-15 08:53:40 +0000
+++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.pro 2015-12-07 14:19:44 +0000
@@ -1,6 +1,6 @@
1TEMPLATE = subdirs1TEMPLATE = subdirs
22
3SUBDIRS += po3SUBDIRS += Gallery.pro po
44
5filetypes = qml png svg js jpg qmlproject desktop5filetypes = qml png svg js jpg qmlproject desktop
66
@@ -10,7 +10,8 @@
10 OTHER_FILES += *.$$filetype10 OTHER_FILES += *.$$filetype
11}11}
1212
13OTHER_FILES += gallery13OTHER_FILES += gallery \
14 gallery-logging.config
1415
15desktop_files.path = $$[QT_INSTALL_EXAMPLES]/ubuntu-ui-toolkit/examples/ubuntu-ui-toolkit-gallery16desktop_files.path = $$[QT_INSTALL_EXAMPLES]/ubuntu-ui-toolkit/examples/ubuntu-ui-toolkit-gallery
16desktop_files.files = ubuntu-ui-toolkit-gallery.desktop17desktop_files.files = ubuntu-ui-toolkit-gallery.desktop
1718
=== modified file 'export_modules_dir.sh'
--- export_modules_dir.sh 2015-05-19 07:55:27 +0000
+++ export_modules_dir.sh 2015-12-07 14:19:44 +0000
@@ -1,4 +1,4 @@
1#!/bin/sh1#!/bin/bash
2#2#
3# Copyright 2012 - 2015 Canonical Ltd.3# Copyright 2012 - 2015 Canonical Ltd.
4#4#
@@ -15,10 +15,12 @@
15# along with this program. If not, see <http://www.gnu.org/licenses/>.15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16#16#
1717
18. `dirname $0`/build_paths.inc18. `dirname ${BASH_SOURCE[0]}`/build_paths.inc || exit 1
19export QML_IMPORT_PATH=$BUILD_DIR/qml19export QML_IMPORT_PATH=$BUILD_DIR/qml
20export QML2_IMPORT_PATH=$BUILD_DIR/qml20export QML2_IMPORT_PATH=$BUILD_DIR/qml
21export UBUNTU_UI_TOOLKIT_THEMES_PATH=$BUILD_DIR/qml21export UBUNTU_UI_TOOLKIT_THEMES_PATH=$BUILD_DIR/qml
22export LD_LIBRARY_PATH=$BUILD_DIR/lib
22/sbin/initctl set-env --global QML_IMPORT_PATH=$BUILD_DIR/qml23/sbin/initctl set-env --global QML_IMPORT_PATH=$BUILD_DIR/qml
23/sbin/initctl set-env --global QML2_IMPORT_PATH=$BUILD_DIR/qml24/sbin/initctl set-env --global QML2_IMPORT_PATH=$BUILD_DIR/qml
24/sbin/initctl set-env --global UBUNTU_UI_TOOLKIT_THEMES_PATH=$BUILD_DIR/qml25/sbin/initctl set-env --global UBUNTU_UI_TOOLKIT_THEMES_PATH=$BUILD_DIR/qml
26/sbin/initctl set-env --global LD_LIBRARY_PATH=$BUILD_DIR/lib
2527
=== modified file 'features/ubuntu_qml_plugin.prf'
--- features/ubuntu_qml_plugin.prf 2015-08-13 09:40:00 +0000
+++ features/ubuntu_qml_plugin.prf 2015-12-07 14:19:44 +0000
@@ -36,8 +36,19 @@
36 membackend.name = ALARM_BACKEND36 membackend.name = ALARM_BACKEND
37 membackend.value = memory37 membackend.value = memory
3838
39 #make sure qmlplugindump finds all libs
40 ld_lib_path.name = LD_LIBRARY_PATH
41 ld_lib_path.value =
42 for(qmod, QTREPOS) {
43 qmod = $$qmod/lib
44 exists($$qmod): ld_lib_path.value += $$shell_path($$qmod)
45 }
46 ld_lib_path.value += $$shell_path($$ROOT_BUILD_DIR/lib)
47 ld_lib_path.value = $$unique(ld_lib_path.value)
48
39 qtAddToolEnv(QMLPLUGINDUMP, importpath)49 qtAddToolEnv(QMLPLUGINDUMP, importpath)
40 qtAddToolEnv(QMLPLUGINDUMP, membackend)50 qtAddToolEnv(QMLPLUGINDUMP, membackend)
51 qtAddToolEnv(QMLPLUGINDUMP, ld_lib_path)
4152
42 TARGETPATHBASE = $$replace(TARGETPATH, \\.\\d+\$, )53 TARGETPATHBASE = $$replace(TARGETPATH, \\.\\d+\$, )
4354
@@ -68,3 +79,6 @@
6879
69QMAKE_CXXFLAGS += -Werror80QMAKE_CXXFLAGS += -Werror
7081
82#do not warn for deprecated declarations
83QMAKE_CXXFLAGS -= -Werror=deprecated-declarations
84
7185
=== added file 'features/ubuntu_qt_module.prf'
--- features/ubuntu_qt_module.prf 1970-01-01 00:00:00 +0000
+++ features/ubuntu_qt_module.prf 2015-12-07 14:19:44 +0000
@@ -0,0 +1,22 @@
1!build_with_qt: {
2 #enable autocreation of include directory
3 CONFIG += git_build
4}
5
6load(qt_module)
7
8CONFIG -= create_cmake
9
10# when building against the system Qt we pick up the CXX_FLAGS for a release build
11# reset them to the default debug build flags
12!build_with_qt: {
13 CONFIG(debug, debug|release) {
14 QMAKE_CFLAGS = $$QMAKE_CFLAGS_DEBUG
15 QMAKE_CXXFLAGS = $$QMAKE_CXXFLAGS_DEBUG
16 }
17}
18
19QMAKE_CXXFLAGS += -Werror
20
21#do not warn for deprecated declarations
22QMAKE_CXXFLAGS -= -Werror=deprecated-declarations
023
=== modified file 'gallery.sh'
--- gallery.sh 2015-08-11 15:42:46 +0000
+++ gallery.sh 2015-12-07 14:19:44 +0000
@@ -15,8 +15,6 @@
15# along with this program. If not, see <http://www.gnu.org/licenses/>.15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16#16#
1717
18source export_modules_dir.sh
19
20if [ "$1" == "--autopilot" ]18if [ "$1" == "--autopilot" ]
21then19then
22 examples/ubuntu-ui-toolkit-gallery/gallery -testability &20 examples/ubuntu-ui-toolkit-gallery/gallery -testability &
2321
=== modified file 'src/Ubuntu/Components/1.2/DraggingArea.qml'
--- src/Ubuntu/Components/1.2/DraggingArea.qml 2015-04-30 08:32:44 +0000
+++ src/Ubuntu/Components/1.2/DraggingArea.qml 2015-12-07 14:19:44 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.417import QtQuick 2.4
18import "mathUtils.js" as MathLocal18import Ubuntu.Components 1.2
1919
20MouseArea {20MouseArea {
21 id: draggingArea21 id: draggingArea
@@ -25,7 +25,7 @@
25 property real dragVelocity: 025 property real dragVelocity: 0
26 property real dragValue: (orientation == Qt.Vertical ? (mouseY - __pressedPosition.y)26 property real dragValue: (orientation == Qt.Vertical ? (mouseY - __pressedPosition.y)
27 : (mouseX - __pressedPosition.x))27 : (mouseX - __pressedPosition.x))
28 property real lateralPosition: orientation == Qt.Horizontal ? MathLocal.clamp(mouseY, 0, height) : MathLocal.clamp(mouseX, 0, width)28 property real lateralPosition: orientation == Qt.Horizontal ? MathUtils.clamp(mouseY, 0, height) : MathUtils.clamp(mouseX, 0, width)
29 property point __pressedPosition: Qt.point(0, 0)29 property point __pressedPosition: Qt.point(0, 0)
30 property var __dragEvents: []30 property var __dragEvents: []
31 property bool clickValidated: true31 property bool clickValidated: true
3232
=== modified file 'src/Ubuntu/Components/1.2/MainViewBase.qml'
--- src/Ubuntu/Components/1.2/MainViewBase.qml 2015-04-30 08:32:44 +0000
+++ src/Ubuntu/Components/1.2/MainViewBase.qml 2015-12-07 14:19:44 +0000
@@ -48,12 +48,12 @@
4848
49 Qt bug: https://bugreports.qt-project.org/browse/QTBUG-1171249 Qt bug: https://bugreports.qt-project.org/browse/QTBUG-11712
50 */50 */
51 property string theme: (ColorUtils.luminance(backgroundColor) >= 0.85) ?51 property string themeName: (ColorUtils.luminance(backgroundColor) >= 0.85) ?
52 "Ambiance" : "SuruDark"52 "Ambiance" : "SuruDark"
53 onThemeChanged: {53 onThemeNameChanged: {
54 // only change the theme if the current one is a system one.54 // only change the theme if the current one is a system one.
55 if (theme !== "" && (Theme.name.search("Ubuntu.Components.Themes") >= 0)) {55 if (themeName !== "" && (Theme.name.search("Ubuntu.Components.Themes") >= 0)) {
56 Theme.name = "Ubuntu.Components.Themes.%1".arg(theme);56 Theme.name = "Ubuntu.Components.Themes.%1".arg(themeName);
57 }57 }
58 }58 }
59 }59 }
6060
=== modified file 'src/Ubuntu/Components/1.2/Slider.qml'
--- src/Ubuntu/Components/1.2/Slider.qml 2015-04-30 08:32:44 +0000
+++ src/Ubuntu/Components/1.2/Slider.qml 2015-12-07 14:19:44 +0000
@@ -17,7 +17,6 @@
17// FIXME(loicm) Add support for keyboard shortcuts (basically left/right).17// FIXME(loicm) Add support for keyboard shortcuts (basically left/right).
1818
19import QtQuick 2.419import QtQuick 2.4
20import "mathUtils.js" as MathUtils
21import Ubuntu.Components 1.220import Ubuntu.Components 1.2
2221
23/*!22/*!
2423
=== modified file 'src/Ubuntu/Components/1.2/TextArea.qml'
--- src/Ubuntu/Components/1.2/TextArea.qml 2015-04-30 08:32:44 +0000
+++ src/Ubuntu/Components/1.2/TextArea.qml 2015-12-07 14:19:44 +0000
@@ -17,7 +17,6 @@
17import QtQuick 2.417import QtQuick 2.4
18import Ubuntu.Components 1.2 as Ubuntu18import Ubuntu.Components 1.2 as Ubuntu
19import Ubuntu.Components.Popups 1.019import Ubuntu.Components.Popups 1.0
20import "mathUtils.js" as MathUtils
2120
22/*!21/*!
23 \qmltype TextArea22 \qmltype TextArea
@@ -767,7 +766,7 @@
767 var max = (control.maximumLineCount <= 0) ?766 var max = (control.maximumLineCount <= 0) ?
768 control.lineCount :767 control.lineCount :
769 Math.min(control.maximumLineCount, control.lineCount);768 Math.min(control.maximumLineCount, control.lineCount);
770 control.height = linesHeight(MathUtils.clamp(control.lineCount, 1, max));769 control.height = linesHeight(Ubuntu.MathUtils.clamp(control.lineCount, 1, max));
771 }770 }
772 }771 }
773 }772 }
774773
=== removed file 'src/Ubuntu/Components/1.2/mathUtils.js'
--- src/Ubuntu/Components/1.2/mathUtils.js 2015-07-17 14:42:26 +0000
+++ src/Ubuntu/Components/1.2/mathUtils.js 1970-01-01 00:00:00 +0000
@@ -1,61 +0,0 @@
1/*
2 * Copyright 2012 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17/*!
18 \qmltype mathUtils
19 \inqmlmodule Ubuntu.Components 1.2
20 \ingroup ubuntu
21 \brief Various mathematical utility functions.
22 */
23
24.pragma library
25
26/*!
27 \qmlmethod clamp(x, min, max)
28 Ensure the value x is between min and max
29 */
30function clamp(x, min, max) {
31 if (min <= max) {
32 return Math.max(min, Math.min(x, max));
33 } else {
34 // swap min/max if min > max
35 return clamp(x, max, min);
36 }
37}
38
39/*!
40 \qmlmethod lerp(delta, from, to)
41 Get the linear interpolation
42 */
43function lerp(delta, from, to) {
44 return ((1.0 - delta) * from) + (delta * to);
45}
46
47/*!
48 \qmlmethod getFlickableChild(item)
49 Linearly project a value x from [xmin, xmax] into [ymin, ymax]
50 */
51function projectValue(x, xmin, xmax, ymin, ymax) {
52 return ((x - xmin) * ymax - (x - xmax) * ymin) / (xmax - xmin)
53}
54
55/*!
56 \qmlmethod clampAndProject(x, xmin, xmax, ymin, ymax)
57 Linearly project a value x, but in addition to projectValue it's clamped to xmin/xmax first
58 */
59function clampAndProject(x, xmin, xmax, ymin, ymax) {
60 return projectValue(clamp(x, xmin, xmax), xmin, xmax, ymin, ymax)
61}
620
=== removed file 'src/Ubuntu/Components/1.2/scrollbarUtils.js'
--- src/Ubuntu/Components/1.2/scrollbarUtils.js 2015-04-30 08:32:44 +0000
+++ src/Ubuntu/Components/1.2/scrollbarUtils.js 1970-01-01 00:00:00 +0000
@@ -1,129 +0,0 @@
1/*
2 * Copyright 2012 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17.pragma library
18
19Qt.include("mathUtils.js")
20
21/*!
22 \internal
23 Object storing property names used in calculations.
24 */
25var _obj = {
26 scrollbar: null,
27 vertical: false,
28 propOrigin: "",
29 propContent: "",
30 propPosRatio: "",
31 propSizeRatio: "",
32 propCoordinate: "",
33 propSize: "",
34 refresh: function () {
35 _obj.vertical = (_obj.scrollbar.align === Qt.AlignLeading) || (_obj.scrollbar.align === Qt.AlignTrailing)
36 _obj.propOrigin = (_obj.vertical) ? "originY" : "originX";
37 _obj.propContent = (_obj.vertical) ? "contentY" : "contentX";
38 _obj.propPosRatio = (_obj.vertical) ? "yPosition" : "xPosition";
39 _obj.propSizeRatio = (_obj.vertical) ? "heightRatio" : "widthRatio";
40 _obj.propCoordinate = (_obj.vertical) ? "y" : "x";
41 _obj.propSize = (_obj.vertical) ? "height" : "width";
42 }
43}
44
45/*!
46 \internal
47 Checks whether the _obj is valid or not. Must be called in every function
48 as those can be invoked prior to the host (style) component completion.
49 */
50function __check(sb) {
51 if (sb !== null && (_obj.scrollbar !== sb)) {
52 _obj.scrollbar = sb;
53 sb.flickableItemChanged.connect(_obj.refresh);
54 sb.alignChanged.connect(_obj.refresh);
55 _obj.refresh();
56 }
57
58 return _obj.scrollbar;
59}
60
61/*!
62 Returns whether the scrollbar is vertical or horizontal.
63 */
64function isVertical(scrollbar) {
65 if (!__check(scrollbar)) return 0;
66 return _obj.vertical;
67}
68
69/*!
70 Calculates the slider position based on the visible area's ratios.
71 */
72function sliderPos(scrollbar, min, max) {
73 if (!__check(scrollbar)) return 0;
74 return clamp(scrollbar.flickableItem.visibleArea[_obj.propPosRatio] * scrollbar.flickableItem[_obj.propSize], min, max);
75}
76
77/*!
78 Calculates the slider size for ListViews based on the visible area's position
79 and size ratios, clamping it between min and max.
80
81 The function can be used in Scrollbar styles to calculate the size of the slider.
82 */
83function sliderSize(scrollbar, min, max) {
84 if (!__check(scrollbar)) return 0;
85 var sizeRatio = scrollbar.flickableItem.visibleArea[_obj.propSizeRatio];
86 var posRatio = scrollbar.flickableItem.visibleArea[_obj.propPosRatio];
87 var sizeUnderflow = (sizeRatio * max) < min ? min - (sizeRatio * max) : 0
88 var startPos = posRatio * (max - sizeUnderflow)
89 var endPos = (posRatio + sizeRatio) * (max - sizeUnderflow) + sizeUnderflow
90 var overshootStart = startPos < 0 ? -startPos : 0
91 var overshootEnd = endPos > max ? endPos - max : 0
92
93 // overshoot adjusted start and end
94 var adjustedStartPos = startPos + overshootStart
95 var adjustedEndPos = endPos - overshootStart - overshootEnd
96
97 // final position and size of thumb
98 var position = adjustedStartPos + min > max ? max - min : adjustedStartPos
99 var result = (adjustedEndPos - position) < min ? min : (adjustedEndPos - position)
100
101 return result;
102}
103
104/*!
105 The function calculates and clamps the position to be scrolled to the minimum
106 and maximum values.
107
108 The scroll and drag functions require a slider that does not have any minimum
109 size set (meaning the minimum is set to 0.0). Implementations should consider
110 using an invisible cursor to drag the slider and the ListView position.
111 */
112function scrollAndClamp(scrollbar, amount, min, max) {
113 if (!__check(scrollbar)) return 0;
114 return scrollbar.flickableItem[_obj.propOrigin] +
115 clamp(scrollbar.flickableItem[_obj.propContent] - scrollbar.flickableItem[_obj.propOrigin] + amount,
116 min, max);
117}
118
119/*!
120 The function calculates the new position of the dragged slider. The amount is
121 relative to the contentSize, which is either the flickable's contentHeight or
122 contentWidth or other calculated value, depending on its orientation. The pageSize
123 specifies the visibleArea, and it is usually the heigtht/width of the scrolling area.
124 */
125function dragAndClamp(scrollbar, cursor, contentSize, pageSize) {
126 if (!__check(scrollbar)) return 0;
127 scrollbar.flickableItem[_obj.propContent] =
128 scrollbar.flickableItem[_obj.propOrigin] + cursor[_obj.propCoordinate] * contentSize / pageSize;
129}
1300
=== modified file 'src/Ubuntu/Components/1.3/AdaptivePageLayout.qml'
--- src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2015-10-14 15:44:15 +0000
+++ src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2015-12-07 14:19:44 +0000
@@ -166,6 +166,11 @@
166 and the preferred width is set to 40 grid units. This width is set every time166 and the preferred width is set to 40 grid units. This width is set every time
167 the layout is activated.167 the layout is activated.
168168
169 When a \l Page with the \l Page::header property set is added to an
170 AdaptivePageLayout, the AdaptivePageLayout will synchronize the height of that
171 header with the height of the headers in other columns, i.e., the height of
172 each of the headers will be set to the maximum implicitHeight of all the headers.
173
169 \sa PageStack, PageColumnsLayout, PageColumn174 \sa PageStack, PageColumnsLayout, PageColumn
170*/175*/
171176
@@ -452,7 +457,17 @@
452 // replace page holder's child457 // replace page holder's child
453 var holder = body.children[targetColumn];458 var holder = body.children[targetColumn];
454 holder.detachCurrentPage();459 holder.detachCurrentPage();
455 holder.attachPage(pageWrapper);460 holder.attachPage(pageWrapper); // sets pageWrapper.pageHolder
461
462 // set the back action for Page.header:
463 var page = pageWrapper.object;
464 if (page && page.hasOwnProperty("header") && page.header &&
465 page.header.hasOwnProperty("navigationActions")) {
466 // Page.header is an instance of PageHeader.
467 var backAction = backActionComponent.createObject(
468 pageWrapper, { 'wrapper': pageWrapper } );
469 page.header.navigationActions = [ backAction ] ;
470 }
456 }471 }
457472
458 function getWrapper(page) {473 function getWrapper(page) {
@@ -644,6 +659,42 @@
644 }659 }
645 }660 }
646661
662 // An instance will be added to each Page with
663 Component {
664 id: backActionComponent
665
666 Action {
667 // used when the Page has a Page.header property set.
668 id: backAction
669 objectName: "apl_back_action"
670 iconName: "back"
671 text: "Back"
672
673 // set when backAction is created.
674 property PageWrapper wrapper
675 onTriggered: layout.removePages(wrapper.object)
676
677 visible: {
678 var parentWrapper;
679 try {
680 parentWrapper = d.tree.parent(wrapper);
681 } catch(err) {
682 // Root node has no parent node.
683 return false;
684 }
685 if (!wrapper.pageHolder) {
686 // columns are being re-arranged.
687 return false;
688 }
689 // wrapper.column is the virtual column, pageHolder.column the actual column.
690 var column = wrapper.pageHolder.column;
691 var nextInColumn = d.tree.top(column, column < d.columns - 1, 1);
692 return parentWrapper === nextInColumn;
693 }
694 }
695 }
696
697
647 // Page holder component, can have only one Page as child at a time, all stacked pages698 // Page holder component, can have only one Page as child at a time, all stacked pages
648 // will be parented into hiddenPool699 // will be parented into hiddenPool
649 Component {700 Component {
@@ -670,6 +721,15 @@
670 property var page: pageWrapper ? pageWrapper.object : null721 property var page: pageWrapper ? pageWrapper.object : null
671 property bool customHeader: page && page.hasOwnProperty("header") &&722 property bool customHeader: page && page.hasOwnProperty("header") &&
672 page.header723 page.header
724 onPageChanged: body.updateHeaderHeight(0)
725 Connections {
726 target: page
727 onHeaderChanged: body.updateHeaderHeight(0)
728 }
729 Connections {
730 target: page ? page.header : null
731 onImplicitHeightChanged: body.updateHeaderHeight(page.header.implicitHeight)
732 }
673733
674 // prevent the pages from taking the app header height into account.734 // prevent the pages from taking the app header height into account.
675 __propagated: null735 __propagated: null
@@ -683,8 +743,6 @@
683 right: parent.right743 right: parent.right
684 rightMargin: dividerThickness744 rightMargin: dividerThickness
685 }745 }
686 // we need to clip because the header does not have a background
687 clip: true
688 Item {746 Item {
689 id: hiddenItem747 id: hiddenItem
690 anchors.fill: parent748 anchors.fill: parent
@@ -692,6 +750,8 @@
692 }750 }
693 }751 }
694752
753 // subHeader is to be deprecated in UITK 1.4 and will be replaced
754 // by the Page.header property (introduced in 1.3).
695 property alias head: subHeader755 property alias head: subHeader
696 StyledItem {756 StyledItem {
697 id: subHeader757 id: subHeader
@@ -703,7 +763,6 @@
703 height: body.headerHeight763 height: body.headerHeight
704764
705 styleName: "PageHeadStyle"765 styleName: "PageHeadStyle"
706 theme.version: Ubuntu.toolkitVersion
707 objectName: "Header" + column766 objectName: "Header" + column
708767
709 property real preferredHeight: subHeader.__styleInstance ?768 property real preferredHeight: subHeader.__styleInstance ?
@@ -795,8 +854,8 @@
795 onXChanged: holder.Layout.preferredWidth = x854 onXChanged: holder.Layout.preferredWidth = x
796 }855 }
797856
798 function attachPage(page) {857 function attachPage(wrapper) {
799 pageWrapper = page;858 pageWrapper = wrapper;
800 pageWrapper.parent = holderBody;859 pageWrapper.parent = holderBody;
801 pageWrapper.pageHolder = holder;860 pageWrapper.pageHolder = holder;
802 pageWrapper.active = true;861 pageWrapper.active = true;
@@ -854,17 +913,32 @@
854 property real headerHeight: 0913 property real headerHeight: 0
855914
856 function updateHeaderHeight(newHeight) {915 function updateHeaderHeight(newHeight) {
916 var page;
917 var i;
857 if (newHeight > body.headerHeight) {918 if (newHeight > body.headerHeight) {
858 body.headerHeight = newHeight;919 body.headerHeight = newHeight;
859 } else {920 } else {
860 var h = 0;921 var h = 0;
861 var subHeight = 0;922 var subHeight = 0;
862 for (var i = 0; i < children.length; i++) {923 for (i = 0; i < children.length; i++) {
863 subHeight = children[i].head.preferredHeight;924 page = children[i].page;
925 if (page && page.hasOwnProperty("header") && page.header) {
926 subHeight = page.header.implicitHeight;
927 } else {
928 subHeight = children[i].head.preferredHeight;
929 }
864 if (subHeight > h) h = subHeight;930 if (subHeight > h) h = subHeight;
865 }931 }
866 body.headerHeight = h;932 body.headerHeight = h;
867 }933 }
934
935 // Update all the Page.header heights.
936 for (i = 0; i < body.children.length; i++) {
937 page = body.children[i].page;
938 if (page && page.hasOwnProperty("header") && page.header) {
939 page.header.height = headerHeight;
940 }
941 }
868 }942 }
869943
870 onChildrenChanged: {944 onChildrenChanged: {
871945
=== modified file 'src/Ubuntu/Components/1.3/AnimatedItem.qml'
--- src/Ubuntu/Components/1.3/AnimatedItem.qml 2015-04-25 08:54:58 +0000
+++ src/Ubuntu/Components/1.3/AnimatedItem.qml 2015-12-07 14:19:44 +0000
@@ -25,14 +25,13 @@
25*/25*/
2626
27import QtQuick 2.427import QtQuick 2.4
28import Ubuntu.Components 1.3 as Toolkit28import Ubuntu.Components 1.3
2929
30Toolkit.StyledItem {30StyledItem {
31 id: root31 id: root
32 /*!32 /*!
33 \deprecated33 \deprecated
34 Specifies whether the component is on the visible area of the Flickable or not.34 Specifies whether the component is on the visible area of the Flickable or not.
35 */35 */
36 theme.version: Toolkit.Ubuntu.toolkitVersion
37 property bool onScreen: true36 property bool onScreen: true
38}37}
3938
=== modified file 'src/Ubuntu/Components/1.3/AppHeader.qml'
--- src/Ubuntu/Components/1.3/AppHeader.qml 2015-10-01 21:23:04 +0000
+++ src/Ubuntu/Components/1.3/AppHeader.qml 2015-12-07 14:19:44 +0000
@@ -151,6 +151,5 @@
151 }151 }
152 }152 }
153153
154 theme.version: Components.Ubuntu.toolkitVersion
155 styleName: "PageHeadStyle"154 styleName: "PageHeadStyle"
156}155}
157156
=== removed file 'src/Ubuntu/Components/1.3/BottomEdgeHint.qml'
--- src/Ubuntu/Components/1.3/BottomEdgeHint.qml 2015-09-21 14:44:13 +0000
+++ src/Ubuntu/Components/1.3/BottomEdgeHint.qml 1970-01-01 00:00:00 +0000
@@ -1,155 +0,0 @@
1/*
2 * Copyright 2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19
20/*!
21 \qmlabstract BottomEdgeHint
22 \inqmlmodule Ubuntu.Components 1.3
23 \ingroup ubuntu
24 \brief The BottomEdgeHint shows the availability of extra features
25 available from the bottom edge of the application.
26
27 It displays either a label or an icon at the bottom of the application.
28
29 It has 2 states: hidden or visible. When hidden, part of it is still visible
30 to hint at the existence of the bottom edge.
31
32 When used with a mouse it acts like a button. The typical action associated
33 with clicking on it should be revealing the extra features provided by the
34 bottom edge.
35
36 Example:
37 \qml
38 BottomEdgeHint {
39 id: bottomEdgeHint
40 text: i18n.tr("Favorites")
41 onClicked: revealBottomEdge()
42 }
43 \endqml
44
45*/
46Item {
47 id: bottomEdgeHint
48
49 anchors {
50 bottom: parent.bottom
51 bottomMargin: bottomEdgeHint.state == "Hidden" ? -bottomEdgeHint.height + units.gu(1.5) : 0
52 horizontalCenter: parent.horizontalCenter
53 Behavior on bottomMargin { UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } }
54 }
55
56 width: label.paintedWidth + units.gu(7)
57 height: units.gu(4)
58
59 /*!
60 This handler is called when there is a mouse click on the BottomEdgeHint
61 and the BottomEdgeHint is not disabled.
62 */
63 signal clicked()
64
65 Keys.onEnterPressed: clicked()
66 Keys.onReturnPressed: clicked()
67
68 /*!
69 The label displayed by the BottomEdgeHint.
70 */
71 property string text
72
73 /*!
74 The icon displayed by the BottomEdgeHint.
75
76 This is the URL of any image file.
77 If both iconSource and iconName are defined, iconName will be ignored.
78 */
79 property url iconSource: iconName ? "image://theme/" + iconName : ""
80
81 /*!
82 The icon associated with the BottomEdgeHint in the icon theme.
83
84 If both iconSource and iconName are defined, iconName will be ignored.
85 */
86 property string iconName
87
88 /*!
89 BottomEdgeHint can take 2 states of visibility: "Hidden" and "Visible".
90
91 When "Visible", the full hint with its content is shown.
92
93 When "Hidden", only part of the hint is visible leaving more space for application content.
94 */
95 property string state: "Visible"
96
97 MouseArea {
98 id: mouseArea
99 anchors.fill: parent
100 hoverEnabled: true
101 onEntered: bottomEdgeHint.state = "Visible"
102 onClicked: {
103 Haptics.play();
104 bottomEdgeHint.clicked();
105 mouse.accepted = false;
106 }
107 }
108
109 clip: true
110
111 UbuntuShape {
112 id: background
113
114 anchors {
115 bottom: parent.bottom
116 horizontalCenter: bottomEdgeHint.horizontalCenter
117 bottomMargin: -units.gu(1)
118 }
119
120 width: bottomEdgeHint.width - 2 * hoverExpansion
121 height: bottomEdgeHint.height + units.gu(1) - hoverExpansion
122
123 property real hoverExpansion: mouseArea.containsMouse ? 0 : units.gu(0.5)
124 Behavior on hoverExpansion { UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration } }
125
126 backgroundColor: theme.palette.normal.overlay
127 }
128
129 Label {
130 id: label
131
132 anchors {
133 top: parent.top
134 horizontalCenter: parent.horizontalCenter
135 }
136 text: icon.name ? "" : bottomEdgeHint.text
137 textSize: Label.Medium
138 height: bottomEdgeHint.height
139 verticalAlignment: Text.AlignVCenter
140 horizontalAlignment: Text.AlignHCenter
141 }
142
143 Icon {
144 id: icon
145
146 name: bottomEdgeHint.iconName
147 anchors {
148 bottom: parent.bottom
149 bottomMargin: units.gu(0.5)
150 horizontalCenter: parent.horizontalCenter
151 }
152 width: height
153 height: units.gu(2)
154 }
155}
1560
=== modified file 'src/Ubuntu/Components/1.3/Button.qml'
--- src/Ubuntu/Components/1.3/Button.qml 2015-08-20 06:56:44 +0000
+++ src/Ubuntu/Components/1.3/Button.qml 2015-12-07 14:19:44 +0000
@@ -121,6 +121,5 @@
121 */121 */
122 property string iconPosition: "left"122 property string iconPosition: "left"
123123
124 theme.version: Ubuntu.toolkitVersion
125 styleName: "ButtonStyle"124 styleName: "ButtonStyle"
126}125}
127126
=== modified file 'src/Ubuntu/Components/1.3/CheckBox.qml'
--- src/Ubuntu/Components/1.3/CheckBox.qml 2015-09-16 16:58:51 +0000
+++ src/Ubuntu/Components/1.3/CheckBox.qml 2015-12-07 14:19:44 +0000
@@ -49,6 +49,5 @@
49 */49 */
50 onTriggered: checked = !checked50 onTriggered: checked = !checked
5151
52 theme.version: Ubuntu.toolkitVersion
53 styleName: "CheckBoxStyle"52 styleName: "CheckBoxStyle"
54}53}
5554
=== modified file 'src/Ubuntu/Components/1.3/DraggingArea.qml'
--- src/Ubuntu/Components/1.3/DraggingArea.qml 2015-04-25 08:54:58 +0000
+++ src/Ubuntu/Components/1.3/DraggingArea.qml 2015-12-07 14:19:44 +0000
@@ -15,6 +15,7 @@
15 */15 */
1616
17import QtQuick 2.417import QtQuick 2.4
18import Ubuntu.Components 1.3
1819
19MouseArea {20MouseArea {
20 id: draggingArea21 id: draggingArea
2122
=== modified file 'src/Ubuntu/Components/1.3/OptionSelector.qml'
--- src/Ubuntu/Components/1.3/OptionSelector.qml 2015-09-07 10:05:58 +0000
+++ src/Ubuntu/Components/1.3/OptionSelector.qml 2015-12-07 14:19:44 +0000
@@ -225,7 +225,6 @@
225 right: parent.right225 right: parent.right
226 }226 }
227 state: optionSelector.expanded ? "expanded" : "collapsed"227 state: optionSelector.expanded ? "expanded" : "collapsed"
228 theme.version: Toolkit.Ubuntu.toolkitVersion
229 styleName: "OptionSelectorStyle"228 styleName: "OptionSelectorStyle"
230 states: [ State {229 states: [ State {
231 name: "expanded"230 name: "expanded"
232231
=== removed file 'src/Ubuntu/Components/1.3/Page.qdoc'
--- src/Ubuntu/Components/1.3/Page.qdoc 2015-04-25 08:54:58 +0000
+++ src/Ubuntu/Components/1.3/Page.qdoc 1970-01-01 00:00:00 +0000
@@ -1,132 +0,0 @@
1/*
2 * Copyright 2014 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17/*!
18 \qmltype Page
19 \inqmlmodule Ubuntu.Components 1.1
20 \ingroup ubuntu
21 \brief A page is the basic Item that must be used inside the \l MainView,
22 \l PageStack and \l Tabs.
23 Anchors and height of a Page are automatically determined to align with
24 the header of the \l MainView, but can be overridden.
25
26 \l MainView provides a header for Pages it includes.
27 The text and actions of the header are determined by the \l title
28 and \l head properties of the page:
29
30 \qml
31 import QtQuick 2.4
32 import Ubuntu.Components 1.2
33
34 MainView {
35 width: units.gu(48)
36 height: units.gu(60)
37
38 Page {
39 title: i18n.tr("Example page")
40
41 Label {
42 anchors.centerIn: parent
43 text: i18n.tr("Hello world!")
44 }
45
46 head.actions: [
47 Action {
48 iconName: "search"
49 text: i18n.tr("Search")
50 },
51 Action {
52 iconName: "contacts"
53 text: i18n.tr("Contacts")
54 }
55 ]
56 }
57 }
58 \endqml
59 See \l MainView for more examples on how to use the header.
60 Advanced navigation structures can be created by adding Pages to a \l PageStack or \l Tabs.
61
62 The Page automatically anchors to the left and bottom of its parent. The width of the Page
63 will be the full width of its parent \l MainView or \l PageStack or \l Tab,
64 and the height will adapt to leave space for the header when needed. It is possible to
65 use a Page inside a Loader, but in that case do not set the anchors or size of the Loader
66 so that the Page can control its width and height.
67*/
68
69/*!
70 \qmlproperty string Page::title
71 The title of the page. Will be shown in the header of the \l MainView.
72 If the page is used inside a \l Tab, the default title is the \l Tab title.
73 For a Page not inside a \l Tab, the default title is an empty string.
74 */
75
76/*!
77 \qmlproperty Item Page::tools
78 \deprecated
79 The toolbar items associated with this Page.
80 DEPRECATED. Use \b head.actions instead.
81 */
82
83/*!
84 \qmlproperty PageHeadConfiguration Page::head
85 \readonly
86 Configuration of the header for this page.
87 */
88
89/*!
90 \qmlproperty Flickable Page::flickable
91 Optional flickable that controls the header. This property
92 is automatically set to the first child of the page that is Flickable
93 and anchors to the top of the page or fills the page. For example:
94 \qml
95 import QtQuick 2.4
96 import Ubuntu.Components 1.2
97
98 MainView {
99 width: units.gu(30)
100 height: units.gu(50)
101 Page {
102 id: page
103 title: "example"
104 //flickable: null // uncomment for a fixed header
105 Flickable {
106 id: content
107 anchors.fill: parent
108 contentHeight: units.gu(70)
109 Label {
110 text: "hello"
111 anchors.centerIn: parent
112 }
113 }
114 }
115 }
116 \endqml
117 In this example, page.flickable will automatically be set to content because it is
118 a Flickable and it fills its parent. Thus, scrolling down in the Flickable will automatically
119 hide the header.
120
121 Set this property to null to avoid automatic flickable detection, which disables hiding
122 of the header by scrolling in the Flickable. In cases where a flickable should control the header,
123 but it is not automatically detected, the flickable property can be set.
124 */
125
126/*!
127 \qmlproperty list<Action> Page::actions
128 Local actions. These actions will be made available outside the application
129 (for example, to HUD) when the Page is active. For actions that are always available
130 when the application is running, use the actions property of \l MainView.
131 For actions in the header, see \l head.
132*/
1330
=== modified file 'src/Ubuntu/Components/1.3/Page.qml'
--- src/Ubuntu/Components/1.3/Page.qml 2015-10-15 10:07:59 +0000
+++ src/Ubuntu/Components/1.3/Page.qml 2015-12-07 14:19:44 +0000
@@ -19,8 +19,55 @@
19import "pageUtils.js" as Utils19import "pageUtils.js" as Utils
2020
21/*!21/*!
22 \internal22 \qmltype Page
23 Documentation is in Page.qdoc23 \inqmlmodule Ubuntu.Components 1.1
24 \ingroup ubuntu
25 \brief A page is the basic Item that must be used inside the \l MainView,
26 \l PageStack and \l Tabs.
27 Anchors and height of a Page are automatically determined to align with
28 the header of the \l MainView, but can be overridden.
29
30
31 \l MainView provides a header for Pages it includes if no
32 \l header property was set.
33 The text and actions of the header are determined by the \l title
34 and \l head properties of the page:
35
36 \qml
37 import QtQuick 2.4
38 import Ubuntu.Components 1.2
39
40 MainView {
41 width: units.gu(48)
42 height: units.gu(60)
43
44 Page {
45 title: i18n.tr("Example page")
46
47 Label {
48 anchors.centerIn: parent
49 text: i18n.tr("Hello world!")
50 }
51
52 head.actions: [
53 Action {
54 iconName: "search"
55 text: i18n.tr("Search")
56 },
57 Action {
58 iconName: "contacts"
59 text: i18n.tr("Contacts")
60 }
61 ]
62 }
63 }
64 \endqml
65
66 The Page automatically anchors to the left and bottom of its parent. The width of the Page
67 will be the full width of its parent \l MainView or \l PageStack or \l Tab,
68 and the height will adapt to leave space for the header when needed. It is possible to
69 use a Page inside a Loader, but in that case do not set the anchors or size of the Loader
70 so that the Page can control its width and height.
24*/71*/
25PageTreeNode {72PageTreeNode {
26 id: page73 id: page
@@ -35,13 +82,13 @@
3582
36 /*!83 /*!
37 The header property for this page. Setting this property will reparent the84 The header property for this page. Setting this property will reparent the
38 header to the page and disable the \l Mainview's application header.85 header to the page and disable the \l MainView's application header.
39 \qml86 \qml
40 Page {87 Page {
41 id: page88 id: page
42 title: "Page with header"89 title: "Page with header"
43 header: PageHeader {90 header: PageHeader {
44 title: page.header91 title: page.title
45 trailingActionBar.actions: [92 trailingActionBar.actions: [
46 Action { iconName: "settings" },93 Action { iconName: "settings" },
47 Action { iconName: "info" }94 Action { iconName: "info" }
@@ -49,17 +96,65 @@
49 }96 }
50 }97 }
51 \endqml98 \endqml
99 \sa PageHeader
52 */100 */
53 property Item header101 property Item header
54 onHeaderChanged: internal.updateHeader()102 onHeaderChanged: internal.updateHeader()
55 Component.onCompleted: internal.updateHeader()103 Component.onCompleted: internal.updateHeader()
56104
105 /*! \internal */
57 isLeaf: true106 isLeaf: true
107
108 /*!
109 The title of the page. Will be shown in the header of the \l MainView.
110 If the page is used inside a \l Tab, the default title is the \l Tab title.
111 For a Page not inside a \l Tab, the default title is an empty string.
112 */
58 property string title: parentNode && parentNode.hasOwnProperty("title") ? parentNode.title : ""113 property string title: parentNode && parentNode.hasOwnProperty("title") ? parentNode.title : ""
114
115 /*!
116 Optional flickable that controls the MainView header. This property
117 is automatically set to the first child of the page that is Flickable
118 and anchors to the top of the page or fills the page. For example:
119 \qml
120 import QtQuick 2.4
121 import Ubuntu.Components 1.2
122
123 MainView {
124 width: units.gu(30)
125 height: units.gu(50)
126 Page {
127 id: page
128 title: "example"
129 //flickable: null // uncomment for a fixed header
130 Flickable {
131 id: content
132 anchors.fill: parent
133 contentHeight: units.gu(70)
134 Label {
135 text: "hello"
136 anchors.centerIn: parent
137 }
138 }
139 }
140 }
141 \endqml
142 In this example, page.flickable will automatically be set to content because it is
143 a Flickable and it fills its parent. Thus, scrolling down in the Flickable will automatically
144 hide the header.
145
146 Set this property to null to avoid automatic flickable detection, which disables hiding
147 of the header by scrolling in the Flickable. In cases where a flickable should control the header,
148 but it is not automatically detected, the flickable property can be set.
149 */
59 property Flickable flickable: Utils.getFlickableChild(page)150 property Flickable flickable: Utils.getFlickableChild(page)
60151
61 /*!152 /*!
62 \qmlproperty PageHeadConfiguration head153 \qmlproperty PageHeadConfiguration Page::head
154 \readonly
155 \deprecated
156 Configuration of the header for this page.
157 Deprecated: This configuration will be replaced by setting the \l header property.
63 */158 */
64 readonly property alias head: headerConfig159 readonly property alias head: headerConfig
65 Toolkit13.PageHeadConfiguration {160 Toolkit13.PageHeadConfiguration {
66161
=== modified file 'src/Ubuntu/Components/1.3/PageHeader.qml'
--- src/Ubuntu/Components/1.3/PageHeader.qml 2015-10-15 14:17:25 +0000
+++ src/Ubuntu/Components/1.3/PageHeader.qml 2015-12-07 14:19:44 +0000
@@ -40,8 +40,8 @@
40Header {40Header {
41 id: header41 id: header
42 anchors {42 anchors {
43 left: parent.left43 left: parent ? parent.left : undefined
44 right: parent.right44 right: parent ? parent.right : undefined
45 }45 }
4646
47 /*!47 /*!
@@ -74,11 +74,11 @@
74 */74 */
75 property Item contents75 property Item contents
7676
77 Component.onCompleted: holder.updateContents()77 Component.onCompleted: contentsHolder.updateContents()
78 onContentsChanged: holder.updateContents()78 onContentsChanged: contentsHolder.updateContents()
7979
80 Item {80 Item {
81 id: holder81 id: contentsHolder
82 anchors {82 anchors {
83 left: leading.right83 left: leading.right
84 right: trailing.left84 right: trailing.left
@@ -95,23 +95,39 @@
95 property Item previousContentsParent: null95 property Item previousContentsParent: null
9696
97 function updateContents() {97 function updateContents() {
98 if (holder.previousContents) {98 if (previousContents) {
99 holder.previousContents.parent = holder.previousContentsParent;99 previousContents.parent = previousContentsParent;
100 }100 }
101 if (contents) {101 if (header.contents) {
102 titleLoader.sourceComponent = null;102 titleLoader.sourceComponent = null;
103 holder.previousContents = header.contents;103 previousContents = header.contents;
104 holder.previousContentsParent = header.contents.parent;104 previousContentsParent = header.contents.parent;
105 header.contents.parent = holder;105 header.contents.parent = contentsHolder;
106 } else {106 } else {
107 holder.previousContents = null;107 previousContents = null;
108 holder.previousContentsParent = null;108 previousContentsParent = null;
109 titleLoader.sourceComponent = __styleInstance.titleComponent;109 titleLoader.sourceComponent = __styleInstance.titleComponent;
110 }110 }
111 }111 }
112
113 // When the style changes, make sure that the titleLoader loads
114 // the new titleComponent.
115 property Item styleInstance: __styleInstance
116 onStyleInstanceChanged: updateContents()
112 }117 }
113118
114 /*!119 /*!
120 The actions to be shown in the leading action bar.
121 This property is automatically set by the
122 \l AdaptivePageLayout and other navigation components to configure the
123 back action for the \l Page.
124 Application developers should not set this property, because the
125 value may be overridden by Ubuntu components that have navigation.
126 Instead, set \l leadingActionBar's actions property.
127 */
128 property list<Action> navigationActions
129
130 /*!
115 \qmlproperty ActionBar leadingActionBar131 \qmlproperty ActionBar leadingActionBar
116 The \l ActionBar for the leading navigation actions.132 The \l ActionBar for the leading navigation actions.
117 Example:133 Example:
@@ -125,6 +141,9 @@
125 ]141 ]
126 }142 }
127 \endqml143 \endqml
144 The default value of \l leadingActionBar actions is
145 \l navigationActions, but that value can be changed to show
146 different actions in front of the title.
128 See \l ActionBar.147 See \l ActionBar.
129 */148 */
130 readonly property alias leadingActionBar: leading149 readonly property alias leadingActionBar: leading
@@ -138,7 +157,8 @@
138 height: header.__styleInstance.contentHeight157 height: header.__styleInstance.contentHeight
139 numberOfSlots: 1158 numberOfSlots: 1
140 delegate: header.__styleInstance.defaultActionDelegate159 delegate: header.__styleInstance.defaultActionDelegate
141 visible: actions.length > 0160 actions: header.navigationActions
161 visible: leading.width > 0 // at least 1 visible action
142 StyleHints {162 StyleHints {
143 overflowIconName: "navigation-menu"163 overflowIconName: "navigation-menu"
144 }164 }
@@ -182,7 +202,59 @@
182 height: header.__styleInstance.contentHeight202 height: header.__styleInstance.contentHeight
183 numberOfSlots: 3203 numberOfSlots: 3
184 delegate: header.__styleInstance.defaultActionDelegate204 delegate: header.__styleInstance.defaultActionDelegate
185 visible: actions.length > 0205 visible: trailing.width > 0 // at least 1 visible action
206 }
207
208 /*!
209 Item shown at the bottom of the header.
210 The extension can be any Item, but it must have a height so that
211 the PageHeader correctly adjusts its height for the extension to fit.
212 The extension Item should anchor to the left, right and bottom of
213 its parent so that it will be automatically positioned above the
214 header divider. This property replaces the sections property. Sections
215 can now be added to the header as follows:
216 \qml
217 PageHeader {
218 title: "Header with sections"
219 extension: Sections {
220 anchors {
221 left: parent.left
222 leftMargin: units.gu(2)
223 bottom: parent.bottom
224 }
225 model: ["one", "two", "three"]
226 }
227 }
228 \endqml
229 */
230 property Item extension
231
232 onExtensionChanged: extensionHolder.updateExtension()
233 Item {
234 id: extensionHolder
235 anchors {
236 left: parent.left
237 right: parent.right
238 top: contentsHolder.bottom
239 }
240 height: header.extension ? header.extension.height : 0
241
242 property Item previousExtension: header.extension
243 property Item previousExtensionParent: null
244
245 function updateExtension() {
246 if (previousExtension) {
247 previousExtension.parent = previousExtensionParent;
248 }
249 if (header.extension) {
250 previousExtension = header.extension;
251 previousExtensionParent = header.extension.parent;
252 header.extension.parent = extensionHolder;
253 } else {
254 previousExtension = null;
255 previousExtensionParent = null;
256 }
257 }
186 }258 }
187259
188 /*!260 /*!
@@ -190,6 +262,7 @@
190 Sections shown at the bottom of the header. By default,262 Sections shown at the bottom of the header. By default,
191 the sections will only be visible if its actions or model263 the sections will only be visible if its actions or model
192 is set. See \l Sections.264 is set. See \l Sections.
265 \deprecated Use \l extension instead.
193 */266 */
194 readonly property alias sections: sectionsItem267 readonly property alias sections: sectionsItem
195 Sections {268 Sections {
@@ -197,12 +270,11 @@
197 anchors {270 anchors {
198 left: parent.left271 left: parent.left
199 leftMargin: units.gu(2)272 leftMargin: units.gu(2)
200 top: holder.bottom273 top: contentsHolder.bottom
201 }274 }
202 visible: model && model.length > 0275 visible: model && model.length > 0 && !header.extension
203 height: visible ? implicitHeight : 0276 height: visible ? implicitHeight : 0
204 }277 }
205278
206 theme.version: Ubuntu.toolkitVersion
207 styleName: "PageHeaderStyle"279 styleName: "PageHeaderStyle"
208}280}
209281
=== modified file 'src/Ubuntu/Components/1.3/PageStack.qml'
--- src/Ubuntu/Components/1.3/PageStack.qml 2015-07-10 07:42:38 +0000
+++ src/Ubuntu/Components/1.3/PageStack.qml 2015-12-07 14:19:44 +0000
@@ -16,6 +16,7 @@
1616
17import QtQuick 2.417import QtQuick 2.4
18import "../1.2/stack.js" as Stack18import "../1.2/stack.js" as Stack
19import Ubuntu.Components 1.3
1920
20/*!21/*!
21 \qmltype PageStack22 \qmltype PageStack
@@ -171,6 +172,13 @@
171 } else {172 } else {
172 internal.pushWrapperObject();173 internal.pushWrapperObject();
173 }174 }
175 // set the back action for Page.header:
176 if (pageObject && pageObject.hasOwnProperty("header") && pageObject.header &&
177 pageObject.header.hasOwnProperty("navigationActions")) {
178 // Page.header is an instance of PageHeader.
179 pageObject.header.navigationActions = [ backAction ];
180 }
181
174 return pageObject;182 return pageObject;
175 }183 }
176184
@@ -206,6 +214,16 @@
206 internal.stackUpdated();214 internal.stackUpdated();
207 }215 }
208216
217 Action {
218 // used when the Page has a Page.header property set.
219 id: backAction
220 visible: pageStack.depth > 0
221 iconName: "back"
222 text: "Back"
223 onTriggered: pageStack.pop()
224 objectName: "pagestack_back_action"
225 }
226
209 QtObject {227 QtObject {
210 id: internal228 id: internal
211 property Item headStyle: (pageStack.__propagated229 property Item headStyle: (pageStack.__propagated
212230
=== modified file 'src/Ubuntu/Components/1.3/PageTreeNode.qml'
--- src/Ubuntu/Components/1.3/PageTreeNode.qml 2015-10-14 19:18:58 +0000
+++ src/Ubuntu/Components/1.3/PageTreeNode.qml 2015-12-07 14:19:44 +0000
@@ -125,10 +125,6 @@
125 if (i.isLeaf) {125 if (i.isLeaf) {
126 // children of a leaf are not part of the tree126 // children of a leaf are not part of the tree
127 node = null;127 node = null;
128 print("WARNING! " +
129 "Do not put Page/Tabs/PageStack inside another "+
130 "Page because that causes confusion which is the "+
131 "active page that sets the title and actions.");
132 } else {128 } else {
133 // current node is part of the tree with i as its parent.129 // current node is part of the tree with i as its parent.
134 node = i;130 node = i;
@@ -148,6 +144,4 @@
148 node.parentNode = internal.getParentPageTreeNode(node);144 node.parentNode = internal.getParentPageTreeNode(node);
149 }145 }
150 }146 }
151
152 theme.version: Toolkit.Ubuntu.toolkitVersion
153}147}
154148
=== modified file 'src/Ubuntu/Components/1.3/PageWrapper.qml'
--- src/Ubuntu/Components/1.3/PageWrapper.qml 2015-09-24 15:28:58 +0000
+++ src/Ubuntu/Components/1.3/PageWrapper.qml 2015-12-07 14:19:44 +0000
@@ -46,7 +46,7 @@
46 property bool canDestroy: false46 property bool canDestroy: false
4747
48 /*!48 /*!
49 Column number in MultiColumnView.49 Column number in AdaptivePageLayout.
50 */50 */
51 property int column: 051 property int column: 0
5252
@@ -61,7 +61,7 @@
61 property Item parentWrapper61 property Item parentWrapper
6262
63 /*!63 /*!
64 Page holder in MultiColumnView64 Page holder in AdaptivePageLayout.
65 */65 */
66 property Item pageHolder66 property Item pageHolder
6767
6868
=== modified file 'src/Ubuntu/Components/1.3/ProgressBar.qml'
--- src/Ubuntu/Components/1.3/ProgressBar.qml 2015-05-21 10:50:35 +0000
+++ src/Ubuntu/Components/1.3/ProgressBar.qml 2015-12-07 14:19:44 +0000
@@ -70,6 +70,5 @@
70 */70 */
71 property bool showProgressPercentage: true71 property bool showProgressPercentage: true
7272
73 theme.version: Ubuntu.toolkitVersion
74 styleName: "ProgressBarStyle"73 styleName: "ProgressBarStyle"
75}74}
7675
=== modified file 'src/Ubuntu/Components/1.3/PullToRefresh.qml'
--- src/Ubuntu/Components/1.3/PullToRefresh.qml 2015-05-21 10:50:35 +0000
+++ src/Ubuntu/Components/1.3/PullToRefresh.qml 2015-12-07 14:19:44 +0000
@@ -222,7 +222,6 @@
222 */222 */
223 signal refresh()223 signal refresh()
224224
225 theme.version: Ubuntu.toolkitVersion
226 styleName: "PullToRefreshStyle"225 styleName: "PullToRefreshStyle"
227 implicitHeight: __styleInstance.implicitHeight226 implicitHeight: __styleInstance.implicitHeight
228 anchors {227 anchors {
229228
=== modified file 'src/Ubuntu/Components/1.3/Scrollbar.qml'
--- src/Ubuntu/Components/1.3/Scrollbar.qml 2015-05-21 10:50:35 +0000
+++ src/Ubuntu/Components/1.3/Scrollbar.qml 2015-12-07 14:19:44 +0000
@@ -146,6 +146,5 @@
146 }146 }
147 }147 }
148148
149 theme.version: Toolkit.Ubuntu.toolkitVersion
150 styleName: "ScrollbarStyle"149 styleName: "ScrollbarStyle"
151}150}
152151
=== modified file 'src/Ubuntu/Components/1.3/Sections.qml'
--- src/Ubuntu/Components/1.3/Sections.qml 2015-07-14 12:49:58 +0000
+++ src/Ubuntu/Components/1.3/Sections.qml 2015-12-07 14:19:44 +0000
@@ -29,7 +29,6 @@
29StyledItem {29StyledItem {
30 id: sections30 id: sections
31 styleName: "SectionsStyle"31 styleName: "SectionsStyle"
32 theme.version: Ubuntu.toolkitVersion
3332
34 /*!33 /*!
35 List of actions that represent the sections.34 List of actions that represent the sections.
3635
=== modified file 'src/Ubuntu/Components/1.3/Slider.qml'
--- src/Ubuntu/Components/1.3/Slider.qml 2015-05-21 10:50:35 +0000
+++ src/Ubuntu/Components/1.3/Slider.qml 2015-12-07 14:19:44 +0000
@@ -159,7 +159,7 @@
159 return Toolkit.MathUtils.clampAndProject(value, slider.minimumValue,159 return Toolkit.MathUtils.clampAndProject(value, slider.minimumValue,
160 slider.maximumValue, 1.0, 0.0);160 slider.maximumValue, 1.0, 0.0);
161 } else {161 } else {
162 return MathUtils.clampAndProject(value, slider.minimumValue,162 return Toolkit.MathUtils.clampAndProject(value, slider.minimumValue,
163 slider.maximumValue, 0.0, 1.0);163 slider.maximumValue, 0.0, 1.0);
164 }164 }
165165
@@ -167,10 +167,10 @@
167167
168 function valueFromNormalizedValue(normalizedValue) {168 function valueFromNormalizedValue(normalizedValue) {
169 if (Qt.application.layoutDirection == Qt.RightToLeft) {169 if (Qt.application.layoutDirection == Qt.RightToLeft) {
170 return MathUtils.lerp(MathUtils.clamp(normalizedValue, 0.0, 1.0),170 return Toolkit.MathUtils.lerp(Toolkit.MathUtils.clamp(normalizedValue, 0.0, 1.0),
171 slider.maximumValue, slider.minimumValue);171 slider.maximumValue, slider.minimumValue);
172 } else {172 } else {
173 return MathUtils.lerp(MathUtils.clamp(normalizedValue, 0.0, 1.0),173 return Toolkit.MathUtils.lerp(Toolkit.MathUtils.clamp(normalizedValue, 0.0, 1.0),
174 slider.minimumValue, slider.maximumValue);174 slider.minimumValue, slider.maximumValue);
175 }175 }
176 }176 }
@@ -206,6 +206,5 @@
206 onLiveValueChanged: if (isPressed) slider.requestFocus(Qt.MouseFocusReason)206 onLiveValueChanged: if (isPressed) slider.requestFocus(Qt.MouseFocusReason)
207 }207 }
208208
209 theme.version: Toolkit.Ubuntu.toolkitVersion
210 styleName: "SliderStyle"209 styleName: "SliderStyle"
211}210}
212211
=== modified file 'src/Ubuntu/Components/1.3/TabBar.qml'
--- src/Ubuntu/Components/1.3/TabBar.qml 2015-05-21 10:50:35 +0000
+++ src/Ubuntu/Components/1.3/TabBar.qml 2015-12-07 14:19:44 +0000
@@ -97,7 +97,6 @@
9797
98 implicitHeight: units.gu(7.5)98 implicitHeight: units.gu(7.5)
99 activeFocusOnPress: true99 activeFocusOnPress: true
100 theme.version: Toolkit.Ubuntu.toolkitVersion
101 styleName: "TabBarStyle"100 styleName: "TabBarStyle"
102101
103 QtObject {102 QtObject {
104103
=== modified file 'src/Ubuntu/Components/1.3/TextArea.qml'
--- src/Ubuntu/Components/1.3/TextArea.qml 2015-09-07 10:05:58 +0000
+++ src/Ubuntu/Components/1.3/TextArea.qml 2015-12-07 14:19:44 +0000
@@ -538,6 +538,13 @@
538 */538 */
539 property alias wrapMode:editor.wrapMode539 property alias wrapMode:editor.wrapMode
540540
541 /*!
542 Whether the TextArea should gain active focus on a mouse press. By default
543 this is set to true.
544 \qmlproperty bool activeFocusOnPress
545 */
546 property alias activeFocusOnPress: editor.activeFocusOnPress
547
541 // signals548 // signals
542 /*!549 /*!
543 This handler is called when the user clicks on a link embedded in the text.550 This handler is called when the user clicks on a link embedded in the text.
@@ -752,6 +759,7 @@
752759
753 opacity: enabled ? 1.0 : 0.3760 opacity: enabled ? 1.0 : 0.3
754 activeFocusOnPress: true761 activeFocusOnPress: true
762 activeFocusOnTab: true
755763
756 /*!\internal */764 /*!\internal */
757 onVisibleChanged: {765 onVisibleChanged: {
@@ -858,7 +866,7 @@
858 wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere866 wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
859 mouseSelectionMode: TextEdit.SelectWords867 mouseSelectionMode: TextEdit.SelectWords
860 selectByMouse: true868 selectByMouse: true
861 activeFocusOnPress: control.activeFocusOnPress869 activeFocusOnPress: true
862 onActiveFocusChanged: if (!activeFocus && inputHandler.popover) PopupUtils.close(inputHandler.popover)870 onActiveFocusChanged: if (!activeFocus && inputHandler.popover) PopupUtils.close(inputHandler.popover)
863 cursorDelegate: TextCursor {871 cursorDelegate: TextCursor {
864 handler: inputHandler872 handler: inputHandler
@@ -886,6 +894,5 @@
886 }894 }
887 }895 }
888896
889 theme.version: Ubuntu.Ubuntu.toolkitVersion
890 styleName: "TextAreaStyle"897 styleName: "TextAreaStyle"
891}898}
892899
=== modified file 'src/Ubuntu/Components/1.3/TextCursor.qml'
--- src/Ubuntu/Components/1.3/TextCursor.qml 2015-10-30 13:38:52 +0000
+++ src/Ubuntu/Components/1.3/TextCursor.qml 2015-12-07 14:19:44 +0000
@@ -41,7 +41,6 @@
41 handler.main.cursorDelegate :41 handler.main.cursorDelegate :
42 __styleInstance.cursorDelegate42 __styleInstance.cursorDelegate
4343
44 theme.version: Ubuntu.Ubuntu.toolkitVersion
45 styleName: "TextCursorStyle"44 styleName: "TextCursorStyle"
4645
47 objectName: "textCursor"46 objectName: "textCursor"
4847
=== modified file 'src/Ubuntu/Components/1.3/TextField.qml'
--- src/Ubuntu/Components/1.3/TextField.qml 2015-09-07 10:05:58 +0000
+++ src/Ubuntu/Components/1.3/TextField.qml 2015-12-07 14:19:44 +0000
@@ -172,6 +172,13 @@
172 property alias acceptableInput: editor.acceptableInput172 property alias acceptableInput: editor.acceptableInput
173173
174 /*!174 /*!
175 Whether the TextField should gain active focus on a mouse press. By default
176 this is set to true.
177 \qmlproperty bool activeFocusOnPress
178 */
179 property alias activeFocusOnPress: editor.activeFocusOnPress
180
181 /*!
175 Whether the TextField should scroll when the text is longer than the width.182 Whether the TextField should scroll when the text is longer than the width.
176 By default this is set to true.183 By default this is set to true.
177184
@@ -810,6 +817,7 @@
810817
811 opacity: enabled ? 1.0 : 0.3818 opacity: enabled ? 1.0 : 0.3
812 activeFocusOnPress: true819 activeFocusOnPress: true
820 activeFocusOnTab: true
813821
814 /*! \internal */822 /*! \internal */
815 onVisibleChanged: {823 onVisibleChanged: {
@@ -870,6 +878,8 @@
870 for (var i = 0; i < children.length; i++) {878 for (var i = 0; i < children.length; i++) {
871 children[i].parent = leftPane;879 children[i].parent = leftPane;
872 children[i].anchors.verticalCenter = verticalCenter;880 children[i].anchors.verticalCenter = verticalCenter;
881 children[i].activeFocusOnPress = false;
882 children[i].activeFocusOnTab = false;
873 }883 }
874 }884 }
875 }885 }
@@ -892,6 +902,8 @@
892 for (var i = 0; i < children.length; i++) {902 for (var i = 0; i < children.length; i++) {
893 children[i].parent = rightPane;903 children[i].parent = rightPane;
894 children[i].anchors.verticalCenter = verticalCenter;904 children[i].anchors.verticalCenter = verticalCenter;
905 children[i].activeFocusOnPress = false;
906 children[i].activeFocusOnTab = false;
895 }907 }
896 }908 }
897 }909 }
@@ -900,6 +912,7 @@
900 id: clearButton912 id: clearButton
901 objectName: "clear_button"913 objectName: "clear_button"
902 activeFocusOnPress: false914 activeFocusOnPress: false
915 activeFocusOnTab: false
903916
904 anchors {917 anchors {
905 top: parent.top918 top: parent.top
@@ -993,7 +1006,7 @@
9931006
994 // overrides1007 // overrides
995 selectByMouse: true1008 selectByMouse: true
996 activeFocusOnPress: control.activeFocusOnPress1009 activeFocusOnPress: true
997 onActiveFocusChanged: if (!activeFocus && inputHandler.popover) PopupUtils.close(inputHandler.popover)1010 onActiveFocusChanged: if (!activeFocus && inputHandler.popover) PopupUtils.close(inputHandler.popover)
9981011
999 // input selection and navigation handling1012 // input selection and navigation handling
@@ -1013,6 +1026,5 @@
1013 cursorPosition = 0;1026 cursorPosition = 0;
1014 }1027 }
10151028
1016 theme.version: Ubuntu.Ubuntu.toolkitVersion
1017 styleName: "TextFieldStyle"1029 styleName: "TextFieldStyle"
1018}1030}
10191031
=== modified file 'src/Ubuntu/Components/1.3/TextInputPopover.qml'
--- src/Ubuntu/Components/1.3/TextInputPopover.qml 2015-09-16 05:28:29 +0000
+++ src/Ubuntu/Components/1.3/TextInputPopover.qml 2015-12-07 14:19:44 +0000
@@ -86,7 +86,6 @@
86 width: Math.max(units.gu(5), implicitWidth) + units.gu(2)86 width: Math.max(units.gu(5), implicitWidth) + units.gu(2)
87 height: units.gu(6)87 height: units.gu(6)
88 action: actions[modelData]88 action: actions[modelData]
89 theme.version: Ubuntu.toolkitVersion
90 styleName: "ToolbarButtonStyle"89 styleName: "ToolbarButtonStyle"
91 }90 }
92 }91 }
9392
=== modified file 'src/Ubuntu/Components/1.3/Toolbar.qml'
--- src/Ubuntu/Components/1.3/Toolbar.qml 2015-05-21 10:50:35 +0000
+++ src/Ubuntu/Components/1.3/Toolbar.qml 2015-12-07 14:19:44 +0000
@@ -135,7 +135,6 @@
135 property bool opened: toolbar.opened135 property bool opened: toolbar.opened
136 property bool animating: toolbar.animating136 property bool animating: toolbar.animating
137137
138 theme.version: Toolkit.Ubuntu.toolkitVersion
139 styleName: "ToolbarStyle"138 styleName: "ToolbarStyle"
140 }139 }
141140
142141
=== modified file 'src/Ubuntu/Components/1.3/ToolbarButton.qml'
--- src/Ubuntu/Components/1.3/ToolbarButton.qml 2015-05-21 10:50:35 +0000
+++ src/Ubuntu/Components/1.3/ToolbarButton.qml 2015-12-07 14:19:44 +0000
@@ -84,6 +84,5 @@
84 height: parent ? parent.height : undefined84 height: parent ? parent.height : undefined
85 width: units.gu(5)85 width: units.gu(5)
8686
87 theme.version: Ubuntu.toolkitVersion
88 styleName: "ToolbarButtonStyle"87 styleName: "ToolbarButtonStyle"
89}88}
9089
=== removed file 'src/Ubuntu/Components/1.3/mathUtils.js'
--- src/Ubuntu/Components/1.3/mathUtils.js 2015-07-24 18:25:07 +0000
+++ src/Ubuntu/Components/1.3/mathUtils.js 1970-01-01 00:00:00 +0000
@@ -1,61 +0,0 @@
1/*
2 * Copyright 2012-2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17/*!
18 \qmltype mathUtils
19 \inqmlmodule Ubuntu.Components 1.3
20 \ingroup ubuntu
21 \brief Various mathematical utility functions.
22 */
23
24.pragma library
25
26/*!
27 \qmlmethod mathUtils::clamp(x, min, max)
28 Ensure the value x is between min and max
29 */
30function clamp(x, min, max) {
31 if (min <= max) {
32 return Math.max(min, Math.min(x, max));
33 } else {
34 // swap min/max if min > max
35 return clamp(x, max, min);
36 }
37}
38
39/*!
40 \qmlmethod mathUtils::lerp(delta, from, to)
41 Get the linear interpolation
42 */
43function lerp(delta, from, to) {
44 return ((1.0 - delta) * from) + (delta * to);
45}
46
47/*!
48 \qmlmethod mathUtils::projectValue(x, xmin, xmax, ymin, ymax)
49 Linearly project a value x from [xmin, xmax] into [ymin, ymax]
50 */
51function projectValue(x, xmin, xmax, ymin, ymax) {
52 return ((x - xmin) * ymax - (x - xmax) * ymin) / (xmax - xmin)
53}
54
55/*!
56 \qmlmethod mathUtils::clampAndProject(x, xmin, xmax, ymin, ymax)
57 Linearly project a value x, but in addition to projectValue it's clamped to xmin/xmax first
58 */
59function clampAndProject(x, xmin, xmax, ymin, ymax) {
60 return projectValue(clamp(x, xmin, xmax), xmin, xmax, ymin, ymax)
61}
620
=== modified file 'src/Ubuntu/Components/ComponentModule.pro'
--- src/Ubuntu/Components/ComponentModule.pro 2015-10-02 22:48:13 +0000
+++ src/Ubuntu/Components/ComponentModule.pro 2015-12-07 14:19:44 +0000
@@ -43,7 +43,6 @@
43 1.2/MainView12.qml \43 1.2/MainView12.qml \
44 1.2/MainViewBase.qml \44 1.2/MainViewBase.qml \
45 1.2/MainView.qml \45 1.2/MainView.qml \
46 1.2/mathUtils.js \
47 1.2/Object.qml \46 1.2/Object.qml \
48 1.2/OptionSelectorDelegate.qml \47 1.2/OptionSelectorDelegate.qml \
49 1.2/OptionSelector.qml \48 1.2/OptionSelector.qml \
@@ -60,7 +59,6 @@
60 1.2/Panel.qml \59 1.2/Panel.qml \
61 1.2/PullToRefresh.qml \60 1.2/PullToRefresh.qml \
62 1.2/Scrollbar.qml \61 1.2/Scrollbar.qml \
63 1.2/scrollbarUtils.js \
64 1.2/Slider.qml \62 1.2/Slider.qml \
65 1.2/sliderUtils.js \63 1.2/sliderUtils.js \
66 1.2/stack.js \64 1.2/stack.js \
@@ -96,7 +94,6 @@
96 1.3/InputHandler.qml \94 1.3/InputHandler.qml \
97 1.3/MainViewBase.qml \95 1.3/MainViewBase.qml \
98 1.3/MainView.qml \96 1.3/MainView.qml \
99 1.3/mathUtils.js \
100 1.3/OptionSelectorDelegate.qml \97 1.3/OptionSelectorDelegate.qml \
101 1.3/OptionSelector.qml \98 1.3/OptionSelector.qml \
102 1.3/OrientationHelper.qml \99 1.3/OrientationHelper.qml \
@@ -132,16 +129,14 @@
132 1.3/UbuntuListView.qml \129 1.3/UbuntuListView.qml \
133 1.3/UbuntuNumberAnimation.qml \130 1.3/UbuntuNumberAnimation.qml \
134 1.3/ListItemPopover.qml \131 1.3/ListItemPopover.qml \
135 1.3/BottomEdgeHint.qml \
136 1.3/PageColumn.qml \132 1.3/PageColumn.qml \
137 1.3/PageColumnsLayout.qml \133 1.3/PageColumnsLayout.qml \
138 1.3/ProgressionSlot.qml \134 1.3/ProgressionSlot.qml \
139 1.3/PageHeader.qml \135 1.3/PageHeader.qml \
140136
141OTHER_FILES+= qmldir \137OTHER_FILES+= qmldir \
142 1.3/CrossFadeImage.qdoc \138 1.3/CrossFadeImage.qdoc \
143 1.3/UbuntuListView11.qdoc \139 1.3/UbuntuListView11.qdoc \
144 1.3/Page.qdoc \
145 1.3/PageHeadConfiguration.qdoc \140 1.3/PageHeadConfiguration.qdoc \
146 1.3/MainView.qdoc \141 1.3/MainView.qdoc \
147 1.3/Icon.qdoc142 1.3/Icon.qdoc
148143
=== modified file 'src/Ubuntu/Components/ListItems/1.3/ItemSelector.qml'
--- src/Ubuntu/Components/ListItems/1.3/ItemSelector.qml 2015-05-22 13:54:38 +0000
+++ src/Ubuntu/Components/ListItems/1.3/ItemSelector.qml 2015-12-07 14:19:44 +0000
@@ -216,7 +216,6 @@
216 right: parent.right216 right: parent.right
217 }217 }
218 state: itemSelector.expanded ? "expanded" : "collapsed"218 state: itemSelector.expanded ? "expanded" : "collapsed"
219 theme.version: Ubuntu.toolkitVersion
220 styleName: "ListItemOptionSelectorStyle"219 styleName: "ListItemOptionSelectorStyle"
221220
222 states: [ State {221 states: [ State {
223222
=== modified file 'src/Ubuntu/Components/ListItems/1.3/ProgressionVisual.qml'
--- src/Ubuntu/Components/ListItems/1.3/ProgressionVisual.qml 2015-05-22 13:54:38 +0000
+++ src/Ubuntu/Components/ListItems/1.3/ProgressionVisual.qml 2015-12-07 14:19:44 +0000
@@ -25,6 +25,5 @@
25 property bool showSplit: false25 property bool showSplit: false
26 property real splitMargin26 property real splitMargin
2727
28 theme.version: Ubuntu.toolkitVersion
29 styleName: "ProgressionVisualStyle"28 styleName: "ProgressionVisualStyle"
30}29}
3130
=== modified file 'src/Ubuntu/Components/Pickers/1.3/DatePicker.qml'
--- src/Ubuntu/Components/Pickers/1.3/DatePicker.qml 2015-05-22 13:54:38 +0000
+++ src/Ubuntu/Components/Pickers/1.3/DatePicker.qml 2015-12-07 14:19:44 +0000
@@ -420,7 +420,6 @@
420 }420 }
421 }421 }
422422
423 theme.version: Ubuntu.toolkitVersion
424 styleName: "DatePickerStyle"423 styleName: "DatePickerStyle"
425 Binding {424 Binding {
426 target: __styleInstance425 target: __styleInstance
427426
=== modified file 'src/Ubuntu/Components/Pickers/1.3/Dialer.qml'
--- src/Ubuntu/Components/Pickers/1.3/Dialer.qml 2015-05-22 13:54:38 +0000
+++ src/Ubuntu/Components/Pickers/1.3/Dialer.qml 2015-12-07 14:19:44 +0000
@@ -145,7 +145,6 @@
145 implicitHeight: size145 implicitHeight: size
146 activeFocusOnPress: true146 activeFocusOnPress: true
147147
148 theme.version: Ubuntu.toolkitVersion
149 styleName: "DialerStyle"148 styleName: "DialerStyle"
150149
151 Item {150 Item {
152151
=== modified file 'src/Ubuntu/Components/Pickers/1.3/DialerHand.qml'
--- src/Ubuntu/Components/Pickers/1.3/DialerHand.qml 2015-05-22 13:54:38 +0000
+++ src/Ubuntu/Components/Pickers/1.3/DialerHand.qml 2015-12-07 14:19:44 +0000
@@ -143,7 +143,6 @@
143 width: parent.width143 width: parent.width
144 height: parent.height144 height: parent.height
145 activeFocusOnPress: true145 activeFocusOnPress: true
146 theme.version: Ubuntu.toolkitVersion
147 styleName: "DialerHandStyle"146 styleName: "DialerHandStyle"
148147
149 /*! \internal */148 /*! \internal */
150149
=== modified file 'src/Ubuntu/Components/Pickers/1.3/Picker.qml'
--- src/Ubuntu/Components/Pickers/1.3/Picker.qml 2015-09-24 20:05:52 +0000
+++ src/Ubuntu/Components/Pickers/1.3/Picker.qml 2015-12-07 14:19:44 +0000
@@ -165,7 +165,6 @@
165165
166 activeFocusOnPress: true166 activeFocusOnPress: true
167167
168 theme.version: Ubuntu.toolkitVersion
169 styleName: "PickerStyle"168 styleName: "PickerStyle"
170169
171 /*! \internal */170 /*! \internal */
172171
=== modified file 'src/Ubuntu/Components/Pickers/1.3/PickerDelegate.qml'
--- src/Ubuntu/Components/Pickers/1.3/PickerDelegate.qml 2015-09-24 20:05:52 +0000
+++ src/Ubuntu/Components/Pickers/1.3/PickerDelegate.qml 2015-12-07 14:19:44 +0000
@@ -45,7 +45,6 @@
45 internal.itemList.currentIndex = index;45 internal.itemList.currentIndex = index;
46 }46 }
4747
48 theme.version: Ubuntu.toolkitVersion
49 styleName: "PickerDelegateStyle"48 styleName: "PickerDelegateStyle"
5049
51 QtObject {50 QtObject {
5251
=== modified file 'src/Ubuntu/Components/Popups/1.2/Dialog.qml'
--- src/Ubuntu/Components/Popups/1.2/Dialog.qml 2015-04-30 08:32:44 +0000
+++ src/Ubuntu/Components/Popups/1.2/Dialog.qml 2015-12-07 14:19:44 +0000
@@ -156,6 +156,8 @@
156 activeFocusOnPress: true156 activeFocusOnPress: true
157 width: Math.min(minimumWidth, dialog.width)157 width: Math.min(minimumWidth, dialog.width)
158 anchors.centerIn: parent158 anchors.centerIn: parent
159 clip: true
160 objectName: 'dialogForeground'
159161
160 // used in the style162 // used in the style
161 property string title163 property string title
@@ -166,8 +168,9 @@
166 property real margins: units.gu(4)168 property real margins: units.gu(4)
167 property real itemSpacing: units.gu(2)169 property real itemSpacing: units.gu(2)
168 property Item dismissArea: dialog.dismissArea170 property Item dismissArea: dialog.dismissArea
171 property real keyboardHeight: dialog.anchorToKeyboard && UbuntuApplication.inputMethod.visible ? UbuntuApplication.inputMethod.keyboardRectangle.height : 0
169172
170 height: Math.min(contentsColumn.height + foreground.margins, dialog.height)173 height: Math.min(contentsColumn.height + foreground.margins, dialog.height - keyboardHeight)
171174
172 Flickable {175 Flickable {
173 anchors.fill: parent176 anchors.fill: parent
174177
=== modified file 'src/Ubuntu/Components/Popups/1.3/Dialog.qml'
--- src/Ubuntu/Components/Popups/1.3/Dialog.qml 2015-09-21 14:44:13 +0000
+++ src/Ubuntu/Components/Popups/1.3/Dialog.qml 2015-12-07 14:19:44 +0000
@@ -157,6 +157,8 @@
157 focus: visible157 focus: visible
158 width: Math.min(minimumWidth, dialog.width)158 width: Math.min(minimumWidth, dialog.width)
159 anchors.centerIn: parent159 anchors.centerIn: parent
160 clip: true
161 objectName: 'dialogForeground'
160162
161 // used in the style163 // used in the style
162 property string title164 property string title
@@ -167,8 +169,9 @@
167 property real margins: units.gu(4)169 property real margins: units.gu(4)
168 property real itemSpacing: units.gu(2)170 property real itemSpacing: units.gu(2)
169 property Item dismissArea: dialog.dismissArea171 property Item dismissArea: dialog.dismissArea
172 property real keyboardHeight: dialog.anchorToKeyboard && UbuntuApplication.inputMethod.visible ? UbuntuApplication.inputMethod.keyboardRectangle.height : 0
170173
171 height: Math.min(contentsColumn.height + foreground.margins, dialog.height)174 height: Math.min(contentsColumn.height + foreground.margins, dialog.height - keyboardHeight)
172175
173 Flickable {176 Flickable {
174 anchors.fill: parent177 anchors.fill: parent
@@ -213,7 +216,6 @@
213 }216 }
214 }217 }
215218
216 theme.version: Ubuntu.toolkitVersion
217 styleName: "DialogForegroundStyle"219 styleName: "DialogForegroundStyle"
218 }220 }
219}221}
220222
=== modified file 'src/Ubuntu/Components/Popups/1.3/Popover.qml'
--- src/Ubuntu/Components/Popups/1.3/Popover.qml 2015-08-12 19:53:20 +0000
+++ src/Ubuntu/Components/Popups/1.3/Popover.qml 2015-12-07 14:19:44 +0000
@@ -241,7 +241,6 @@
241 signal showCompleted()241 signal showCompleted()
242 signal hideCompleted()242 signal hideCompleted()
243243
244 theme.version: Ubuntu.toolkitVersion
245 styleName: "PopoverForegroundStyle"244 styleName: "PopoverForegroundStyle"
246 }245 }
247246
248247
=== modified file 'src/Ubuntu/Components/Popups/1.3/SheetBase.qml'
--- src/Ubuntu/Components/Popups/1.3/SheetBase.qml 2015-05-22 13:54:38 +0000
+++ src/Ubuntu/Components/Popups/1.3/SheetBase.qml 2015-12-07 14:19:44 +0000
@@ -109,7 +109,6 @@
109 }109 }
110 }110 }
111111
112 theme.version: Ubuntu.toolkitVersion
113 styleName: "SheetForegroundStyle"112 styleName: "SheetForegroundStyle"
114 }113 }
115}114}
116115
=== modified file 'src/Ubuntu/Components/Styles/1.3/PageHeaderStyle.qml'
--- src/Ubuntu/Components/Styles/1.3/PageHeaderStyle.qml 2015-10-10 13:02:00 +0000
+++ src/Ubuntu/Components/Styles/1.3/PageHeaderStyle.qml 2015-12-07 14:19:44 +0000
@@ -51,7 +51,7 @@
51 property Component titleComponent51 property Component titleComponent
5252
53 /*!53 /*!
54 The height of the header excluding the divider and sections.54 The height of the header excluding the divider and extension.
55 */55 */
56 property real contentHeight56 property real contentHeight
57}57}
5858
=== modified file 'src/Ubuntu/Components/Styles/Styles.pro'
--- src/Ubuntu/Components/Styles/Styles.pro 2015-10-08 21:19:56 +0000
+++ src/Ubuntu/Components/Styles/Styles.pro 2015-12-07 14:19:44 +0000
@@ -13,7 +13,3 @@
13load(ubuntu_qml_module)13load(ubuntu_qml_module)
1414
15OTHER_FILES+=qmldir15OTHER_FILES+=qmldir
16
17
18
19
2016
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.2/OptionSelectorStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.2/OptionSelectorStyle.qml 2015-04-24 14:52:19 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.2/OptionSelectorStyle.qml 2015-12-07 14:19:44 +0000
@@ -20,6 +20,7 @@
2020
21Item {21Item {
22 id: ambianceStyle22 id: ambianceStyle
23 objectName: "OptionSelector12"
2324
24 property url chevron: Qt.resolvedUrl("../artwork/chevron_down.png")25 property url chevron: Qt.resolvedUrl("../artwork/chevron_down.png")
25 property url tick: Qt.resolvedUrl("../artwork/tick.png")26 property url tick: Qt.resolvedUrl("../artwork/tick.png")
2627
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.2/ScrollbarStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.2/ScrollbarStyle.qml 2015-04-24 14:52:19 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.2/ScrollbarStyle.qml 2015-12-07 14:19:44 +0000
@@ -85,7 +85,7 @@
85 property Flickable flickableItem: styledItem.flickableItem85 property Flickable flickableItem: styledItem.flickableItem
86 property bool isScrollable: styledItem.__private.scrollable && pageSize > 0.086 property bool isScrollable: styledItem.__private.scrollable && pageSize > 0.0
87 && contentSize > 0.0 && contentSize > pageSize87 && contentSize > 0.0 && contentSize > pageSize
88 property bool isVertical: ScrollbarUtils.isVertical(styledItem)88 property bool isVertical: (styledItem.align === Qt.AlignLeading) || (styledItem.align === Qt.AlignTrailing)
89 property bool frontAligned: (styledItem.align === Qt.AlignLeading)89 property bool frontAligned: (styledItem.align === Qt.AlignLeading)
90 property bool rearAligned: (styledItem.align === Qt.AlignTrailing)90 property bool rearAligned: (styledItem.align === Qt.AlignTrailing)
91 property bool topAligned: (styledItem.align === Qt.AlignTop)91 property bool topAligned: (styledItem.align === Qt.AlignTop)
@@ -94,6 +94,83 @@
94 property real pageSize: (isVertical) ? styledItem.height : styledItem.width94 property real pageSize: (isVertical) ? styledItem.height : styledItem.width
95 property real contentSize: (isVertical) ? styledItem.flickableItem.contentHeight : styledItem.flickableItem.contentWidth95 property real contentSize: (isVertical) ? styledItem.flickableItem.contentHeight : styledItem.flickableItem.contentWidth
9696
97 /*!
98 \internal
99 Object storing property names used in calculations.
100 */
101 QtObject {
102 id: scrollbarUtils
103
104 property string propOrigin: (isVertical) ? "originY" : "originX"
105 property string propContent: (isVertical) ? "contentY" : "contentX"
106 property string propPosRatio: (isVertical) ? "yPosition" : "xPosition"
107 property string propSizeRatio: (isVertical) ? "heightRatio" : "widthRatio"
108 property string propCoordinate: (isVertical) ? "y" : "x"
109 property string propSize: (isVertical) ? "height" : "width"
110
111 /*!
112 \internal
113 Calculates the slider position based on the visible area's ratios.
114 */
115 function sliderPos(min, max) {
116 return MathUtils.clamp(styledItem.flickableItem.visibleArea[propPosRatio] * styledItem.flickableItem[propSize], min, max);
117 }
118
119 /*!
120 \internal
121 Calculates the slider size for ListViews based on the visible area's position
122 and size ratios, clamping it between min and max.
123
124 The function can be used in Scrollbar styles to calculate the size of the slider.
125 */
126 function sliderSize(min, max) {
127 var sizeRatio = styledItem.flickableItem.visibleArea[propSizeRatio];
128 var posRatio = styledItem.flickableItem.visibleArea[propPosRatio];
129 var sizeUnderflow = (sizeRatio * max) < min ? min - (sizeRatio * max) : 0
130 var startPos = posRatio * (max - sizeUnderflow)
131 var endPos = (posRatio + sizeRatio) * (max - sizeUnderflow) + sizeUnderflow
132 var overshootStart = startPos < 0 ? -startPos : 0
133 var overshootEnd = endPos > max ? endPos - max : 0
134
135 // overshoot adjusted start and end
136 var adjustedStartPos = startPos + overshootStart
137 var adjustedEndPos = endPos - overshootStart - overshootEnd
138
139 // final position and size of thumb
140 var position = adjustedStartPos + min > max ? max - min : adjustedStartPos
141 var result = (adjustedEndPos - position) < min ? min : (adjustedEndPos - position)
142
143 return result;
144 }
145
146 /*!
147 \internal
148 The function calculates and clamps the position to be scrolled to the minimum
149 and maximum values.
150
151 The scroll and drag functions require a slider that does not have any minimum
152 size set (meaning the minimum is set to 0.0). Implementations should consider
153 using an invisible cursor to drag the slider and the ListView position.
154 */
155 function scrollAndClamp(amount, min, max) {
156 return styledItem.flickableItem[propOrigin] +
157 MathUtils.clamp(styledItem.flickableItem[propContent] - styledItem.flickableItem[propOrigin] + amount,
158 min, max);
159 }
160
161 /*!
162 \internal
163 The function calculates the new position of the dragged slider. The amount is
164 relative to the contentSize, which is either the flickable's contentHeight or
165 contentWidth or other calculated value, depending on its orientation. The pageSize
166 specifies the visibleArea, and it is usually the heigtht/width of the scrolling area.
167 */
168 function dragAndClamp(cursor, contentSize, pageSize) {
169 styledItem.flickableItem[propContent] =
170 styledItem.flickableItem[propOrigin] + cursor[propCoordinate] * contentSize / pageSize;
171 }
172 }
173
97 /*****************************************174 /*****************************************
98 Visuals175 Visuals
99 *****************************************/176 *****************************************/
@@ -231,13 +308,13 @@
231 // total size of the flickable.308 // total size of the flickable.
232 Item {309 Item {
233 id: scrollCursor310 id: scrollCursor
234 x: (isVertical) ? 0 : ScrollbarUtils.sliderPos(styledItem, 0.0, styledItem.width - scrollCursor.width)311 x: (isVertical) ? 0 : scrollbarUtils.sliderPos(styledItem, 0.0, styledItem.width - scrollCursor.width)
235 y: (!isVertical) ? 0 : ScrollbarUtils.sliderPos(styledItem, 0.0, styledItem.height - scrollCursor.height)312 y: (!isVertical) ? 0 : scrollbarUtils.sliderPos(styledItem, 0.0, styledItem.height - scrollCursor.height)
236 width: (isVertical) ? scrollbarArea.thickness : ScrollbarUtils.sliderSize(styledItem, 0.0, flickableItem.width)313 width: (isVertical) ? scrollbarArea.thickness : scrollbarUtils.sliderSize(styledItem, 0.0, flickableItem.width)
237 height: (!isVertical) ? scrollbarArea.thickness : ScrollbarUtils.sliderSize(styledItem, 0.0, flickableItem.height)314 height: (!isVertical) ? scrollbarArea.thickness : scrollbarUtils.sliderSize(styledItem, 0.0, flickableItem.height)
238315
239 function drag() {316 function drag() {
240 ScrollbarUtils.dragAndClamp(styledItem, scrollCursor, contentSize, pageSize);317 scrollbarUtils.dragAndClamp(styledItem, scrollCursor, contentSize, pageSize);
241 }318 }
242 }319 }
243320
@@ -253,10 +330,10 @@
253 bottom: (!isVertical) ? scrollbarArea.bottom : undefined330 bottom: (!isVertical) ? scrollbarArea.bottom : undefined
254 }331 }
255332
256 x: (isVertical) ? 0 : ScrollbarUtils.sliderPos(styledItem, 0.0, styledItem.width - slider.width)333 x: (isVertical) ? 0 : scrollbarUtils.sliderPos(styledItem, 0.0, styledItem.width - slider.width)
257 y: (!isVertical) ? 0 : ScrollbarUtils.sliderPos(styledItem, 0.0, styledItem.height - slider.height)334 y: (!isVertical) ? 0 : scrollbarUtils.sliderPos(styledItem, 0.0, styledItem.height - slider.height)
258 width: (isVertical) ? scrollbarArea.thickness : ScrollbarUtils.sliderSize(styledItem, minimumSliderSize, flickableItem.width)335 width: (isVertical) ? scrollbarArea.thickness : scrollbarUtils.sliderSize(styledItem, minimumSliderSize, flickableItem.width)
259 height: (!isVertical) ? scrollbarArea.thickness : ScrollbarUtils.sliderSize(styledItem, minimumSliderSize, flickableItem.height)336 height: (!isVertical) ? scrollbarArea.thickness : scrollbarUtils.sliderSize(styledItem, minimumSliderSize, flickableItem.height)
260 radius: visuals.sliderRadius337 radius: visuals.sliderRadius
261338
262 Behavior on width {339 Behavior on width {
@@ -275,7 +352,7 @@
275 }352 }
276353
277 function scroll(amount) {354 function scroll(amount) {
278 scrollAnimation.to = ScrollbarUtils.scrollAndClamp(styledItem, amount, 0.0, contentSize - pageSize);355 scrollAnimation.to = scrollbarUtils.scrollAndClamp(styledItem, amount, 0.0, contentSize - pageSize);
279 scrollAnimation.restart();356 scrollAnimation.restart();
280 }357 }
281 }358 }
282359
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/ActionBarStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/ActionBarStyle.qml 2015-10-15 14:17:25 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/ActionBarStyle.qml 2015-12-07 14:19:44 +0000
@@ -34,7 +34,7 @@
34 */34 */
35 defaultDelegate: AbstractButton {35 defaultDelegate: AbstractButton {
36 style: IconButtonStyle { }36 style: IconButtonStyle { }
37 objectName: action.objectName + "_action_button"37 objectName: action.objectName + "_button"
38 height: parent ? parent.height : undefined38 height: parent ? parent.height : undefined
39 action: modelData39 action: modelData
40 }40 }
@@ -88,7 +88,7 @@
88 iconSource: actionBarStyle.overflowIconSource88 iconSource: actionBarStyle.overflowIconSource
89 iconName: actionBarStyle.overflowIconName89 iconName: actionBarStyle.overflowIconName
90 text: actionBarStyle.overflowText90 text: actionBarStyle.overflowText
91 objectName: "overflow"91 objectName: "overflow_action"
92 visible: numberOfSlots.requested > numberOfSlots.available92 visible: numberOfSlots.requested > numberOfSlots.available
93 onTriggered: {93 onTriggered: {
94 var overflowButton = actionsRepeater.itemAt(actionsRepeater.count - 1);94 var overflowButton = actionsRepeater.itemAt(actionsRepeater.count - 1);
9595
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/ActivityIndicatorStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/ActivityIndicatorStyle.qml 2015-04-25 07:36:13 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/ActivityIndicatorStyle.qml 2015-12-07 14:19:44 +0000
@@ -22,7 +22,7 @@
2222
23 anchors.fill: parent23 anchors.fill: parent
24 smooth: true24 smooth: true
25 visible: styledItem.running25 visible: styledItem.running && styledItem.visible
26 fillMode: Image.PreserveAspectFit26 fillMode: Image.PreserveAspectFit
27 horizontalAlignment: Image.AlignHCenter27 horizontalAlignment: Image.AlignHCenter
28 verticalAlignment: Image.AlignVCenter28 verticalAlignment: Image.AlignVCenter
2929
=== added file 'src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeHintStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeHintStyle.qml 1970-01-01 00:00:00 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeHintStyle.qml 2015-12-07 14:19:44 +0000
@@ -0,0 +1,149 @@
1/*
2 * Copyright 2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19import Ubuntu.Components.ListItems 1.3
20
21Item {
22 id: bottomEdgeHintStyle
23 implicitWidth: styledItem.parent.width
24 implicitHeight: units.gu(4)
25
26 readonly property BottomEdgeHint hint: styledItem
27
28 // translate hint status into state
29 state: {
30 switch (hint.status) {
31 case BottomEdgeHint.Hidden: return "Hidden";
32 case BottomEdgeHint.Inactive: return "Inactive"
33 case BottomEdgeHint.Active: return "Active"
34 case BottomEdgeHint.Locked: return "Locked"
35 }
36 }
37
38 states: [
39 State {
40 name: "Inactive"
41 extend: ""
42 },
43 State {
44 name: "Active"
45 PropertyChanges {
46 target: h1
47 anchors.verticalCenterOffset: styledItem.height / 2
48 }
49 PropertyChanges {
50 target: h2
51 anchors.topMargin: 0
52 }
53 },
54 State {
55 name: "Hidden"
56 PropertyChanges {
57 target: styledItem
58 opacity: 0.0
59 }
60 },
61 State {
62 name: "Locked"
63 PropertyChanges {
64 target: h1
65 anchors.verticalCenterOffset: styledItem.height / 2
66 }
67 PropertyChanges {
68 target: h2
69 anchors.topMargin: 0
70 }
71 }
72 ]
73 transitions: [
74 Transition {
75 from: "*"
76 to: "Active"
77 reversible: true
78 UbuntuNumberAnimation {
79 targets: [h1, h2]
80 properties: "anchors.verticalCenterOffset, anchors.topMargin"
81 }
82 },
83 Transition {
84 from: "*"
85 to: "Hidden"
86 reversible: true
87 UbuntuNumberAnimation {
88 target: styledItem
89 property: "opacity"
90 duration: UbuntuAnimation.SlowDuration
91 }
92 }
93 ]
94
95 clip: true
96
97 Icon {
98 id: h1
99 width: units.gu(2)
100 height: width
101 anchors {
102 centerIn: parent
103 topMargin: styledItem.height
104 }
105 name: "up"
106 }
107
108 Rectangle {
109 id: h2
110 anchors {
111 top: parent.top
112 left: parent.left
113 right: parent.right
114 topMargin: styledItem.height
115 }
116 height: styledItem.height
117 color: theme.palette.normal.overlay
118 ThinDivider {
119 anchors.top: parent.top
120 }
121
122 Row {
123 anchors {
124 top: parent.top
125 bottom: parent.bottom
126 horizontalCenter: parent.horizontalCenter
127 }
128 spacing: units.gu(1)
129 Icon {
130 id: icon
131 name: styledItem.iconName
132 source: styledItem.iconSource
133 width: height
134 height: units.gu(2)
135 anchors.verticalCenter: parent.verticalCenter
136 color: theme.palette.normal.overlayText
137 }
138 Label {
139 id: label
140 text: styledItem.text
141 textSize: Label.Medium
142 color: theme.palette.normal.overlayText
143 height: styledItem.height
144 anchors.verticalCenter: parent.verticalCenter
145 verticalAlignment: Text.AlignVCenter
146 }
147 }
148 }
149}
0150
=== added file 'src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeStyle.qml 1970-01-01 00:00:00 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeStyle.qml 2015-12-07 14:19:44 +0000
@@ -0,0 +1,118 @@
1/*
2 * Copyright (C) 2015 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16import QtQuick 2.4
17import Ubuntu.Components 1.3
18import Ubuntu.Components.Styles 1.3
19
20BottomEdgeStyle {
21 id: bottomEdgeStyle
22 //setup properties
23 property BottomEdge bottomEdge: styledItem
24 panel: panelItem
25 contentItem: loader.item
26 panelAnimation: panelBehavior
27 revealThreshold: bottomEdge.hint.height + units.gu(2)
28
29 // own styling properties
30 property color backgroundColor: Qt.rgba(0, 0, 0, Math.min(0.25, (height - revealThreshold - panelItem.y) / (height - revealThreshold)))
31 property color panelColor: theme.palette.normal.overlay
32 property color shadowColor: "#000000"
33
34 anchors.fill: parent
35
36 Rectangle {
37 id: background
38 anchors.fill: parent
39 color: backgroundColor
40 z: -1
41 }
42
43 Rectangle {
44 id: panelItem
45 objectName: "bottomedge_panel"
46 anchors {
47 left: parent.left
48 right: parent.right
49 top: parent.bottom
50 topMargin: bottomEdge.status >= BottomEdge.Revealed
51 ? -(bottomEdge.height * bottomEdge.dragProgress)
52 : 0
53 }
54 height: loader.item ? loader.item.height : 0
55 color: panelColor
56 opacity: bottomEdge.status >= BottomEdge.Revealed ? 1.0 : 0.0
57
58 Behavior on anchors.topMargin { UbuntuNumberAnimation { id: panelBehavior } }
59
60 state: bottomEdge.status > BottomEdge.Hidden ? "drop-hint" : ""
61 states: [
62 State {
63 name: "drop-hint"
64 PropertyChanges {
65 target: bottomEdge.hint
66 restoreEntryValues: false
67 status: BottomEdgeHint.Inactive
68 }
69 }
70 ]
71
72 // shadows
73 Rectangle {
74 id: topShadow
75 anchors {
76 bottom: parent.top
77 left: parent.left
78 right: parent.right
79 }
80 height: units.gu(1.5)
81 gradient: Gradient {
82 GradientStop { position: 0.0; color: Qt.rgba(shadowColor.r, shadowColor.g, shadowColor.b, 0.0) }
83 GradientStop { position: 0.75; color: Qt.rgba(shadowColor.r, shadowColor.g, shadowColor.b, 0.05) }
84 GradientStop { position: 1.0; color: Qt.rgba(shadowColor.r, shadowColor.g, shadowColor.b, 0.1) }
85 }
86 }
87 Rectangle {
88 id: bottomShadow
89 anchors {
90 top: parent.bottom
91 left: parent.left
92 right: parent.right
93 }
94 height: units.gu(1.5)
95 rotation: 180
96 gradient: Gradient {
97 GradientStop { position: 0.0; color: Qt.rgba(shadowColor.r, shadowColor.g, shadowColor.b, 0.0) }
98 GradientStop { position: 0.75; color: Qt.rgba(shadowColor.r, shadowColor.g, shadowColor.b, 0.05) }
99 GradientStop { position: 1.0; color: Qt.rgba(shadowColor.r, shadowColor.g, shadowColor.b, 0.1) }
100 }
101 }
102
103 // content
104 Loader {
105 id: loader
106 anchors.horizontalCenter: parent.horizontalCenter
107 asynchronous: true
108 source: bottomEdge.status > BottomEdge.Hidden ? bottomEdge.contentUrl : ""
109 sourceComponent: bottomEdge.status > BottomEdge.Hidden ? bottomEdge.contentComponent : null
110 onItemChanged: {
111 if (item) {
112 item.parent = panelItem;
113 item.anchors.horizontalCenter = panelItem.horizontalCenter;
114 }
115 }
116 }
117 }
118}
0119
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/OptionSelectorStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/OptionSelectorStyle.qml 2015-07-22 13:14:43 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/OptionSelectorStyle.qml 2015-12-07 14:19:44 +0000
@@ -20,6 +20,7 @@
2020
21Item {21Item {
22 id: ambianceStyle22 id: ambianceStyle
23 objectName: "OptionSelector13"
2324
24 property url chevron: Qt.resolvedUrl("../artwork/chevron_down.png")25 property url chevron: Qt.resolvedUrl("../artwork/chevron_down.png")
25 property url tick: Qt.resolvedUrl("../artwork/tick.png")26 property url tick: Qt.resolvedUrl("../artwork/tick.png")
2627
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml 2015-11-02 15:27:14 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml 2015-12-07 14:19:44 +0000
@@ -405,6 +405,16 @@
405405
406 actions: headerStyle.config.actions406 actions: headerStyle.config.actions
407 numberOfSlots: 3407 numberOfSlots: 3
408
409 delegate: AbstractButton {
410 style: IconButtonStyle { }
411 objectName: action.objectName + "_button"
412 height: parent ? parent.height : undefined
413 action: modelData
414 StyleHints {
415 foregroundColor: headerStyle.buttonColor
416 }
417 }
408 }418 }
409 }419 }
410}420}
411421
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeaderStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeaderStyle.qml 2015-10-13 21:55:11 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeaderStyle.qml 2015-12-07 14:19:44 +0000
@@ -21,17 +21,24 @@
21 id: pageHeaderStyle21 id: pageHeaderStyle
2222
23 foregroundColor: theme.palette.selected.backgroundText23 foregroundColor: theme.palette.selected.backgroundText
24 backgroundColor: "white"24 backgroundColor: theme.palette.normal.background
25 dividerColor: Qt.rgba(0, 0, 0, 0.1)25 dividerColor: Qt.rgba(0, 0, 0, 0.1)
26 property int fontWeight: Font.Light26 property int fontWeight: Font.Light
27 property int textSize: Label.Large27 property int textSize: Label.Large
2828
29 contentHeight: units.gu(6)29 contentHeight: units.gu(6)
30 implicitHeight: contentHeight + divider.height + styledItem.sections.height30 implicitHeight: contentHeight + divider.height + internal.extensionHeight
31
32 Object {
33 id: internal
34 property real extensionHeight: styledItem.extension ?
35 styledItem.extension.height
36 : styledItem.sections.height
37 }
3138
32 defaultActionDelegate: AbstractButton {39 defaultActionDelegate: AbstractButton {
33 style: IconButtonStyle { }40 style: IconButtonStyle { }
34 objectName: action.objectName + "_action_button"41 objectName: action.objectName + "_button"
35 height: parent ? parent.height : undefined42 height: parent ? parent.height : undefined
36 action: modelData43 action: modelData
37 StyleHints {44 StyleHints {
3845
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/ScrollbarStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/ScrollbarStyle.qml 2015-06-02 15:24:54 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/ScrollbarStyle.qml 2015-12-07 14:19:44 +0000
@@ -85,7 +85,7 @@
85 property Flickable flickableItem: styledItem.flickableItem85 property Flickable flickableItem: styledItem.flickableItem
86 property bool isScrollable: styledItem.__private.scrollable && pageSize > 0.086 property bool isScrollable: styledItem.__private.scrollable && pageSize > 0.0
87 && contentSize > 0.0 && contentSize > pageSize87 && contentSize > 0.0 && contentSize > pageSize
88 property bool isVertical: ScrollbarUtils.isVertical(styledItem)88 property bool isVertical: (styledItem.align === Qt.AlignLeading) || (styledItem.align === Qt.AlignTrailing)
89 property bool frontAligned: (styledItem.align === Qt.AlignLeading)89 property bool frontAligned: (styledItem.align === Qt.AlignLeading)
90 property bool rearAligned: (styledItem.align === Qt.AlignTrailing)90 property bool rearAligned: (styledItem.align === Qt.AlignTrailing)
91 property bool topAligned: (styledItem.align === Qt.AlignTop)91 property bool topAligned: (styledItem.align === Qt.AlignTop)
@@ -94,6 +94,83 @@
94 property real pageSize: (isVertical) ? styledItem.height : styledItem.width94 property real pageSize: (isVertical) ? styledItem.height : styledItem.width
95 property real contentSize: (isVertical) ? styledItem.flickableItem.contentHeight : styledItem.flickableItem.contentWidth95 property real contentSize: (isVertical) ? styledItem.flickableItem.contentHeight : styledItem.flickableItem.contentWidth
9696
97 /*!
98 \internal
99 Object storing property names used in calculations.
100 */
101 QtObject {
102 id: scrollbarUtils
103
104 property string propOrigin: (isVertical) ? "originY" : "originX"
105 property string propContent: (isVertical) ? "contentY" : "contentX"
106 property string propPosRatio: (isVertical) ? "yPosition" : "xPosition"
107 property string propSizeRatio: (isVertical) ? "heightRatio" : "widthRatio"
108 property string propCoordinate: (isVertical) ? "y" : "x"
109 property string propSize: (isVertical) ? "height" : "width"
110
111 /*!
112 \internal
113 Calculates the slider position based on the visible area's ratios.
114 */
115 function sliderPos(min, max) {
116 return MathUtils.clamp(styledItem.flickableItem.visibleArea[propPosRatio] * styledItem.flickableItem[propSize], min, max);
117 }
118
119 /*!
120 \internal
121 Calculates the slider size for ListViews based on the visible area's position
122 and size ratios, clamping it between min and max.
123
124 The function can be used in Scrollbar styles to calculate the size of the slider.
125 */
126 function sliderSize(min, max) {
127 var sizeRatio = styledItem.flickableItem.visibleArea[propSizeRatio];
128 var posRatio = styledItem.flickableItem.visibleArea[propPosRatio];
129 var sizeUnderflow = (sizeRatio * max) < min ? min - (sizeRatio * max) : 0
130 var startPos = posRatio * (max - sizeUnderflow)
131 var endPos = (posRatio + sizeRatio) * (max - sizeUnderflow) + sizeUnderflow
132 var overshootStart = startPos < 0 ? -startPos : 0
133 var overshootEnd = endPos > max ? endPos - max : 0
134
135 // overshoot adjusted start and end
136 var adjustedStartPos = startPos + overshootStart
137 var adjustedEndPos = endPos - overshootStart - overshootEnd
138
139 // final position and size of thumb
140 var position = adjustedStartPos + min > max ? max - min : adjustedStartPos
141 var result = (adjustedEndPos - position) < min ? min : (adjustedEndPos - position)
142
143 return result;
144 }
145
146 /*!
147 \internal
148 The function calculates and clamps the position to be scrolled to the minimum
149 and maximum values.
150
151 The scroll and drag functions require a slider that does not have any minimum
152 size set (meaning the minimum is set to 0.0). Implementations should consider
153 using an invisible cursor to drag the slider and the ListView position.
154 */
155 function scrollAndClamp(amount, min, max) {
156 return styledItem.flickableItem[propOrigin] +
157 MathUtils.clamp(styledItem.flickableItem[propContent] - styledItem.flickableItem[propOrigin] + amount,
158 min, max);
159 }
160
161 /*!
162 \internal
163 The function calculates the new position of the dragged slider. The amount is
164 relative to the contentSize, which is either the flickable's contentHeight or
165 contentWidth or other calculated value, depending on its orientation. The pageSize
166 specifies the visibleArea, and it is usually the heigtht/width of the scrolling area.
167 */
168 function dragAndClamp(cursor, contentSize, pageSize) {
169 styledItem.flickableItem[propContent] =
170 styledItem.flickableItem[propOrigin] + cursor[propCoordinate] * contentSize / pageSize;
171 }
172 }
173
97 /*****************************************174 /*****************************************
98 Visuals175 Visuals
99 *****************************************/176 *****************************************/
@@ -231,13 +308,13 @@
231 // total size of the flickable.308 // total size of the flickable.
232 Item {309 Item {
233 id: scrollCursor310 id: scrollCursor
234 x: (isVertical) ? 0 : ScrollbarUtils.sliderPos(styledItem, 0.0, styledItem.width - scrollCursor.width)311 x: (isVertical) ? 0 : scrollbarUtils.sliderPos(styledItem, 0.0, styledItem.width - scrollCursor.width)
235 y: (!isVertical) ? 0 : ScrollbarUtils.sliderPos(styledItem, 0.0, styledItem.height - scrollCursor.height)312 y: (!isVertical) ? 0 : scrollbarUtils.sliderPos(styledItem, 0.0, styledItem.height - scrollCursor.height)
236 width: (isVertical) ? scrollbarArea.thickness : ScrollbarUtils.sliderSize(styledItem, 0.0, flickableItem.width)313 width: (isVertical) ? scrollbarArea.thickness : scrollbarUtils.sliderSize(styledItem, 0.0, flickableItem.width)
237 height: (!isVertical) ? scrollbarArea.thickness : ScrollbarUtils.sliderSize(styledItem, 0.0, flickableItem.height)314 height: (!isVertical) ? scrollbarArea.thickness : scrollbarUtils.sliderSize(styledItem, 0.0, flickableItem.height)
238315
239 function drag() {316 function drag() {
240 ScrollbarUtils.dragAndClamp(styledItem, scrollCursor, contentSize, pageSize);317 scrollbarUtils.dragAndClamp(styledItem, scrollCursor, contentSize, pageSize);
241 }318 }
242 }319 }
243320
@@ -253,10 +330,10 @@
253 bottom: (!isVertical) ? scrollbarArea.bottom : undefined330 bottom: (!isVertical) ? scrollbarArea.bottom : undefined
254 }331 }
255332
256 x: (isVertical) ? 0 : ScrollbarUtils.sliderPos(styledItem, 0.0, styledItem.width - slider.width)333 x: (isVertical) ? 0 : scrollbarUtils.sliderPos(styledItem, 0.0, styledItem.width - slider.width)
257 y: (!isVertical) ? 0 : ScrollbarUtils.sliderPos(styledItem, 0.0, styledItem.height - slider.height)334 y: (!isVertical) ? 0 : scrollbarUtils.sliderPos(styledItem, 0.0, styledItem.height - slider.height)
258 width: (isVertical) ? scrollbarArea.thickness : ScrollbarUtils.sliderSize(styledItem, minimumSliderSize, flickableItem.width)335 width: (isVertical) ? scrollbarArea.thickness : scrollbarUtils.sliderSize(styledItem, minimumSliderSize, flickableItem.width)
259 height: (!isVertical) ? scrollbarArea.thickness : ScrollbarUtils.sliderSize(styledItem, minimumSliderSize, flickableItem.height)336 height: (!isVertical) ? scrollbarArea.thickness : scrollbarUtils.sliderSize(styledItem, minimumSliderSize, flickableItem.height)
260 radius: visuals.sliderRadius337 radius: visuals.sliderRadius
261338
262 Behavior on width {339 Behavior on width {
@@ -275,7 +352,7 @@
275 }352 }
276353
277 function scroll(amount) {354 function scroll(amount) {
278 scrollAnimation.to = ScrollbarUtils.scrollAndClamp(styledItem, amount, 0.0, contentSize - pageSize);355 scrollAnimation.to = scrollbarUtils.scrollAndClamp(styledItem, amount, 0.0, contentSize - pageSize);
279 scrollAnimation.restart();356 scrollAnimation.restart();
280 }357 }
281 }358 }
282359
=== removed file 'src/Ubuntu/Components/Themes/Ambiance/1.3/scrollbarUtils.js'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/scrollbarUtils.js 2015-07-23 22:12:36 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/scrollbarUtils.js 1970-01-01 00:00:00 +0000
@@ -1,139 +0,0 @@
1/*
2 * Copyright 2012-2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17/*!
18 \qmltype scrollbarUtils
19 \inqmlmodule Ubuntu.Components 1.3
20 \ingroup ubuntu
21 \brief Various scrolling utility functions.
22 */
23
24.pragma library
25
26Qt.include("mathUtils.js")
27
28/*
29 Object storing property names used in calculations.
30 */
31var _obj = {
32 scrollbar: null,
33 vertical: false,
34 propOrigin: "",
35 propContent: "",
36 propPosRatio: "",
37 propSizeRatio: "",
38 propCoordinate: "",
39 propSize: "",
40 refresh: function () {
41 _obj.vertical = (_obj.scrollbar.align === Qt.AlignLeading) || (_obj.scrollbar.align === Qt.AlignTrailing)
42 _obj.propOrigin = (_obj.vertical) ? "originY" : "originX";
43 _obj.propContent = (_obj.vertical) ? "contentY" : "contentX";
44 _obj.propPosRatio = (_obj.vertical) ? "yPosition" : "xPosition";
45 _obj.propSizeRatio = (_obj.vertical) ? "heightRatio" : "widthRatio";
46 _obj.propCoordinate = (_obj.vertical) ? "y" : "x";
47 _obj.propSize = (_obj.vertical) ? "height" : "width";
48 }
49}
50
51/*
52 Checks whether the _obj is valid or not. Must be called in every function
53 as those can be invoked prior to the host (style) component completion.
54 */
55function __check(sb) {
56 if (sb !== null && (_obj.scrollbar !== sb)) {
57 _obj.scrollbar = sb;
58 sb.flickableItemChanged.connect(_obj.refresh);
59 sb.alignChanged.connect(_obj.refresh);
60 _obj.refresh();
61 }
62
63 return _obj.scrollbar;
64}
65
66/*!
67 \qmlmethod scrollbarUtils::isVertical(scrollbar)
68 Returns whether the scrollbar is vertical or horizontal.
69 */
70function isVertical(scrollbar) {
71 if (!__check(scrollbar)) return 0;
72 return _obj.vertical;
73}
74
75/*!
76 \qmlmethod scrollbarUtils::sliderPos(scrollbar, min, max)
77 Calculates the slider position based on the visible area's ratios.
78 */
79function sliderPos(scrollbar, min, max) {
80 if (!__check(scrollbar)) return 0;
81 return clamp(scrollbar.flickableItem.visibleArea[_obj.propPosRatio] * scrollbar.flickableItem[_obj.propSize], min, max);
82}
83
84/*!
85 \qmlmethod scrollbarUtils::sliderSize(scrollbar, min, max)
86 Calculates the slider size for ListViews based on the visible area's position
87 and size ratios, clamping it between min and max.
88
89 The function can be used in Scrollbar styles to calculate the size of the slider.
90 */
91function sliderSize(scrollbar, min, max) {
92 if (!__check(scrollbar)) return 0;
93 var sizeRatio = scrollbar.flickableItem.visibleArea[_obj.propSizeRatio];
94 var posRatio = scrollbar.flickableItem.visibleArea[_obj.propPosRatio];
95 var sizeUnderflow = (sizeRatio * max) < min ? min - (sizeRatio * max) : 0
96 var startPos = posRatio * (max - sizeUnderflow)
97 var endPos = (posRatio + sizeRatio) * (max - sizeUnderflow) + sizeUnderflow
98 var overshootStart = startPos < 0 ? -startPos : 0
99 var overshootEnd = endPos > max ? endPos - max : 0
100
101 // overshoot adjusted start and end
102 var adjustedStartPos = startPos + overshootStart
103 var adjustedEndPos = endPos - overshootStart - overshootEnd
104
105 // final position and size of thumb
106 var position = adjustedStartPos + min > max ? max - min : adjustedStartPos
107 var result = (adjustedEndPos - position) < min ? min : (adjustedEndPos - position)
108
109 return result;
110}
111
112/*!
113 \qmlmethod scrollbarUtils::scrollAndClamp(scrollbar, amount, min, max)
114 The function calculates and clamps the position to be scrolled to the minimum
115 and maximum values.
116
117 The scroll and drag functions require a slider that does not have any minimum
118 size set (meaning the minimum is set to 0.0). Implementations should consider
119 using an invisible cursor to drag the slider and the ListView position.
120 */
121function scrollAndClamp(scrollbar, amount, min, max) {
122 if (!__check(scrollbar)) return 0;
123 return scrollbar.flickableItem[_obj.propOrigin] +
124 clamp(scrollbar.flickableItem[_obj.propContent] - scrollbar.flickableItem[_obj.propOrigin] + amount,
125 min, max);
126}
127
128/*!
129 \qmlmethod scrollbarUtils::dragAndClamp(scrollbar, cursor, contentSize, pageSize)
130 The function calculates the new position of the dragged slider. The amount is
131 relative to the contentSize, which is either the flickable's contentHeight or
132 contentWidth or other calculated value, depending on its orientation. The pageSize
133 specifies the visibleArea, and it is usually the heigtht/width of the scrolling area.
134 */
135function dragAndClamp(scrollbar, cursor, contentSize, pageSize) {
136 if (!__check(scrollbar)) return 0;
137 scrollbar.flickableItem[_obj.propContent] =
138 scrollbar.flickableItem[_obj.propOrigin] + cursor[_obj.propCoordinate] * contentSize / pageSize;
139}
1400
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/Ambiance.pro'
--- src/Ubuntu/Components/Themes/Ambiance/Ambiance.pro 2015-10-02 22:48:13 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/Ambiance.pro 2015-12-07 14:19:44 +0000
@@ -113,6 +113,10 @@
113 1.3/ToolbarStyle.qml \113 1.3/ToolbarStyle.qml \
114 1.3/IconButtonStyle.qml \114 1.3/IconButtonStyle.qml \
115 1.3/PageHeaderStyle.qml \115 1.3/PageHeaderStyle.qml \
116 $$ARTWORK_FILES116 1.3/BottomEdgeHintStyle.qml \
117 1.3/BottomEdgeStyle.qml \
118 $$ARTWORK_FILES
117119
118load(ubuntu_qml_module)120load(ubuntu_qml_module)
121
122OTHER_FILES+=qmldir
119123
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/qmldir'
--- src/Ubuntu/Components/Themes/Ambiance/qmldir 2015-10-02 22:48:13 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/qmldir 2015-12-07 14:19:44 +0000
@@ -82,6 +82,7 @@
8282
83ListItemStyle 1.3 ./1.3/ListItemStyle.qml83ListItemStyle 1.3 ./1.3/ListItemStyle.qml
84internal SliderUtils 1.3/sliderUtils.js84internal SliderUtils 1.3/sliderUtils.js
85internal ScrollbarUtils 1.3/scrollbarUtils.js
86internal ColorUtils 1.3/colorUtils.js85internal ColorUtils 1.3/colorUtils.js
87PageHeaderStyle 1.3 ./1.3/PageHeaderStyle.qml86PageHeaderStyle 1.3 ./1.3/PageHeaderStyle.qml
87BottomEdgeHintStyle 1.3 ./1.3/BottomEdgeHintStyle.qml
88BottomEdgeStyle 1.3 ./1.3/BottomEdgeStyle.qml
8889
=== added directory 'src/Ubuntu/Components/plugin/gestures'
=== added file 'src/Ubuntu/Components/plugin/gestures/CandidateInactivityTimer.cpp'
--- src/Ubuntu/Components/plugin/gestures/CandidateInactivityTimer.cpp 1970-01-01 00:00:00 +0000
+++ src/Ubuntu/Components/plugin/gestures/CandidateInactivityTimer.cpp 2015-12-07 14:19:44 +0000
@@ -0,0 +1,46 @@
1/*
2 * Copyright (C) 2015 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "CandidateInactivityTimer.h"
18
19namespace UbuntuGestures {
20
21CandidateInactivityTimer::CandidateInactivityTimer(int touchId, QQuickItem *candidate,
22 AbstractTimer *timer, QObject *parent)
23 : QObject(parent)
24 , m_timer(timer)
25 , m_touchId(touchId)
26 , m_candidate(candidate)
27{
28 connect(m_timer, &AbstractTimer::timeout,
29 this, &CandidateInactivityTimer::onTimeout);
30 m_timer->setInterval(durationMs);
31 m_timer->setSingleShot(true);
32 m_timer->start();
33}
34
35CandidateInactivityTimer::~CandidateInactivityTimer()
36{
37 delete m_timer;
38}
39
40void CandidateInactivityTimer::onTimeout()
41{
42 qWarning("[TouchRegistry] Candidate for touch %d defaulted!", m_touchId);
43 Q_EMIT candidateDefaulted(m_touchId, m_candidate);
44}
45
46} // namespace UbuntuGestures
047
=== added file 'src/Ubuntu/Components/plugin/gestures/CandidateInactivityTimer.h'
--- src/Ubuntu/Components/plugin/gestures/CandidateInactivityTimer.h 1970-01-01 00:00:00 +0000
+++ src/Ubuntu/Components/plugin/gestures/CandidateInactivityTimer.h 2015-12-07 14:19:44 +0000
@@ -0,0 +1,52 @@
1/*
2 * Copyright 2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 */
17
18#ifndef UBUNTUGESTURES_CANDIDATE_INACTIVITY_TIMER_H
19#define UBUNTUGESTURES_CANDIDATE_INACTIVITY_TIMER_H
20
21#include <QtCore/QObject>
22
23class QQuickItem;
24
25#include "Timer.h"
26
27namespace UbuntuGestures {
28
29class UBUNTUGESTURESQML_EXPORT CandidateInactivityTimer : public QObject {
30 Q_OBJECT
31public:
32 CandidateInactivityTimer(int touchId, QQuickItem *candidate,
33 AbstractTimer *timer,
34 QObject *parent = Q_NULLPTR);
35
36 virtual ~CandidateInactivityTimer();
37
38 const int durationMs = 1000;
39
40Q_SIGNALS:
41 void candidateDefaulted(int touchId, QQuickItem *candidate);
42private Q_SLOTS:
43 void onTimeout();
44private:
45 AbstractTimer *m_timer;
46 int m_touchId;
47 QQuickItem *m_candidate;
48};
49
50} // namespace UbuntuGestures
51
52#endif // UBUNTUGESTURES_CANDIDATE_INACTIVITY_TIMER_H
053
=== added file 'src/Ubuntu/Components/plugin/gestures/damper.cpp'
--- src/Ubuntu/Components/plugin/gestures/damper.cpp 1970-01-01 00:00:00 +0000
+++ src/Ubuntu/Components/plugin/gestures/damper.cpp 2015-12-07 14:19:44 +0000
@@ -0,0 +1,24 @@
1/*
2 * Copyright (C) 2015 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "Damper.h"
18#include <QDebug>
19
20QDebug operator<<(QDebug dbg, const DampedPointF &p)
21{
22 dbg.nospace() << "(" << p.x() << ", " << p.y() << ")";
23 return dbg.space();
24}
025
=== added file 'src/Ubuntu/Components/plugin/gestures/damper.h'
--- src/Ubuntu/Components/plugin/gestures/damper.h 1970-01-01 00:00:00 +0000
+++ src/Ubuntu/Components/plugin/gestures/damper.h 2015-12-07 14:19:44 +0000
@@ -0,0 +1,89 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef UBUNTU_GESTURES_DAMPER_H
18#define UBUNTU_GESTURES_DAMPER_H
19
20#include <QtCore/QPointF>
21
22/*
23 Decreases the oscillations of a value along an axis.
24 */
25template <class Type> class Damper {
26public:
27 Damper() : m_value(0), m_maxDelta(0) { }
28
29 // Maximum delta between the raw value and its dampened counterpart.
30 void setMaxDelta(Type maxDelta) {
31 if (maxDelta < 0) qFatal("Damper::maxDelta must be a positive number.");
32 m_maxDelta = maxDelta;
33 }
34 Type maxDelta() const { return m_maxDelta; }
35
36 void reset(Type value) {
37 m_value = value;
38 }
39
40 Type update(Type value) {
41 Type delta = value - m_value;
42 if (delta > 0 && delta > m_maxDelta) {
43 m_value += delta - m_maxDelta;
44 } else if (delta < 0 && delta < -m_maxDelta) {
45 m_value += delta + m_maxDelta;
46 }
47
48 return m_value;
49 }
50
51 Type value() const { return m_value; }
52
53private:
54 Type m_value;
55 Type m_maxDelta;
56};
57
58/*
59 A point that has its movement dampened.
60 */
61class DampedPointF {
62public:
63 void setMaxDelta(qreal maxDelta) {
64 m_x.setMaxDelta(maxDelta);
65 m_y.setMaxDelta(maxDelta);
66 }
67
68 qreal maxDelta() const { return m_x.maxDelta(); }
69
70 void reset(const QPointF &point) {
71 m_x.reset(point.x());
72 m_y.reset(point.y());
73 }
74
75 void update(const QPointF &point) {
76 m_x.update(point.x());
77 m_y.update(point.y());
78 }
79
80 qreal x() const { return m_x.value(); }
81 qreal y() const { return m_y.value(); }
82private:
83 Damper<qreal> m_x;
84 Damper<qreal> m_y;
85};
86
87QDebug operator<<(QDebug dbg, const DampedPointF &p);
88
89#endif // UBUNTU_GESTURES_DAMPER_H
090
=== added file 'src/Ubuntu/Components/plugin/gestures/ubuntugesturesqmlglobal.h'
--- src/Ubuntu/Components/plugin/gestures/ubuntugesturesqmlglobal.h 1970-01-01 00:00:00 +0000
+++ src/Ubuntu/Components/plugin/gestures/ubuntugesturesqmlglobal.h 2015-12-07 14:19:44 +0000
@@ -0,0 +1,24 @@
1/*
2 * Copyright 2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 */
17
18#include <QtCore/QtGlobal>
19
20#if defined(UBUNTUGESTURESQML_LIBRARY)
21# define UBUNTUGESTURESQML_EXPORT Q_DECL_EXPORT
22#else
23# define UBUNTUGESTURESQML_EXPORT Q_DECL_IMPORT
24#endif
025
=== added file 'src/Ubuntu/Components/plugin/gestures/ucswipearea.cpp'
--- src/Ubuntu/Components/plugin/gestures/ucswipearea.cpp 1970-01-01 00:00:00 +0000
+++ src/Ubuntu/Components/plugin/gestures/ucswipearea.cpp 2015-12-07 14:19:44 +0000
@@ -0,0 +1,958 @@
1/*
2 * Copyright (C) 2015 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 */
17
18#include "ucswipearea_p.h"
19
20#include <QQuickWindow>
21#include <QtCore/qmath.h>
22#include <QScreen>
23#include <QDebug>
24
25#include <private/qquickwindow_p.h>
26
27// local
28#include <UbuntuGestures/TouchOwnershipEvent>
29#include <UbuntuGestures/TouchRegistry>
30#include <UbuntuGestures/UnownedTouchEvent>
31
32using namespace UbuntuGestures;
33
34Q_LOGGING_CATEGORY(ucSwipeArea, "ubuntu.components.SwipeArea", QtMsgType::QtWarningMsg)
35Q_LOGGING_CATEGORY(ucActiveTouchInfo, "ubuntu.components.SwipeArea.ActiveTouchInfo", QtMsgType::QtWarningMsg)
36
37#define SA_TRACE(params) qCDebug(ucSwipeArea).nospace() << "[SwipeArea(" << qPrintable(objectName()) << ")] " << params
38#define TI_TRACE(params) qCDebug(ucActiveTouchInfo).nospace() << "[ActiveTouchInfo] " << params
39
40namespace {
41const char *statusToString(UCSwipeAreaPrivate::Status status)
42{
43 if (status == UCSwipeAreaPrivate::WaitingForTouch) {
44 return "WaitingForTouch";
45 } else if (status == UCSwipeAreaPrivate::Undecided) {
46 return "Undecided";
47 } else {
48 return "Recognized";
49 }
50}
51
52QString touchPointStateToString(Qt::TouchPointState state)
53{
54 switch (state) {
55 case Qt::TouchPointPressed:
56 return QStringLiteral("pressed");
57 case Qt::TouchPointMoved:
58 return QStringLiteral("moved");
59 case Qt::TouchPointStationary:
60 return QStringLiteral("stationary");
61 case Qt::TouchPointReleased:
62 return QStringLiteral("released");
63 default:
64 return QStringLiteral("INVALID_STATE");
65 }
66}
67
68QString touchEventToString(const QTouchEvent *ev)
69{
70 QString message;
71
72 switch (ev->type()) {
73 case QEvent::TouchBegin:
74 message.append("TouchBegin ");
75 break;
76 case QEvent::TouchUpdate:
77 message.append("TouchUpdate ");
78 break;
79 case QEvent::TouchEnd:
80 message.append("TouchEnd ");
81 break;
82 case QEvent::TouchCancel:
83 message.append("TouchCancel ");
84 break;
85 default:
86 message.append("INVALID_TOUCH_EVENT_TYPE ");
87 }
88
89 Q_FOREACH(const QTouchEvent::TouchPoint& touchPoint, ev->touchPoints()) {
90 message.append(
91 QStringLiteral("(id:%1, state:%2, scenePos:(%3,%4)) ")
92 .arg(touchPoint.id())
93 .arg(touchPointStateToString(touchPoint.state()))
94 .arg(touchPoint.scenePos().x())
95 .arg(touchPoint.scenePos().y())
96 );
97 }
98
99 return message;
100}
101
102} // namespace {
103
104class Direction
105{
106public:
107 static bool isHorizontal(UCSwipeArea::Direction type)
108 {
109 return type == UCSwipeArea::Leftwards
110 || type == UCSwipeArea::Rightwards
111 || type == UCSwipeArea::Horizontal;
112 }
113
114 static bool isVertical(UCSwipeArea::Direction type)
115 {
116 return type == UCSwipeArea::Upwards
117 || type == UCSwipeArea::Downwards
118 || type == UCSwipeArea::Vertical;
119 }
120
121 static bool isPositive(UCSwipeArea::Direction type)
122 {
123 return type == UCSwipeArea::Rightwards
124 || type == UCSwipeArea::Downwards
125 || type == UCSwipeArea::Horizontal
126 || type == UCSwipeArea::Vertical;
127 }
128};
129/*!
130 * \qmltype SwipeArea
131 * \instantiates UCSwipeArea
132 * \inherits Item
133 * \inqmlmodule Ubuntu.Components 1.3
134 * \since Ubuntu.Components 1.3
135 * \ingroup ubuntu-gestures
136 * \brief An area which detects axis-aligned single-finger drag gestures.
137 *
138 * The component can be used to detect gestures of a certain direction, and can
139 * grab gestures started on a component placed behind of the SwipeArea.
140 * The gesture is detected on the SwipeArea, therefore the size must be
141 * chosen carefully so it can properly detect the gesture.
142 *
143 * The gesture direction is specified by the \l direction property. The recognized
144 * and captured gesture is reported through the \l dragging property, which becomes
145 * \c true when the gesture is detected. If there was a component under the
146 * SwipeArea, the gesture will be cancelled on that component.
147 *
148 * The drag recognition is performed within the component area in the specified
149 * direction. If the drag deviates too much from this, recognition will fail,
150 * as well as if the drag or the flick is too short. Once the drag is
151 * intercepted, the gesture will be followed even after it leaves the detection area.
152 *
153 * Example:
154 * \qml
155 * import QtQuick 2.4
156 * import Ubuntu.Components 1.3
157 *
158 * MainView {
159 * width: units.gu(40)
160 * height: units.gu(70)
161 *
162 * Page {
163 * title: "SwipeArea sample"
164 * SwipeArea {
165 * anchors {
166 * left: parent.left
167 * right: parent.right
168 * bottom: parent.bottom
169 * }
170 * height: units.gu(5)
171 * direction: SwipeArea.Upwards
172 * Label {
173 * text: "Drag upwards"
174 * anchors {
175 * centerIn: parent
176 * verticalOffset: parent.dragging ? parent.distance : 0
177 * }
178 * }
179 * }
180 * }
181 * }
182 * \endqml
183 * \note When used with a Flickable (or ListView, GridView) always put the
184 * SwipeArea next to the Flickable as sibling.
185 */
186UCSwipeArea::UCSwipeArea(QQuickItem *parent)
187 : QQuickItem(parent)
188 , d(new UCSwipeAreaPrivate(this))
189{
190 d->setRecognitionTimer(new Timer(this));
191 d->recognitionTimer->setInterval(d->maxTime);
192 d->recognitionTimer->setSingleShot(true);
193
194 connect(this, &QQuickItem::enabledChanged, d, &UCSwipeAreaPrivate::giveUpIfDisabledOrInvisible);
195 connect(this, &QQuickItem::visibleChanged, d, &UCSwipeAreaPrivate::giveUpIfDisabledOrInvisible);
196}
197
198/*!
199 * \qmlproperty enum SwipeArea::direction
200 * The direction in which the gesture should move in order to be recognized.
201 * \table
202 * \header
203 * \li Direction
204 * \li Description
205 * \row
206 * \li Rightwards
207 * \li Along the positive direction of the X axis
208 * \row
209 * \li Leftwards
210 * \li Along the negative direction of the X axis
211 * \row
212 * \li Downwards
213 * \li Along the positive direction of the Y axis
214 * \row
215 * \li Upwards
216 * \li Along the negative direction of the Y axis
217 * \row
218 * \li Horizontal
219 * \li Along the X axis, in any direction
220 * \row
221 * \li Vertical
222 * \li Along the Y axis, in any direction
223 * \endtable
224 */
225UCSwipeArea::Direction UCSwipeArea::direction() const
226{
227 return d->direction;
228}
229
230void UCSwipeArea::setDirection(Direction direction)
231{
232 if (direction != d->direction) {
233 d->direction = direction;
234 Q_EMIT directionChanged(d->direction);
235 }
236}
237
238void UCSwipeAreaPrivate::setDistanceThreshold(qreal value)
239{
240 if (distanceThreshold != value) {
241 distanceThreshold = value;
242 distanceThresholdSquared = distanceThreshold * distanceThreshold;
243 }
244}
245
246void UCSwipeAreaPrivate::setMaxTime(int value)
247{
248 if (maxTime != value) {
249 maxTime = value;
250 recognitionTimer->setInterval(maxTime);
251 }
252}
253
254void UCSwipeAreaPrivate::setRecognitionTimer(UbuntuGestures::AbstractTimer *timer)
255{
256 int interval = 0;
257 bool timerWasRunning = false;
258 bool wasSingleShot = false;
259
260 // can be null when called from the constructor
261 if (recognitionTimer) {
262 wasSingleShot = recognitionTimer->isSingleShot();
263 interval = recognitionTimer->interval();
264 timerWasRunning = recognitionTimer->isRunning();
265 if (recognitionTimer->parent() == this) {
266 delete recognitionTimer;
267 }
268 }
269
270 recognitionTimer = timer;
271 timer->setInterval(interval);
272 timer->setSingleShot(wasSingleShot);
273 connect(timer, &UbuntuGestures::AbstractTimer::timeout,
274 this, &UCSwipeAreaPrivate::rejectGesture);
275 if (timerWasRunning) {
276 recognitionTimer->start();
277 }
278}
279
280void UCSwipeAreaPrivate::setTimeSource(const SharedTimeSource &timeSource)
281{
282 this->timeSource = timeSource;
283 activeTouches.m_timeSource = timeSource;
284}
285
286/*!
287 * \qmlproperty real SwipeArea::distance
288 * \readonly
289 * The property holds the distance of the swipe from the beginning of the gesture
290 * recognition to the current touch position.
291 */
292qreal UCSwipeArea::distance() const
293{
294 return d->sceneDistance;
295}
296
297/*!
298 * \qmlproperty point SwipeArea::touchPosition
299 * \readonly
300 * Position of the touch point performing the drag relative to this item.
301 */
302QPointF UCSwipeArea::touchPosition() const
303{
304 return mapFromScene(d->publicScenePos);
305}
306
307/*!
308 * \qmlproperty bool SwipeArea::dragging
309 * \readonly
310 * Reports whether a drag gesture is taking place.
311 */
312bool UCSwipeArea::dragging() const
313{
314 return d->status == UCSwipeAreaPrivate::Recognized;
315}
316
317/*!
318 * \qmlproperty bool SwipeArea::pressed
319 * \readonly
320 * Reports whether the drag area is pressed.
321 */
322bool UCSwipeArea::pressed() const
323{
324 return d->status != UCSwipeAreaPrivate::WaitingForTouch;
325}
326
327/*!
328 * \qmlproperty bool SwipeArea::immediateRecognition
329 * Drives whether the gesture should be recognized as soon as the touch lands on
330 * the area. With this property set it will work the same way as a MultiPointTouchArea,
331 *
332 * Defaults to false. In most cases this should not be set.
333 */
334bool UCSwipeArea::immediateRecognition() const
335{
336 return d->immediateRecognition;
337}
338
339void UCSwipeArea::setImmediateRecognition(bool enabled)
340{
341 if (d->immediateRecognition != enabled) {
342 d->immediateRecognition = enabled;
343 Q_EMIT immediateRecognitionChanged(enabled);
344 }
345}
346
347bool UCSwipeArea::event(QEvent *event)
348{
349 if (event->type() == TouchOwnershipEvent::touchOwnershipEventType()) {
350 d->touchOwnershipEvent(static_cast<TouchOwnershipEvent *>(event));
351 return true;
352 } else if (event->type() == UnownedTouchEvent::unownedTouchEventType()) {
353 d->unownedTouchEvent(static_cast<UnownedTouchEvent *>(event));
354 return true;
355 } else {
356 return QQuickItem::event(event);
357 }
358}
359
360void UCSwipeAreaPrivate::touchOwnershipEvent(TouchOwnershipEvent *event)
361{
362 if (event->gained()) {
363 QVector<int> ids;
364 ids.append(event->touchId());
365 SA_TRACE("grabbing touch");
366 q->grabTouchPoints(ids);
367 } else {
368 // We still wanna know when it ends for keeping the composition time window up-to-date
369 TouchRegistry::instance()->addTouchWatcher(touchId, q);
370
371 setStatus(WaitingForTouch);
372 }
373}
374
375void UCSwipeAreaPrivate::unownedTouchEvent(UnownedTouchEvent *unownedTouchEvent)
376{
377 QTouchEvent *event = unownedTouchEvent->touchEvent();
378
379 Q_ASSERT(!event->touchPointStates().testFlag(Qt::TouchPointPressed));
380
381 SA_TRACE("Unowned " << timeSource->msecsSinceReference() << " " << qPrintable(touchEventToString(event)));
382
383 switch (status) {
384 case WaitingForTouch:
385 // do nothing
386 break;
387 case Undecided:
388 Q_ASSERT(q->isEnabled() && q->isVisible());
389 unownedTouchEvent_undecided(unownedTouchEvent);
390 break;
391 default: // Recognized:
392 // do nothing
393 break;
394 }
395
396 activeTouches.update(event);
397}
398
399void UCSwipeAreaPrivate::unownedTouchEvent_undecided(UnownedTouchEvent *unownedTouchEvent)
400{
401 const QTouchEvent::TouchPoint *touchPoint = fetchTargetTouchPoint(unownedTouchEvent->touchEvent());
402 if (!touchPoint) {
403 qCritical() << "UCSwipeArea[status=Undecided]: touch " << touchId
404 << "missing from UnownedTouchEvent without first reaching state Qt::TouchPointReleased. "
405 "Considering it as released.";
406
407 TouchRegistry::instance()->removeCandidateOwnerForTouch(touchId, q);
408 setStatus(WaitingForTouch);
409 return;
410 }
411
412 const QPointF &touchScenePosition = touchPoint->scenePos();
413
414 if (touchPoint->state() == Qt::TouchPointReleased) {
415 // touch has ended before recognition concluded
416 SA_TRACE("Touch has ended before recognition concluded");
417 TouchRegistry::instance()->removeCandidateOwnerForTouch(touchId, q);
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to status/vote changes: