Merge lp:~bzoltan/ubuntu-ui-toolkit/OTA10-landing-2016-01-20 into lp:ubuntu-ui-toolkit

Proposed by Zoltan Balogh on 2016-01-21
Status: Merged
Approved by: Zoltan Balogh on 2016-02-25
Approved revision: 1851
Merged at revision: 1281
Proposed branch: lp:~bzoltan/ubuntu-ui-toolkit/OTA10-landing-2016-01-20
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 28940 lines (+17117/-3799)
291 files modified
apicheck/apicheck.pro (+1/-1)
components.api (+87/-3)
debian/changelog (+148/-0)
debian/control (+32/-12)
debian/libubuntugestures5-dev.install (+29/-22)
debian/libubuntutoolkit5-dev.install (+15/-0)
debian/libubuntutoolkit5.install (+1/-0)
debian/rules (+1/-1)
documentation/statesaving.qdoc (+1/-1)
documentation/ubuntu-components.qdoc (+1/-1)
documentation/ubuntu-theming.qdoc (+0/-6)
documentation/ubuntu-ui-toolkit-common.qdocconf (+1/-1)
examples/ubuntu-ui-toolkit-gallery/About.qml (+1/-1)
examples/ubuntu-ui-toolkit-gallery/BottomEdgePage.qml (+1/-1)
examples/ubuntu-ui-toolkit-gallery/Buttons.qml (+14/-10)
examples/ubuntu-ui-toolkit-gallery/Colors.qml (+159/-9)
examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml (+1/-0)
examples/ubuntu-ui-toolkit-gallery/NewListItems.qml (+1/-1)
examples/ubuntu-ui-toolkit-gallery/PageHeaders.qml (+28/-1)
examples/ubuntu-ui-toolkit-gallery/Popover.qml (+1/-1)
examples/ubuntu-ui-toolkit-gallery/Sections.qml (+62/-14)
examples/ubuntu-ui-toolkit-gallery/Template.qml (+2/-0)
examples/ubuntu-ui-toolkit-gallery/WidgetsModel.qml (+87/-96)
examples/ubuntu-ui-toolkit-gallery/gallery (+0/-6)
examples/ubuntu-ui-toolkit-gallery/manifest.json.in (+15/-0)
examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery-click.pro (+36/-0)
examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.apparmor (+9/-0)
examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.desktop (+4/-4)
examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.pro (+1/-1)
examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml (+1/-1)
export_modules_dir.sh (+1/-1)
gallery.sh (+3/-2)
src/Ubuntu/Components/1.2/MainViewBase.qml (+1/-1)
src/Ubuntu/Components/1.2/Panel.qml (+1/-1)
src/Ubuntu/Components/1.2/colorUtils.js (+0/-25)
src/Ubuntu/Components/1.3/AdaptivePageLayout.qml (+111/-76)
src/Ubuntu/Components/1.3/AppHeader.qml (+14/-5)
src/Ubuntu/Components/1.3/ComboButton.qml (+66/-25)
src/Ubuntu/Components/1.3/Icon.qdoc (+0/-87)
src/Ubuntu/Components/1.3/Icon.qml (+157/-0)
src/Ubuntu/Components/1.3/MainView.qml (+37/-55)
src/Ubuntu/Components/1.3/MainViewBase.qml (+0/-173)
src/Ubuntu/Components/1.3/OptionSelector.qml (+2/-1)
src/Ubuntu/Components/1.3/Page.qml (+95/-99)
src/Ubuntu/Components/1.3/PageHeadConfiguration.qml (+2/-2)
src/Ubuntu/Components/1.3/PageHeader.qml (+4/-1)
src/Ubuntu/Components/1.3/PageStack.qml (+9/-2)
src/Ubuntu/Components/1.3/PageWrapper.qml (+0/-160)
src/Ubuntu/Components/1.3/PageWrapperUtils.js (+0/-202)
src/Ubuntu/Components/1.3/Panel.qml (+1/-1)
src/Ubuntu/Components/1.3/ScrollView.qml (+11/-11)
src/Ubuntu/Components/1.3/Scrollbar.qml (+2/-0)
src/Ubuntu/Components/1.3/Sections.qml (+0/-4)
src/Ubuntu/Components/1.3/Slider.qml (+20/-5)
src/Ubuntu/Components/1.3/TextArea.qml (+9/-4)
src/Ubuntu/Components/1.3/TextField.qml (+23/-12)
src/Ubuntu/Components/1.3/Toolbar.qml (+1/-1)
src/Ubuntu/Components/1.3/UbuntuColors.qml (+66/-17)
src/Ubuntu/Components/1.3/colorUtils.js (+0/-37)
src/Ubuntu/Components/1.3/tree.js (+0/-182)
src/Ubuntu/Components/ComponentModule.pro (+2/-6)
src/Ubuntu/Components/ListItems/1.2/ItemSelector.qml (+1/-1)
src/Ubuntu/Components/ListItems/1.3/Empty.qml (+3/-1)
src/Ubuntu/Components/ListItems/1.3/ItemSelector.qml (+1/-1)
src/Ubuntu/Components/ListItems/1.3/LabelVisual.qml (+9/-2)
src/Ubuntu/Components/ListItems/1.3/Standard.qml (+2/-2)
src/Ubuntu/Components/Popups/1.3/Dialog.qml (+11/-4)
src/Ubuntu/Components/Popups/1.3/Popover.qml (+8/-0)
src/Ubuntu/Components/Themes/1.3/Palette.qml (+21/-1)
src/Ubuntu/Components/Themes/1.3/PaletteValues.qml (+89/-3)
src/Ubuntu/Components/Themes/Ambiance/1.2/MainViewStyle.qml (+7/-0)
src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml (+49/-0)
src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml (+27/-0)
src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeHintStyle.qml (+14/-5)
src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeStyle.qml (+10/-1)
src/Ubuntu/Components/Themes/Ambiance/1.3/BubbleShape.qml (+5/-36)
src/Ubuntu/Components/Themes/Ambiance/1.3/CheckBoxStyle.qml (+14/-12)
src/Ubuntu/Components/Themes/Ambiance/1.3/ComboButtonStyle.qml (+162/-64)
src/Ubuntu/Components/Themes/Ambiance/1.3/DatePickerStyle.qml (+1/-1)
src/Ubuntu/Components/Themes/Ambiance/1.3/DialerStyle.qml (+13/-11)
src/Ubuntu/Components/Themes/Ambiance/1.3/DialogForegroundStyle.qml (+2/-2)
src/Ubuntu/Components/Themes/Ambiance/1.3/FocusShape.qml (+14/-21)
src/Ubuntu/Components/Themes/Ambiance/1.3/IconButtonStyle.qml (+8/-8)
src/Ubuntu/Components/Themes/Ambiance/1.3/ListItemStyle.qml (+11/-8)
src/Ubuntu/Components/Themes/Ambiance/1.3/MainViewStyle.qml (+9/-0)
src/Ubuntu/Components/Themes/Ambiance/1.3/OptionSelectorStyle.qml (+21/-2)
src/Ubuntu/Components/Themes/Ambiance/1.3/OverflowPanel.qml (+4/-4)
src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml (+20/-5)
src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeaderStyle.qml (+3/-2)
src/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml (+37/-21)
src/Ubuntu/Components/Themes/Ambiance/1.3/PickerStyle.qml (+4/-2)
src/Ubuntu/Components/Themes/Ambiance/1.3/PopoverForegroundStyle.qml (+4/-1)
src/Ubuntu/Components/Themes/Ambiance/1.3/ProgressBarStyle.qml (+12/-4)
src/Ubuntu/Components/Themes/Ambiance/1.3/ScrollbarStyle.qml (+82/-44)
src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsForPageHead.qml (+2/-3)
src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsForPageHeadStyle.qml (+122/-0)
src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml (+311/-37)
src/Ubuntu/Components/Themes/Ambiance/1.3/SliderStyle.qml (+12/-9)
src/Ubuntu/Components/Themes/Ambiance/1.3/SwitchStyle.qml (+26/-156)
src/Ubuntu/Components/Themes/Ambiance/1.3/TextAreaStyle.qml (+13/-5)
src/Ubuntu/Components/Themes/Ambiance/1.3/TextCursorStyle.qml (+3/-3)
src/Ubuntu/Components/Themes/Ambiance/1.3/ToolbarButtonStyle.qml (+11/-7)
src/Ubuntu/Components/Themes/Ambiance/1.3/colorUtils.js (+0/-36)
src/Ubuntu/Components/Themes/Ambiance/Ambiance.pro (+3/-0)
src/Ubuntu/Components/Themes/Ambiance/qmldir (+2/-0)
src/Ubuntu/Components/Themes/SuruDark/1.2/ListItemStyle.qml (+0/-25)
src/Ubuntu/Components/Themes/SuruDark/1.3/ListItemStyle.qml (+0/-26)
src/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml (+38/-21)
src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml (+49/-0)
src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml (+29/-0)
src/Ubuntu/Components/Themes/SuruDark/SuruDark.pro (+2/-2)
src/Ubuntu/Components/Themes/SuruDark/qmldir (+1/-0)
src/Ubuntu/Components/plugin/adapters/actionsproxy_p.cpp (+73/-63)
src/Ubuntu/Components/plugin/adapters/actionsproxy_p.h (+8/-7)
src/Ubuntu/Components/plugin/adapters/dbuspropertywatcher_p.cpp (+2/-2)
src/Ubuntu/Components/plugin/i18n.cpp (+8/-1)
src/Ubuntu/Components/plugin/i18n.h (+10/-4)
src/Ubuntu/Components/plugin/inversemouseareatype.cpp (+3/-3)
src/Ubuntu/Components/plugin/plugin.cpp (+81/-87)
src/Ubuntu/Components/plugin/plugin.h (+1/-0)
src/Ubuntu/Components/plugin/plugin.pri (+21/-5)
src/Ubuntu/Components/plugin/plugin.qrc (+2/-0)
src/Ubuntu/Components/plugin/privates/appheaderbase.cpp (+69/-0)
src/Ubuntu/Components/plugin/privates/appheaderbase.h (+54/-0)
src/Ubuntu/Components/plugin/privates/frame.cpp (+469/-0)
src/Ubuntu/Components/plugin/privates/frame.h (+101/-0)
src/Ubuntu/Components/plugin/privates/listitemdragarea.cpp (+2/-3)
src/Ubuntu/Components/plugin/privates/shaders/frame.frag (+33/-0)
src/Ubuntu/Components/plugin/privates/shaders/frame.vert (+34/-0)
src/Ubuntu/Components/plugin/privates/textures.h (+5483/-0)
src/Ubuntu/Components/plugin/privates/threelabelsslot_p.cpp (+30/-10)
src/Ubuntu/Components/plugin/privates/threelabelsslot_p.h (+7/-1)
src/Ubuntu/Components/plugin/privates/ucpagewrapper.cpp (+773/-0)
src/Ubuntu/Components/plugin/privates/ucpagewrapper.h (+113/-0)
src/Ubuntu/Components/plugin/privates/ucpagewrapper_p.h (+77/-0)
src/Ubuntu/Components/plugin/privates/ucpagewrapperincubator.cpp (+61/-0)
src/Ubuntu/Components/plugin/privates/ucpagewrapperincubator_p.h (+59/-0)
src/Ubuntu/Components/plugin/quickutils.cpp (+8/-1)
src/Ubuntu/Components/plugin/quickutils.h (+11/-3)
src/Ubuntu/Components/plugin/statesaverbackend_p.cpp (+10/-7)
src/Ubuntu/Components/plugin/statesaverbackend_p.h (+10/-3)
src/Ubuntu/Components/plugin/ucabstractbutton.cpp (+156/-3)
src/Ubuntu/Components/plugin/ucabstractbutton.h (+9/-0)
src/Ubuntu/Components/plugin/ucabstractbutton_p.h (+2/-0)
src/Ubuntu/Components/plugin/ucaction.cpp (+67/-11)
src/Ubuntu/Components/plugin/ucaction.h (+18/-0)
src/Ubuntu/Components/plugin/ucactioncontext.cpp (+138/-9)
src/Ubuntu/Components/plugin/ucactioncontext.h (+45/-3)
src/Ubuntu/Components/plugin/ucactionitem.cpp (+3/-1)
src/Ubuntu/Components/plugin/ucalarm.cpp (+4/-4)
src/Ubuntu/Components/plugin/ucapplication.cpp (+6/-0)
src/Ubuntu/Components/plugin/ucapplication.h (+10/-4)
src/Ubuntu/Components/plugin/ucarguments.cpp (+4/-4)
src/Ubuntu/Components/plugin/ucbottomedge.cpp (+7/-3)
src/Ubuntu/Components/plugin/ucbottomedge_p.h (+0/-1)
src/Ubuntu/Components/plugin/ucbottomedgehint.cpp (+8/-8)
src/Ubuntu/Components/plugin/ucdeprecatedtheme.cpp (+30/-16)
src/Ubuntu/Components/plugin/ucdeprecatedtheme.h (+5/-7)
src/Ubuntu/Components/plugin/ucfontutils.cpp (+3/-1)
src/Ubuntu/Components/plugin/ucfontutils.h (+13/-3)
src/Ubuntu/Components/plugin/uchaptics.cpp (+6/-4)
src/Ubuntu/Components/plugin/uchaptics.h (+19/-13)
src/Ubuntu/Components/plugin/ucheader.cpp (+8/-12)
src/Ubuntu/Components/plugin/ucheader.h (+2/-2)
src/Ubuntu/Components/plugin/uclabel.cpp (+47/-7)
src/Ubuntu/Components/plugin/uclabel.h (+11/-0)
src/Ubuntu/Components/plugin/uclistitem.cpp (+43/-28)
src/Ubuntu/Components/plugin/uclistitem_p.h (+1/-1)
src/Ubuntu/Components/plugin/uclistitemlayout.cpp (+80/-4)
src/Ubuntu/Components/plugin/uclistitemstyle.cpp (+2/-2)
src/Ubuntu/Components/plugin/ucmainviewbase.cpp (+314/-0)
src/Ubuntu/Components/plugin/ucmainviewbase.h (+84/-0)
src/Ubuntu/Components/plugin/ucmainviewbase_p.h (+57/-0)
src/Ubuntu/Components/plugin/ucmargins.h (+76/-0)
src/Ubuntu/Components/plugin/ucmathutils.cpp (+0/-8)
src/Ubuntu/Components/plugin/ucmathutils.h (+0/-2)
src/Ubuntu/Components/plugin/ucmousefilters.cpp (+2/-3)
src/Ubuntu/Components/plugin/ucpagetreenode.cpp (+1/-1)
src/Ubuntu/Components/plugin/ucpagetreenode.h (+1/-1)
src/Ubuntu/Components/plugin/ucpagetreenode_p.h (+5/-3)
src/Ubuntu/Components/plugin/ucperformancemonitor.cpp (+136/-0)
src/Ubuntu/Components/plugin/ucperformancemonitor.h (+55/-0)
src/Ubuntu/Components/plugin/ucproportionalshape.cpp (+6/-0)
src/Ubuntu/Components/plugin/ucproportionalshape.h (+2/-0)
src/Ubuntu/Components/plugin/ucqquickimageextension.cpp (+17/-6)
src/Ubuntu/Components/plugin/ucserviceproperties.cpp (+2/-3)
src/Ubuntu/Components/plugin/ucslotslayout.cpp (+17/-17)
src/Ubuntu/Components/plugin/ucstatesaver.cpp (+18/-14)
src/Ubuntu/Components/plugin/ucstyleditembase.cpp (+3/-2)
src/Ubuntu/Components/plugin/uctheme.cpp (+85/-65)
src/Ubuntu/Components/plugin/uctheme.h (+7/-13)
src/Ubuntu/Components/plugin/ucthemingextension.cpp (+32/-8)
src/Ubuntu/Components/plugin/ucthemingextension.h (+3/-3)
src/Ubuntu/Components/plugin/ucubuntushape.cpp (+3/-3)
src/Ubuntu/Components/plugin/ucunits.cpp (+7/-0)
src/Ubuntu/Components/plugin/ucunits.h (+11/-3)
src/Ubuntu/Components/plugin/ucviewitemsattached.cpp (+2/-2)
src/Ubuntu/Components/qmldir (+2/-3)
src/Ubuntu/Components/tools/privates/createprivateshapetextures.cpp (+125/-0)
src/Ubuntu/Components/tools/privates/privates.pro (+5/-0)
src/Ubuntu/Test/UbuntuTestCase.qml (+4/-2)
src/Ubuntu/UbuntuGestures/UbuntuGestures.pro (+3/-2)
src/Ubuntu/UbuntuGestures/ucswipearea.cpp (+7/-4)
src/Ubuntu/UbuntuToolkit/UbuntuToolkit.pro (+22/-0)
src/Ubuntu/UbuntuToolkit/colorutils.cpp (+30/-0)
src/Ubuntu/UbuntuToolkit/colorutils.h (+34/-0)
src/Ubuntu/UbuntuToolkit/tree.cpp (+232/-0)
src/Ubuntu/UbuntuToolkit/tree.h (+48/-0)
src/Ubuntu/UbuntuToolkit/ubuntutoolkitglobal.h (+29/-0)
src/src.pro (+6/-3)
sync.profile (+6/-3)
tests/Gallery/gallery (+6/-0)
tests/Gallery/gallery-logging.config (+3/-0)
tests/api/api.pro (+1/-1)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_common.py (+10/-1)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_flickable.py (+103/-16)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_qquicklistview.py (+34/-5)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_sections.py (+11/-12)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/pickers.py (+76/-3)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py (+138/-16)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable_uitk10.py (+308/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listview.QQuickListViewTestCase.Uitk10.vertical.qml (+57/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listview.QQuickListViewTestCase.Uitk13.horizontal.qml (+64/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listview.QQuickListViewTestCase.Uitk13.vertical.qml (+62/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquicklistview.py (+84/-84)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_sections.SectionsTestCase.qml (+36/-4)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_sections.py (+25/-1)
tests/autopilot/ubuntuuitoolkit/tests/gallery/test_buttons.py (+0/-88)
tests/checkresults.sh (+17/-10)
tests/resources/ubuntushape/FrameTest.qml (+71/-0)
tests/tests.pro (+2/-2)
tests/uitk_test_plan.sh (+0/-554)
tests/unit/add_qmlmakecheck.pri (+13/-3)
tests/unit/plugin_dependency.pri (+1/-0)
tests/unit/runtest.sh (+10/-5)
tests/unit/tst_alarms/tst_alarms.cpp (+7/-0)
tests/unit/tst_arguments/tst_arguments.cpp (+8/-0)
tests/unit/tst_components/tst_action.qml (+14/-6)
tests/unit/tst_components/tst_label13.qml (+64/-0)
tests/unit/tst_i18n/tst_i18n_LocalizedApp/src/LocalizedApp.qml (+1/-1)
tests/unit/tst_i18n/tst_i18n_LocalizedApp/src/tst_i18n_LocalizedApp.cpp (+6/-2)
tests/unit/tst_i18n/tst_i18n_RelativeTime/src/tst_i18n_RelativeTime.cpp (+6/-2)
tests/unit/tst_mainview/Settings.qml (+1/-1)
tests/unit/tst_mainview/tst_mainview.cpp (+8/-6)
tests/unit/tst_qquick_image_extension/tst_qquick_image_extension.cpp (+16/-0)
tests/unit/tst_quickutils/tst_quickutils.cpp (+4/-2)
tests/unit/tst_units/dpr1/tst_units.cpp (+5/-5)
tests/unit_x11/add_qmlmakecheck.pri (+13/-3)
tests/unit_x11/tst_animator/tst_animator.cpp (+9/-1)
tests/unit_x11/tst_animator/tst_animator.qml (+1/-1)
tests/unit_x11/tst_animator/tst_animator13.qml (+36/-0)
tests/unit_x11/tst_bottomedge/LeanActiveRegionChange.qml (+1/-1)
tests/unit_x11/tst_bottomedge/tst_bottomedge.cpp (+26/-9)
tests/unit_x11/tst_components/AppTheme/Palette.qml (+1/-1)
tests/unit_x11/tst_components/MockKeyboard.qml (+1/-1)
tests/unit_x11/tst_components/ScrollbarTestCase.qml (+245/-0)
tests/unit_x11/tst_components/tst_abstractbutton13.qml (+144/-0)
tests/unit_x11/tst_components/tst_adaptivepagelayout.qml (+22/-0)
tests/unit_x11/tst_components/tst_contextual_actions.qml (+326/-0)
tests/unit_x11/tst_components/tst_focus.qml (+44/-7)
tests/unit_x11/tst_components/tst_icon.qml (+6/-3)
tests/unit_x11/tst_components/tst_icon13.qml (+139/-0)
tests/unit_x11/tst_components/tst_listitem.qml (+3/-5)
tests/unit_x11/tst_components/tst_listitem13.qml (+26/-5)
tests/unit_x11/tst_components/tst_pagehead_sections.qml (+1/-1)
tests/unit_x11/tst_components/tst_pagehead_sections_bug1511839.qml (+1/-1)
tests/unit_x11/tst_components/tst_pagehead_visible.qml (+9/-0)
tests/unit_x11/tst_components/tst_pagestack.qml (+6/-0)
tests/unit_x11/tst_components/tst_scrollbar.qml (+712/-103)
tests/unit_x11/tst_components/tst_scrollview.qml (+773/-0)
tests/unit_x11/tst_components/tst_sections.qml (+121/-68)
tests/unit_x11/tst_components/tst_shortcuts.qml (+32/-8)
tests/unit_x11/tst_components/tst_slider.qml (+128/-0)
tests/unit_x11/tst_components/tst_slider13.qml (+38/-2)
tests/unit_x11/tst_components/tst_slotslayout.qml (+54/-2)
tests/unit_x11/tst_components/tst_tabs_with_repeater.DEPRECATED_TOOLBAR.qml (+4/-0)
tests/unit_x11/tst_components/tst_textinput_common13.qml (+34/-3)
tests/unit_x11/tst_deprecated_theme_engine/ErroneousPaletteUse.qml (+33/-0)
tests/unit_x11/tst_deprecated_theme_engine/tst_deprecated_theme_engine.cpp (+33/-16)
tests/unit_x11/tst_deprecated_theme_engine/tst_deprecated_theme_engine.pro (+3/-2)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaInListView.qml (+2/-2)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaOnTop.qml (+2/-2)
tests/unit_x11/tst_inversemousearea/OverlappedMouseArea.qml (+1/-0)
tests/unit_x11/tst_inversemousearea/tst_inversemouseareatest.cpp (+104/-168)
tests/unit_x11/tst_layouts/tst_layouts.cpp (+20/-20)
tests/unit_x11/tst_mousefilters/tst_mousefilterstest.cpp (+3/-2)
tests/unit_x11/tst_statesaver/tst_statesaver.cpp (+22/-10)
tests/unit_x11/tst_subtheming/DefaultTheme.qml (+28/-0)
tests/unit_x11/tst_subtheming/themes/BuggyTheme/Palette.qml (+25/-0)
tests/unit_x11/tst_subtheming/tst_subtheming.cpp (+71/-6)
tests/unit_x11/tst_subtheming/tst_subtheming.pro (+3/-0)
To merge this branch: bzr merge lp:~bzoltan/ubuntu-ui-toolkit/OTA10-landing-2016-01-20
Reviewer Review Type Date Requested Status
Zoltan Balogh (community) Approve on 2016-03-01
PS Jenkins bot continuous-integration Needs Fixing on 2016-02-25
Review via email: mp+283385@code.launchpad.net

Commit message

OTA10-landing-2016-01-20

Description of the change

OTA10-landing-2016-01-20

To post a comment you must log in.
1813. By Zoltan Balogh on 2016-01-21

Sync with staging

1814. By Zoltan Balogh on 2016-01-21

Sync with staging

1815. By Zoltan Balogh on 2016-01-21

Sync with staging

1816. By Zoltan Balogh on 2016-01-21

Sync with staging

1817. By Zoltan Balogh on 2016-01-21

Fix test script

1818. By Zoltan Balogh on 2016-01-21

Sync with staging

1819. By Zoltan Balogh on 2016-01-25

Sync with staging

1820. By Zoltan Balogh on 2016-01-27

Sync with staging

1821. By Zoltan Balogh on 2016-01-28

Sync with the staging

1822. By Zoltan Balogh on 2016-01-28

sync with staging

1823. By Zoltan Balogh on 2016-01-28

Sync with staging

1824. By Zoltan Balogh on 2016-01-29

Sync with staging

1825. By Zoltan Balogh on 2016-02-02

Sync with the staging

1826. By Zoltan Balogh on 2016-02-03

Sync with the staging

1827. By Zoltan Balogh on 2016-02-03

Sync with staging

1828. By Zoltan Balogh on 2016-02-04

sync with staging

1829. By Zoltan Balogh on 2016-02-04

sync with staging

1830. By Zoltan Balogh on 2016-02-04

sync with staging

1831. By Zoltan Balogh on 2016-02-16

Sync

1832. By Zoltan Balogh on 2016-02-16

Sync

1833. By Zoltan Balogh on 2016-02-16

Sync

1834. By Zoltan Balogh on 2016-02-16

Sync

1835. By Zoltan Balogh on 2016-02-16

Wait for subcomponents in libtoolkit

1836. By Zoltan Balogh on 2016-02-16

do not Wait for subcomponents in libtoolkit

1837. By Zoltan Balogh on 2016-02-17

force non parallel for s390x

1838. By Zoltan Balogh on 2016-02-17

rules syntax fix

1839. By Zoltan Balogh on 2016-02-17

one more s390x non-parallel try + fix docs

1840. By Zoltan Balogh on 2016-02-18

Fix button color in test

1841. By Zoltan Balogh on 2016-02-18

Fixed performance monitor dangling pointer crash.

1842. By Zoltan Balogh on 2016-02-18

Fixed performance monitor crash because of a NULL timer pointer dereference.

1843. By Zoltan Balogh on 2016-02-18

Fixed performance monitor crash because of a NULL timer pointer dereference.

1844. By Zoltan Balogh on 2016-02-19

Sync with staging

1845. By Zoltan Balogh on 2016-02-19

Remove the not helping s390x non-parallel build options.

1846. By Zoltan Balogh on 2016-02-22

Sync

1847. By Zoltan Balogh on 2016-02-23

Remove & from test_buttons

1848. By Zoltan Balogh on 2016-02-24

add more deps

1849. By Zoltan Balogh on 2016-02-24

Next try

1850. By Zoltan Balogh on 2016-02-25

Next try

1851. By Zoltan Balogh on 2016-02-25

Next try

1852. By Zoltan Balogh on 2016-02-26

Sync from staging

Zoltan Balogh (bzoltan) :
review: Approve
1853. By Zoltan Balogh on 2016-03-01

Fix AbstractButton not resetting eventual negative sensing area margins during resize. Fixing ComboButton altering __mouseArea anchors. lp:~zsombi/ubuntu-ui-toolkit/fix_abstractbuttonsensing_landing_ota10

1854. By Zoltan Balogh on 2016-03-08

 lp:~zsombi/ubuntu-ui-toolkit/stylingCrash

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'apicheck/apicheck.pro'
2--- apicheck/apicheck.pro 2015-11-30 15:39:52 +0000
3+++ apicheck/apicheck.pro 2016-03-08 06:42:31 +0000
4@@ -7,4 +7,4 @@
5 installPath = $$[QT_INSTALL_LIBS]/ubuntu-ui-toolkit
6 apicheck.path = $$installPath
7 apicheck.files = apicheck
8-INSTALLS += apicheck
9+INSTALLS += $$TARGET
10
11=== modified file 'components.api'
12--- components.api 2015-12-19 10:06:24 +0000
13+++ components.api 2016-03-08 06:42:31 +0000
14@@ -8,6 +8,7 @@
15 signal clicked()
16 signal pressAndHold()
17 readonly property bool pressed
18+ readonly property UCMargins sensingMargins
19 Ubuntu.Components.Action 1.3 1.0 0.1 UCAction: QtObject
20 property string description
21 property bool enabled
22@@ -83,6 +84,7 @@
23 property bool onScreen
24 property bool running
25 Ubuntu.Components.AdaptivePageLayout 1.3: PageTreeNode
26+ property bool asynchronous
27 readonly property int columns
28 property list<PageColumnsLayou> layouts
29 function var addPageToCurrentColumn(var sourcePage, var page, var properties)
30@@ -268,7 +270,8 @@
31 function push(var data)
32 function clear()
33 function QQuickMimeData* newData()
34-Ubuntu.Components.ColorUtils 0.1 1.0
35+Ubuntu.Components.ColorUtils 1.0 0.1: QtObject singleton
36+ function double luminance(color color)
37 Ubuntu.Components.ComboButton 1.1: Button
38 property double collapsedHeight
39 default property list<QtObject> comboList
40@@ -276,13 +279,18 @@
41 property color dropdownColor
42 property bool expanded
43 property double expandedHeight
44-Ubuntu.Components.ComboButton 1.3: Button
45+Ubuntu.Components.ComboButton 1.3: AbstractButton
46 property double collapsedHeight
47+ property color color
48 default property list<QtObject> comboList
49 readonly property double comboListHeight
50 property color dropdownColor
51 property bool expanded
52 property double expandedHeight
53+ property QFont font
54+ property Gradient gradient
55+ property string iconPosition
56+ property color strokeColor
57 Ubuntu.Components.Styles.ComboButtonStyle 1.1: Item
58 property Item comboListHolder
59 property double comboListMargin
60@@ -498,6 +506,12 @@
61 property string name
62 Ubuntu.Components.Icon 1.1: Icon
63 property url source
64+Ubuntu.Components.Icon 1.3: Item
65+ property bool asynchronous
66+ property color color
67+ property color keyColor
68+ property string name
69+ property url source
70 Ubuntu.Components.InverseMouse 1.0 0.1 UCInverseMouse: Mouse
71 Ubuntu.Components.InverseMouseArea 1.0 0.1 InverseMouseAreaType: MouseArea
72 function bool contains(QPointF point)
73@@ -615,6 +629,22 @@
74 Ubuntu.Components.MainView 1.3: MainViewBase
75 property bool automaticOrientation
76 default property list<QtObject> contentsItem
77+Ubuntu.Components.MainViewBase 1.3 UCMainViewBase: PageTreeNode
78+ readonly property PopupContext actionContext
79+ readonly property ActionManager actionManager
80+ property list<Action> actions
81+ property bool anchorToKeyboard
82+ property string applicationName
83+ property color backgroundColor
84+ property color footerColor
85+ property color headerColor
86+ signal applicationNameChanged(string applicationName)
87+ signal anchorToKeyboardChanged(bool anchorToKeyboard)
88+ signal headerColorChanged(color headerColor)
89+ signal backgroundColorChanged(color backgroundColor)
90+ signal footerColorChanged(color footerColor)
91+ signal actionManagerChanged(ActionManager actionManager)
92+ signal actionContextChanged(PopupContext actionContext)
93 Ubuntu.Components.MathUtils 1.0 0.1: QtObject singleton
94 function double clamp(double x, double min, double max)
95 function double lerp(double delta, double from, double to)
96@@ -715,6 +745,7 @@
97 Ubuntu.Components.Page 1.1 Page11: Page10
98 readonly property PageHeadConfiguration head
99 Ubuntu.Components.Page 1.3: PageTreeNode
100+ readonly property ActionContext actionContext
101 property Flickable flickable
102 readonly property PageHeadConfiguration head
103 property Item header
104@@ -830,8 +861,11 @@
105 property PaletteValues normal
106 property PaletteValues selected
107 Ubuntu.Components.Themes.Palette 1.3: QtObject
108+ property PaletteValues disabled
109+ property PaletteValues highlighted
110 property PaletteValues normal
111 property PaletteValues selected
112+ property PaletteValues selectedDisabled
113 Ubuntu.Components.Themes.PaletteValues 0.1: QtObject
114 property color background
115 property color backgroundText
116@@ -845,17 +879,32 @@
117 property color overlayText
118 property color selection
119 Ubuntu.Components.Themes.PaletteValues 1.3: QtObject
120+ property color activity
121+ property color activityText
122 property color background
123+ property color backgroundSecondaryText
124+ property color backgroundTertiaryText
125 property color backgroundText
126 property color base
127 property color baseText
128 property color field
129 property color fieldText
130+ property color focus
131+ property color focusText
132 property color foreground
133 property color foregroundText
134+ property color negative
135+ property color negativeText
136 property color overlay
137+ property color overlaySecondaryText
138 property color overlayText
139+ property color positive
140+ property color positiveText
141+ property color raised
142+ property color raisedSecondaryText
143+ property color raisedText
144 property color selection
145+ property color selectionText
146 Ubuntu.Components.Panel 1.0 0.1: Item
147 property int align
148 property bool animate
149@@ -947,6 +996,7 @@
150 property bool grabDismissAreaEvents
151 function var show()
152 function var hide()
153+Ubuntu.Components.PopupContext 1.3 UCPopupContext: ActionContext
154 Ubuntu.Components.Popups.PopupUtils 0.1 1.0 1.3
155 Ubuntu.Components.ProgressBar 1.0 0.1: AnimatedItem
156 property bool indeterminate
157@@ -963,7 +1013,11 @@
158 property bool onScreen
159 property bool showProgressPercentage
160 property double value
161-Ubuntu.Components.ProgressionSlot 1.3: Icon
162+Ubuntu.Components.ProgressionSlot 1.3: Item
163+ property bool asynchronous
164+ property color color
165+ property color keyColor
166+ property string name
167 property url source
168 Ubuntu.Components.ProportionalShape 1.3 UCProportionalShape: UbuntuShape
169 Ubuntu.Components.PullToRefresh 1.1: StyledItem
170@@ -1056,6 +1110,7 @@
171 function var formatValue(var v)
172 property double minimumValue
173 readonly property bool pressed
174+ property double stepSize
175 property double value
176 Ubuntu.Components.SliderUtils 0.1 1.0
177 Ubuntu.Components.SlotsAttached 1.3: QtObject
178@@ -1491,6 +1546,7 @@
179 property Item pageStack
180 Ubuntu.Components.Styles.ToolbarStyle 1.3: Item
181 property Component defaultDelegate
182+UCActionContextAttached: QtObject
183 Ubuntu.Components.UCApplication 1.0 0.1: QtObject
184 property string applicationName
185 property QtObject inputMethod
186@@ -1503,6 +1559,12 @@
187 UCListItemExpansion: QtObject
188 property bool expanded
189 property double height
190+UCMargins: QtObject
191+ property double all
192+ property double bottom
193+ property double left
194+ property double right
195+ property double top
196 UCStateSaverAttached: QtObject
197 property bool enabled
198 property string properties
199@@ -1558,6 +1620,28 @@
200 readonly property color purple
201 readonly property color red
202 readonly property color warmGrey
203+Ubuntu.Components.UbuntuColors 1.3: QtObject singleton
204+ readonly property color ash
205+ readonly property color blue
206+ readonly property color coolGrey
207+ readonly property color darkAubergine
208+ readonly property color darkGrey
209+ readonly property color graphite
210+ readonly property color green
211+ property Gradient greyGradient
212+ readonly property color inkstone
213+ readonly property color jet
214+ readonly property color lightAubergine
215+ readonly property color lightGrey
216+ readonly property color midAubergine
217+ readonly property color orange
218+ property Gradient orangeGradient
219+ readonly property color porcelain
220+ readonly property color purple
221+ readonly property color red
222+ readonly property color silk
223+ readonly property color slate
224+ readonly property color warmGrey
225 Ubuntu.Components.UbuntuListView 1.0 0.1: ListView
226 property int expandedIndex
227 Ubuntu.Components.UbuntuListView 1.1 UbuntuListView11: UbuntuListView
228
229=== modified file 'debian/changelog'
230--- debian/changelog 2016-01-06 04:27:02 +0000
231+++ debian/changelog 2016-03-08 06:42:31 +0000
232@@ -1,3 +1,151 @@
233+ubuntu-ui-toolkit (1.3.1872+16.04-0ubuntu1) UNRELEASED; urgency=medium
234+
235+ [ Timo Jyrinki ]
236+ * Fix gles unit test skipping.
237+ * Add s390x to the unit test skipping architectures
238+ * UITK test plan - wily -> xenial. Fixes LP: #1544490
239+
240+ [ Christian Dywan ]
241+ * Print errors when QuickUtils fails to create a component.
242+ * unit tests shouldn't use deprecated Dialog.callera
243+ * Correctly count only test case results. The result= value is used in suites
244+ and results.
245+ * Skip tst_pagehead_visible flakes on non-arm. Fixes LP: #1534651
246+ * Skip flaky tst_mousefilterTest::doubleClicked. Fixes LP: #1542215
247+ * Suppress click signal if releasing outside of ListItem. Fixes LP: #1541148.
248+ * Use gdb in runtest.sh to produce backtraces.
249+ * Arrow keys change value of a Slider. Fixes LP: #1523824.
250+ * Only use Maliit when enabled explicitly in the environment
251+
252+ [ Oliver Tilloy ]
253+ * Do not try to assign to non-existent property "activeFocusOnPress".
254+ Fixes LP: #1532953
255+ * Bubble up ESC key press event if there is no popover to close.
256+ Fixes LP: #1546627
257+
258+ [ Loïc Molinari ]
259+ * Added private items and nodes for the new component styles.
260+ Fixes LP: #1523836
261+ * Made use of new private Frame item for the focusing.
262+ * Fixed performance monitor crash because of a NULL timer pointer dereference.
263+ Fixes LP: #1546986
264+ * Fixed performance monitor dangling pointer crash. Fixes LP: #1546984
265+ * [ProportionalShape] Ensured width/height ratio is correct with default values.
266+ Fixes LP: #1546546
267+ * Added a workaround to prevent a crash while changing the QPA scale factor.
268+
269+ [ Florian Boucault ]
270+ * Always on performance monitor that logs frames that too long to render.
271+ * MainView: proceed to selecting the theme automatically at startup too.
272+ Fixes LP: #1535819
273+ * MainView: when no gradient color is needed for the background, rely on
274+ QQuickWindow's GL clear color. Lessens overdraw considerably for most
275+ apps. Fixes LP: #1439133.
276+ * Panel: MathUtils used without import prefix was leading to undefined
277+ reference.
278+ * Label: use native rendering on low dpi screens (GRID_UNIT_PX <= 10) for
279+ sharper looking text.
280+ * Gallery: added palette browser to Colors page.
281+
282+ [ Tim Peeters ]
283+ * Support scrolling in ListViews with horizontal orientation to the
284+ qquicklistview CPO.
285+ * Add background to AppHeader and remove contents clipping from MainView.
286+ Fixes LP: #1531016, LP: #1531457.
287+ * Hide AppHeader when using AdaptivePageLayout. Fixes bug 1531871.
288+ Fixes LP: #1531871.
289+ * Implement horizontal flicking in the flickable autopilot CPO.
290+ * Re-order to list of pages in the gallery to be alphabetical.
291+ * Fix the autopilot failures introduced with the horizontal scrolling in
292+ the Flickable CPO.
293+ * Update documentation for MainView, Page, AdaptivePageLayout to use the new
294+ PageHeader in all examples. Deprecate old properties. Fixes LP: #1540574
295+ * Add 'animate' property to new internal AppHeaderBase, and do not show a
296+ header animation when starting an app without header.
297+ Fixes LP: #1518002, LP: #1524901.
298+ * Use the correct string for skipping tests on x86_64 .
299+ * Sections scrolling and keyboard navigation. Fixes LP: #1465048, LP: #1489591
300+ * Fix autopilot color button failure.
301+
302+ [ Zoltán Balogh ]
303+ * Create a click packaging project for the UITK Component Gallery.
304+ * Improve the test plan executor script.
305+
306+ [ Andrea Bernabei ]
307+ * Refer to SlotsLayout.Last instead of SlotsLayout.End in SlotsLayout
308+ documentation. Fixes LP: #1536170.
309+ * Update "Import Statement:" in docs of Ubuntu.Components. Currently
310+ Developer's website shows "import Ubuntu.Components 1.2" and "since
311+ Ubuntu.Components 1.3" and that is confusing for all app developers.
312+ Fixes LP: #1531817.
313+ * Fix ListItemLayout multiline labels positioning and add docs about
314+ aliasing labels properties
315+ * UbuntuTestCase flick(): default events delay to 1. Fixes LP: #1549256.
316+ * Add Scrollbar and ScrollView tests plus implementation fixes.
317+
318+ [ Benjamin Zeller ]
319+ * Fix Bug lp:1535241 "AdaptivePageLayout first example is badly broken".
320+ Fixes LP: #1535241.
321+ * The click project file is should not be part of the UITK project.
322+ * Move MainViewBase to C++.
323+ * Move tree.js to C++.
324+ * Do not leak the incubator pointer in case a QML engine never took care of
325+ it. Delete the object directly.
326+ * Move PageWrapper.qml to C++ for 1.3.
327+ * Add Ubuntu toolkit shared library
328+ * Move ColorUtils to UbuntuToolkit.
329+ * Fixes LP: #1540642
330+ * Make sure objects are initialized with extra properties before they are
331+ instantiated in the QML engine.
332+ * Use QQmlProperty::write() instead of QObject::writeProperty()
333+
334+ [ Zsombor Egri ]
335+ * Update Palette values for Ubuntu.Components 1.3 and apply the palette on
336+ components. First set of visual updates including ListItem, Text inputs,
337+ CheckBox, Switch, Slider, PageHeader, ActionBar and BottomEdge.
338+ Fixes LP: #1350915.
339+ * Contextual Actions - shortcut (and mnemonics) handling must obey
340+ active/inactive contexts, such as Page activation as well as Popups and
341+ Dialogs. Fixes LP: #1514856.
342+ * Attach default theme to the QML Engine it creates. Fixes LP: #1527546
343+ * Palette fix. Update components to use the palette. Fixes LP: #1495477
344+ * Disable rendering performance logs for the unit tests.
345+ * Specify message severity for the performance logging category.
346+ * Link singletons used as context properties in root context of the QML
347+ Engine to the engine instance. Fixes LP: #1539558.
348+ * Specify message severity for the performance logging category.
349+ * Expose Icon.asynchronous property to drive image loading of the icon.
350+ Fixes LP: #1535480.
351+ * Redo InverseMosueArea tests to not to use shared view for all the tests.
352+ Fixes LP: #1544455
353+ * Get singletons report fatal error in case the parent is null upon first
354+ creation. Adjust failing test cases. Fixes LP: #1542309
355+ * Deprecated Theme forces palette to be loaded from 1.2 themes.
356+ Fixes LP: #1549830
357+ * Introduce AdaptivePageLayout.asynchronous to the API. Fixes LP: #1540449
358+ * AbstractButton handles 4x4GU minimal sensing area, exposes sensingMargins
359+ to extend sensing area even further. Fixes LP:#1468645, LP: #1508114
360+
361+ [ Albert Astals Cid ]
362+ * Have a default pixelsPerInch value. Otherwise when running unity8 tests
363+ under xvfb we get the wrong parameters warning and tests fail.
364+
365+ [ Robert Ancell ]
366+ * Fix documentation typo - Ubunut -> Ubuntu.
367+ * Use new QML package name for qml-module-qtfeedback, drop old QML
368+ package names.
369+ * Fix examples using OptionSelectorDelegate that place it in the Toolkit
370+ namespace but don't have the import to match.
371+
372+ [ Colin Watson ]
373+ * Make src/Ubuntu/Test depend on src/Ubuntu/Components, to fix build with
374+ high parallelisation.
375+
376+ [ Pierre Bertet on 2016-02-17
377+ * ComboButton: not based on Button anymore + style update.
378+
379+ -- Zoltán Balogh <zoltan@bakter.hu> Thu, 21 Jan 2016 06:21:26 +0200
380+
381 ubuntu-ui-toolkit (1.3.1795+16.04.20160106-0ubuntu1) xenial; urgency=medium
382
383 [ Christian Dywan ]
384
385=== modified file 'debian/control'
386--- debian/control 2015-12-17 15:38:35 +0000
387+++ debian/control 2016-03-08 06:42:31 +0000
388@@ -16,15 +16,15 @@
389 libqt5sql5-sqlite,
390 qtdeclarative5-dev-tools,
391 qtdeclarative5-private-dev,
392- qml-module-qtquick2 | qtdeclarative5-qtquick2-plugin,
393- qml-module-qttest | qtdeclarative5-test-plugin,
394- qml-module-qtquick-window2 | qtdeclarative5-window-plugin,
395+ qml-module-qtquick2,
396+ qml-module-qttest,
397+ qml-module-qtquick-window2,
398 qml-module-qtquick-layouts,
399- qtdeclarative5-qtfeedback-plugin,
400+ qml-module-qtfeedback,
401 qtdeclarative5-unity-action-plugin (>= 1.1.0),
402 qtdeclarative5-private-dev,
403- qml-module-qtquick-localstorage | qtdeclarative5-localstorage-plugin,
404- qml-module-qt-labs-settings | qtdeclarative5-settings-plugin,
405+ qml-module-qtquick-localstorage,
406+ qml-module-qt-labs-settings,
407 qml-module-qtqml-models2,
408 qtdeclarative5-doc-html,
409 qtwebkit5-doc-html,
410@@ -42,6 +42,7 @@
411 dbus-test-runner,
412 accountsservice,
413 xvfb,
414+ gdb,
415 libgl1-mesa-dri,
416 locales,
417 suru-icon-theme,
418@@ -66,15 +67,16 @@
419 Pre-Depends: dpkg (>= 1.15.6~), ${misc:Pre-Depends}
420 Depends: qml-module-qtgraphicaleffects | libqt5qml-graphicaleffects,
421 libqt5svg5,
422- qml-module-qtquick2 | qtdeclarative5-qtquick2-plugin,
423- qml-module-qtquick-window2 | qtdeclarative5-window-plugin,
424+ qml-module-qtquick2,
425+ qml-module-qtquick-window2,
426 qml-module-qtquick-layouts,
427- qtdeclarative5-qtfeedback-plugin,
428+ qml-module-qtfeedback,
429 qtdeclarative5-unity-action-plugin (>= 1.1.0),
430 suru-icon-theme,
431 ttf-ubuntu-font-family,
432 ubuntu-ui-toolkit-theme (= ${binary:Version}),
433 libubuntugestures5 (= ${binary:Version}),
434+ libubuntutoolkit5 (= ${binary:Version}),
435 ${misc:Depends},
436 ${shlibs:Depends},
437 Conflicts: qt-components-ubuntu
438@@ -104,7 +106,7 @@
439 Depends: ${misc:Depends},
440 ${shlibs:Depends},
441 Description: Ubuntu gestures library development files
442- This package contains the development files for
443+ This package contains the development files for
444 Ubuntu gestures library with SwipeArea
445
446 Package: libubuntugestures5-private-dev
447@@ -117,6 +119,25 @@
448 This package contains the private development files for
449 Ubuntu gestures library with SwipeArea
450
451+Package: libubuntutoolkit5
452+Architecture: any
453+Multi-Arch: same
454+Pre-Depends: dpkg (>= 1.15.6~), ${misc:Pre-Depends}
455+Depends: ${misc:Depends},
456+ ${shlibs:Depends},
457+Description: Ubuntu toolkit common library for Ubuntu UI Toolkit
458+ Contains components and helper classes that are shared between the
459+ Ubuntu QML plugins
460+
461+Package: libubuntutoolkit5-dev
462+Architecture: any
463+Multi-Arch: same
464+Pre-Depends: dpkg (>= 1.15.6~), ${misc:Pre-Depends}
465+Depends: ${misc:Depends},
466+ ${shlibs:Depends},
467+Description: Ubuntu toolkit common library development files
468+ This package contains the development files for
469+ Ubuntu toolkit common library
470
471 Package: ubuntu-ui-toolkit-theme
472 Architecture: any
473@@ -159,7 +180,7 @@
474 Depends: ubuntu-ui-toolkit-tools (>= ${source:Version}),
475 qtdeclarative5-ubuntu-ui-toolkit-plugin (= ${binary:Version}) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles,
476 ubuntu-ui-toolkit-theme (= ${binary:Version}),
477- qml-module-qtquick-xmllistmodel | qtdeclarative5-xmllistmodel-plugin,
478+ qml-module-qtquick-xmllistmodel,
479 qml-module-qt-labs-folderlistmodel,
480 ${misc:Depends},
481 ${shlibs:Depends}
482@@ -220,4 +241,3 @@
483 .
484 This package contains the application launcher, which is a drop-in
485 replacement for qmlscene, oxideqmlscene, qml and derivatives.
486-
487
488=== modified file 'debian/libubuntugestures5-dev.install'
489--- debian/libubuntugestures5-dev.install 2015-12-16 09:55:02 +0000
490+++ debian/libubuntugestures5-dev.install 2016-03-08 06:42:31 +0000
491@@ -1,28 +1,35 @@
492-usr/include/*/qt5/UbuntuGestures/ubuntugesturesglobal.h
493-usr/include/*/qt5/UbuntuGestures/CandidateInactivityTimer
494-usr/include/*/qt5/UbuntuGestures/TouchOwnershipEvent
495-usr/include/*/qt5/UbuntuGestures/UbuntuGestures
496-usr/include/*/qt5/UbuntuGestures/pool.h
497-usr/include/*/qt5/UbuntuGestures/unownedtouchevent.h
498-usr/include/*/qt5/UbuntuGestures/DebugHelpers
499-usr/include/*/qt5/UbuntuGestures/debughelpers.h
500-usr/include/*/qt5/UbuntuGestures/touchownershipevent.h
501-usr/include/*/qt5/UbuntuGestures/touchregistry.h
502-usr/include/*/qt5/UbuntuGestures/UbuntuGesturesDepends
503-usr/include/*/qt5/UbuntuGestures/timesource.h
504-usr/include/*/qt5/UbuntuGestures/TimeSource
505-usr/include/*/qt5/UbuntuGestures/timer.h
506-usr/include/*/qt5/UbuntuGestures/UnownedTouchEvent
507-usr/include/*/qt5/UbuntuGestures/TouchRegistry
508-usr/include/*/qt5/UbuntuGestures/Pool
509-usr/include/*/qt5/UbuntuGestures/ubuntugesturesversion.h
510-usr/include/*/qt5/UbuntuGestures/Timer
511-usr/include/*/qt5/UbuntuGestures/candidateinactivitytimer.h
512-usr/include/*/qt5/UbuntuGestures/UbuntuGesturesVersion
513+usr/include/*/qt5/UbuntuGestures/ubuntugesturesglobal.h
514+usr/include/*/qt5/UbuntuGestures/CandidateInactivityTimer
515+usr/include/*/qt5/UbuntuGestures/TouchOwnershipEvent
516+usr/include/*/qt5/UbuntuGestures/UbuntuGestures
517+usr/include/*/qt5/UbuntuGestures/pool.h
518+usr/include/*/qt5/UbuntuGestures/unownedtouchevent.h
519+usr/include/*/qt5/UbuntuGestures/DebugHelpers
520+usr/include/*/qt5/UbuntuGestures/debughelpers.h
521+usr/include/*/qt5/UbuntuGestures/touchownershipevent.h
522+usr/include/*/qt5/UbuntuGestures/touchregistry.h
523+usr/include/*/qt5/UbuntuGestures/UbuntuGesturesDepends
524+usr/include/*/qt5/UbuntuGestures/timesource.h
525+usr/include/*/qt5/UbuntuGestures/TimeSource
526+usr/include/*/qt5/UbuntuGestures/timer.h
527+usr/include/*/qt5/UbuntuGestures/UnownedTouchEvent
528+usr/include/*/qt5/UbuntuGestures/TouchRegistry
529+usr/include/*/qt5/UbuntuGestures/Pool
530+usr/include/*/qt5/UbuntuGestures/ubuntugesturesversion.h
531+usr/include/*/qt5/UbuntuGestures/Timer
532+usr/include/*/qt5/UbuntuGestures/candidateinactivitytimer.h
533+usr/include/*/qt5/UbuntuGestures/UbuntuGesturesVersion
534+usr/include/*/qt5/UbuntuGestures/TimerFactory
535+usr/include/*/qt5/UbuntuGestures/AbstractTimer
536+usr/include/*/qt5/UbuntuGestures/FakeTimeSource
537+usr/include/*/qt5/UbuntuGestures/AbstractTimerFactory
538+usr/include/*/qt5/UbuntuGestures/FakeTimerFactory
539+usr/include/*/qt5/UbuntuGestures/RealTimeSource
540+usr/include/*/qt5/UbuntuGestures/SharedTimeSource
541+usr/include/*/qt5/UbuntuGestures/FakeTimer
542 usr/lib/*/libUbuntuGestures.prl
543 usr/lib/*/libUbuntuGestures.la
544 usr/lib/*/libUbuntuGestures.so
545 usr/lib/*/pkgconfig/UbuntuGestures.pc
546 usr/lib/*/qt5/mkspecs/modules/qt_lib_UbuntuGestures.pri
547 usr/lib/*/qt5/mkspecs/modules/qt_lib_UbuntuGestures_private.pri
548-
549
550=== added file 'debian/libubuntutoolkit5-dev.install'
551--- debian/libubuntutoolkit5-dev.install 1970-01-01 00:00:00 +0000
552+++ debian/libubuntutoolkit5-dev.install 2016-03-08 06:42:31 +0000
553@@ -0,0 +1,15 @@
554+usr/include/*/qt5/UbuntuToolkit/ColorUtils
555+usr/include/*/qt5/UbuntuToolkit/colorutils.h
556+usr/include/*/qt5/UbuntuToolkit/Tree
557+usr/include/*/qt5/UbuntuToolkit/tree.h
558+usr/include/*/qt5/UbuntuToolkit/UbuntuToolkit
559+usr/include/*/qt5/UbuntuToolkit/UbuntuToolkitDepends
560+usr/include/*/qt5/UbuntuToolkit/UbuntuToolkitVersion
561+usr/include/*/qt5/UbuntuToolkit/ubuntutoolkitglobal.h
562+usr/include/*/qt5/UbuntuToolkit/ubuntutoolkitversion.h
563+usr/lib/*/libUbuntuToolkit.prl
564+usr/lib/*/libUbuntuToolkit.la
565+usr/lib/*/libUbuntuToolkit.so
566+usr/lib/*/pkgconfig/UbuntuToolkit.pc
567+usr/lib/*/qt5/mkspecs/modules/qt_lib_UbuntuToolkit.pri
568+usr/lib/*/qt5/mkspecs/modules/qt_lib_UbuntuToolkit_private.pri
569
570=== added file 'debian/libubuntutoolkit5.install'
571--- debian/libubuntutoolkit5.install 1970-01-01 00:00:00 +0000
572+++ debian/libubuntutoolkit5.install 2016-03-08 06:42:31 +0000
573@@ -0,0 +1,1 @@
574+usr/lib/*/libUbuntuToolkit.so.*
575
576=== modified file 'debian/rules'
577--- debian/rules 2015-12-03 10:36:02 +0000
578+++ debian/rules 2016-03-08 06:42:31 +0000
579@@ -11,7 +11,7 @@
580 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
581
582 # Skip tests on the archs they are known to be flaky with current configuration
583-testskip_architectures := powerpc arm64 ppc64el
584+testskip_architectures := powerpc arm64 ppc64el s390x
585
586 override_dh_auto_configure:
587 qmake -r
588
589=== modified file 'documentation/statesaving.qdoc'
590--- documentation/statesaving.qdoc 2015-07-22 14:35:48 +0000
591+++ documentation/statesaving.qdoc 2016-03-08 06:42:31 +0000
592@@ -53,7 +53,7 @@
593 for the application. However runtime application name change would require
594 application restart.
595
596- Having these preconditions, we can deduct that \l MainViewBase::applicationName
597+ Having these preconditions, we can deduct that \l MainView::applicationName
598 property is one of the properties which cannot be serialized.
599
600 \section1 IDs
601
602=== modified file 'documentation/ubuntu-components.qdoc'
603--- documentation/ubuntu-components.qdoc 2015-03-03 13:47:48 +0000
604+++ documentation/ubuntu-components.qdoc 2016-03-08 06:42:31 +0000
605@@ -15,7 +15,7 @@
606 */
607
608 /*!
609- \qmlmodule Ubuntu.Components 1.2
610+ \qmlmodule Ubuntu.Components 1.3
611 \title Basic QML Types
612 \nextpage {Ubuntu User Interface Toolkit}
613 */
614
615=== modified file 'documentation/ubuntu-theming.qdoc'
616--- documentation/ubuntu-theming.qdoc 2015-08-11 10:01:34 +0000
617+++ documentation/ubuntu-theming.qdoc 2016-03-08 06:42:31 +0000
618@@ -270,17 +270,11 @@
619 * The extended (or even overridden) style component documents must follow the naming
620 * convention, and must have the names implied by the components styled.
621 *
622- * SuruDark theme overrides the Ambiance theme's ListItemStyle, therefore declares the
623- * ListItemStyle.qml document, with the following content:
624- * \snippet Themes/SuruDark/1.3/ListItemStyle.qml 0
625- *
626 * The style imports the Ambiance theme module, and extends the Ambiance ListItemStyle
627 * component. The same is done in the other style components. However, Palette defines
628 * own values, and does not re-use Ambiance palette values.
629 * \snippet Themes/SuruDark/1.3/Palette.qml 0
630 *
631- * The same is done with TabBarStyle and OptionSelectorStyle components.
632- *
633 * \note If a theme derived from SuruDark wants to override style components not present
634 * in SuruDark, they must import the SuruDark's parent theme in the style component.
635 * As example, if FancyTheme would want to override the SwitchStyle, it would need to
636
637=== modified file 'documentation/ubuntu-ui-toolkit-common.qdocconf'
638--- documentation/ubuntu-ui-toolkit-common.qdocconf 2015-09-01 11:59:13 +0000
639+++ documentation/ubuntu-ui-toolkit-common.qdocconf 2016-03-08 06:42:31 +0000
640@@ -29,7 +29,7 @@
641 excludefiles += $BLD/../src/Ubuntu/Components/1.3/PageWrapperUtils.js
642 outputdir = $BLD/html
643 outputformats = HTML
644-version = 1.2
645+version = 1.3
646 syntaxhighlighting = true
647 sourceencoding = UTF-8
648 outputencoding = UTF-8
649
650=== modified file 'examples/ubuntu-ui-toolkit-gallery/About.qml'
651--- examples/ubuntu-ui-toolkit-gallery/About.qml 2015-10-23 14:46:16 +0000
652+++ examples/ubuntu-ui-toolkit-gallery/About.qml 2016-03-08 06:42:31 +0000
653@@ -23,7 +23,7 @@
654 theme: ThemeSettings {
655 name: "Ubuntu.Components.Themes.SuruDark"
656 palette: Palette {
657- normal.background: UbuntuColors.darkGrey
658+ normal.background: UbuntuColors.slate
659 }
660 }
661 style: Rectangle {
662
663=== modified file 'examples/ubuntu-ui-toolkit-gallery/BottomEdgePage.qml'
664--- examples/ubuntu-ui-toolkit-gallery/BottomEdgePage.qml 2015-12-02 08:23:14 +0000
665+++ examples/ubuntu-ui-toolkit-gallery/BottomEdgePage.qml 2016-03-08 06:42:31 +0000
666@@ -132,7 +132,7 @@
667 objectName: "CustomRegion1"
668 enabled: regionConfig.model >= 1
669 to: 0.3
670- property color baseColor: UbuntuColors.lightGrey
671+ property color baseColor: UbuntuColors.silk
672 },
673 BottomEdgeRegion {
674 objectName: "CustomRegion2"
675
676=== modified file 'examples/ubuntu-ui-toolkit-gallery/Buttons.qml'
677--- examples/ubuntu-ui-toolkit-gallery/Buttons.qml 2015-12-07 11:47:35 +0000
678+++ examples/ubuntu-ui-toolkit-gallery/Buttons.qml 2016-03-08 06:42:31 +0000
679@@ -24,7 +24,7 @@
680 TemplateSection {
681 className: "Button"
682
683- TemplateRow {
684+ TemplateFlow {
685 title: i18n.tr("Standard")
686
687 Button {
688@@ -33,7 +33,7 @@
689 }
690 }
691
692- TemplateRow {
693+ TemplateFlow {
694 title: i18n.tr("Stroke")
695
696 Button {
697@@ -43,7 +43,7 @@
698 }
699 }
700
701- TemplateRow {
702+ TemplateFlow {
703 title: i18n.tr("Color")
704
705 Button {
706@@ -59,7 +59,7 @@
707 }
708 }
709
710- TemplateRow {
711+ TemplateFlow {
712 title: i18n.tr("Icon")
713
714 Button {
715@@ -68,7 +68,7 @@
716 }
717 }
718
719- TemplateRow {
720+ TemplateFlow {
721 title: i18n.tr("Icon+Text")
722
723 Button {
724@@ -87,7 +87,7 @@
725 }
726 }
727
728- TemplateRow {
729+ TemplateFlow {
730 title: i18n.tr("Disabled")
731
732 Button {
733@@ -101,12 +101,13 @@
734 TemplateSection {
735 className: "ComboButton"
736
737- TemplateRow {
738+ TemplateFlow {
739 title: i18n.tr("Collapsed")
740
741 ComboButton {
742 text: "Press me"
743 objectName: "combobutton_collapsed"
744+ width: parent.width < units.gu(30)? parent.width : units.gu(30)
745 comboList: UbuntuListView {
746 model: 10
747 delegate: Standard {
748@@ -116,11 +117,12 @@
749 }
750 }
751
752- TemplateRow {
753+ TemplateFlow {
754 title: i18n.tr("Icon")
755
756 ComboButton {
757 iconSource: "call.png"
758+ width: parent.width < units.gu(30)? parent.width : units.gu(30)
759 comboList: UbuntuListView {
760 model: 10
761 delegate: Standard {
762@@ -130,12 +132,13 @@
763 }
764 }
765
766- TemplateRow {
767+ TemplateFlow {
768 title: i18n.tr("Icon+Text")
769
770 ComboButton {
771 text: "Answer"
772 iconSource: "call.png"
773+ width: parent.width < units.gu(30)? parent.width : units.gu(30)
774 comboList: UbuntuListView {
775 model: 10
776 delegate: Standard {
777@@ -144,13 +147,14 @@
778 }
779 }
780 }
781- TemplateRow {
782+ TemplateFlow {
783 title: i18n.tr("Expanded")
784
785 ComboButton {
786 text: "Press me"
787 objectName: "combobutton_expanded"
788 expanded: true
789+ width: parent.width < units.gu(30)? parent.width : units.gu(30)
790 comboList: UbuntuListView {
791 model: 10
792 delegate: Standard {
793
794=== modified file 'examples/ubuntu-ui-toolkit-gallery/Colors.qml'
795--- examples/ubuntu-ui-toolkit-gallery/Colors.qml 2015-07-22 13:14:43 +0000
796+++ examples/ubuntu-ui-toolkit-gallery/Colors.qml 2016-03-08 06:42:31 +0000
797@@ -16,11 +16,131 @@
798
799 import QtQuick 2.4
800 import Ubuntu.Components 1.3
801+import QtQml.Models 2.1
802
803 Template {
804+ id: colorsTemplate
805 objectName: "colorsTemplate"
806
807 TemplateSection {
808+ id: paletteSection
809+
810+ title: "Palette"
811+ className: "Palette"
812+ documentation: "qml-palette.html"
813+
814+ property var palettes: ["normal", "disabled", "selected", "selectedDisabled", "highlighted"]
815+ property var paletteValues: [["background", ["backgroundText", "backgroundSecondaryText", "backgroundTertiaryText"]],
816+ ["base", ["baseText"]],
817+ ["foreground", ["foregroundText"]],
818+ ["field", ["fieldText"]],
819+ ["focus", ["focusText"]],
820+ ["activity", ["activityText"]],
821+ ["negative", ["negativeText"]],
822+ ["overlay", ["overlayText", "overlaySecondaryText"]],
823+ ["positive", ["positiveText"]],
824+ ["raised", ["raisedText", "raisedSecondaryText"]],
825+ ["selection", ["selectionText"]]]
826+
827+ Flow {
828+ id: paletteFlow
829+ anchors {
830+ left: parent.left
831+ right: parent.right
832+ }
833+ spacing: units.gu(2)
834+ property var previewed
835+
836+ Repeater {
837+ model: paletteSection.palettes
838+ Column {
839+ spacing: units.gu(1)
840+ width: paletteColorGrid.width
841+ property var palette: theme.palette[modelData]
842+
843+ Label {
844+ text: "theme.palette." + modelData
845+ textSize: Label.Small
846+ }
847+
848+ Grid {
849+ id: paletteColorGrid
850+ spacing: units.gu(0)
851+
852+ Repeater {
853+ model: paletteSection.paletteValues
854+
855+ Item {
856+ id: paletteColor
857+ property string mainColor: modelData[0]
858+ property var textColors: modelData[1]
859+ property bool previewed: paletteFlow.previewed == paletteColor
860+ width: units.gu(4)
861+ height: units.gu(5)
862+ z: previewed ? 10 : 0
863+
864+ MouseArea {
865+ id: colorHoverArea
866+ anchors.fill: parent
867+ hoverEnabled: true
868+ onClicked: paletteFlow.previewed = paletteColor
869+ onContainsMouseChanged: {
870+ if (containsMouse) {
871+ paletteFlow.previewed = paletteColor;
872+ } else {
873+ if (paletteFlow.previewed == paletteColor) {
874+ paletteFlow.previewed = null;
875+ }
876+ }
877+ }
878+ }
879+
880+ Rectangle {
881+ width: paletteColor.width + (previewed ? units.gu(26) : 0)
882+ height: paletteColor.height + (previewed ? units.gu(2.5) : 0)
883+ Behavior on height { UbuntuNumberAnimation {duration: UbuntuAnimation.SnapDuration} }
884+ color: theme.palette.normal.background
885+ parent: previewed ? colorsTemplate : paletteColor
886+ x: Math.max(0, paletteColor.mapToItem(parent, 0, 0).x + (previewed ? (paletteColor.width-width)/2 : 0))
887+ y: paletteColor.mapToItem(parent, 0, 0).y + (previewed ? (paletteColor.height-height)/2 : 0)
888+
889+ Rectangle {
890+ anchors.fill: parent
891+ color: palette[mainColor]
892+ border.width: color == theme.palette.normal.background ? units.dp(1) : 0
893+ border.color: theme.palette.normal.backgroundText
894+ }
895+
896+ Column {
897+ anchors {
898+ left: parent.left
899+ leftMargin: units.gu(0.5)
900+ right: parent.right
901+ top: parent.top
902+ topMargin: units.gu(0.5)
903+ }
904+
905+ Repeater {
906+ model: textColors
907+ Label {
908+ width: previewed ? implicitWidth : parent.width
909+ text: previewed ? modelData : modelData.slice(0, 4)
910+ color: palette[modelData]
911+ textSize: previewed ? Label.Medium : Label.XSmall
912+ elide: Text.ElideRight
913+ }
914+ }
915+ }
916+ }
917+ }
918+ }
919+ }
920+ }
921+ }
922+ }
923+ }
924+
925+ TemplateSection {
926 title: "UbuntuColors"
927 className: "UbuntuColors"
928
929@@ -33,15 +153,45 @@
930 }
931 }
932 TemplateRow {
933- title: i18n.tr("Light grey")
934- UbuntuShape {
935- backgroundColor: UbuntuColors.lightGrey
936- }
937- }
938- TemplateRow {
939- title: i18n.tr("Dark grey")
940- UbuntuShape {
941- backgroundColor: UbuntuColors.darkGrey
942+ title: i18n.tr("Porcelain")
943+ UbuntuShape {
944+ backgroundColor: UbuntuColors.porcelain
945+ }
946+ }
947+ TemplateRow {
948+ title: i18n.tr("Silk")
949+ UbuntuShape {
950+ backgroundColor: UbuntuColors.silk
951+ }
952+ }
953+ TemplateRow {
954+ title: i18n.tr("Ash")
955+ UbuntuShape {
956+ backgroundColor: UbuntuColors.ash
957+ }
958+ }
959+ TemplateRow {
960+ title: i18n.tr("Graphite")
961+ UbuntuShape {
962+ backgroundColor: UbuntuColors.graphite
963+ }
964+ }
965+ TemplateRow {
966+ title: i18n.tr("Slate")
967+ UbuntuShape {
968+ backgroundColor: UbuntuColors.slate
969+ }
970+ }
971+ TemplateRow {
972+ title: i18n.tr("Inkstone")
973+ UbuntuShape {
974+ backgroundColor: UbuntuColors.inkstone
975+ }
976+ }
977+ TemplateRow {
978+ title: i18n.tr("Jet")
979+ UbuntuShape {
980+ backgroundColor: UbuntuColors.jet
981 }
982 }
983 TemplateRow {
984
985=== modified file 'examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml'
986--- examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml 2015-11-10 11:53:53 +0000
987+++ examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml 2016-03-08 06:42:31 +0000
988@@ -79,6 +79,7 @@
989 id: telegramContactsLayout
990 title.text: "Telegram Name goes here"
991 subtitle.text: "last seen 12:02"
992+ summary.text: "Oh wow! What a nice layout!"
993
994 Rectangle {
995 id: imageShape
996
997=== modified file 'examples/ubuntu-ui-toolkit-gallery/NewListItems.qml'
998--- examples/ubuntu-ui-toolkit-gallery/NewListItems.qml 2015-09-28 12:26:13 +0000
999+++ examples/ubuntu-ui-toolkit-gallery/NewListItems.qml 2016-03-08 06:42:31 +0000
1000@@ -163,7 +163,7 @@
1001 model: [ i18n.tr("Basic"), i18n.tr("Colored divider"), i18n.tr("Immutable"), i18n.tr("No divider") ]
1002 delegate: ListItemWithLabel {
1003 title.text: modelData
1004- color: dragging ? "lightblue" : "transparent"
1005+ color: dragging ? theme.palette.selected.base : "transparent"
1006 divider {
1007 colorFrom: modelData == i18n.tr("Colored divider") ? UbuntuColors.red : Qt.rgba(0.0, 0.0, 0.0, 0.0)
1008 colorTo: modelData == i18n.tr("Colored divider") ? UbuntuColors.green : Qt.rgba(0.0, 0.0, 0.0, 0.0)
1009
1010=== modified file 'examples/ubuntu-ui-toolkit-gallery/PageHeaders.qml'
1011--- examples/ubuntu-ui-toolkit-gallery/PageHeaders.qml 2015-12-15 15:08:49 +0000
1012+++ examples/ubuntu-ui-toolkit-gallery/PageHeaders.qml 2016-03-08 06:42:31 +0000
1013@@ -44,8 +44,35 @@
1014 iconName: "edit"
1015 text: "Edit"
1016 onTriggered: page.header = editHeader
1017+ },
1018+ Action {
1019+ iconName: standardHeader.extension === sections
1020+ ? "media-playback-stop"
1021+ : "filters"
1022+ text: "Sections"
1023+ onTriggered: {
1024+ if (standardHeader.extension) {
1025+ standardHeader.extension = null;
1026+ } else {
1027+ standardHeader.extension = sections;
1028+ }
1029+ }
1030 }
1031 ]
1032+
1033+ Sections {
1034+ id: sections
1035+ visible: standardHeader.extension === sections
1036+ anchors {
1037+ left: parent.left
1038+ right: parent.right
1039+ bottom: parent.bottom
1040+ }
1041+ model: ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
1042+ "ten", "eleven", "twelve", "thirteen"]
1043+ }
1044+
1045+
1046 }
1047
1048 PageHeader {
1049@@ -81,7 +108,7 @@
1050 width: label.width + units.gu(4)
1051 height: parent.height
1052 Rectangle {
1053- color: UbuntuColors.darkGrey
1054+ color: UbuntuColors.slate
1055 opacity: 0.1
1056 anchors.fill: parent
1057 visible: button.pressed
1058
1059=== modified file 'examples/ubuntu-ui-toolkit-gallery/Popover.qml'
1060--- examples/ubuntu-ui-toolkit-gallery/Popover.qml 2015-06-24 16:16:51 +0000
1061+++ examples/ubuntu-ui-toolkit-gallery/Popover.qml 2016-03-08 06:42:31 +0000
1062@@ -21,7 +21,7 @@
1063 Template {
1064 objectName: "popoversTemplate"
1065
1066- head.actions: [
1067+ trailingActions: [
1068 Action {
1069 text: "Actions"
1070 iconSource: "call_icon.png"
1071
1072=== modified file 'examples/ubuntu-ui-toolkit-gallery/Sections.qml'
1073--- examples/ubuntu-ui-toolkit-gallery/Sections.qml 2015-10-23 14:46:16 +0000
1074+++ examples/ubuntu-ui-toolkit-gallery/Sections.qml 2016-03-08 06:42:31 +0000
1075@@ -22,10 +22,39 @@
1076 id: sectionsTemplate
1077
1078 header: PageHeader {
1079+ id: h
1080 title: sectionsTemplate.title
1081- sections.model: ["first", "second", "third"]
1082+ extension: Sections {
1083+ anchors {
1084+ left: parent.left
1085+ right: parent.right
1086+ bottom: parent.bottom
1087+ }
1088+ model: h.showManySections ? sectionsTemplate.manyActions
1089+ : sectionsTemplate.fewActions
1090+ }
1091+ property bool showManySections: false
1092+ trailingActionBar.actions: [
1093+ Action {
1094+ iconName: h.showManySections ? "view-collapse" : "view-expand"
1095+ text: h.showManySections ? "less" : "more"
1096+ onTriggered: h.showManySections = !h.showManySections;
1097+ }
1098+ ]
1099 }
1100
1101+ property list<Action> fewActions: [
1102+ Action { text: "One" },
1103+ Action { text: "Two" },
1104+ Action { text: "Three" }
1105+ ]
1106+
1107+ property var manyActions: [
1108+ "one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
1109+ "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen",
1110+ "sixteen", "seventeen", "eighteen", "nineteen", "twenty"
1111+ ]
1112+
1113 TemplateSection {
1114 title: "Sections"
1115 className: "Sections"
1116@@ -34,19 +63,38 @@
1117 title: i18n.tr("Enabled")
1118
1119 Sections {
1120- actions: [
1121- Action { text: "one" },
1122- Action { text: "two" },
1123- Action { text: "three" }
1124- ]
1125- }
1126- }
1127- TemplateRow {
1128- title: i18n.tr("Disabled")
1129-
1130- Sections {
1131- model: ["one", "two", "three"]
1132- enabled: false
1133+ actions: sectionsTemplate.fewActions
1134+ }
1135+ }
1136+ TemplateRow {
1137+ title: i18n.tr("Disabled")
1138+
1139+ Sections {
1140+ model: sectionsTemplate.fewActions
1141+ enabled: false
1142+ }
1143+ }
1144+ }
1145+
1146+ TemplateSection {
1147+ title: "Scrollable sections"
1148+ className: "Sections"
1149+
1150+ TemplateRow {
1151+ title: i18n.tr("Enabled")
1152+
1153+ Sections {
1154+ model: sectionsTemplate.manyActions
1155+ width: parent.width
1156+ }
1157+ }
1158+ TemplateRow {
1159+ title: i18n.tr("Disabled")
1160+
1161+ Sections {
1162+ model: sectionsTemplate.manyActions
1163+ enabled: false
1164+ width: parent.width
1165 }
1166 }
1167 }
1168
1169=== modified file 'examples/ubuntu-ui-toolkit-gallery/Template.qml'
1170--- examples/ubuntu-ui-toolkit-gallery/Template.qml 2015-12-16 15:02:33 +0000
1171+++ examples/ubuntu-ui-toolkit-gallery/Template.qml 2016-03-08 06:42:31 +0000
1172@@ -23,12 +23,14 @@
1173 default property alias content: column.children
1174 property alias spacing: column.spacing
1175 property alias scrollable: templateFlickable.interactive
1176+ property list<Action> trailingActions
1177 flickable: templateFlickable
1178
1179 header: PageHeader {
1180 title: template.title
1181 flickable: layout.columns === 1 ? templateFlickable : null
1182 onFlickableChanged: exposed = true;
1183+ trailingActionBar.actions: trailingActions
1184 }
1185
1186 ScrollView {
1187
1188=== modified file 'examples/ubuntu-ui-toolkit-gallery/WidgetsModel.qml'
1189--- examples/ubuntu-ui-toolkit-gallery/WidgetsModel.qml 2015-12-16 12:58:03 +0000
1190+++ examples/ubuntu-ui-toolkit-gallery/WidgetsModel.qml 2016-03-08 06:42:31 +0000
1191@@ -17,64 +17,100 @@
1192 import QtQuick 2.0
1193
1194 ListModel {
1195- // Already in design guidelines
1196- ListElement {
1197- objectName: "navigationElement"
1198- label: "Navigation"
1199- source: "Navigation.qml"
1200- }
1201 ListElement {
1202 objectName: "actionBarElement"
1203 label: "ActionBar"
1204 source: "ActionBars.qml"
1205 }
1206 ListElement {
1207+ objectName: "animationsElement"
1208+ label: "Animations"
1209+ source: "Animations.qml"
1210+ }
1211+ ListElement {
1212+ objectName: "bottomEdgeHintElement"
1213+ label: "Bottom Edge"
1214+ source: "BottomEdgePage.qml"
1215+ }
1216+ ListElement {
1217+ objectName: "buttonsElement"
1218+ label: "Buttons"
1219+ source: "Buttons.qml"
1220+ }
1221+ ListElement {
1222 objectName: "colorsElement"
1223 label: "Colors"
1224 source: "Colors.qml"
1225 }
1226 ListElement {
1227- objectName: "togglesElement"
1228- label: "Toggles"
1229- source: "Toggles.qml"
1230- }
1231- ListElement {
1232- objectName: "buttonsElement"
1233- label: "Buttons"
1234- source: "Buttons.qml"
1235- }
1236- ListElement {
1237- objectName: "slidersElement"
1238- label: "Slider"
1239- source: "Sliders.qml"
1240- }
1241- ListElement {
1242- objectName: "textinputsElement"
1243- label: "Text Field"
1244- source: "TextInputs.qml"
1245- }
1246-
1247+ objectName: "crossFadeImageElement"
1248+ label: "CrossFadeImage"
1249+ source: "CrossFadeImage.qml"
1250+ }
1251+ ListElement {
1252+ objectName: "dialogsElement"
1253+ label: "Dialog"
1254+ source: "Dialog.qml"
1255+ }
1256+ ListElement {
1257+ objectName: "iconsElement"
1258+ label: "Icons"
1259+ source: "Icons.qml"
1260+ }
1261+ ListElement {
1262+ objectName: "labelsElement"
1263+ label: "Label"
1264+ source: "Label.qml"
1265+ }
1266+ ListElement {
1267+ objectName: "newListItemsElement"
1268+ label: "List items (new)"
1269+ source: "NewListItems.qml"
1270+ }
1271+ ListElement {
1272+ objectName: "listItemsElement"
1273+ label: "List Items (old)"
1274+ source: "ListItems.qml"
1275+ }
1276+ ListElement {
1277+ objectName: "listItemLayoutElement"
1278+ label: "ListItem Layouts"
1279+ source: "ListItemLayouts.qml"
1280+ }
1281+ ListElement {
1282+ objectName: "navigationElement"
1283+ label: "Navigation"
1284+ source: "Navigation.qml"
1285+ }
1286 ListElement {
1287 objectName: "optionSelectorsElement"
1288 label: "Option Selector"
1289 source: "OptionSelectors.qml"
1290 }
1291-
1292- // Not in design guidelines yet
1293+ ListElement {
1294+ objectName: "pageHeaderElement"
1295+ label: "Page header"
1296+ source: "PageHeaders.qml"
1297+ }
1298 ListElement {
1299 objectName: "pickersElement"
1300 label: "Pickers"
1301 source: "Pickers.qml"
1302 }
1303 ListElement {
1304+ objectName: "popoversElement"
1305+ label: "Popover"
1306+ source: "Popover.qml"
1307+ }
1308+ ListElement {
1309 objectName: "progressBarsElement"
1310 label: "Progress and activity"
1311 source: "ProgressBars.qml"
1312 }
1313 ListElement {
1314- objectName: "pageHeaderElement"
1315- label: "Page header"
1316- source: "PageHeaders.qml"
1317+ objectName: "proportionalShapesElement"
1318+ label: "Proportional shapes"
1319+ source: "ProportionalShape.qml"
1320 }
1321 ListElement {
1322 objectName: "sectionsElement"
1323@@ -82,29 +118,14 @@
1324 source: "Sections.qml"
1325 }
1326 ListElement {
1327- objectName: "ubuntuShapesElement"
1328- label: "Ubuntu Shape"
1329- source: "UbuntuShape.qml"
1330- }
1331- ListElement {
1332- objectName: "iconsElement"
1333- label: "Icons"
1334- source: "Icons.qml"
1335- }
1336- ListElement {
1337- objectName: "proportionalShapesElement"
1338- label: "Proportional shapes"
1339- source: "ProportionalShape.qml"
1340- }
1341- ListElement {
1342- objectName: "labelsElement"
1343- label: "Label"
1344- source: "Label.qml"
1345- }
1346- ListElement {
1347- objectName: "crossFadeImageElement"
1348- label: "CrossFadeImage"
1349- source: "CrossFadeImage.qml"
1350+ objectName: "sheetsElement"
1351+ label: "Sheet"
1352+ source: "Sheet.qml"
1353+ }
1354+ ListElement {
1355+ objectName: "slidersElement"
1356+ label: "Slider"
1357+ source: "Sliders.qml"
1358 }
1359 ListElement {
1360 objectName: "swipeAreaElement"
1361@@ -112,53 +133,23 @@
1362 source: "SwipeAreaPage.qml"
1363 }
1364 ListElement {
1365- objectName: "bottomEdgeHintElement"
1366- label: "Bottom Edge"
1367- source: "BottomEdgePage.qml"
1368- }
1369-
1370- ListElement {
1371- objectName: "newListItemsElement"
1372- label: "New list items (preview)"
1373- source: "NewListItems.qml"
1374- }
1375- ListElement {
1376- objectName: "listItemLayoutElement"
1377- label: "ListItemLayouts"
1378- source: "ListItemLayouts.qml"
1379- }
1380- // Already in design guidelines but should be reordered
1381- ListElement {
1382- objectName: "listItemsElement"
1383- label: "List Items"
1384- source: "ListItems.qml"
1385+ objectName: "textinputsElement"
1386+ label: "Text Field"
1387+ source: "TextInputs.qml"
1388+ }
1389+ ListElement {
1390+ objectName: "togglesElement"
1391+ label: "Toggles"
1392+ source: "Toggles.qml"
1393 }
1394 ListElement {
1395 objectName: "ubuntuListViewElement"
1396 label: "Ubuntu ListView"
1397 source: "UbuntuListViews.qml"
1398 }
1399-
1400- ListElement {
1401- objectName: "dialogsElement"
1402- label: "Dialog"
1403- source: "Dialog.qml"
1404- }
1405- ListElement {
1406- objectName: "popoversElement"
1407- label: "Popover"
1408- source: "Popover.qml"
1409- }
1410- ListElement {
1411- objectName: "sheetsElement"
1412- label: "Sheet"
1413- source: "Sheet.qml"
1414- }
1415-
1416- // Not in design guidelines yet
1417- ListElement {
1418- objectName: "animationsElement"
1419- label: "Animations"
1420- source: "Animations.qml"
1421+ ListElement {
1422+ objectName: "ubuntuShapesElement"
1423+ label: "Ubuntu Shape"
1424+ source: "UbuntuShape.qml"
1425 }
1426 }
1427
1428=== modified file 'examples/ubuntu-ui-toolkit-gallery/call@30.png'
1429Binary files examples/ubuntu-ui-toolkit-gallery/call@30.png 2013-06-29 22:36:27 +0000 and examples/ubuntu-ui-toolkit-gallery/call@30.png 2016-03-08 06:42:31 +0000 differ
1430=== removed file 'examples/ubuntu-ui-toolkit-gallery/gallery'
1431--- examples/ubuntu-ui-toolkit-gallery/gallery 2015-12-02 15:13:43 +0000
1432+++ examples/ubuntu-ui-toolkit-gallery/gallery 1970-01-01 00:00:00 +0000
1433@@ -1,6 +0,0 @@
1434-#!/bin/bash
1435-
1436-. `dirname ${BASH_SOURCE[0]}`/../../export_modules_dir.sh || exit 1
1437-
1438-SCRIPT_DIRECTORY=`dirname $0`
1439-QT_LOGGING_CONF=$SCRIPT_DIRECTORY/gallery-logging.config $BUILD_DIR/ubuntu-ui-toolkit-launcher/ubuntu-ui-toolkit-launcher $@ $SCRIPT_DIRECTORY/ubuntu-ui-toolkit-gallery.qml
1440
1441=== added file 'examples/ubuntu-ui-toolkit-gallery/manifest.json.in'
1442--- examples/ubuntu-ui-toolkit-gallery/manifest.json.in 1970-01-01 00:00:00 +0000
1443+++ examples/ubuntu-ui-toolkit-gallery/manifest.json.in 2016-03-08 06:42:31 +0000
1444@@ -0,0 +1,15 @@
1445+{
1446+ "architecture": "all",
1447+ "description": "Component showcase gallery of the Ubuntu user interface toolkit (UITK)",
1448+ "framework": "ubuntu-sdk-15.04.3",
1449+ "hooks": {
1450+ "ubuntu-ui-toolkit-gallery": {
1451+ "apparmor": "ubuntu-ui-toolkit-gallery.apparmor",
1452+ "desktop": "ubuntu-ui-toolkit-gallery.desktop"
1453+ }
1454+ },
1455+ "maintainer": "Zoltán Balogh <zoltan.balogh@ubuntu.com>",
1456+ "name": "com.ubuntu.developer.bzoltan.ubuntu-ui-toolkit-gallery",
1457+ "title": "Ubuntu UI Toolkit Gallery",
1458+ "version": "0.5"
1459+}
1460
1461=== added file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery-click.pro'
1462--- examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery-click.pro 1970-01-01 00:00:00 +0000
1463+++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery-click.pro 2016-03-08 06:42:31 +0000
1464@@ -0,0 +1,36 @@
1465+TEMPLATE = subdirs
1466+
1467+#load Ubuntu specific features
1468+load(ubuntu-click)
1469+
1470+# specify the manifest file, this file is required for click
1471+# packaging and for the IDE to create runconfigurations
1472+UBUNTU_MANIFEST_FILE=manifest.json.in
1473+
1474+TARGET = ubuntu-ui-toolkit-gallery
1475+
1476+QML_FILES += $$files(*.qml,true) \
1477+ $$files(*.js,true)
1478+
1479+CONF_FILES += ubuntu-ui-toolkit-gallery.apparmor \
1480+ ubuntu-ui-toolkit-gallery.png
1481+
1482+OTHER_FILES += $${CONF_FILES} \
1483+ $${QML_FILES} \
1484+ ubuntu-ui-toolkit-gallery.desktop
1485+
1486+#specify where the qml/js files are installed to
1487+qml_files.path = /
1488+qml_files.files += $${QML_FILES}
1489+
1490+#specify where the config files are installed to
1491+config_files.path = /
1492+config_files.files += $${CONF_FILES}
1493+
1494+#install the desktop file, a translated version is
1495+#automatically created in the build directory
1496+desktop_file.path = /
1497+desktop_file.files = ubuntu-ui-toolkit-gallery.desktop
1498+desktop_file.CONFIG += no_check_exist
1499+
1500+INSTALLS+=config_files qml_files desktop_file
1501
1502=== added file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.apparmor'
1503--- examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.apparmor 1970-01-01 00:00:00 +0000
1504+++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.apparmor 2016-03-08 06:42:31 +0000
1505@@ -0,0 +1,9 @@
1506+{
1507+ "policy_groups": [
1508+ "networking"
1509+ ],
1510+ "policy_version": 1.3
1511+}
1512+
1513+
1514+
1515
1516=== modified file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.desktop'
1517--- examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.desktop 2015-08-06 11:50:01 +0000
1518+++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.desktop 2016-03-08 06:42:31 +0000
1519@@ -1,11 +1,11 @@
1520 [Desktop Entry]
1521 Name=Ubuntu UI Toolkit Gallery
1522-Exec=/usr/bin/ubuntu-ui-toolkit-launcher $@ /usr/lib/ubuntu-ui-toolkit/examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml
1523+Exec=qmlscene %U ubuntu-ui-toolkit-gallery.qml
1524 Terminal=false
1525 Type=Application
1526 X-Ubuntu-Touch=true
1527-X-Ubuntu-Gettext-Domain=ubuntu-ui-toolkit-gallery
1528+X-Ubuntu-Gettext-Domain=com.ubuntu.developer.bzoltan.ubuntu-ui-toolkit-gallery
1529 # Added Icon and Path as a workaround for http://pad.lv/1227359.
1530 # TODO remove them once that bug is fixed. --elopio - 2013-09-18
1531-Icon=/usr/lib/ubuntu-ui-toolkit/examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.png
1532-Path=/usr/lib/ubuntu-ui-toolkit/examples/ubuntu-ui-toolkit-gallery/
1533+Icon=ubuntu-ui-toolkit-gallery.png
1534+
1535
1536=== modified file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.pro'
1537--- examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.pro 2015-12-02 15:13:43 +0000
1538+++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.pro 2016-03-08 06:42:31 +0000
1539@@ -1,6 +1,6 @@
1540 TEMPLATE = subdirs
1541
1542-SUBDIRS += Gallery.pro po
1543+SUBDIRS += po
1544
1545 filetypes = qml png svg js jpg qmlproject desktop
1546
1547
1548=== modified file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml'
1549--- examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml 2015-09-30 05:59:49 +0000
1550+++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml 2016-03-08 06:42:31 +0000
1551@@ -24,7 +24,7 @@
1552 objectName: "mainView"
1553
1554 // Note! applicationName needs to match the .desktop filename
1555- applicationName: "ubuntu-ui-toolkit-gallery"
1556+ applicationName: "com.ubuntu.developer.bzoltan.ubuntu-ui-toolkit-gallery"
1557
1558 width: units.gu(120)
1559 height: units.gu(75)
1560
1561=== modified file 'export_modules_dir.sh'
1562--- export_modules_dir.sh 2015-12-14 13:36:44 +0000
1563+++ export_modules_dir.sh 2016-03-08 06:42:31 +0000
1564@@ -19,7 +19,7 @@
1565 export QML_IMPORT_PATH=$BUILD_DIR/qml
1566 export QML2_IMPORT_PATH=$BUILD_DIR/qml
1567 export UBUNTU_UI_TOOLKIT_THEMES_PATH=$BUILD_DIR/qml
1568-export LD_LIBRARY_PATH=$BUILD_DIR/lib
1569+export LD_LIBRARY_PATH=$BUILD_DIR/lib:$LD_LIBRARY_PATH
1570 /sbin/initctl set-env --global QML_IMPORT_PATH=$BUILD_DIR/qml
1571 /sbin/initctl set-env --global QML2_IMPORT_PATH=$BUILD_DIR/qml
1572 /sbin/initctl set-env --global UBUNTU_UI_TOOLKIT_THEMES_PATH=$BUILD_DIR/qml
1573
1574=== modified file 'gallery.sh'
1575--- gallery.sh 2015-11-17 09:17:58 +0000
1576+++ gallery.sh 2016-03-08 06:42:31 +0000
1577@@ -17,8 +17,9 @@
1578
1579 if [ "$1" == "--autopilot" ]
1580 then
1581- examples/ubuntu-ui-toolkit-gallery/gallery -testability &
1582+ tests/Gallery/gallery -testability &
1583 autopilot vis
1584 else
1585- examples/ubuntu-ui-toolkit-gallery/gallery $@
1586+ tests/Gallery/gallery $@
1587+
1588 fi
1589
1590=== modified file 'src/Ubuntu/Components/1.2/MainViewBase.qml'
1591--- src/Ubuntu/Components/1.2/MainViewBase.qml 2015-09-28 12:55:04 +0000
1592+++ src/Ubuntu/Components/1.2/MainViewBase.qml 2016-03-08 06:42:31 +0000
1593@@ -48,7 +48,7 @@
1594
1595 Qt bug: https://bugreports.qt-project.org/browse/QTBUG-11712
1596 */
1597- property string themeName: (ColorUtils.luminance(backgroundColor) >= 0.85) ?
1598+ property string themeName: (Toolkit.ColorUtils.luminance(backgroundColor) >= 0.85) ?
1599 "Ambiance" : "SuruDark"
1600 onThemeNameChanged: {
1601 // only change the theme if the current one is a system one.
1602
1603=== modified file 'src/Ubuntu/Components/1.2/Panel.qml'
1604--- src/Ubuntu/Components/1.2/Panel.qml 2015-04-30 08:32:44 +0000
1605+++ src/Ubuntu/Components/1.2/Panel.qml 2016-03-08 06:42:31 +0000
1606@@ -321,7 +321,7 @@
1607 name: "moving"
1608 PropertyChanges {
1609 target: bar
1610- position: MathUtils.clamp(draggingArea.mousePosition - internal.movingDelta, 0, bar.size)
1611+ position: Toolkit.MathUtils.clamp(draggingArea.mousePosition - internal.movingDelta, 0, bar.size)
1612 }
1613 },
1614 State {
1615
1616=== removed file 'src/Ubuntu/Components/1.2/colorUtils.js'
1617--- src/Ubuntu/Components/1.2/colorUtils.js 2015-04-30 08:32:44 +0000
1618+++ src/Ubuntu/Components/1.2/colorUtils.js 1970-01-01 00:00:00 +0000
1619@@ -1,25 +0,0 @@
1620-/*
1621- * Copyright (C) 2013 Canonical, Ltd.
1622- *
1623- * This program is free software; you can redistribute it and/or modify
1624- * it under the terms of the GNU General Public License as published by
1625- * the Free Software Foundation; version 3.
1626- *
1627- * This program is distributed in the hope that it will be useful,
1628- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1629- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1630- * GNU General Public License for more details.
1631- *
1632- * You should have received a copy of the GNU General Public License
1633- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1634- */
1635-
1636-.pragma library
1637-
1638-function luminance(hexcolor){
1639- hexcolor = String(hexcolor)
1640- var r = parseInt(hexcolor.substr(1,2),16);
1641- var g = parseInt(hexcolor.substr(3,2),16);
1642- var b = parseInt(hexcolor.substr(5,2),16);
1643- return ((r*212)+(g*715)+(b*73))/1000/255;
1644-}
1645
1646=== modified file 'src/Ubuntu/Components/1.3/AdaptivePageLayout.qml'
1647--- src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2015-10-29 10:03:14 +0000
1648+++ src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2016-03-08 06:42:31 +0000
1649@@ -17,7 +17,7 @@
1650 import QtQuick 2.4
1651 import QtQuick.Layouts 1.1
1652 import Ubuntu.Components 1.3
1653-import "tree.js" as Tree
1654+import Ubuntu.Components.Private 1.3
1655
1656 /*!
1657 \qmltype AdaptivePageLayout
1658@@ -61,8 +61,12 @@
1659 primaryPage: page1
1660 Page {
1661 id: page1
1662- title: "Main page"
1663+ header: PageHeader {
1664+ id: header
1665+ title: "Main Page"
1666+ }
1667 Column {
1668+ anchors.top: header.bottom
1669 Button {
1670 text: "Add Page2 above " + page1.title
1671 onClicked: page1.pageStack.addPageToCurrentColumn(page1, page2)
1672@@ -75,11 +79,15 @@
1673 }
1674 Page {
1675 id: page2
1676- title: "Page #2"
1677+ header: PageHeader {
1678+ title: "Page #2"
1679+ }
1680 }
1681 Page {
1682 id: page3
1683- title: "Page #3"
1684+ header: PageHeader {
1685+ title: "Page #3"
1686+ }
1687 }
1688 }
1689 }
1690@@ -133,8 +141,12 @@
1691 id: page1Component
1692 Page {
1693 id: page1
1694- title: "Main page"
1695+ header: PageHeader {
1696+ id: header
1697+ title: "Main page"
1698+ }
1699 Column {
1700+ anchors.top: header.bottom
1701 Button {
1702 text: "Add Page2 above " + page1.title
1703 onClicked: page1.pageStack.addPageToCurrentColumn(page1, page2)
1704@@ -148,11 +160,15 @@
1705 }
1706 Page {
1707 id: page2
1708- title: "Page #2"
1709+ header: PageHeader {
1710+ title: "Page #2"
1711+ }
1712 }
1713 Page {
1714 id: page3
1715- title: "Page #3"
1716+ header: PageHeader {
1717+ title: "Page #3"
1718+ }
1719 }
1720 }
1721 }
1722@@ -200,13 +216,17 @@
1723 /*!
1724 The property specifies the source of the primaryPage in case the primary
1725 page is created from a Component or loaded from an external document. It
1726- has precedence over \l primaryPage. The page specified in this way will
1727- be cerated asynchronously and the instance will be reported through
1728- \l primaryPage property.
1729+ has precedence over \l primaryPage.
1730 */
1731 property var primaryPageSource
1732
1733 /*!
1734+ The property drives the way the pages should be loaded, synchronously or
1735+ asynchronously. Defaults to true.
1736+ */
1737+ property bool asynchronous: true
1738+
1739+ /*!
1740 \qmlproperty int columns
1741 \readonly
1742 The property holds the number of columns shown in the layout.
1743@@ -228,62 +248,70 @@
1744 is created. \c sourcePage must be active.
1745
1746 The function creates the new page asynchronously if the new \c page to be
1747- added is a Component or a QML document. In this case the function returns
1748- an incubator which can be used to track the page creation.For more about
1749- incubation in QML and creating components asynchronously, see
1750+ added is a Component or a QML document and the \l asynchronous property is
1751+ set to true. In this case the function returns an incubator which can be
1752+ used to track the page creation. For more about incubation in QML and creating
1753+ components asynchronously, see
1754 \l {http://doc.qt.io/qt-5/qml-qtqml-component.html#incubateObject-method}
1755 {Component.incubateObject()}.
1756 The following example removes an element from the list model whenever the
1757 page opened in the second column is closed. Note, the example must be run
1758 on desktop or on a device with at least 90 grid units screen width.
1759 \qml
1760- import QtQuick 2.4
1761- import Ubuntu.Components 1.3
1762-
1763- MainView {
1764- width: units.gu(90)
1765- height: units.gu(70)
1766-
1767- Component {
1768- id: page2Component
1769- Page {
1770- title: "Second Page"
1771- Button {
1772- text: "Close me"
1773- onClicked: pageStack.removePages(pageStack.primaryPage);
1774- }
1775- }
1776- }
1777-
1778- AdaptivePageLayout {
1779- id: pageLayout
1780- anchors.fill: parent
1781- primaryPage: Page {
1782- title: "Primary Page"
1783- ListView {
1784- id: listView
1785- anchors.fill: parent
1786- model: 10
1787- delegate: ListItem {
1788- Label { text: modelData }
1789- onClicked: {
1790- var incubator = pageLayout.addPageToNextColumn(pageLayout.primaryPage, page2Component);
1791- if (incubator && incubator.status == Component.Loading) {
1792- incubator.onStatusChanged = function(status) {
1793- if (status == Component.Ready) {
1794- // connect page's destruction to decrement model
1795- incubator.object.Component.destruction.connect(function() {
1796- listView.model--;
1797- });
1798- }
1799- }
1800- }
1801- }
1802- }
1803- }
1804- }
1805- }
1806- }
1807+ import QtQuick 2.4
1808+ import Ubuntu.Components 1.3
1809+
1810+ MainView {
1811+ width: units.gu(90)
1812+ height: units.gu(70)
1813+
1814+ Component {
1815+ id: page2Component
1816+ Page {
1817+ header: PageHeader {
1818+ id: header
1819+ title: "Second Page"
1820+ }
1821+ Button {
1822+ anchors.top: header.bottom
1823+ text: "Close me"
1824+ onClicked: pageStack.removePages(pageStack.primaryPage);
1825+ }
1826+ }
1827+ }
1828+
1829+ AdaptivePageLayout {
1830+ id: pageLayout
1831+ anchors.fill: parent
1832+ primaryPage: Page {
1833+ header: PageHeader {
1834+ title: "Primary Page"
1835+ flickable: listView
1836+ }
1837+ ListView {
1838+ id: listView
1839+ anchors.fill: parent
1840+ model: 10
1841+ delegate: ListItem {
1842+ Label { text: modelData }
1843+ onClicked: {
1844+ var incubator = pageLayout.addPageToNextColumn(pageLayout.primaryPage, page2Component);
1845+ if (incubator && incubator.status == Component.Loading) {
1846+ incubator.onStatusChanged = function(status) {
1847+ if (status == Component.Ready) {
1848+ // connect page's destruction to decrement model
1849+ incubator.object.Component.destruction.connect(function() {
1850+ listView.model--;
1851+ });
1852+ }
1853+ }
1854+ }
1855+ }
1856+ }
1857+ }
1858+ }
1859+ }
1860+ }
1861 \endqml
1862
1863 \sa {http://doc.qt.io/qt-5/qml-qtqml-component.html#incubateObject-method}{Component.incubateObject}
1864@@ -389,7 +417,7 @@
1865
1866 property bool internalUpdate: false
1867 property bool completed: false
1868- property var tree: new Tree.Tree()
1869+ property var tree: Tree{}
1870
1871 property int columns: !layout.layouts.length ?
1872 (layout.width >= units.gu(80) ? 2 : 1) :
1873@@ -440,8 +468,7 @@
1874 }
1875
1876 function createWrapper(page, properties) {
1877- var wrapperComponent = Qt.createComponent("PageWrapper.qml");
1878- var wrapperObject = wrapperComponent.createObject(hiddenPages, {synchronous: false});
1879+ var wrapperObject = pageWrapperComponent.createObject(hiddenPages, {synchronous: !layout.asynchronous});
1880 wrapperObject.pageStack = layout;
1881 wrapperObject.properties = properties;
1882 // set reference last because it will trigger creation of the object
1883@@ -650,6 +677,13 @@
1884 }
1885 }
1886
1887+ Component{
1888+ id: pageWrapperComponent
1889+ PageWrapper{
1890+ }
1891+ }
1892+
1893+
1894 // default metrics
1895 Component {
1896 id: defaultMetrics
1897@@ -675,13 +709,12 @@
1898 onTriggered: layout.removePages(wrapper.object)
1899
1900 visible: {
1901- var parentWrapper;
1902- try {
1903- parentWrapper = d.tree.parent(wrapper);
1904- } catch(err) {
1905+ var parentWrapper = d.tree.parent(wrapper);
1906+
1907+ if (!parentWrapper)
1908 // Root node has no parent node.
1909 return false;
1910- }
1911+
1912 if (!wrapper.pageHolder) {
1913 // columns are being re-arranged.
1914 return false;
1915@@ -705,7 +738,7 @@
1916 id: holder
1917 active: false
1918 objectName: "ColumnHolder" + column
1919- property PageWrapper pageWrapper
1920+ property var pageWrapper: pageWrapperComponent.createObject()
1921 property int column
1922 property alias config: subHeader.config
1923 property PageColumn metrics: getDefaultMetrics()
1924@@ -777,6 +810,7 @@
1925
1926 property color dividerColor: layout.__propagated.header.dividerColor
1927 property color panelColor: layout.__propagated.header.panelColor
1928+ property color backgroundColor: layout.__propagated.header.backgroundColor
1929
1930 visible: !customHeader && holder.pageWrapper && holder.pageWrapper.active
1931
1932@@ -788,13 +822,13 @@
1933 if (!page) {
1934 return false;
1935 }
1936- var parentWrapper;
1937- try {
1938- parentWrapper = d.tree.parent(holder.pageWrapper);
1939- } catch(err) {
1940+ var parentWrapper = d.tree.parent(holder.pageWrapper);
1941+
1942+ if (!parentWrapper) {
1943 // Root node has no parent node.
1944 return false;
1945 }
1946+
1947 var nextInColumn = d.tree.top(holder.column, holder.column < d.columns - 1, 1);
1948 return parentWrapper === nextInColumn;
1949 }
1950@@ -809,7 +843,7 @@
1951 rightMargin: dividerThickness
1952 }
1953 width: (column == (d.columns - 1)) || !pageWrapper ? 0 : units.dp(1)
1954- color: theme.palette.selected.background
1955+ color: theme.palette.normal.base
1956 MouseArea {
1957 id: resizerSensing
1958 objectName: "Divider"
1959@@ -834,7 +868,7 @@
1960 when: resizerSensing.pressed
1961 PropertyChanges {
1962 target: verticalDivider
1963- color: Qt.darker(theme.palette.normal.background, 1.5)
1964+ color: Qt.darker(theme.palette.normal.background, 1.7)
1965 }
1966 }
1967 transitions: Transition {
1968@@ -891,10 +925,11 @@
1969 /*! \internal */
1970 // Pages declared as children will be placed directly into hiddenPages
1971 default property alias data: hiddenPages.data
1972- Item {
1973+ PageTreeNode {
1974 id: hiddenPages
1975 objectName: "HiddenPagePool"
1976 visible: false
1977+ active: false
1978 // make sure nothing is shown eventually
1979 clip: true
1980 anchors.fill: parent
1981
1982=== modified file 'src/Ubuntu/Components/1.3/AppHeader.qml'
1983--- src/Ubuntu/Components/1.3/AppHeader.qml 2015-12-14 20:38:59 +0000
1984+++ src/Ubuntu/Components/1.3/AppHeader.qml 2016-03-08 06:42:31 +0000
1985@@ -15,7 +15,7 @@
1986 */
1987
1988 import QtQuick 2.4
1989-import Ubuntu.Components 1.3 as Components
1990+import Ubuntu.Components.Private 1.3 as Privates
1991
1992 /*!
1993 \internal
1994@@ -23,7 +23,8 @@
1995 \inqmlmodule Ubuntu.Components 1.1
1996 \ingroup ubuntu
1997 */
1998-Components.Header {
1999+Privates.AppHeaderBase {
2000+ // Note: styleName is set to "PageHeadStyle" in UCAppHeaderBase.
2001 id: header
2002
2003 anchors {
2004@@ -32,6 +33,11 @@
2005 }
2006
2007 /*!
2008+ The background color of the header. Value set by MainView.
2009+ */
2010+ property color backgroundColor
2011+
2012+ /*!
2013 The background color of the divider. Value set by MainView.
2014 */
2015 property color dividerColor
2016@@ -112,7 +118,12 @@
2017 */
2018 property QtObject config: null
2019
2020- Component.onCompleted: internal.updateProperties()
2021+ animate: false
2022+ exposed: false
2023+ Component.onCompleted: {
2024+ internal.updateProperties();
2025+ header.animate = true;
2026+ }
2027 onConfigChanged: internal.updateProperties()
2028
2029 onExposedChanged: {
2030@@ -158,6 +169,4 @@
2031 }
2032 }
2033 }
2034-
2035- styleName: "PageHeadStyle"
2036 }
2037
2038=== modified file 'src/Ubuntu/Components/1.3/ComboButton.qml'
2039--- src/Ubuntu/Components/1.3/ComboButton.qml 2015-08-20 06:56:44 +0000
2040+++ src/Ubuntu/Components/1.3/ComboButton.qml 2016-03-08 06:42:31 +0000
2041@@ -161,10 +161,68 @@
2042 \section2 Styling
2043 The style of the component is defined in \l ComboButtonStyle.
2044 */
2045-Button {
2046+AbstractButton {
2047 id: combo
2048
2049 /*!
2050+ \deprecated
2051+ If set to a color, the button has a stroke border instead of a filled
2052+ shape.
2053+ */
2054+ property color strokeColor
2055+ onStrokeColorChanged: console.warn(
2056+ "WARNING: ComboButton.strokeColor is deprecated."
2057+ )
2058+
2059+ /*!
2060+ \deprecated
2061+ The background color of the button.
2062+ */
2063+ property color color
2064+ onColorChanged: console.warn("WARNING: ComboButton.color is deprecated.")
2065+
2066+ /*!
2067+ \deprecated
2068+ The gradient used to fill the background of the button.
2069+ Standard Ubuntu gradients are defined in \l UbuntuColors.
2070+ If both a gradient and a color are specified, the gradient will be used.
2071+ */
2072+ property Gradient gradient
2073+ onGradientChanged: console.warn(
2074+ "WARNING: ComboButton.gradient is deprecated."
2075+ )
2076+
2077+ /*!
2078+ \deprecated
2079+ The property specifies the color of the dropdown button and the combo
2080+ list for both collapsed and expanded states. You can use \l expanded to
2081+ define different colors for expanded or collapsed states.
2082+ */
2083+ property color dropdownColor
2084+ onDropdownColorChanged: console.warn(
2085+ "WARNING: ComboButton.dropdownColor is deprecated."
2086+ )
2087+
2088+ /*!
2089+ The font used for the button's text.
2090+ */
2091+ property font font: __styleInstance.defaultFont
2092+
2093+ /*!
2094+ The position of the icon relative to the text. Options
2095+ are "left" and "right". The default value is "left".
2096+
2097+ If only text or only an icon is defined, this
2098+ property is ignored and the text or icon is
2099+ centered horizontally and vertically in the button.
2100+
2101+ Currently this is a string value. We are waiting for
2102+ support for enums:
2103+ https://bugreports.qt-project.org/browse/QTBUG-14861
2104+ */
2105+ property string iconPosition: "left"
2106+
2107+ /*!
2108 Specifies whether the combo list is expanded or not. The default falue is
2109 false.
2110 */
2111@@ -239,33 +297,16 @@
2112 */
2113 default property alias comboList: comboListHolder.data
2114
2115- /* ----------------- Color and font configurations ----------------- */
2116- /*!
2117- The property specifies the color of the dropdown button and the combo list
2118- for both collapsed and expanded states. You can use \l expanded to define
2119- different colors for expanded or collapsed states.
2120- */
2121- property color dropdownColor: __styleInstance ? __styleInstance.defaultDropdownColor : color
2122-
2123-
2124 styleName: "ComboButtonStyle"
2125
2126- Component.onCompleted: {
2127- // update mouse area to report clicks only on the main button area
2128- // area excluding dropDown button and combo list
2129- // we must do separate bindings as __mouseArea is a read-only property
2130- __mouseArea.anchors.fill = undefined;
2131- __mouseArea.anchors.left = Qt.binding(function() {return combo.left;});
2132- __mouseArea.anchors.top = Qt.binding(function() {return combo.top;});
2133- __mouseArea.anchors.right = Qt.binding(function() {return combo.right;});
2134- __mouseArea.anchors.rightMargin = Qt.binding(function() {return combo.__styleInstance.dropDownWidth + combo.__styleInstance.dropDownSeparatorWidth;});
2135- __mouseArea.height = Qt.binding(function() {return collapsedHeight;});
2136- // for autopilot, set the main button name
2137- __mouseArea.objectName = "combobutton_mainbutton";
2138-
2139- // bind a height calculation to avoid unwanted change
2140- combo.height = Qt.binding(function() {return collapsedHeight + __styleInstance.comboListPanel.height});
2141+ // update sensing area to report clicks only on the main button area
2142+ // area excluding dropDown button and combo list
2143+ sensingMargins {
2144+ bottom: -(combo.height - combo.collapsedHeight)
2145+ right: -combo.__styleInstance.dropDownWidth
2146 }
2147+ __mouseArea.objectName: "combobutton_mainbutton"
2148+ height: collapsedHeight + __styleInstance.comboListPanel.height
2149
2150 // dropdown button
2151 AbstractButton {
2152
2153=== removed file 'src/Ubuntu/Components/1.3/Icon.qdoc'
2154--- src/Ubuntu/Components/1.3/Icon.qdoc 2015-04-25 08:54:58 +0000
2155+++ src/Ubuntu/Components/1.3/Icon.qdoc 1970-01-01 00:00:00 +0000
2156@@ -1,87 +0,0 @@
2157-/*
2158- * Copyright (C) 2014 Canonical, Ltd.
2159- *
2160- * This program is free software; you can redistribute it and/or modify
2161- * it under the terms of the GNU General Public License as published by
2162- * the Free Software Foundation; version 3.
2163- *
2164- * This program is distributed in the hope that it will be useful,
2165- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2166- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2167- * GNU General Public License for more details.
2168- *
2169- * You should have received a copy of the GNU General Public License
2170- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2171- */
2172-
2173-/*!
2174- \qmltype Icon
2175- \inqmlmodule Ubuntu.Components 1.1
2176- \ingroup ubuntu
2177- \brief The Icon component displays an icon from the icon theme.
2178-
2179- The icon theme contains a set of standard icons referred to by their name.
2180- Using icons whenever possible enhances consistency accross applications.
2181- Each icon has a name and can have different visual representations depending
2182- on the size requested.
2183-
2184- Icons can also be colorized. Setting the \l color property will make all pixels
2185- with the \l keyColor (by default #808080) colored.
2186-
2187- Example:
2188- \qml
2189- Icon {
2190- width: 64
2191- height: 64
2192- name: "search"
2193- }
2194- \endqml
2195-
2196- Example of colorization:
2197- \qml
2198- Icon {
2199- width: 64
2200- height: 64
2201- name: "search"
2202- color: UbuntuColors.warmGrey
2203- }
2204- \endqml
2205-
2206- Icon themes are created following the
2207- \l{http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html}{Freedesktop Icon Theme Specification}.
2208-*/
2209-
2210-/*!
2211- The name of the icon to display.
2212- \qmlproperty string Icon::name
2213-
2214- If both name and source are set, name will be ignored.
2215-
2216- \note The complete list of icons available in Ubuntu is not published yet.
2217- For now please refer to the folders where the icon themes are installed:
2218- \list
2219- \li Ubuntu Touch: \l file:/usr/share/icons/suru
2220- \li Ubuntu Desktop: \l file:/usr/share/icons/ubuntu-mono-dark
2221- \endlist
2222- These 2 separate icon themes will be merged soon.
2223-*/
2224-
2225-/*!
2226- The source url of the icon to display. It has precedence over name.
2227-
2228- If both name and source are set, name will be ignored.
2229-
2230- \since Ubuntu.Components 1.1
2231- \qmlproperty url Icon::source
2232-*/
2233-
2234-/*!
2235- The color that all pixels that originally are of color \l keyColor should take.
2236- \qmlproperty color Icon::color
2237-*/
2238-
2239-/*!
2240- The color of the pixels that should be colorized.
2241- By default it is set to #808080.
2242- \qmlproperty color Icon::keyColor
2243-*/
2244
2245=== added file 'src/Ubuntu/Components/1.3/Icon.qml'
2246--- src/Ubuntu/Components/1.3/Icon.qml 1970-01-01 00:00:00 +0000
2247+++ src/Ubuntu/Components/1.3/Icon.qml 2016-03-08 06:42:31 +0000
2248@@ -0,0 +1,157 @@
2249+/*
2250+ * Copyright (C) 2015 Canonical, Ltd.
2251+ *
2252+ * This program is free software; you can redistribute it and/or modify
2253+ * it under the terms of the GNU General Public License as published by
2254+ * the Free Software Foundation; version 3.
2255+ *
2256+ * This program is distributed in the hope that it will be useful,
2257+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2258+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2259+ * GNU General Public License for more details.
2260+ *
2261+ * You should have received a copy of the GNU General Public License
2262+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2263+ *
2264+ * Authors: Zsombor Egri <zsombor.egri@canonical.com>
2265+ * Loic Molinari <loic.molinari@canonical.com>
2266+ */
2267+
2268+import QtQuick 2.4
2269+
2270+/*!
2271+ \qmltype Icon
2272+ \inqmlmodule Ubuntu.Components 1.3
2273+ \inherits Item
2274+ \ingroup ubuntu
2275+ \brief The Icon component displays an icon from the icon theme.
2276+
2277+ The icon theme contains a set of standard icons referred to by their name.
2278+ Using icons whenever possible enhances consistency accross applications.
2279+ Each icon has a name and can have different visual representations depending
2280+ on the size requested.
2281+
2282+ Icons can also be colorized. Setting the \l color property will make all pixels
2283+ with the \l keyColor (by default #808080) colored.
2284+
2285+ Example:
2286+ \qml
2287+ Icon {
2288+ width: 64
2289+ height: 64
2290+ name: "search"
2291+ }
2292+ \endqml
2293+
2294+ Example of colorization:
2295+ \qml
2296+ Icon {
2297+ width: 64
2298+ height: 64
2299+ name: "search"
2300+ color: UbuntuColors.warmGrey
2301+ }
2302+ \endqml
2303+
2304+ Icon themes are created following the
2305+ \l{http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html}{Freedesktop Icon Theme Specification}.
2306+*/
2307+
2308+Item {
2309+ id: icon
2310+
2311+ /*!
2312+ The name of the icon to display.
2313+ \qmlproperty string Icon::name
2314+
2315+ If both name and source are set, name will be ignored.
2316+
2317+ \note The complete list of icons available in Ubuntu is not published yet.
2318+ For now please refer to the folders where the icon themes are installed:
2319+ \list
2320+ \li Ubuntu Touch: \l file:/usr/share/icons/suru
2321+ \li Ubuntu Desktop: \l file:/usr/share/icons/ubuntu-mono-dark
2322+ \endlist
2323+ These 2 separate icon themes will be merged soon.
2324+ */
2325+ property string name
2326+
2327+ /*!
2328+ The color that all pixels that originally are of color \l keyColor should take.
2329+ \qmlproperty color Icon::color
2330+ */
2331+
2332+ property alias color: colorizedImage.keyColorOut
2333+
2334+ /*!
2335+ The color of the pixels that should be colorized.
2336+ By default it is set to #808080.
2337+ \qmlproperty color Icon::keyColor
2338+ */
2339+ property alias keyColor: colorizedImage.keyColorIn
2340+
2341+ /*!
2342+ The source url of the icon to display. It has precedence over name.
2343+
2344+ If both name and source are set, name will be ignored.
2345+
2346+ \since Ubuntu.Components 1.1
2347+ \qmlproperty url Icon::source
2348+ */
2349+
2350+ property alias source: image.source
2351+
2352+ /*!
2353+ \qmlproperty bool Icon::asynchronous
2354+ The property drives the image loading of the icon. Defaults to false.
2355+ */
2356+ property alias asynchronous: image.asynchronous
2357+
2358+ implicitWidth: image.implicitWidth
2359+ implicitHeight: image.implicitHeight
2360+
2361+ Image {
2362+ id: image
2363+ objectName: "image"
2364+ anchors.fill: parent
2365+ fillMode: Image.PreserveAspectFit
2366+
2367+ sourceSize {
2368+ width: icon.width
2369+ height: icon.height
2370+ }
2371+
2372+ source: icon.name ? "image://theme/%1".arg(icon.name) : ""
2373+
2374+ cache: true
2375+ visible: !colorizedImage.visible
2376+ asynchronous: false
2377+ }
2378+
2379+ ShaderEffect {
2380+ id: colorizedImage
2381+ objectName: "shader"
2382+
2383+ anchors.fill: parent
2384+
2385+ // Whether or not a color has been set.
2386+ visible: image.status == Image.Ready && keyColorOut != Qt.rgba(0.0, 0.0, 0.0, 0.0)
2387+
2388+ property Image source: image
2389+ property color keyColorOut: Qt.rgba(0.0, 0.0, 0.0, 0.0)
2390+ property color keyColorIn: "#808080"
2391+ property real threshold: 0.1
2392+
2393+ fragmentShader: "
2394+ varying highp vec2 qt_TexCoord0;
2395+ uniform sampler2D source;
2396+ uniform highp vec4 keyColorOut;
2397+ uniform highp vec4 keyColorIn;
2398+ uniform lowp float threshold;
2399+ uniform lowp float qt_Opacity;
2400+ void main() {
2401+ lowp vec4 sourceColor = texture2D(source, qt_TexCoord0);
2402+ gl_FragColor = mix(keyColorOut * vec4(sourceColor.a), sourceColor, step(threshold, distance(sourceColor.rgb / sourceColor.a, keyColorIn.rgb))) * qt_Opacity;
2403+ }"
2404+ }
2405+}
2406
2407=== modified file 'src/Ubuntu/Components/1.3/MainView.qml'
2408--- src/Ubuntu/Components/1.3/MainView.qml 2015-10-13 13:37:43 +0000
2409+++ src/Ubuntu/Components/1.3/MainView.qml 2016-03-08 06:42:31 +0000
2410@@ -23,9 +23,8 @@
2411 \qmltype MainView
2412 \inqmlmodule Ubuntu.Components 1.3
2413 \ingroup ubuntu
2414+ \inherits StyledItem
2415 \brief MainView is the root Item that should be used for all applications.
2416- It automatically adds a header and toolbar for its contents and can
2417- rotate its content based on the device orientation.
2418
2419 The simplest way to use a MainView is to include a single \l Page object
2420 inside the MainView:
2421@@ -38,27 +37,30 @@
2422 height: units.gu(60)
2423
2424 Page {
2425- title: "Simple page"
2426+ header: PageHeader {
2427+ id: pageHeader
2428+ title: "Simple page"
2429+ }
2430 Button {
2431- anchors.centerIn: parent
2432+ anchors {
2433+ horizontalCenter: parent.horizontalCenter
2434+ top: pageHeader.bottom
2435+ topMargin: units.gu(5)
2436+ }
2437+ width: units.gu(15)
2438 text: "Push me"
2439- width: units.gu(15)
2440 onClicked: print("Click!")
2441 }
2442 }
2443 }
2444 \endqml
2445 It is not required to set the anchors of the \l Page as it will automatically fill its parent.
2446- The MainView has a header that automatically shows the title of the \l Page.
2447-
2448- Do not include multiple Pages directly inside the MainView, but use \l Tabs
2449- or \l PageStack inside MainView to navigate between several Pages.
2450-
2451- For the MainView to automatically rotate its content following the orientation
2452- of the device, set the \l automaticOrientation property to true.
2453-
2454- If the \l Page inside the MainView includes a Flickable with enough contents for scrolling,
2455- the header will automatically hide and show when the user scrolls up or down:
2456+
2457+ Do not include multiple Pages directly inside the MainView, but use \l AdaptivePageLayout
2458+ inside MainView to navigate between several Pages.
2459+
2460+ If the \l Page inside the MainView includes a Flickable, set the flickable property of
2461+ the PageHeader to automatically hide and show the header when the user scrolls up or down:
2462 \qml
2463 import QtQuick 2.4
2464 import Ubuntu.Components 1.3
2465@@ -68,9 +70,13 @@
2466 height: units.gu(60)
2467
2468 Page {
2469- title: "Page with Flickable"
2470+ header: PageHeader {
2471+ title: "Page with Flickable"
2472+ flickable: myFlickable
2473+ }
2474
2475 Flickable {
2476+ id: myFlickable
2477 anchors.fill: parent
2478 contentHeight: column.height
2479
2480@@ -91,20 +97,12 @@
2481 example.
2482
2483 The examples above show how to include a single \l Page inside a MainView, but more
2484- advanced application structures are possible using \l PageStack and \l Tabs.
2485+ advanced application structures are possible using \l AdaptivePageLayout.
2486 */
2487-MainViewBase {
2488+Toolkit.MainViewBase {
2489 id: mainView
2490
2491- /*!
2492- \qmlproperty bool MainView::automaticOrientation
2493- \deprecated
2494-
2495- Sets whether the application will be automatically rotating when the
2496- device is.
2497-
2498- This property has no significance anymore as the shell rotates.
2499- */
2500+ /*! \deprecated */
2501 property bool automaticOrientation: false
2502
2503 /*!
2504@@ -121,28 +119,10 @@
2505 UbuntuApplication.inputMethod.keyboardRectangle.height : 0
2506 }
2507
2508- // clip the contents so that it does not overlap the header
2509 Item {
2510- id: contentsClipper
2511+ id: contents
2512 anchors {
2513- left: parent.left
2514- right: parent.right
2515- top: headerItem.bottom
2516- bottom: parent.bottom
2517- }
2518- // only clip when necessary
2519- // ListView headers may be positioned at the top, independent from
2520- // flickable.contentY, so do not clip depending on activePage.flickable.contentY.
2521- clip: headerItem.bottomY > 0 && internal.activePage && internal.activePage.flickable
2522-
2523- Item {
2524- id: contents
2525- anchors {
2526- fill: parent
2527-
2528- // compensate so that the actual y is always 0
2529- topMargin: -parent.y
2530- }
2531+ fill: parent
2532 }
2533 }
2534
2535@@ -159,6 +139,7 @@
2536 property real bottomY: headerItem.y + headerItem.height
2537 dividerColor: Qt.darker(mainView.headerColor, 1.1)
2538 panelColor: Qt.lighter(mainView.headerColor, 1.1)
2539+ backgroundColor: mainView.headerColor
2540
2541 title: internal.activePage ? internal.activePage.title : ""
2542 pageStack: internal.activePage ? internal.activePage.pageStack : null
2543@@ -179,7 +160,8 @@
2544 // don't show the application header if the page has its own header.
2545 visible: !(internal.activePage &&
2546 internal.activePage.hasOwnProperty("header") &&
2547- internal.activePage.header)
2548+ internal.activePage.header) &&
2549+ internal.activePage
2550
2551 height: visible ? implicitHeight : 0
2552
2553@@ -250,12 +232,12 @@
2554 Used by PageStack. This property only exists in MainView 1.2 and later.
2555 */
2556 readonly property bool animateHeader: false
2557-
2558- // FIXME: Currently disabled to prevent bug 1461729
2559-// readonly property bool animateHeader: headerItem.__styleInstance &&
2560-// headerItem.__styleInstance.hasOwnProperty("animateIn") &&
2561-// headerItem.__styleInstance.hasOwnProperty("animateOut") &&
2562-// headerItem.__styleInstance.hasOwnProperty("animateInFinished") &&
2563-// headerItem.__styleInstance.hasOwnProperty("animateOutFinished")
2564+ }
2565+
2566+ backgroundColor: theme.palette.normal.background
2567+
2568+ PerformanceOverlay {
2569+ id: performanceOverlay
2570+ active: false
2571 }
2572 }
2573
2574=== removed file 'src/Ubuntu/Components/1.3/MainViewBase.qml'
2575--- src/Ubuntu/Components/1.3/MainViewBase.qml 2015-12-08 18:34:40 +0000
2576+++ src/Ubuntu/Components/1.3/MainViewBase.qml 1970-01-01 00:00:00 +0000
2577@@ -1,173 +0,0 @@
2578-/*
2579- * Copyright 2015 Canonical Ltd.
2580- *
2581- * This program is free software; you can redistribute it and/or modify
2582- * it under the terms of the GNU Lesser General Public License as published by
2583- * the Free Software Foundation; version 3.
2584- *
2585- * This program is distributed in the hope that it will be useful,
2586- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2587- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2588- * GNU Lesser General Public License for more details.
2589- *
2590- * You should have received a copy of the GNU Lesser General Public License
2591- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2592- */
2593-
2594-import QtQuick 2.4
2595-import Ubuntu.Components 1.3 as Toolkit
2596-import Ubuntu.PerformanceMetrics 1.0
2597-import QtQuick.Window 2.0
2598-
2599-/*!
2600- \internal
2601- \qmlabstract MainViewBase
2602- \inqmlmodule Ubuntu.Components 1.3
2603- \ingroup ubuntu
2604- \brief The base class for MainView and MultiColumnView.
2605-*/
2606-Toolkit.PageTreeNode {
2607- id: mainView
2608- styleName: "MainViewStyle"
2609-
2610- /*!
2611- The property holds the application's name, which must be the same as the
2612- desktop file's name.
2613- The name also sets the name of the QCoreApplication and defaults for data
2614- and cache folders that work on the desktop and under confinement, as well as
2615- the default gettext domain.
2616- C++ code that writes files may use QStandardPaths::writableLocation with
2617- QStandardPaths::DataLocation or QStandardPaths::CacheLocation.
2618- */
2619- property string applicationName: ""
2620-
2621- /*!
2622- The property holds if the application should automatically resize the
2623- contents when the input method appears
2624-
2625- The default value is false.
2626- */
2627- property bool anchorToKeyboard: false
2628-
2629- /*!
2630- \qmlproperty color MainView::headerColor
2631- Color of the header's background.
2632-
2633- \sa backgroundColor, footerColor
2634- */
2635- property color headerColor: backgroundColor
2636-
2637- /*!
2638- \qmlproperty color MainView::backgroundColor
2639- Color of the background.
2640-
2641- The background is usually a single color. However if \l headerColor
2642- or \l footerColor are set then a gradient of colors will be drawn.
2643-
2644- For example, in order for the MainView to draw a color gradient beneath
2645- the content:
2646- \qml
2647- import QtQuick 2.4
2648- import Ubuntu.Components 1.2
2649-
2650- MainView {
2651- width: units.gu(40)
2652- height: units.gu(60)
2653-
2654- headerColor: "#343C60"
2655- backgroundColor: "#6A69A2"
2656- footerColor: "#8896D5"
2657- }
2658- \endqml
2659-
2660- \sa footerColor, headerColor
2661- */
2662- property color backgroundColor: theme.palette.normal.background
2663-
2664- /*!
2665- \qmlproperty color MainView::footerColor
2666- Color of the footer's background.
2667-
2668- \sa backgroundColor, headerColor
2669- */
2670- property color footerColor: backgroundColor
2671-
2672- Toolkit.Object {
2673- id: autoTheme
2674- // FIXME: Define the background colors in MainViewStyle and get rid of the properties
2675- // in MainViewBase. That removes the need for auto-theming.
2676-
2677- /*
2678- As we don't know the order the property bindings and onXXXChanged signals are evaluated
2679- we should rely only on one property when changing the theme to avoid intermediate
2680- theme changes due to properties being evaluated separately.
2681-
2682- Qt bug: https://bugreports.qt-project.org/browse/QTBUG-11712
2683- */
2684-
2685- Connections {
2686- target: mainView
2687-
2688- onBackgroundColorChanged: {
2689- if (mainView.backgroundColor != theme.palette.normal.background) {
2690- // custom color, proceed with auto-theming
2691- autoTheme.themeName = (ColorUtils.luminance(backgroundColor) >= 0.85) ?
2692- "Ambiance" : "SuruDark";
2693- }
2694- }
2695- }
2696-
2697- property string themeName
2698- onThemeNameChanged: {
2699- // only change the theme if the current one is a system one.
2700- if (themeName !== "" && (theme.name.search("Ubuntu.Components.Themes") == 0)) {
2701- mainView.theme.name = "Ubuntu.Components.Themes.%1".arg(themeName);
2702- }
2703- }
2704- }
2705-
2706- /*!
2707- \qmlproperty bool MainViewBase::active
2708- Root views are active by default.
2709- */
2710- active: true
2711-
2712- /*!
2713- \qmlproperty list<Action> MainViewBase::actions
2714- A global list of actions that will be available to the system (including HUD)
2715- as long as the application is running. For actions that are not always available to the
2716- system, but only when a certain \l Page is active, see the actions property of \l Page.
2717- */
2718- property alias actions: unityActionManager.actions
2719-
2720- /*!
2721- \qmlproperty ActionManager MainView::actionManager
2722- \readonly
2723-
2724- The ActionManager that supervises the global and local ActionContexts.
2725- The \l actions property should be used preferably since it covers most
2726- use cases. The ActionManager is accessible to have a more refined control
2727- over the actions, e.g. if one wants to add/remove actions dynamically, create
2728- specific action contexts, etc.
2729- */
2730- property alias actionManager: unityActionManager
2731- Toolkit.ActionManager {
2732- id: unityActionManager
2733- onQuit: {
2734- // FIXME Wire this up to the application lifecycle management API instead of quit().
2735- Qt.quit()
2736- }
2737- }
2738-
2739- onApplicationNameChanged: {
2740- if (applicationName !== "") {
2741- i18n.domain = applicationName;
2742- UbuntuApplication.applicationName = applicationName
2743- }
2744- }
2745-
2746- PerformanceOverlay {
2747- id: performanceOverlay
2748- active: false
2749- }
2750-}
2751
2752=== modified file 'src/Ubuntu/Components/1.3/OptionSelector.qml'
2753--- src/Ubuntu/Components/1.3/OptionSelector.qml 2015-09-28 14:36:54 +0000
2754+++ src/Ubuntu/Components/1.3/OptionSelector.qml 2016-03-08 06:42:31 +0000
2755@@ -216,7 +216,7 @@
2756
2757 readonly property url chevron: __styleInstance.chevron
2758 readonly property url tick: __styleInstance.tick
2759- readonly property color themeColour: theme.palette.selected.fieldText
2760+ readonly property color themeColour: theme.palette.normal.backgroundText
2761 readonly property alias colourImage: optionSelector.colourImage
2762 property bool currentlyExpanded: expanded || multiSelection
2763
2764@@ -264,6 +264,7 @@
2765
2766 ListView {
2767 id: list
2768+ parent: listContainer.__styleInstance.content
2769
2770 property int previousIndex: -1
2771 readonly property alias expanded: optionSelector.expanded
2772
2773=== modified file 'src/Ubuntu/Components/1.3/Page.qml'
2774--- src/Ubuntu/Components/1.3/Page.qml 2015-12-08 18:34:40 +0000
2775+++ src/Ubuntu/Components/1.3/Page.qml 2016-03-08 06:42:31 +0000
2776@@ -15,61 +15,62 @@
2777 */
2778
2779 import QtQuick 2.4
2780-import Ubuntu.Components 1.3 as Toolkit13
2781+import Ubuntu.Components 1.3
2782 import "pageUtils.js" as Utils
2783
2784 /*!
2785 \qmltype Page
2786- \inqmlmodule Ubuntu.Components 1.1
2787+ \inqmlmodule Ubuntu.Components 1.3
2788+ \inherits StyledItem
2789 \ingroup ubuntu
2790- \brief A page is the basic Item that must be used inside the \l MainView,
2791- \l PageStack and \l Tabs.
2792+ \brief A page is the basic Item that represents a single view in
2793+ an Ubuntu application. It is recommended to use the Page inside
2794+ the \l MainView or \l AdaptivePageLayout.
2795+
2796+ \l MainView provides a header for Pages it includes if no
2797+ \l header property was set. However, the application header is deprecated
2798+ and it is recommended to set the \l header property instead.
2799+
2800 Anchors and height of a Page are automatically determined to align with
2801 the header of the \l MainView, but can be overridden.
2802-
2803-
2804- \l MainView provides a header for Pages it includes if no
2805- \l header property was set.
2806- The text and actions of the header are determined by the \l title
2807- and \l head properties of the page:
2808-
2809- \qml
2810- import QtQuick 2.4
2811- import Ubuntu.Components 1.2
2812-
2813- MainView {
2814- width: units.gu(48)
2815- height: units.gu(60)
2816-
2817- Page {
2818- title: i18n.tr("Example page")
2819-
2820- Label {
2821- anchors.centerIn: parent
2822- text: i18n.tr("Hello world!")
2823+ Page contents does not automatically leave space for the Page \l header,
2824+ so this must be taken into account when anchoring the contents of the Page.
2825+
2826+ Example:
2827+ \qml
2828+ import QtQuick 2.4
2829+ import Ubuntu.Components 1.3
2830+
2831+ MainView {
2832+ width: units.gu(48)
2833+ height: units.gu(60)
2834+
2835+ Page {
2836+ header: PageHeader {
2837+ id: pageHeader
2838+ title: i18n.tr("Example page")
2839+
2840+ trailingActionBar.actions: [
2841+ Action {
2842+ iconName: "search"
2843+ text: i18n.tr("Search")
2844+ }
2845+ ]
2846+ }
2847+
2848+ Label {
2849+ anchors {
2850+ horizontalCenter: parent.horizontalCenter
2851+ top: pageHeader.bottom
2852+ topMargin: units.gu(5)
2853+ }
2854+ text: i18n.tr("Hello world!")
2855+ }
2856 }
2857-
2858- head.actions: [
2859- Action {
2860- iconName: "search"
2861- text: i18n.tr("Search")
2862- },
2863- Action {
2864- iconName: "contacts"
2865- text: i18n.tr("Contacts")
2866- }
2867- ]
2868 }
2869- }
2870- \endqml
2871-
2872- The Page automatically anchors to the left and bottom of its parent. The width of the Page
2873- will be the full width of its parent \l MainView or \l PageStack or \l Tab,
2874- and the height will adapt to leave space for the header when needed. It is possible to
2875- use a Page inside a Loader, but in that case do not set the anchors or size of the Loader
2876- so that the Page can control its width and height.
2877+ \endqml
2878 */
2879-Toolkit13.PageTreeNode {
2880+PageTreeNode {
2881 id: page
2882 anchors {
2883 left: parent ? parent.left : undefined
2884@@ -78,25 +79,47 @@
2885 // Set width and height so that a parent Loader can be automatically resized
2886 // to the size of the loaded Page.
2887 width: parentNode ? parentNode.width - page.x : undefined
2888+ // FIXME: We no longer need to take the internal header height into account
2889+ // when we remove MainView's AppHeader.
2890 height: parentNode ? page.flickable ? parentNode.height : parentNode.height - internal.headerHeight : undefined
2891
2892 /*!
2893+ \qmlproperty ActrionContext Page::actionContext
2894+ \readonly
2895+ \since Ubuntu.Components 1.3
2896+ The action context of the page.
2897+ */
2898+ readonly property alias actionContext: localContext
2899+ ActionContext {
2900+ id: localContext
2901+ active: page.active
2902+ objectName: page.objectName + "Context"
2903+ }
2904+
2905+ /*!
2906+ \since Ubuntu.Components 1.3
2907 The header property for this page. Setting this property will reparent the
2908 header to the page and disable the \l MainView's application header.
2909 \qml
2910 Page {
2911 id: page
2912- title: "Page with header"
2913 header: PageHeader {
2914- title: page.title
2915+ title: "Page with header"
2916 trailingActionBar.actions: [
2917 Action { iconName: "settings" },
2918 Action { iconName: "info" }
2919 ]
2920+ flickable: myFlickable
2921 }
2922 }
2923 \endqml
2924- \sa PageHeader
2925+ To avoid Page content being occluded by the header, the contents of the Page
2926+ should anchor to the bottom of the header. When the Page contents is flickable,
2927+ the contents does not need to be anchored to the header, but it is recommended
2928+ to use a \l PageHeader or \l Header component as the Page header, and set its
2929+ \l Header::flickable property so that the Flickable gets a top-margin that
2930+ leaves enough space for the header.
2931+ \sa PageHeader, Header
2932 */
2933 property Item header
2934 onHeaderChanged: internal.updateHeader()
2935@@ -105,70 +128,43 @@
2936 /*! \internal */
2937 isLeaf: true
2938
2939- /*!
2940- The title of the page. Will be shown in the header of the \l MainView.
2941- If the page is used inside a \l Tab, the default title is the \l Tab title.
2942- For a Page not inside a \l Tab, the default title is an empty string.
2943- */
2944+ /*! \deprecated */
2945 property string title: parentNode && parentNode.hasOwnProperty("title") ? parentNode.title : ""
2946-
2947- /*!
2948- Optional flickable that controls the MainView header. This property
2949- is automatically set to the first child of the page that is Flickable
2950- and anchors to the top of the page or fills the page. For example:
2951- \qml
2952- import QtQuick 2.4
2953- import Ubuntu.Components 1.2
2954-
2955- MainView {
2956- width: units.gu(30)
2957- height: units.gu(50)
2958- Page {
2959- id: page
2960- title: "example"
2961- //flickable: null // uncomment for a fixed header
2962- Flickable {
2963- id: content
2964- anchors.fill: parent
2965- contentHeight: units.gu(70)
2966- Label {
2967- text: "hello"
2968- anchors.centerIn: parent
2969- }
2970- }
2971- }
2972- }
2973- \endqml
2974- In this example, page.flickable will automatically be set to content because it is
2975- a Flickable and it fills its parent. Thus, scrolling down in the Flickable will automatically
2976- hide the header.
2977-
2978- Set this property to null to avoid automatic flickable detection, which disables hiding
2979- of the header by scrolling in the Flickable. In cases where a flickable should control the header,
2980- but it is not automatically detected, the flickable property can be set.
2981- */
2982+ /*! \deprecated */
2983 property Flickable flickable: Utils.getFlickableChild(page)
2984-
2985- /*!
2986- \qmlproperty PageHeadConfiguration Page::head
2987- \readonly
2988- \deprecated
2989- Configuration of the header for this page.
2990- Deprecated: This configuration will be replaced by setting the \l header property.
2991- */
2992+ /*! \deprecated */
2993 readonly property alias head: headerConfig
2994- Toolkit13.PageHeadConfiguration {
2995+ PageHeadConfiguration {
2996 id: headerConfig
2997 title: page.title
2998 flickable: page.flickable
2999+ onFlickableChanged: internal.printDeprecationWarning()
3000+ onTitleChanged: internal.printDeprecationWarning()
3001+ onActionsChanged: internal.printDeprecationWarning()
3002+ onBackActionChanged: internal.printDeprecationWarning()
3003 }
3004
3005- Toolkit13.Object {
3006+ Object {
3007 id: internal
3008
3009+ property bool showDeprecationWarning: true
3010+ function printDeprecationWarning() {
3011+ if (internal.showDeprecationWarning) {
3012+ var titleStr = page;
3013+ if (page.title) {
3014+ titleStr += "\"" + page.title + "\"";
3015+ }
3016+ titleStr += ": "
3017+ print(titleStr + "In Ubuntu.Components 1.3, the use of Page.title, Page.flickable and" +
3018+ " Page.head is deprecated. Use Page.header and the PageHeader component instead.");
3019+ internal.showDeprecationWarning = false;
3020+ }
3021+ }
3022+
3023 property Item previousHeader: null
3024 property Item previousHeaderParent: null
3025 function updateHeader() {
3026+ internal.showDeprecationWarning = false;
3027 if (internal.previousHeader) {
3028 internal.previousHeader.parent = internal.previousHeaderParent;
3029 }
3030
3031=== modified file 'src/Ubuntu/Components/1.3/PageHeadConfiguration.qml'
3032--- src/Ubuntu/Components/1.3/PageHeadConfiguration.qml 2015-10-01 12:54:32 +0000
3033+++ src/Ubuntu/Components/1.3/PageHeadConfiguration.qml 2016-03-08 06:42:31 +0000
3034@@ -1,5 +1,5 @@
3035 /*
3036- * Copyright 2015 Canonical Ltd.
3037+ * Copyright 2016 Canonical Ltd.
3038 *
3039 * This program is free software; you can redistribute it and/or modify
3040 * it under the terms of the GNU Lesser General Public License as published by
3041@@ -50,7 +50,7 @@
3042 PageHeadSections {
3043 id: headSections
3044 }
3045- property color foregroundColor: theme.palette.selected.backgroundText
3046+ property color foregroundColor: theme.palette.normal.backgroundText
3047
3048 property bool locked: false
3049
3050
3051=== modified file 'src/Ubuntu/Components/1.3/PageHeader.qml'
3052--- src/Ubuntu/Components/1.3/PageHeader.qml 2015-12-15 14:20:33 +0000
3053+++ src/Ubuntu/Components/1.3/PageHeader.qml 2016-03-08 06:42:31 +0000
3054@@ -32,10 +32,13 @@
3055 StyleHints {
3056 foregroundColor: UbuntuColors.orange
3057 backgroundColor: "black"
3058- dividerColor: UbuntuColors.darkGrey
3059+ dividerColor: UbuntuColors.slate
3060 }
3061 }
3062 \endqml
3063+
3064+ See \l Header properties that are inherited by PageHeader to control
3065+ the visibility of the header.
3066 */
3067 Header {
3068 id: header
3069
3070=== modified file 'src/Ubuntu/Components/1.3/PageStack.qml'
3071--- src/Ubuntu/Components/1.3/PageStack.qml 2015-10-21 19:28:41 +0000
3072+++ src/Ubuntu/Components/1.3/PageStack.qml 2016-03-08 06:42:31 +0000
3073@@ -17,6 +17,7 @@
3074 import QtQuick 2.4
3075 import "../1.2/stack.js" as Stack
3076 import Ubuntu.Components 1.3
3077+import Ubuntu.Components.Private 1.3
3078
3079 /*!
3080 \qmltype PageStack
3081@@ -224,6 +225,13 @@
3082 objectName: "pagestack_back_action"
3083 }
3084
3085+
3086+ Component {
3087+ id: pageWrapperComponent
3088+ PageWrapper{
3089+ }
3090+ }
3091+
3092 QtObject {
3093 id: internal
3094 property Item headStyle: (pageStack.__propagated
3095@@ -282,8 +290,7 @@
3096 property var stack: new Stack.Stack()
3097
3098 function createWrapper(page, properties) {
3099- var wrapperComponent = Qt.createComponent("PageWrapper.qml");
3100- var wrapperObject = wrapperComponent.createObject(pageStack);
3101+ var wrapperObject = pageWrapperComponent.createObject(pageStack);
3102 wrapperObject.pageStack = pageStack;
3103 wrapperObject.properties = properties;
3104 // set reference last because it will trigger creation of the object
3105
3106=== removed file 'src/Ubuntu/Components/1.3/PageWrapper.qml'
3107--- src/Ubuntu/Components/1.3/PageWrapper.qml 2015-12-08 18:34:40 +0000
3108+++ src/Ubuntu/Components/1.3/PageWrapper.qml 1970-01-01 00:00:00 +0000
3109@@ -1,160 +0,0 @@
3110-/*
3111- * Copyright 2015 Canonical Ltd.
3112- *
3113- * This program is free software; you can redistribute it and/or modify
3114- * it under the terms of the GNU Lesser General Public License as published by
3115- * the Free Software Foundation; version 3.
3116- *
3117- * This program is distributed in the hope that it will be useful,
3118- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3119- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3120- * GNU Lesser General Public License for more details.
3121- *
3122- * You should have received a copy of the GNU Lesser General Public License
3123- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3124- */
3125-
3126-import QtQuick 2.4
3127-import Ubuntu.Components 1.3 as Toolkit
3128-import "PageWrapperUtils.js" as Utils
3129-
3130-/*!
3131- \internal
3132- \qmltype PageWrapper
3133- \inqmlmodule Ubuntu.Components 1.1
3134- \ingroup ubuntu
3135- \brief Internal class used by \l PageStack
3136-*/
3137-Toolkit.PageTreeNode {
3138- id: pageWrapper
3139- anchors.fill: parent
3140-
3141- /*!
3142- The reference to the page object. This can be the page
3143- itself (which is an Item), but also a url pointing to a QML file.
3144- */
3145- property var reference
3146-
3147- /*!
3148- The initialized page object, or null if the object needs to be created.
3149- */
3150- property Item object: null
3151-
3152- /*!
3153- This variable will be true if \l object holds an object that was created
3154- from the given reference, and thus can be destroyed when no the page is deactivated.
3155- */
3156- property bool canDestroy: false
3157-
3158- /*!
3159- Column number in AdaptivePageLayout.
3160- */
3161- property int column: 0
3162-
3163- /*!
3164- Parent page.
3165- */
3166- property Item parentPage
3167-
3168- /*!
3169- Parent PageWrapper or the parentPage.
3170- */
3171- property Item parentWrapper
3172-
3173- /*!
3174- Page holder in AdaptivePageLayout.
3175- */
3176- property Item pageHolder
3177-
3178- /*!
3179- Instructs to load the page synchronously or not. Used by AdaptivePageLayout.
3180- True by default to keep PageStack integrity.
3181- */
3182- property bool synchronous: true
3183-
3184- /*!
3185- Incubator for the asynchronous page creation
3186- */
3187- property var incubator: null
3188-
3189- /*!
3190- Signal emitted when incubator completes page loading.
3191- */
3192- signal pageLoaded()
3193-
3194- /*!
3195- Returns true if the current PageWrapper is a child of the given page
3196- */
3197- function childOf(page) {
3198- if (parentPage == page) return true;
3199- if (page && parentWrapper) {
3200- var wrapper = parentWrapper;
3201- while (wrapper) {
3202- if (wrapper.object == page) {
3203- return true;
3204- }
3205- wrapper = wrapper.parentWrapper;
3206- }
3207- }
3208- return false;
3209- }
3210-
3211- /*!
3212- This value is updated when a PageWrapper is pushed to/popped from a PageStack.
3213- */
3214- active: false
3215-
3216- /*!
3217- \internal
3218- */
3219- onActiveChanged: {
3220- if (reference) {
3221- if (pageWrapper.active) Utils.activate(pageWrapper);
3222- else Utils.deactivate(pageWrapper);
3223- }
3224- }
3225-
3226- visible: active
3227-
3228- /*!
3229- Properties are use to initialize a new object, or if reference
3230- is already an object, properties are copied to the object when activated.
3231- Set properties before setting the reference.
3232- */
3233- property var properties
3234-
3235- /*!
3236- \internal
3237- */
3238- onReferenceChanged: {
3239- Utils.deactivate(pageWrapper);
3240- if (pageWrapper.object) pageWrapper.object = null;
3241- Utils.initPage(pageWrapper);
3242- if (pageWrapper.active && reference) {
3243- if ((pageWrapper.incubator && pageWrapper.incubator.status == Component.Ready) || pageWrapper.object) {
3244- Utils.activate(pageWrapper);
3245- } else {
3246- // asynchronous, connect page activation
3247- pageLoaded.connect(function () {
3248- Utils.activate(pageWrapper);
3249- });
3250- }
3251- }
3252- }
3253-
3254- /*!
3255- \internal
3256- */
3257- Component.onDestruction: {
3258- Utils.deactivate(pageWrapper);
3259- if (pageWrapper.canDestroy) Utils.destroyObject(pageWrapper);
3260- }
3261-
3262- /*!
3263- \internal
3264- Destroy \l object. Only call this function if \l canDestroy
3265- */
3266- function destroyObject() {
3267- Utils.destroyObject(pageWrapper);
3268- }
3269-}
3270
3271=== removed file 'src/Ubuntu/Components/1.3/PageWrapperUtils.js'
3272--- src/Ubuntu/Components/1.3/PageWrapperUtils.js 2015-10-16 09:18:03 +0000
3273+++ src/Ubuntu/Components/1.3/PageWrapperUtils.js 1970-01-01 00:00:00 +0000
3274@@ -1,202 +0,0 @@
3275-/*
3276- * Copyright 2015 Canonical Ltd.
3277- *
3278- * This program is free software; you can redistribute it and/or modify
3279- * it under the terms of the GNU Lesser General Public License as published by
3280- * the Free Software Foundation; version 3.
3281- *
3282- * This program is distributed in the hope that it will be useful,
3283- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3284- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3285- * GNU Lesser General Public License for more details.
3286- *
3287- * You should have received a copy of the GNU Lesser General Public License
3288- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3289- */
3290-
3291-/*!
3292- \qmltype PageWrapperUtils
3293- \inqmlmodule Ubuntu.Components 1.3
3294- \ingroup ubuntu
3295- \internal
3296- \brief Internal book-keeping used by AdaptivePageLayout.
3297- */
3298-
3299-//.pragma library // FIXME: cannot refer to Component.Error if I use this.
3300-// FIXME: ideally we would make this a stateless library, but that breaks applications
3301-// that rely on accessing context variables in pages that were pushed on a PageStack
3302-// by url (PageStack.push("FileName.qml")) because of a Qt bug:
3303-// https://bugreports.qt-project.org/browse/QTBUG-31347
3304-
3305-/*!
3306- \internal
3307- \qmlmethod PageWrapperUtils::Incubator(pageWrapper, pageComponent)
3308- Incubator wrapper object. Used when page is loaded asynchronously.
3309- */
3310-
3311-function Incubator(pageWrapper, pageComponent) {
3312- // private variable for QmlIncubatorObject
3313- var incubator = null;
3314-
3315- // public API
3316- this.status = Component.Ready;
3317- this.object = null;
3318- this.onStatusChanged = null;
3319- this.forceCompletion = function () {
3320- if (incubator) {
3321- incubator.forceCompletion();
3322- }
3323- }
3324-
3325- // internal function to catch status changes
3326- function incubatorStatusChanged(status) {
3327- // update wrapper incubator fields
3328- pageWrapper.incubator.status = status;
3329- pageWrapper.incubator.object = pageWrapper.object = incubator.object;
3330-
3331- // forward state change to the user
3332- if (pageWrapper.incubator.onStatusChanged) {
3333- // call onStatusChanged
3334- pageWrapper.incubator.onStatusChanged(status);
3335- }
3336-
3337- // emit pageWrapper's pageLoaded signal to complete page activation
3338- if (status === Component.Ready) {
3339- pageWrapper.pageLoaded();
3340- }
3341-
3342- // cleanup of ready or error
3343- if (status !== Component.Loading) {
3344- pageWrapper.incubator = null;
3345- }
3346- }
3347-
3348- function incubatePage() {
3349- if (pageComponent.status == Component.Loading) {
3350- return;
3351- }
3352-
3353- if (pageWrapper.properties) {
3354- incubator = pageComponent.incubateObject(pageWrapper, pageWrapper.properties);
3355- } else {
3356- incubator = pageComponent.incubateObject(pageWrapper);
3357- }
3358-
3359- if (!incubator) {
3360- throw new Error("Error while loading page: " + pageComponent.errorString());
3361- } else if (incubator.status != Component.Ready) {
3362- pageWrapper.incubator.status = incubator.status;
3363- incubator.onStatusChanged = incubatorStatusChanged;
3364- } else {
3365- incubatorStatusChanged(incubator.status);
3366- }
3367- }
3368-
3369- // main
3370- pageWrapper.incubator = this;
3371- if (pageComponent.status == Component.Loading) {
3372- pageComponent.statusChanged.connect(incubatePage);
3373- this.status = Component.Loading;
3374- }
3375- incubatePage();
3376-}
3377-
3378-/*******************************************************
3379- *
3380- */
3381-/*!
3382- \internal
3383- \qmlmethod PageWrapperUtils::initPage(pageWrapper)
3384- Initialize pageWrapper.object.
3385- */
3386-function initPage(pageWrapper) {
3387- var pageComponent;
3388-
3389- if (pageWrapper.reference.createObject) {
3390- // page reference is a component
3391- pageComponent = pageWrapper.reference;
3392- } else if (typeof pageWrapper.reference == "string") {
3393- // page reference is a string (url)
3394- if (pageWrapper.synchronous) {
3395- pageComponent = Qt.createComponent(pageWrapper.reference);
3396- } else {
3397- pageComponent = Qt.createComponent(pageWrapper.reference, Component.Asynchronous);
3398- }
3399- }
3400-
3401- if (pageComponent) {
3402- if (pageComponent.status === Component.Error) {
3403- throw new Error("Error while loading page: " + pageComponent.errorString());
3404- } else {
3405- // create the object
3406- if (pageWrapper.synchronous) {
3407- if (pageWrapper.properties) {
3408- // initialize the object with the given properties
3409- pageWrapper.object = pageComponent.createObject(pageWrapper, pageWrapper.properties);
3410- } else {
3411- pageWrapper.object = pageComponent.createObject(pageWrapper);
3412- }
3413- } else {
3414- pageWrapper.incubator = new Incubator(pageWrapper, pageComponent);
3415- }
3416- pageWrapper.canDestroy = true;
3417- }
3418- } else {
3419- // page reference is an object
3420- pageWrapper.object = pageWrapper.reference;
3421- pageWrapper.object.parent = pageWrapper;
3422- pageWrapper.canDestroy = false;
3423-
3424- // copy the properties to the page object
3425- for (var prop in pageWrapper.properties) {
3426- if (pageWrapper.properties.hasOwnProperty(prop)) {
3427- pageWrapper.object[prop] = pageWrapper.properties[prop];
3428- }
3429- }
3430- }
3431-
3432- return pageWrapper.object;
3433-}
3434-
3435-/*!
3436- \internal
3437- \qmlmethod PageWrapperUtils::activate(pageWrapper)
3438- Create the page object if needed, and make the page object visible.
3439- */
3440-function activate(pageWrapper) {
3441- if (!pageWrapper.object) {
3442- initPage(pageWrapper);
3443- }
3444-
3445- // Having the same page pushed multiple times on a stack changes
3446- // the parent of the page object. Change it back here.
3447- pageWrapper.object.parent = pageWrapper;
3448-
3449- // Some page objects are invisible initially. Make visible.
3450-
3451- pageWrapper.object.visible = true;
3452- pageWrapper.active = true;
3453-}
3454-
3455-/*!
3456- \internal
3457- \qmlmethod PageWrapperUtils::deactivate(pageWrapper)
3458- Hide page object.
3459- */
3460-function deactivate(pageWrapper) {
3461- pageWrapper.active = false;
3462-}
3463-
3464-/*!
3465- \internal
3466- \qmlmethod PageWrapperUtils::destroyObject(pageWrapper)
3467- Destroy the page object if pageWrapper.canDestroy is true.
3468- Do nothing if pageWrapper.canDestroy is false.
3469- */
3470-function destroyObject(pageWrapper) {
3471- if (pageWrapper.canDestroy) {
3472- pageWrapper.object.destroy();
3473- pageWrapper.object = null;
3474- pageWrapper.canDestroy = false;
3475- }
3476-}
3477
3478=== modified file 'src/Ubuntu/Components/1.3/Panel.qml'
3479--- src/Ubuntu/Components/1.3/Panel.qml 2015-04-25 08:54:58 +0000
3480+++ src/Ubuntu/Components/1.3/Panel.qml 2016-03-08 06:42:31 +0000
3481@@ -321,7 +321,7 @@
3482 name: "moving"
3483 PropertyChanges {
3484 target: bar
3485- position: MathUtils.clamp(draggingArea.mousePosition - internal.movingDelta, 0, bar.size)
3486+ position: Toolkit.MathUtils.clamp(draggingArea.mousePosition - internal.movingDelta, 0, bar.size)
3487 }
3488 },
3489 State {
3490
3491=== modified file 'src/Ubuntu/Components/1.3/ScrollView.qml'
3492--- src/Ubuntu/Components/1.3/ScrollView.qml 2015-12-16 15:01:29 +0000
3493+++ src/Ubuntu/Components/1.3/ScrollView.qml 2016-03-08 06:42:31 +0000
3494@@ -99,45 +99,45 @@
3495 Keys.enabled: true
3496 Keys.onLeftPressed: {
3497 if (horizontalScrollbar.__styleInstance !== null) {
3498- horizontalScrollbar.__styleInstance.scroll(-flickableItem.width*internal.shortScrollingRatio)
3499+ horizontalScrollbar.__styleInstance.scrollBy(-flickableItem.width*internal.shortScrollingRatio, true)
3500 }
3501 }
3502 Keys.onRightPressed: {
3503 if (horizontalScrollbar.__styleInstance !== null) {
3504- horizontalScrollbar.__styleInstance.scroll(flickableItem.width*internal.shortScrollingRatio)
3505+ horizontalScrollbar.__styleInstance.scrollBy(flickableItem.width*internal.shortScrollingRatio, true)
3506 }
3507 }
3508 Keys.onDownPressed: {
3509 if (verticalScrollbar.__styleInstance !== null) {
3510- verticalScrollbar.__styleInstance.scroll(flickableItem.height*internal.shortScrollingRatio)
3511+ verticalScrollbar.__styleInstance.scrollBy(flickableItem.height*internal.shortScrollingRatio, true)
3512 }
3513 }
3514 Keys.onUpPressed: {
3515 if (verticalScrollbar.__styleInstance !== null) {
3516- verticalScrollbar.__styleInstance.scroll(-flickableItem.height*internal.shortScrollingRatio)
3517+ verticalScrollbar.__styleInstance.scrollBy(-flickableItem.height*internal.shortScrollingRatio, true)
3518 }
3519 }
3520 Keys.onPressed: {
3521 if (event.key == Qt.Key_Escape) {
3522- var scrollbarWithActiveDrag = (horizontalScrollbar.__styleInstance && horizontalScrollbar.__styleInstance.draggingThumb)
3523- || (verticalScrollbar.__styleInstance && verticalScrollbar.__styleInstance.draggingThumb)
3524+ var scrollbarWithActiveDrag = (horizontalScrollbar.__styleInstance && horizontalScrollbar.__styleInstance.draggingThumb && horizontalScrollbar)
3525+ || (verticalScrollbar.__styleInstance && verticalScrollbar.__styleInstance.draggingThumb && verticalScrollbar)
3526 || null
3527 if (scrollbarWithActiveDrag !== null) {
3528 scrollbarWithActiveDrag.__styleInstance.resetScrollingToPreDrag()
3529+ event.accepted = true
3530 }
3531- event.accepted = true
3532 } else if (verticalScrollbar.__styleInstance !== null) {
3533 if (event.key == Qt.Key_PageDown) {
3534- verticalScrollbar.__styleInstance.scroll(flickableItem.height*internal.longScrollingRatio)
3535+ verticalScrollbar.__styleInstance.scrollBy(flickableItem.height*internal.longScrollingRatio, true)
3536 event.accepted = true
3537 } else if (event.key == Qt.Key_PageUp) {
3538- verticalScrollbar.__styleInstance.scroll(-flickableItem.height*internal.longScrollingRatio)
3539+ verticalScrollbar.__styleInstance.scrollBy(-flickableItem.height*internal.longScrollingRatio, true)
3540 event.accepted = true
3541 } else if (event.key == Qt.Key_Home) {
3542- verticalScrollbar.__styleInstance.scrollToBeginning()
3543+ verticalScrollbar.__styleInstance.scrollToBeginning(true)
3544 event.accepted = true
3545 } else if (event.key == Qt.Key_End) {
3546- verticalScrollbar.__styleInstance.scrollToEnd()
3547+ verticalScrollbar.__styleInstance.scrollToEnd(true)
3548 event.accepted = true
3549 }
3550 }
3551
3552=== modified file 'src/Ubuntu/Components/1.3/Scrollbar.qml'
3553--- src/Ubuntu/Components/1.3/Scrollbar.qml 2015-12-08 10:58:38 +0000
3554+++ src/Ubuntu/Components/1.3/Scrollbar.qml 2016-03-08 06:42:31 +0000
3555@@ -112,11 +112,13 @@
3556 simulate the system setting (which will be implemented in unity8, I guess)
3557 True --> Steppers style, non-overlay scrollbars
3558 False --> Indicator and Trough styles
3559+ CURRENTLY UNUSED
3560 */
3561 property bool __alwaysOnScrollbars: false
3562
3563 /*! internal
3564 Used by ScrollView to tweak Scrollbar's anchoring logic for the always-on scrollbars.
3565+ CURRENTLY UNUSED
3566 */
3567 property Item __viewport: null
3568
3569
3570=== modified file 'src/Ubuntu/Components/1.3/Sections.qml'
3571--- src/Ubuntu/Components/1.3/Sections.qml 2015-12-08 21:38:59 +0000
3572+++ src/Ubuntu/Components/1.3/Sections.qml 2016-03-08 06:42:31 +0000
3573@@ -80,10 +80,6 @@
3574 */
3575 property var model: actions
3576 onModelChanged: {
3577- if (model && model.length > 3) {
3578- // FIXME: Make the Sections scrollable for more than 3 sections.
3579- console.warn("It is not YET recommended or supported to use more than three sections.");
3580- }
3581 if (internal.done) {
3582 if (!model || model.length === 0) {
3583 selectedIndex = -1;
3584
3585=== modified file 'src/Ubuntu/Components/1.3/Slider.qml'
3586--- src/Ubuntu/Components/1.3/Slider.qml 2015-11-18 15:07:15 +0000
3587+++ src/Ubuntu/Components/1.3/Slider.qml 2016-03-08 06:42:31 +0000
3588@@ -63,11 +63,11 @@
3589
3590 // FIXME(loicm) Add Support for the stepSize property.
3591
3592- // /*!
3593- // The distance between two selectable values in the range defined by
3594- // [minimumValue, maximumValue].
3595- // */
3596- // property real stepSize: 1.0
3597+ /*!
3598+ The distance between two selectable values in the range defined by
3599+ [minimumValue, maximumValue].
3600+ */
3601+ property real stepSize: (Math.abs(minimumValue) + Math.abs(maximumValue)) / 100.0
3602
3603 /*!
3604 The current value of the slider. This property is not changed while the
3605@@ -175,6 +175,12 @@
3606 }
3607 }
3608
3609+ function adjustValue(increment) {
3610+ if (Qt.application.layoutDirection == Qt.RightToLeft)
3611+ increment *= -1;
3612+ slider.value = Toolkit.MathUtils.clamp(slider.value + increment, slider.minimumValue, slider.maximumValue);
3613+ }
3614+
3615 /* Mimic the behaviour of the 'pressed' property with one important difference:
3616 'pressed' is set to true only after the onPressed handler has been executed.
3617 That prevents us from doing interesting animations upon press.
3618@@ -206,5 +212,14 @@
3619 onLiveValueChanged: if (isPressed) slider.requestFocus(Qt.MouseFocusReason)
3620 }
3621
3622+ Keys.onLeftPressed: {
3623+ if (event.modifiers === Qt.NoModifier)
3624+ __internals.adjustValue(-slider.stepSize);
3625+ }
3626+ Keys.onRightPressed: {
3627+ if (event.modifiers === Qt.NoModifier)
3628+ __internals.adjustValue(slider.stepSize);
3629+ }
3630+
3631 styleName: "SliderStyle"
3632 }
3633
3634=== modified file 'src/Ubuntu/Components/1.3/TextArea.qml'
3635--- src/Ubuntu/Components/1.3/TextArea.qml 2015-12-14 15:15:46 +0000
3636+++ src/Ubuntu/Components/1.3/TextArea.qml 2016-03-08 06:42:31 +0000
3637@@ -1,5 +1,5 @@
3638 /*
3639- * Copyright 2015 Canonical Ltd.
3640+ * Copyright 2015-2016 Canonical Ltd.
3641 *
3642 * This program is free software; you can redistribute it and/or modify
3643 * it under the terms of the GNU Lesser General Public License as published by
3644@@ -757,7 +757,6 @@
3645
3646 //internals
3647
3648- opacity: enabled ? 1.0 : 0.3
3649 activeFocusOnPress: true
3650 activeFocusOnTab: true
3651
3652@@ -768,7 +767,13 @@
3653 }
3654
3655 // Escape should close the context menu even if the menu takes no input focus
3656- Keys.onEscapePressed: if (activeFocus && inputHandler.popover) PopupUtils.close(inputHandler.popover)
3657+ Keys.onEscapePressed: {
3658+ if (activeFocus && inputHandler.popover) {
3659+ PopupUtils.close(inputHandler.popover)
3660+ } else {
3661+ event.accepted = false
3662+ }
3663+ }
3664
3665 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
3666 LayoutMirroring.childrenInherit: true
3667@@ -827,7 +832,7 @@
3668 }
3669 // hint is shown till user types something in the field
3670 visible: (editor.text == "") && !editor.inputMethodComposing
3671- color: theme.palette.normal.backgroundText
3672+ color: theme.palette.normal.base
3673 font: editor.font
3674 elide: Text.ElideRight
3675 wrapMode: Text.WordWrap
3676
3677=== modified file 'src/Ubuntu/Components/1.3/TextField.qml'
3678--- src/Ubuntu/Components/1.3/TextField.qml 2015-12-22 09:56:19 +0000
3679+++ src/Ubuntu/Components/1.3/TextField.qml 2016-03-08 06:42:31 +0000
3680@@ -1,5 +1,5 @@
3681 /*
3682- * Copyright 2015 Canonical Ltd.
3683+ * Copyright 2015-2016 Canonical Ltd.
3684 *
3685 * This program is free software; you can redistribute it and/or modify
3686 * it under the terms of the GNU Lesser General Public License as published by
3687@@ -833,7 +833,6 @@
3688
3689 // internals
3690
3691- opacity: enabled ? 1.0 : 0.3
3692 activeFocusOnPress: true
3693 activeFocusOnTab: true
3694
3695@@ -844,7 +843,13 @@
3696 }
3697
3698 // Escape should close the context menu even if the menu takes no input focus
3699- Keys.onEscapePressed: if (activeFocus && inputHandler.popover) PopupUtils.close(inputHandler.popover)
3700+ Keys.onEscapePressed: {
3701+ if (activeFocus && inputHandler.popover) {
3702+ PopupUtils.close(inputHandler.popover)
3703+ } else {
3704+ event.accepted = false
3705+ }
3706+ }
3707
3708 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
3709 LayoutMirroring.childrenInherit: true
3710@@ -897,10 +902,13 @@
3711 onChildrenChanged: {
3712 // reparenting
3713 for (var i = 0; i < children.length; i++) {
3714- children[i].parent = leftPane;
3715- children[i].anchors.verticalCenter = verticalCenter;
3716- children[i].activeFocusOnPress = false;
3717- children[i].activeFocusOnTab = false;
3718+ var child = children[i];
3719+ child.parent = leftPane;
3720+ child.anchors.verticalCenter = verticalCenter;
3721+ if (child.hasOwnProperty("activeFocusOnPress")) {
3722+ child.activeFocusOnPress = false;
3723+ }
3724+ child.activeFocusOnTab = false;
3725 }
3726 }
3727 }
3728@@ -921,10 +929,13 @@
3729 onChildrenChanged: {
3730 // reparenting
3731 for (var i = 0; i < children.length; i++) {
3732- children[i].parent = rightPane;
3733- children[i].anchors.verticalCenter = verticalCenter;
3734- children[i].activeFocusOnPress = false;
3735- children[i].activeFocusOnTab = false;
3736+ var child = children[i];
3737+ child.parent = rightPane;
3738+ child.anchors.verticalCenter = verticalCenter;
3739+ if (child.hasOwnProperty("activeFocusOnPress")) {
3740+ child.activeFocusOnPress = false;
3741+ }
3742+ child.activeFocusOnTab = false;
3743 }
3744 }
3745 }
3746@@ -977,7 +988,7 @@
3747 }
3748 // hint is shown till user types something in the field
3749 visible: (editor.text == "") && !editor.inputMethodComposing
3750- color: theme.palette.normal.backgroundText
3751+ color: theme.palette.normal.baseText
3752 font: editor.font
3753 elide: Text.ElideRight
3754 }
3755
3756=== modified file 'src/Ubuntu/Components/1.3/Toolbar.qml'
3757--- src/Ubuntu/Components/1.3/Toolbar.qml 2015-12-15 15:08:49 +0000
3758+++ src/Ubuntu/Components/1.3/Toolbar.qml 2016-03-08 06:42:31 +0000
3759@@ -35,7 +35,7 @@
3760 width: label.width + units.gu(4)
3761 height: parent.height
3762 Rectangle {
3763- color: UbuntuColors.darkGrey
3764+ color: UbuntuColors.slate
3765 opacity: 0.1
3766 anchors.fill: parent
3767 visible: button.pressed
3768
3769=== modified file 'src/Ubuntu/Components/1.3/UbuntuColors.qml'
3770--- src/Ubuntu/Components/1.3/UbuntuColors.qml 2015-04-25 08:54:58 +0000
3771+++ src/Ubuntu/Components/1.3/UbuntuColors.qml 2016-03-08 06:42:31 +0000
3772@@ -1,5 +1,5 @@
3773 /*
3774- Copyright 2014 Canonical Ltd.
3775+ Copyright 2016 Canonical Ltd.
3776 *
3777 This program is free software; you can redistribute it and/or modify
3778 it under the terms of the GNU Lesser General Public License as published by
3779@@ -19,7 +19,7 @@
3780
3781 /*!
3782 \qmltype UbuntuColors
3783- \inqmlmodule Ubuntu.Components 1.1
3784+ \inqmlmodule Ubuntu.Components 1.3
3785 \ingroup ubuntu
3786 \brief Singleton defining the Ubuntu color palette.
3787
3788@@ -37,13 +37,10 @@
3789 \endqml
3790 */
3791 QtObject {
3792- // old colors from UbuntuColors 1.0:
3793
3794- /*!
3795- Orange. Recommended for branded elements, display progress
3796- and intensity, textual links on light backgrounds.
3797- */
3798- readonly property color orange: "#DD4814"
3799+ /*---------------------------------------------------------------
3800+ Deprecated colors
3801+ ---------------------------------------------------------------*/
3802 /*!
3803 \deprecated
3804 Ubuntu supporting color: light aubergine
3805@@ -72,7 +69,7 @@
3806
3807 /*!
3808 Ubuntu orange gradient
3809-
3810+ \deprecated
3811 \sa Button::gradient
3812 */
3813 property Gradient orangeGradient: Gradient {
3814@@ -81,7 +78,7 @@
3815 }
3816 /*!
3817 Ubuntu grey gradient
3818-
3819+ \deprecated
3820 \sa Button::gradient
3821 */
3822 property Gradient greyGradient: Gradient {
3823@@ -89,39 +86,61 @@
3824 GradientStop { position: 1.0; color: "#BBBBBB" }
3825 }
3826
3827- // New colors introduced in UbuntuColors 1.1:
3828+ /*---------------------------------------------------------------
3829+ Supported colors
3830+ ---------------------------------------------------------------*/
3831+ /*!
3832+ Orange. Recommended for branded elements, display progress
3833+ and intensity, textual links on light backgrounds.
3834+ */
3835+ readonly property color orange: "#E95420"
3836
3837 /*!
3838+ \deprecated
3839 Light grey. Recommended for neutral action buttons and
3840 secondary text.
3841 \since Ubuntu.Components 1.1
3842 */
3843- readonly property color lightGrey: "#929292"
3844-
3845- /*!
3846+ readonly property color lightGrey: "#cdcdcd"
3847+
3848+ /*!
3849+ Silk. Recommended for neutral action buttons and
3850+ secondary text.
3851+ \since Ubuntu.Components 1.3
3852+ */
3853+ readonly property color silk: "#cdcdcd"
3854+
3855+ /*!
3856+ \deprecated
3857 Dark grey. Recommended for text and action icons.
3858 \since Ubuntu.Components 1.1
3859 */
3860 readonly property color darkGrey: "#5d5d5d"
3861
3862 /*!
3863+ Slate. Recommended for text and action icons.
3864+ \since Ubuntu.Components 1.3
3865+ */
3866+ readonly property color slate: "#5d5d5d"
3867+
3868+ /*!
3869 Red. Recommended for negative and irreversible action
3870 buttons, errors and alerts.
3871 \since Ubuntu.Components 1.1
3872 */
3873- readonly property color red: "#f32c36"
3874+ readonly property color red: "#ed3146"
3875
3876 /*!
3877 Green. Recommended for positive action buttons.
3878 \since Ubuntu.Components 1.1
3879 */
3880- readonly property color green: "#00a132"
3881+ readonly property color green: "#3eb34f"
3882
3883 /*!
3884 Blue. Recommended for text selection and text cursor.
3885 \since Ubuntu.Components 1.1
3886 */
3887- readonly property color blue: "#12a3d8"
3888+ readonly property color blue: "#19b6ee"
3889
3890 /*!
3891 Purple. Recommended for proper nouns in
3892@@ -129,4 +148,34 @@
3893 \since Ubuntu.Components 1.1
3894 */
3895 readonly property color purple: "#762572"
3896+
3897+ /*!
3898+ Porcelain. Recommended for foregrounds.
3899+ \since Ubuntu.Components 1.3
3900+ */
3901+ readonly property color porcelain: "#f7f7f7"
3902+
3903+ /*!
3904+ Ash. Recommended for subtitles and other tertiary content.
3905+ \since Ubuntu.Components 1.3
3906+ */
3907+ readonly property color ash: "#888888"
3908+
3909+ /*!
3910+ Graphite. Recommended for coloring dark themes' background.
3911+ \since Ubuntu.Components 1.3
3912+ */
3913+ readonly property color graphite: "#666666"
3914+
3915+ /*!
3916+ Inkstone. Recommended for foreground colors in dark themes.
3917+ \since Ubuntu.Components 1.3
3918+ */
3919+ readonly property color inkstone: "#3b3b3b"
3920+
3921+ /*!
3922+ Jet. Recommended for content coloring.
3923+ \since Ubuntu.Components 1.3
3924+ */
3925+ readonly property color jet: "#111111"
3926 }
3927
3928=== removed file 'src/Ubuntu/Components/1.3/colorUtils.js'
3929--- src/Ubuntu/Components/1.3/colorUtils.js 2015-07-24 18:25:07 +0000
3930+++ src/Ubuntu/Components/1.3/colorUtils.js 1970-01-01 00:00:00 +0000
3931@@ -1,37 +0,0 @@
3932-/*
3933- * Copyright (C) 2013-2015 Canonical, Ltd.
3934- *
3935- * This program is free software; you can redistribute it and/or modify
3936- * it under the terms of the GNU General Public License as published by
3937- * the Free Software Foundation; version 3.
3938- *
3939- * This program is distributed in the hope that it will be useful,
3940- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3941- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3942- * GNU General Public License for more details.
3943- *
3944- * You should have received a copy of the GNU General Public License
3945- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3946- */
3947-
3948-/*!
3949- \internal
3950- \qmltype colorUtils
3951- \inqmlmodule Ubuntu.Components 1.3
3952- \ingroup ubuntu
3953- \brief Various chromatic utility functions.
3954- */
3955-
3956-.pragma library
3957-
3958-/*!
3959- \qmlmethod colorUtils::luminance(hexcolor)
3960- Get the luminance for a color.
3961- */
3962-function luminance(hexcolor){
3963- hexcolor = String(hexcolor)
3964- var r = parseInt(hexcolor.substr(1,2),16);
3965- var g = parseInt(hexcolor.substr(3,2),16);
3966- var b = parseInt(hexcolor.substr(5,2),16);
3967- return ((r*212)+(g*715)+(b*73))/1000/255;
3968-}
3969
3970=== removed file 'src/Ubuntu/Components/1.3/tree.js'
3971--- src/Ubuntu/Components/1.3/tree.js 2015-07-17 16:27:55 +0000
3972+++ src/Ubuntu/Components/1.3/tree.js 1970-01-01 00:00:00 +0000
3973@@ -1,182 +0,0 @@
3974-/*
3975- * Copyright 2015 Canonical Ltd.
3976- *
3977- * This program is free software; you can redistribute it and/or modify
3978- * it under the terms of the GNU Lesser General Public License as published by
3979- * the Free Software Foundation; version 3.
3980- *
3981- * This program is distributed in the hope that it will be useful,
3982- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3983- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3984- * GNU Lesser General Public License for more details.
3985- *
3986- * You should have received a copy of the GNU Lesser General Public License
3987- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3988- */
3989-
3990-.pragma library
3991-
3992-function Tree() {
3993- // list<object> of nodes
3994- var nodes = [];
3995-
3996- // list<int> of stems
3997- var stems = [];
3998-
3999- // list<int> of indices of parent nodes
4000- var parents = [];
4001-
4002- // int number of nodes in the tree
4003- var size = 0;
4004-
4005- // Return the index of the given node.
4006- // Returns -1 the node was not found.
4007- this.index = function(node) {
4008- return nodes.indexOf(node);
4009- }
4010-
4011- // Add newNode to the tree in the specified stem, with the specified parent node.
4012- // The root node should be added with parentNode null. All other nodes must be added
4013- // with a parentNode that is already in the tree.
4014- this.add = function(stem, parentNode, newNode) {
4015- if (this.index(newNode) !== -1) {
4016- throw "Cannot add the same node twice to a tree.";
4017- }
4018- if (size === 0) {
4019- // adding root node
4020- if (parentNode !== null) {
4021- throw "Root node must have parentNode null.";
4022- }
4023- } else {
4024- // adding non-root node
4025- if (parentNode === null) {
4026- throw "Only root node has parentNode null."
4027- }
4028- if (this.index(parentNode) === -1) {
4029- throw "Cannot add non-root node if parentNode is not in the tree.";
4030- }
4031- }
4032- nodes.push(newNode);
4033- stems.push(stem);
4034- parents.push(parentNode);
4035- size++;
4036- }
4037-
4038- // Remove all nodes from the specified stem and higher stems.
4039- //
4040- // Returns the removed nodes.
4041- this.prune = function(stem) {
4042- var newNodes = [];
4043- var newStems = [];
4044- var newParents = [];
4045- var removedNodes = [];
4046- for (var i = 0; i < nodes.length; i++) {
4047- if (stems[i] < stem) {
4048- newNodes.push(nodes[i]);
4049- newStems.push(stems[i]);
4050- newParents.push(parents[i]);
4051- } else {
4052- removedNodes.push(nodes[i]);
4053- }
4054- }
4055- nodes = newNodes;
4056- stems = newStems;
4057- parents = newParents;
4058- size = nodes.length;
4059- return removedNodes;
4060- }
4061-
4062- // Chops all nodes with an index higher than the given node which
4063- // are in the same stem or a higher stem.
4064- //
4065- // If, and only if, (inclusive) then also chop the given node.
4066- //
4067- // Default values for node and inclusive are top() and true.
4068- // Returns a list that contains the nodes that were chopped.
4069- this.chop = function(node, inclusive) {
4070- node = typeof node !== 'undefined' ? node : this.top();
4071- inclusive = typeof inclusive !== 'undefined' ? inclusive : true
4072- var nodeIndex = this.index(node);
4073- if (nodeIndex < 0) {
4074- // given node is not in the tree.
4075- return [];
4076- }
4077- if (inclusive) {
4078- size = nodeIndex;
4079- } else {
4080- size = nodeIndex + 1;
4081- }
4082-
4083- // Nodes with index(node) >= nodeIndex && stem >= stems[nodeIndex];
4084- var badNodes = []; // to fill below
4085-
4086- // Nodes with index(node) >= nodeIndex (any stem).
4087- // Potential bad nodes to be removed.
4088- var uglyNodes = nodes.slice(size);
4089- var uglyStems = stems.slice(size); // to check below
4090- var uglyParents = parents.slice(size);
4091-
4092- var stem = stems[nodeIndex];
4093- // Good nodes, with index(node) < nodeIndex && stem < stems[nodeIndex]:
4094- nodes = nodes.slice(0, size);
4095- stems = stems.slice(0, size);
4096- parents = parents.slice(0, size);
4097-
4098- // Add nodes with index(node) > nodeIndex && stem < stems[nodeIndex] back:
4099- for (var i = 0; i < uglyNodes.length; i++) {
4100- if (uglyStems[i] < stem) {
4101- // Because the stem of the parentNode <= stem of the node,
4102- // the node that is added back has the parentNode in nodes.
4103- nodes.push(uglyNodes[i]);
4104- stems.push(uglyStems[i]);
4105- parents.push(uglyParents[i]);
4106- size++;
4107- } else {
4108- badNodes.push(uglyNodes[i]);
4109- }
4110- }
4111- return badNodes;
4112- }
4113-
4114- // Returns the n'th node when traversing one or more stems from the
4115- // top down. When exactMatch, only the specified stem is traversed, and
4116- // when !exactMatch the specified stem and all higher stems are traversed.
4117- //
4118- // Returns null if no matching node was found.
4119- //
4120- // Default value for stem: 0
4121- // Default value for exactMatch: false
4122- // Default value for n: 0 (first node)
4123- //
4124- // Calling top() with no parameters returns top(0, false, 0) which is the
4125- // last node that was added to the tree.
4126- this.top = function(stem, exactMatch, n) {
4127- stem = typeof stem !== 'undefined' ? stem : 0
4128- exactMatch = typeof exactMatch !== 'undefined' ? exactMatch : false
4129- n = typeof n !== 'undefined' ? n : 0
4130-
4131- var st;
4132- var count = n;
4133- for (var i = size - 1; i >= 0; i--) {
4134- st = stems[i];
4135- if ((exactMatch && st === stem) || (!exactMatch && st >= stem)) {
4136- count--;
4137- }
4138- if (count < 0) {
4139- return nodes[i];
4140- }
4141- }
4142- return null;
4143- }
4144-
4145- // Return the parent node of the specified node in the tree
4146- this.parent = function(node) {
4147- var i = nodes.indexOf(node);
4148- if (i === -1) {
4149- throw "Specified node not found in tree.";
4150- } else if (i === 0) {
4151- throw "Root node has no parent node.";
4152- }
4153- return parents[i];
4154- }
4155-}
4156
4157=== modified file 'src/Ubuntu/Components/ComponentModule.pro'
4158--- src/Ubuntu/Components/ComponentModule.pro 2015-12-17 13:48:23 +0000
4159+++ src/Ubuntu/Components/ComponentModule.pro 2016-03-08 06:42:31 +0000
4160@@ -31,7 +31,6 @@
4161 1.2/AppHeader.qml \
4162 1.2/Captions.qml \
4163 1.2/CheckBox.qml \
4164- 1.2/colorUtils.js \
4165 1.2/ComboButton.qml \
4166 1.2/CrossFadeImage10.qml \
4167 1.2/CrossFadeImage11.qml \
4168@@ -92,7 +91,6 @@
4169 1.3/dateUtils.js \
4170 1.3/DraggingArea.qml \
4171 1.3/InputHandler.qml \
4172- 1.3/MainViewBase.qml \
4173 1.3/MainView.qml \
4174 1.3/OptionSelectorDelegate.qml \
4175 1.3/OptionSelector.qml \
4176@@ -103,8 +101,6 @@
4177 1.3/Page.qml \
4178 1.3/PageStack.qml \
4179 1.3/pageUtils.js \
4180- 1.3/PageWrapper.qml \
4181- 1.3/PageWrapperUtils.js \
4182 1.3/Panel.qml \
4183 1.3/ProgressBar.qml \
4184 1.3/PullToRefresh.qml \
4185@@ -122,7 +118,6 @@
4186 1.3/Toolbar.qml \
4187 1.3/ToolbarButton.qml \
4188 1.3/ToolbarItems.qml \
4189- 1.3/tree.js \
4190 1.3/UbuntuColors.qml \
4191 1.3/UbuntuListView.qml \
4192 1.3/UbuntuNumberAnimation.qml \
4193@@ -131,7 +126,8 @@
4194 1.3/PageColumnsLayout.qml \
4195 1.3/ProgressionSlot.qml \
4196 1.3/ScrollView.qml \
4197- 1.3/PageHeader.qml
4198+ 1.3/PageHeader.qml \
4199+ 1.3/Icon.qml
4200
4201 OTHER_FILES+= qmldir \
4202 1.3/CrossFadeImage.qdoc \
4203
4204=== modified file 'src/Ubuntu/Components/ListItems/1.2/ItemSelector.qml'
4205--- src/Ubuntu/Components/ListItems/1.2/ItemSelector.qml 2015-04-30 08:32:44 +0000
4206+++ src/Ubuntu/Components/ListItems/1.2/ItemSelector.qml 2016-03-08 06:42:31 +0000
4207@@ -70,7 +70,7 @@
4208
4209 Component {
4210 id: selectorDelegate
4211- Toolkit.OptionSelectorDelegate { text: name; subText: description; iconSource: image }
4212+ OptionSelectorDelegate { text: name; subText: description; iconSource: image }
4213 }
4214
4215 ListModel {
4216
4217=== modified file 'src/Ubuntu/Components/ListItems/1.3/Empty.qml'
4218--- src/Ubuntu/Components/ListItems/1.3/Empty.qml 2015-09-21 14:44:13 +0000
4219+++ src/Ubuntu/Components/ListItems/1.3/Empty.qml 2016-03-08 06:42:31 +0000
4220@@ -277,6 +277,8 @@
4221 }
4222 }
4223
4224+ // exposed for OptionSelector
4225+ property alias __highlight: highlight
4226 Rectangle {
4227 id: highlight
4228
4229@@ -291,7 +293,7 @@
4230 top: parent.top
4231 }
4232 height: emptyListItem.height - bottomDividerLine.height
4233- color: theme.palette.selected.background
4234+ color: theme.palette.highlighted.background
4235 }
4236
4237 ThinDivider {
4238
4239=== modified file 'src/Ubuntu/Components/ListItems/1.3/ItemSelector.qml'
4240--- src/Ubuntu/Components/ListItems/1.3/ItemSelector.qml 2015-09-28 14:36:54 +0000
4241+++ src/Ubuntu/Components/ListItems/1.3/ItemSelector.qml 2016-03-08 06:42:31 +0000
4242@@ -70,7 +70,7 @@
4243
4244 Component {
4245 id: selectorDelegate
4246- Toolkit.OptionSelectorDelegate { text: name; subText: description; iconSource: image }
4247+ OptionSelectorDelegate { text: name; subText: description; iconSource: image }
4248 }
4249
4250 ListModel {
4251
4252=== modified file 'src/Ubuntu/Components/ListItems/1.3/LabelVisual.qml'
4253--- src/Ubuntu/Components/ListItems/1.3/LabelVisual.qml 2015-09-07 10:05:58 +0000
4254+++ src/Ubuntu/Components/ListItems/1.3/LabelVisual.qml 2016-03-08 06:42:31 +0000
4255@@ -31,7 +31,14 @@
4256 }
4257
4258 elide: Text.ElideRight
4259- color: selected ? UbuntuColors.orange : secondary ? overlay ? theme.palette.normal.overlayText : theme.palette.normal.backgroundText
4260- : overlay ? theme.palette.selected.overlayText : theme.palette.selected.backgroundText
4261+ color: selected
4262+ ? theme.palette.selected.backgroundText
4263+ : (secondary
4264+ ? (overlay
4265+ ? theme.palette.normal.overlaySecondaryText
4266+ : theme.palette.normal.backgroundSecondaryText)
4267+ : (overlay
4268+ ? theme.palette.normal.overlayText
4269+ : theme.palette.normal.backgroundText))
4270 opacity: label.enabled ? 1.0 : 0.5
4271 }
4272
4273=== modified file 'src/Ubuntu/Components/ListItems/1.3/Standard.qml'
4274--- src/Ubuntu/Components/ListItems/1.3/Standard.qml 2015-12-21 19:43:34 +0000
4275+++ src/Ubuntu/Components/ListItems/1.3/Standard.qml 2016-03-08 06:42:31 +0000
4276@@ -172,7 +172,7 @@
4277 bottom: parent.bottom
4278 left: parent.left
4279 }
4280- color: theme.palette.selected.background
4281+ color: theme.palette.highlighted.background
4282 }
4283
4284 Rectangle {
4285@@ -185,7 +185,7 @@
4286 bottom: parent.bottom
4287 right: parent.right
4288 }
4289- color: theme.palette.selected.background
4290+ color: theme.palette.highlighted.background
4291 }
4292
4293 IconVisual {
4294
4295=== modified file 'src/Ubuntu/Components/Popups/1.3/Dialog.qml'
4296--- src/Ubuntu/Components/Popups/1.3/Dialog.qml 2015-12-14 08:27:39 +0000
4297+++ src/Ubuntu/Components/Popups/1.3/Dialog.qml 2016-03-08 06:42:31 +0000
4298@@ -1,5 +1,5 @@
4299 /*
4300- * Copyright 2015 Canonical Ltd.
4301+ * Copyright 2016 Canonical Ltd.
4302 *
4303 * This program is free software; you can redistribute it and/or modify
4304 * it under the terms of the GNU Lesser General Public License as published by
4305@@ -99,7 +99,7 @@
4306 the caller, if possible.
4307 */
4308 property Item caller
4309- onCallerChanged: console.debug("caller DEPRECATED")
4310+ onCallerChanged: console.warn("'caller' is DEPRECATED. It has no effect.")
4311
4312 /*!
4313 The property holds the margins from the dialog's dismissArea. The property
4314@@ -180,6 +180,13 @@
4315 height: childrenRect.height + foreground.margins
4316 onWidthChanged: updateChildrenWidths();
4317
4318+ // put the context into this component to save ActionContext lookup
4319+ PopupContext {
4320+ id: localContext
4321+ objectName: dialog.objectName + "DialogContext"
4322+ active: foreground.visible
4323+ }
4324+
4325 Label {
4326 horizontalAlignment: Text.AlignHCenter
4327 text: dialog.title
4328@@ -187,14 +194,14 @@
4329 maximumLineCount: 2
4330 elide: Text.ElideRight
4331 textSize: Label.Large
4332- color: UbuntuColors.darkGrey
4333+ color: theme.palette.normal.overlayText
4334 visible: (text !== "")
4335 }
4336
4337 Label {
4338 horizontalAlignment: Text.AlignHCenter
4339 text: dialog.text
4340- color: UbuntuColors.darkGrey
4341+ color: theme.palette.normal.overlayText
4342 wrapMode: Text.Wrap
4343 visible: (text !== "")
4344 }
4345
4346=== modified file 'src/Ubuntu/Components/Popups/1.3/Popover.qml'
4347--- src/Ubuntu/Components/Popups/1.3/Popover.qml 2015-12-09 12:34:18 +0000
4348+++ src/Ubuntu/Components/Popups/1.3/Popover.qml 2016-03-08 06:42:31 +0000
4349@@ -227,6 +227,14 @@
4350 right: parent.right
4351 }
4352 height: childrenRect.height
4353+
4354+ // put the PopupContext inside the container to save one step
4355+ // in the context lookup
4356+ PopupContext {
4357+ id: popupContext
4358+ objectName: popover.objectName + "PopupContext"
4359+ active: foreground.visible
4360+ }
4361 }
4362
4363 onWidthChanged: internal.updatePosition()
4364
4365=== modified file 'src/Ubuntu/Components/Themes/1.3/Palette.qml'
4366--- src/Ubuntu/Components/Themes/1.3/Palette.qml 2015-04-24 14:34:39 +0000
4367+++ src/Ubuntu/Components/Themes/1.3/Palette.qml 2016-03-08 06:42:31 +0000
4368@@ -48,12 +48,32 @@
4369 */
4370 QtObject {
4371 /*!
4372- Color palette to use when the widget is not in any particular state.
4373+ Color palette to use when the widget is in the default state.
4374 */
4375 property PaletteValues normal: PaletteValues{}
4376+
4377+ /*!
4378+ Color palette to use when the widget is in the disabled (enabled: false)
4379+ state.
4380+ \since Ubuntu.Components.Themes 1.3
4381+ */
4382+ property PaletteValues disabled: PaletteValues{}
4383+
4384 /*!
4385 Color palette to use when the widget is selected, for example when
4386 a tab is the current one.
4387 */
4388 property PaletteValues selected: PaletteValues{}
4389+
4390+ /*!
4391+ Color palette to use when the widget is selected and disabled.
4392+ \since Ubuntu.Components.Themes 1.3
4393+ */
4394+ property PaletteValues selectedDisabled: PaletteValues{}
4395+
4396+ /*!
4397+ Color palette values to use when the widget is highlighted.
4398+ \since Ubuntu.Components.Themes 1.3
4399+ */
4400+ property PaletteValues highlighted: PaletteValues{}
4401 }
4402
4403=== modified file 'src/Ubuntu/Components/Themes/1.3/PaletteValues.qml'
4404--- src/Ubuntu/Components/Themes/1.3/PaletteValues.qml 2015-04-24 14:34:39 +0000
4405+++ src/Ubuntu/Components/Themes/1.3/PaletteValues.qml 2016-03-08 06:42:31 +0000
4406@@ -1,5 +1,5 @@
4407 /*
4408- * Copyright 2013 Canonical Ltd.
4409+ * Copyright 2016 Canonical Ltd.
4410 *
4411 * This program is free software; you can redistribute it and/or modify
4412 * it under the terms of the GNU Lesser General Public License as published by
4413@@ -33,6 +33,17 @@
4414 */
4415 property color backgroundText
4416 /*!
4417+ Color applied to secondary content on the \l background color.
4418+ \since Ubuntu.Components.Themes 1.3
4419+ */
4420+ property color backgroundSecondaryText
4421+ /*!
4422+ Color applied to tertiary content on the \l background color.
4423+ \since Ubuntu.Components.Themes 1.3
4424+ */
4425+ property color backgroundTertiaryText
4426+
4427+ /*!
4428 Color applied to the background of widgets.
4429 */
4430 property color base
4431@@ -41,6 +52,7 @@
4432 Typically used for labels and images.
4433 */
4434 property color baseText
4435+
4436 /*!
4437 Color applied to widgets on top of the base colour.
4438 */
4439@@ -50,9 +62,26 @@
4440 Typically used for labels and images.
4441 */
4442 property color foregroundText
4443+
4444+ /*!
4445+ Color applied to widgets on top of any layer, background or base.
4446+ \since Ubuntu.Components.Themes 1.3
4447+ */
4448+ property color raised
4449+ /*!
4450+ Color applied to elements placed on top of the \l raised color.
4451+ \since Ubuntu.Components.Themes 1.3
4452+ */
4453+ property color raisedText
4454+ /*!
4455+ Color applied to seconday elements placed on top of the \l raised color.
4456+ \since Ubuntu.Components.Themes 1.3
4457+ */
4458+ property color raisedSecondaryText
4459+
4460 /*!
4461 Color applied to the background of widgets floating over other widgets.
4462- For example: popovers, Toolbar.
4463+ For example popovers, menus, dialogs.
4464 */
4465 property color overlay
4466 /*!
4467@@ -61,7 +90,13 @@
4468 */
4469 property color overlayText
4470 /*!
4471- Colour applied to the backgrouhnd of text input fields.
4472+ Color applied to secondary elements placed on top of the \l overlay color.
4473+ \since Ubuntu.Components.Themes 1.3
4474+ */
4475+ property color overlaySecondaryText
4476+
4477+ /*!
4478+ Colour applied to the background of text input fields.
4479 */
4480 property color field
4481 /*!
4482@@ -69,8 +104,59 @@
4483 Typically used for labels and images.
4484 */
4485 property color fieldText
4486+
4487+ /*!
4488+ Colour applied to the positive actions.
4489+ \since Ubuntu.Components.Themes 1.3
4490+ */
4491+ property color positive
4492+ /*!
4493+ Color applied to elements placed on top of the \l positive color.
4494+ \since Ubuntu.Components.Themes 1.3
4495+ */
4496+ property color positiveText
4497+
4498+ /*!
4499+ Colour applied to the negative actions.
4500+ \since Ubuntu.Components.Themes 1.3
4501+ */
4502+ property color negative
4503+ /*!
4504+ Color applied to elements placed on top of the \l negative color.
4505+ \since Ubuntu.Components.Themes 1.3
4506+ */
4507+ property color negativeText
4508+
4509+ /*!
4510+ Colour applied to the activity colors. Typical example is progress indication,
4511+ activity indication.
4512+ \since Ubuntu.Components.Themes 1.3
4513+ */
4514+ property color activity
4515+ /*!
4516+ Color applied to elements placed on top of the \l activity color.
4517+ \since Ubuntu.Components.Themes 1.3
4518+ */
4519+ property color activityText
4520+
4521 /*!
4522 Color applied to selected text in editable components.
4523 */
4524 property color selection
4525+ /*!
4526+ Color applied to elements placed on top of the \l selection color.
4527+ \since Ubuntu.Components.Themes 1.3
4528+ */
4529+ property color selectionText
4530+
4531+ /*!
4532+ Color applied for the focus frame drawn around the active focus component
4533+ if it was focused using keyboard navigation.
4534+ */
4535+ property color focus
4536+
4537+ /*!
4538+ Color applied to elements placed on top of the \l focus color.
4539+ */
4540+ property color focusText
4541 }
4542
4543=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.2/MainViewStyle.qml'
4544--- src/Ubuntu/Components/Themes/Ambiance/1.2/MainViewStyle.qml 2015-04-24 14:52:19 +0000
4545+++ src/Ubuntu/Components/Themes/Ambiance/1.2/MainViewStyle.qml 2016-03-08 06:42:31 +0000
4546@@ -40,6 +40,13 @@
4547 anchors.fill: parent
4548 color: styledItem.backgroundColor
4549 gradient: internals.isGradient ? backgroundGradient : null
4550+ visible: internals.isGradient
4551+ }
4552+
4553+ Binding {
4554+ target: typeof window != 'undefined' ? window : null
4555+ property: "color"
4556+ value: styledItem.backgroundColor
4557 }
4558
4559 Image {
4560
4561=== added file 'src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml'
4562--- src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml 1970-01-01 00:00:00 +0000
4563+++ src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml 2016-03-08 06:42:31 +0000
4564@@ -0,0 +1,49 @@
4565+/*
4566+ * Copyright 2016 Canonical Ltd.
4567+ *
4568+ * This program is free software; you can redistribute it and/or modify
4569+ * it under the terms of the GNU Lesser General Public License as published by
4570+ * the Free Software Foundation; version 3.
4571+ *
4572+ * This program is distributed in the hope that it will be useful,
4573+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4574+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4575+ * GNU Lesser General Public License for more details.
4576+ *
4577+ * You should have received a copy of the GNU Lesser General Public License
4578+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4579+ */
4580+
4581+import QtQuick 2.4
4582+import Ubuntu.Components 1.3
4583+import Ubuntu.Components.Themes 1.3
4584+
4585+PaletteValues {
4586+ background: "#FFFFFF"
4587+ backgroundText: UbuntuColors.jet
4588+ backgroundSecondaryText: UbuntuColors.slate
4589+ backgroundTertiaryText: UbuntuColors.ash
4590+ base: UbuntuColors.silk
4591+ baseText: UbuntuColors.ash
4592+ foreground: UbuntuColors.porcelain
4593+ foregroundText: UbuntuColors.jet
4594+ raised: "#FFFFFF"
4595+ raisedText: UbuntuColors.slate
4596+ raisedSecondaryText: UbuntuColors.silk
4597+ overlay: "#FFFFFF"
4598+ overlayText: UbuntuColors.slate
4599+ overlaySecondaryText: UbuntuColors.silk
4600+ field: "#FFFFFF"
4601+ fieldText: UbuntuColors.jet
4602+ focus: UbuntuColors.orange
4603+ focusText: "#FFFFFF"
4604+ selection: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.2)
4605+ selectionText: UbuntuColors.jet
4606+ positive: UbuntuColors.green
4607+ positiveText: "#FFFFFF"
4608+ negative: UbuntuColors.red
4609+ negativeText: "#FFFFFF"
4610+ activity: UbuntuColors.blue
4611+ activityText: "#FFFFFF"
4612+}
4613+
4614
4615=== added file 'src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml'
4616--- src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml 1970-01-01 00:00:00 +0000
4617+++ src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml 2016-03-08 06:42:31 +0000
4618@@ -0,0 +1,27 @@
4619+/*
4620+ * Copyright 2016 Canonical Ltd.
4621+ *
4622+ * This program is free software; you can redistribute it and/or modify
4623+ * it under the terms of the GNU Lesser General Public License as published by
4624+ * the Free Software Foundation; version 3.
4625+ *
4626+ * This program is distributed in the hope that it will be useful,
4627+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4628+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4629+ * GNU Lesser General Public License for more details.
4630+ *
4631+ * You should have received a copy of the GNU Lesser General Public License
4632+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4633+ */
4634+
4635+import QtQuick 2.4
4636+import Ubuntu.Components 1.3
4637+
4638+AmbianceNormal {
4639+ background: UbuntuColors.porcelain
4640+ backgroundText: UbuntuColors.blue
4641+ backgroundTertiaryText: UbuntuColors.blue
4642+ base: UbuntuColors.ash
4643+ baseText: UbuntuColors.blue
4644+ foreground: UbuntuColors.ash
4645+}
4646
4647=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeHintStyle.qml'
4648--- src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeHintStyle.qml 2015-11-06 06:29:11 +0000
4649+++ src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeHintStyle.qml 2016-03-08 06:42:31 +0000
4650@@ -1,5 +1,5 @@
4651 /*
4652- * Copyright 2015 Canonical Ltd.
4653+ * Copyright 2016 Canonical Ltd.
4654 *
4655 * This program is free software; you can redistribute it and/or modify
4656 * it under the terms of the GNU Lesser General Public License as published by
4657@@ -25,6 +25,14 @@
4658
4659 readonly property BottomEdgeHint hint: styledItem
4660
4661+ property color backgroundColor: styledItem.enabled
4662+ ? theme.palette.normal.overlay
4663+ : theme.palette.disabled.overlay
4664+
4665+ property color foregroundColor: styledItem.enabled
4666+ ? theme.palette.normal.overlayText
4667+ : theme.palette.disabled.overlayText
4668+
4669 // translate hint status into state
4670 state: {
4671 switch (hint.status) {
4672@@ -102,7 +110,8 @@
4673 centerIn: parent
4674 topMargin: styledItem.height
4675 }
4676- name: "up"
4677+ name: "toolkit_bottom-edge-hint"
4678+ color: foregroundColor
4679 }
4680
4681 Rectangle {
4682@@ -114,7 +123,7 @@
4683 topMargin: styledItem.height
4684 }
4685 height: styledItem.height
4686- color: theme.palette.normal.overlay
4687+ color: backgroundColor
4688 ThinDivider {
4689 anchors.top: parent.top
4690 }
4691@@ -133,13 +142,13 @@
4692 width: height
4693 height: units.gu(2)
4694 anchors.verticalCenter: parent.verticalCenter
4695- color: theme.palette.normal.overlayText
4696+ color: foregroundColor
4697 }
4698 Label {
4699 id: label
4700 text: styledItem.text
4701 textSize: Label.Medium
4702- color: theme.palette.normal.overlayText
4703+ color: foregroundColor
4704 height: styledItem.height
4705 anchors.verticalCenter: parent.verticalCenter
4706 verticalAlignment: Text.AlignVCenter
4707
4708=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeStyle.qml'
4709--- src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeStyle.qml 2015-12-10 16:39:45 +0000
4710+++ src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeStyle.qml 2016-03-08 06:42:31 +0000
4711@@ -27,7 +27,9 @@
4712 revealThreshold: bottomEdge.hint.height + units.gu(2)
4713
4714 // own styling properties
4715- property color backgroundColor: Qt.rgba(0, 0, 0, Math.min(0.25, (height - revealThreshold - panelItem.y) / (height - revealThreshold)))
4716+ property color backgroundColor: !panelItem.collapsing
4717+ ? Qt.rgba(0, 0, 0, Math.min(0.25, (height - revealThreshold - panelItem.y) / (height - revealThreshold)))
4718+ : "transparent"
4719 property color panelColor: theme.palette.normal.overlay
4720 property color shadowColor: "#000000"
4721
4722@@ -43,6 +45,7 @@
4723 Rectangle {
4724 id: panelItem
4725 objectName: "bottomedge_panel"
4726+ property bool collapsing: false
4727 anchors {
4728 left: parent.left
4729 right: parent.right
4730@@ -57,6 +60,12 @@
4731
4732 Behavior on anchors.topMargin { UbuntuNumberAnimation { id: panelBehavior } }
4733
4734+ Connections {
4735+ target: bottomEdge
4736+ onCollapseStarted: panelItem.collapsing = true
4737+ onCollapseCompleted: panelItem.collapsing = false
4738+ }
4739+
4740 state: bottomEdge.status > BottomEdge.Hidden ? "drop-hint" : ""
4741 states: [
4742 State {
4743
4744=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/BubbleShape.qml'
4745--- src/Ubuntu/Components/Themes/Ambiance/1.3/BubbleShape.qml 2015-07-22 13:14:43 +0000
4746+++ src/Ubuntu/Components/Themes/Ambiance/1.3/BubbleShape.qml 2016-03-08 06:42:31 +0000
4747@@ -1,5 +1,5 @@
4748 /*
4749- * Copyright 2015 Canonical Ltd.
4750+ * Copyright 2016 Canonical Ltd.
4751 *
4752 * This program is free software; you can redistribute it and/or modify
4753 * it under the terms of the GNU Lesser General Public License as published by
4754@@ -28,15 +28,14 @@
4755 /*!
4756 The background color of the bubble.
4757 */
4758- property color color: square ? theme.palette.normal.background : theme.palette.normal.overlay
4759+ property color color: square
4760+ ? theme.palette.normal.background
4761+ : theme.palette.normal.overlay
4762
4763 property point target
4764 property string direction: "down"
4765 property bool clipContent: false
4766 default property alias children: content.children
4767- // FIXME: This should not be necessary. See
4768- // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1214978
4769- property alias arrowSource: arrow.source
4770
4771 implicitWidth: units.gu(10)
4772 implicitHeight: units.gu(8)
4773@@ -111,7 +110,7 @@
4774 UbuntuShape {
4775 anchors.fill: parent
4776 aspect: UbuntuShape.Flat
4777- backgroundColor: theme.palette.normal.overlay
4778+ backgroundColor: bubbleShape.color
4779 source: bubbleShape.clipContent ? shapeSource : null
4780 visible: !square
4781 }
4782@@ -139,34 +138,4 @@
4783 visible: bubbleShape.clipContent
4784 }
4785 }
4786-
4787- Item {
4788- x: target.x
4789- y: target.y
4790-
4791- Image {
4792- id: arrow
4793-
4794- visible: !square && bubbleShape.direction != "none"
4795-
4796- function directionToRotation(direction) {
4797- switch (direction) {
4798- case "up":
4799- return 180;
4800- case "left":
4801- return 90;
4802- case "right":
4803- return -90;
4804- default: // "down" or "none"
4805- return 0;
4806- }
4807- }
4808-
4809- x: -width / 2.0
4810- y: -height
4811- transformOrigin: Item.Bottom
4812- rotation: directionToRotation(bubbleShape.direction)
4813- source: Qt.resolvedUrl("../artwork/bubble_arrow.png")
4814- }
4815- }
4816 }
4817
4818=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/CheckBoxStyle.qml'
4819--- src/Ubuntu/Components/Themes/Ambiance/1.3/CheckBoxStyle.qml 2015-12-09 14:45:54 +0000
4820+++ src/Ubuntu/Components/Themes/Ambiance/1.3/CheckBoxStyle.qml 2016-03-08 06:42:31 +0000
4821@@ -23,19 +23,21 @@
4822 /*!
4823 The padding between the background shape and the outside border of the checkbox.
4824 */
4825- property real backgroundPadding: units.gu(0.33)
4826+ property real backgroundPadding: 0
4827
4828 /*!
4829 The background color when the checkbox is not checked.
4830 */
4831- property color uncheckedBackgroundColor: Qt.rgba(theme.palette.normal.foreground.r,
4832- theme.palette.normal.foreground.g,
4833- theme.palette.normal.foreground.b, 0.2)
4834+ property color uncheckedBackgroundColor: styledItem.enabled
4835+ ? theme.palette.normal.foreground
4836+ : theme.palette.disabled.foreground
4837
4838 /*!
4839 The background color when the checkbox is checked.
4840 */
4841- property color checkedBackgroundColor: UbuntuColors.green
4842+ property color checkedBackgroundColor: styledItem.enabled
4843+ ? theme.palette.normal.positive
4844+ : theme.palette.disabled.raised
4845
4846 /*!
4847 The image to show inside the checkbox when it is checked.
4848@@ -45,17 +47,17 @@
4849 /*!
4850 The color of the icon.
4851 */
4852- property color iconColor: theme.palette.normal.foregroundText
4853+ property color iconColor: styledItem.enabled
4854+ ? theme.palette.normal.positiveText
4855+ : theme.palette.disabled.raisedText
4856
4857 /*!
4858 The padding between the icon and the border of the thumb.
4859 */
4860- property real iconPadding: backgroundPadding
4861-
4862- opacity: enabled ? 1.0 : 0.5
4863-
4864- implicitWidth: units.gu(3)
4865- implicitHeight: units.gu(3)
4866+ property real iconPadding: units.gu(0.4)
4867+
4868+ implicitWidth: units.gu(2)
4869+ implicitHeight: units.gu(2)
4870
4871 FocusShape {
4872 }
4873
4874=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/ComboButtonStyle.qml'
4875--- src/Ubuntu/Components/Themes/Ambiance/1.3/ComboButtonStyle.qml 2015-12-09 14:25:50 +0000
4876+++ src/Ubuntu/Components/Themes/Ambiance/1.3/ComboButtonStyle.qml 2016-03-08 06:42:31 +0000
4877@@ -23,20 +23,16 @@
4878
4879 // configurations
4880 dropDownWidth: units.gu(5)
4881- dropDownSeparatorWidth: units.dp(2)
4882 comboListMargin: units.gu(0.8)
4883 comboListHolder: comboListContent
4884 comboListPanel: panelItem
4885 defaultColor: mainButton.defaultColor
4886 defaultGradient: mainButton.defaultGradient
4887- defaultDropdownColor: combo.expanded ? Qt.rgba(0, 0, 0, 0.05) : defaultColor
4888+ defaultDropdownColor: mainButton.defaultColor
4889 defaultFont: mainButton.defaultFont
4890
4891-
4892- width: combo.width
4893- height: combo.collapsedHeight
4894-
4895- property ComboButton combo: styledItem
4896+ width: styledItem.width
4897+ height: styledItem.collapsedHeight
4898
4899 implicitWidth: mainButton.implicitWidth
4900 implicitHeight: mainButton.implicitHeight
4901@@ -44,25 +40,159 @@
4902 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
4903 LayoutMirroring.childrenInherit: true
4904
4905- ButtonStyle {
4906+ Item {
4907 id: mainButton
4908+
4909+ property real minimumWidth: units.gu(36)
4910+ property real horizontalPadding: units.gu(4)
4911+ property color defaultColor: theme.palette.normal.foreground
4912+ property font defaultFont: Qt.font({family: "Ubuntu", pixelSize: FontUtils.sizeToPixels("medium")})
4913+ property Gradient defaultGradient: null
4914+ property real buttonFaceOffset: -dropDownWidth/2
4915+ property bool stroke: false
4916+
4917+ /*!
4918+ The property overrides the button's default background with an item. This
4919+ item can be used by derived styles to reuse the ButtonStyle and override
4920+ the default coloured background with an image or any other drawing.
4921+ The default value is null.
4922+ */
4923+ property Item backgroundSource: comboFace
4924+
4925 anchors {
4926 left: parent.left
4927 top: parent.top
4928 right: parent.right
4929 }
4930- height: combo.collapsedHeight
4931- // overrides
4932- backgroundSource: comboFace
4933- buttonFaceOffset: -dropDownWidth/2 - dropDownSeparatorWidth
4934- horizontalPadding: units.gu(4) - dropDownSeparatorWidth
4935- minimumWidth: units.gu(36)
4936-
4937- // FIXME: use hardcoded color while we get the theme palette updated
4938- defaultColor: "#b2b2b2"
4939- defaultGradient: null
4940-
4941- // button face
4942+ width: styledItem.width
4943+ height: styledItem.collapsedHeight
4944+ implicitWidth: Math.max(
4945+ minimumWidth, foreground.implicitWidth + 2 * mainButton.horizontalPadding
4946+ )
4947+ implicitHeight: units.gu(4)
4948+
4949+ LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
4950+ LayoutMirroring.childrenInherit: true
4951+
4952+ UbuntuShape {
4953+ id: background
4954+ anchors.fill: parent
4955+ borderSource: "radius_idle.sci" // Deprecated, use a dedicated shape.
4956+ visible: mainButton.stroke ? false : ((backgroundColor.a != 0.0) || mainButton.backgroundSource)
4957+ source: mainButton.backgroundSource
4958+
4959+ backgroundColor: defaultColor
4960+ backgroundMode: UbuntuShape.SolidColor
4961+ opacity: styledItem.enabled ? 1.0 : 0.6
4962+ }
4963+
4964+ Item {
4965+ id: foreground
4966+
4967+ property string iconPosition: styledItem.iconPosition
4968+ property real iconSize: units.gu(2)
4969+ property real spacing: mainButton.horizontalPadding
4970+ property bool hasIcon: styledItem.iconSource != ""
4971+ property bool hasText: styledItem.text != ""
4972+
4973+ anchors {
4974+ centerIn: parent
4975+ horizontalCenterOffset: mainButton.buttonFaceOffset
4976+ }
4977+ transformOrigin: Item.Top
4978+ width: parent.width - 2*mainButton.horizontalPadding
4979+ implicitHeight: Math.max(foregroundIcon.height, foregroundLabel.height)
4980+ scale: styledItem.pressed ? 0.98 : 1.0
4981+ Behavior on scale {
4982+ NumberAnimation {
4983+ duration: UbuntuAnimation.SnapDuration
4984+ easing.type: Easing.Linear
4985+ }
4986+ }
4987+ state: foreground.hasIcon && hasText ? iconPosition : "center"
4988+
4989+ Icon {
4990+ id: foregroundIcon
4991+ visible: foreground.hasIcon
4992+ anchors.verticalCenter: parent.verticalCenter
4993+ width: foreground.iconSize
4994+ height: foreground.iconSize
4995+ color: foregroundLabel.color
4996+ source: styledItem.iconSource
4997+ }
4998+
4999+ Label {
5000+ id: foregroundLabel
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to status/vote changes: