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

Proposed by Zoltan Balogh
Status: Merged
Approved by: Zoltan Balogh
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 Approve
PS Jenkins bot continuous-integration Needs Fixing
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.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1813. By Zoltan Balogh

Sync with staging

1814. By Zoltan Balogh

Sync with staging

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1815. By Zoltan Balogh

Sync with staging

1816. By Zoltan Balogh

Sync with staging

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1817. By Zoltan Balogh

Fix test script

1818. By Zoltan Balogh

Sync with staging

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1819. By Zoltan Balogh

Sync with staging

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1820. By Zoltan Balogh

Sync with staging

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1821. By Zoltan Balogh

Sync with the staging

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1822. By Zoltan Balogh

sync with staging

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1823. By Zoltan Balogh

Sync with staging

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1824. By Zoltan Balogh

Sync with staging

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1825. By Zoltan Balogh

Sync with the staging

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1826. By Zoltan Balogh

Sync with the staging

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1827. By Zoltan Balogh

Sync with staging

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1828. By Zoltan Balogh

sync with staging

1829. By Zoltan Balogh

sync with staging

1830. By Zoltan Balogh

sync with staging

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1831. By Zoltan Balogh

Sync

1832. By Zoltan Balogh

Sync

1833. By Zoltan Balogh

Sync

1834. By Zoltan Balogh

Sync

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1835. By Zoltan Balogh

Wait for subcomponents in libtoolkit

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1836. By Zoltan Balogh

do not Wait for subcomponents in libtoolkit

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1837. By Zoltan Balogh

force non parallel for s390x

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1838. By Zoltan Balogh

rules syntax fix

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1839. By Zoltan Balogh

one more s390x non-parallel try + fix docs

1840. By Zoltan Balogh

Fix button color in test

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1841. By Zoltan Balogh

Fixed performance monitor dangling pointer crash.

1842. By Zoltan Balogh

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

1843. By Zoltan Balogh

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

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1844. By Zoltan Balogh

Sync with staging

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1845. By Zoltan Balogh

Remove the not helping s390x non-parallel build options.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1846. By Zoltan Balogh

Sync

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1847. By Zoltan Balogh

Remove & from test_buttons

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1848. By Zoltan Balogh

add more deps

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1849. By Zoltan Balogh

Next try

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1850. By Zoltan Balogh

Next try

1851. By Zoltan Balogh

Next try

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1852. By Zoltan Balogh

Sync from staging

Revision history for this message
Zoltan Balogh (bzoltan) :
review: Approve
1853. By Zoltan Balogh

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

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'apicheck/apicheck.pro'
--- apicheck/apicheck.pro 2015-11-30 15:39:52 +0000
+++ apicheck/apicheck.pro 2016-03-08 06:42:31 +0000
@@ -7,4 +7,4 @@
7installPath = $$[QT_INSTALL_LIBS]/ubuntu-ui-toolkit7installPath = $$[QT_INSTALL_LIBS]/ubuntu-ui-toolkit
8apicheck.path = $$installPath8apicheck.path = $$installPath
9apicheck.files = apicheck9apicheck.files = apicheck
10INSTALLS += apicheck10INSTALLS += $$TARGET
1111
=== modified file 'components.api'
--- components.api 2015-12-19 10:06:24 +0000
+++ components.api 2016-03-08 06:42:31 +0000
@@ -8,6 +8,7 @@
8 signal clicked()8 signal clicked()
9 signal pressAndHold()9 signal pressAndHold()
10 readonly property bool pressed10 readonly property bool pressed
11 readonly property UCMargins sensingMargins
11Ubuntu.Components.Action 1.3 1.0 0.1 UCAction: QtObject12Ubuntu.Components.Action 1.3 1.0 0.1 UCAction: QtObject
12 property string description13 property string description
13 property bool enabled14 property bool enabled
@@ -83,6 +84,7 @@
83 property bool onScreen84 property bool onScreen
84 property bool running85 property bool running
85Ubuntu.Components.AdaptivePageLayout 1.3: PageTreeNode86Ubuntu.Components.AdaptivePageLayout 1.3: PageTreeNode
87 property bool asynchronous
86 readonly property int columns88 readonly property int columns
87 property list<PageColumnsLayou> layouts89 property list<PageColumnsLayou> layouts
88 function var addPageToCurrentColumn(var sourcePage, var page, var properties)90 function var addPageToCurrentColumn(var sourcePage, var page, var properties)
@@ -268,7 +270,8 @@
268 function push(var data)270 function push(var data)
269 function clear()271 function clear()
270 function QQuickMimeData* newData()272 function QQuickMimeData* newData()
271Ubuntu.Components.ColorUtils 0.1 1.0273Ubuntu.Components.ColorUtils 1.0 0.1: QtObject singleton
274 function double luminance(color color)
272Ubuntu.Components.ComboButton 1.1: Button275Ubuntu.Components.ComboButton 1.1: Button
273 property double collapsedHeight276 property double collapsedHeight
274 default property list<QtObject> comboList277 default property list<QtObject> comboList
@@ -276,13 +279,18 @@
276 property color dropdownColor279 property color dropdownColor
277 property bool expanded280 property bool expanded
278 property double expandedHeight281 property double expandedHeight
279Ubuntu.Components.ComboButton 1.3: Button282Ubuntu.Components.ComboButton 1.3: AbstractButton
280 property double collapsedHeight283 property double collapsedHeight
284 property color color
281 default property list<QtObject> comboList285 default property list<QtObject> comboList
282 readonly property double comboListHeight286 readonly property double comboListHeight
283 property color dropdownColor287 property color dropdownColor
284 property bool expanded288 property bool expanded
285 property double expandedHeight289 property double expandedHeight
290 property QFont font
291 property Gradient gradient
292 property string iconPosition
293 property color strokeColor
286Ubuntu.Components.Styles.ComboButtonStyle 1.1: Item294Ubuntu.Components.Styles.ComboButtonStyle 1.1: Item
287 property Item comboListHolder295 property Item comboListHolder
288 property double comboListMargin296 property double comboListMargin
@@ -498,6 +506,12 @@
498 property string name506 property string name
499Ubuntu.Components.Icon 1.1: Icon507Ubuntu.Components.Icon 1.1: Icon
500 property url source508 property url source
509Ubuntu.Components.Icon 1.3: Item
510 property bool asynchronous
511 property color color
512 property color keyColor
513 property string name
514 property url source
501Ubuntu.Components.InverseMouse 1.0 0.1 UCInverseMouse: Mouse515Ubuntu.Components.InverseMouse 1.0 0.1 UCInverseMouse: Mouse
502Ubuntu.Components.InverseMouseArea 1.0 0.1 InverseMouseAreaType: MouseArea516Ubuntu.Components.InverseMouseArea 1.0 0.1 InverseMouseAreaType: MouseArea
503 function bool contains(QPointF point)517 function bool contains(QPointF point)
@@ -615,6 +629,22 @@
615Ubuntu.Components.MainView 1.3: MainViewBase629Ubuntu.Components.MainView 1.3: MainViewBase
616 property bool automaticOrientation630 property bool automaticOrientation
617 default property list<QtObject> contentsItem631 default property list<QtObject> contentsItem
632Ubuntu.Components.MainViewBase 1.3 UCMainViewBase: PageTreeNode
633 readonly property PopupContext actionContext
634 readonly property ActionManager actionManager
635 property list<Action> actions
636 property bool anchorToKeyboard
637 property string applicationName
638 property color backgroundColor
639 property color footerColor
640 property color headerColor
641 signal applicationNameChanged(string applicationName)
642 signal anchorToKeyboardChanged(bool anchorToKeyboard)
643 signal headerColorChanged(color headerColor)
644 signal backgroundColorChanged(color backgroundColor)
645 signal footerColorChanged(color footerColor)
646 signal actionManagerChanged(ActionManager actionManager)
647 signal actionContextChanged(PopupContext actionContext)
618Ubuntu.Components.MathUtils 1.0 0.1: QtObject singleton648Ubuntu.Components.MathUtils 1.0 0.1: QtObject singleton
619 function double clamp(double x, double min, double max)649 function double clamp(double x, double min, double max)
620 function double lerp(double delta, double from, double to)650 function double lerp(double delta, double from, double to)
@@ -715,6 +745,7 @@
715Ubuntu.Components.Page 1.1 Page11: Page10745Ubuntu.Components.Page 1.1 Page11: Page10
716 readonly property PageHeadConfiguration head746 readonly property PageHeadConfiguration head
717Ubuntu.Components.Page 1.3: PageTreeNode747Ubuntu.Components.Page 1.3: PageTreeNode
748 readonly property ActionContext actionContext
718 property Flickable flickable749 property Flickable flickable
719 readonly property PageHeadConfiguration head750 readonly property PageHeadConfiguration head
720 property Item header751 property Item header
@@ -830,8 +861,11 @@
830 property PaletteValues normal861 property PaletteValues normal
831 property PaletteValues selected862 property PaletteValues selected
832Ubuntu.Components.Themes.Palette 1.3: QtObject863Ubuntu.Components.Themes.Palette 1.3: QtObject
864 property PaletteValues disabled
865 property PaletteValues highlighted
833 property PaletteValues normal866 property PaletteValues normal
834 property PaletteValues selected867 property PaletteValues selected
868 property PaletteValues selectedDisabled
835Ubuntu.Components.Themes.PaletteValues 0.1: QtObject869Ubuntu.Components.Themes.PaletteValues 0.1: QtObject
836 property color background870 property color background
837 property color backgroundText871 property color backgroundText
@@ -845,17 +879,32 @@
845 property color overlayText879 property color overlayText
846 property color selection880 property color selection
847Ubuntu.Components.Themes.PaletteValues 1.3: QtObject881Ubuntu.Components.Themes.PaletteValues 1.3: QtObject
882 property color activity
883 property color activityText
848 property color background884 property color background
885 property color backgroundSecondaryText
886 property color backgroundTertiaryText
849 property color backgroundText887 property color backgroundText
850 property color base888 property color base
851 property color baseText889 property color baseText
852 property color field890 property color field
853 property color fieldText891 property color fieldText
892 property color focus
893 property color focusText
854 property color foreground894 property color foreground
855 property color foregroundText895 property color foregroundText
896 property color negative
897 property color negativeText
856 property color overlay898 property color overlay
899 property color overlaySecondaryText
857 property color overlayText900 property color overlayText
901 property color positive
902 property color positiveText
903 property color raised
904 property color raisedSecondaryText
905 property color raisedText
858 property color selection906 property color selection
907 property color selectionText
859Ubuntu.Components.Panel 1.0 0.1: Item908Ubuntu.Components.Panel 1.0 0.1: Item
860 property int align909 property int align
861 property bool animate910 property bool animate
@@ -947,6 +996,7 @@
947 property bool grabDismissAreaEvents996 property bool grabDismissAreaEvents
948 function var show()997 function var show()
949 function var hide()998 function var hide()
999Ubuntu.Components.PopupContext 1.3 UCPopupContext: ActionContext
950Ubuntu.Components.Popups.PopupUtils 0.1 1.0 1.31000Ubuntu.Components.Popups.PopupUtils 0.1 1.0 1.3
951Ubuntu.Components.ProgressBar 1.0 0.1: AnimatedItem1001Ubuntu.Components.ProgressBar 1.0 0.1: AnimatedItem
952 property bool indeterminate1002 property bool indeterminate
@@ -963,7 +1013,11 @@
963 property bool onScreen1013 property bool onScreen
964 property bool showProgressPercentage1014 property bool showProgressPercentage
965 property double value1015 property double value
966Ubuntu.Components.ProgressionSlot 1.3: Icon1016Ubuntu.Components.ProgressionSlot 1.3: Item
1017 property bool asynchronous
1018 property color color
1019 property color keyColor
1020 property string name
967 property url source1021 property url source
968Ubuntu.Components.ProportionalShape 1.3 UCProportionalShape: UbuntuShape1022Ubuntu.Components.ProportionalShape 1.3 UCProportionalShape: UbuntuShape
969Ubuntu.Components.PullToRefresh 1.1: StyledItem1023Ubuntu.Components.PullToRefresh 1.1: StyledItem
@@ -1056,6 +1110,7 @@
1056 function var formatValue(var v)1110 function var formatValue(var v)
1057 property double minimumValue1111 property double minimumValue
1058 readonly property bool pressed1112 readonly property bool pressed
1113 property double stepSize
1059 property double value1114 property double value
1060Ubuntu.Components.SliderUtils 0.1 1.01115Ubuntu.Components.SliderUtils 0.1 1.0
1061Ubuntu.Components.SlotsAttached 1.3: QtObject1116Ubuntu.Components.SlotsAttached 1.3: QtObject
@@ -1491,6 +1546,7 @@
1491 property Item pageStack1546 property Item pageStack
1492Ubuntu.Components.Styles.ToolbarStyle 1.3: Item1547Ubuntu.Components.Styles.ToolbarStyle 1.3: Item
1493 property Component defaultDelegate1548 property Component defaultDelegate
1549UCActionContextAttached: QtObject
1494Ubuntu.Components.UCApplication 1.0 0.1: QtObject1550Ubuntu.Components.UCApplication 1.0 0.1: QtObject
1495 property string applicationName1551 property string applicationName
1496 property QtObject inputMethod1552 property QtObject inputMethod
@@ -1503,6 +1559,12 @@
1503UCListItemExpansion: QtObject1559UCListItemExpansion: QtObject
1504 property bool expanded1560 property bool expanded
1505 property double height1561 property double height
1562UCMargins: QtObject
1563 property double all
1564 property double bottom
1565 property double left
1566 property double right
1567 property double top
1506UCStateSaverAttached: QtObject1568UCStateSaverAttached: QtObject
1507 property bool enabled1569 property bool enabled
1508 property string properties1570 property string properties
@@ -1558,6 +1620,28 @@
1558 readonly property color purple1620 readonly property color purple
1559 readonly property color red1621 readonly property color red
1560 readonly property color warmGrey1622 readonly property color warmGrey
1623Ubuntu.Components.UbuntuColors 1.3: QtObject singleton
1624 readonly property color ash
1625 readonly property color blue
1626 readonly property color coolGrey
1627 readonly property color darkAubergine
1628 readonly property color darkGrey
1629 readonly property color graphite
1630 readonly property color green
1631 property Gradient greyGradient
1632 readonly property color inkstone
1633 readonly property color jet
1634 readonly property color lightAubergine
1635 readonly property color lightGrey
1636 readonly property color midAubergine
1637 readonly property color orange
1638 property Gradient orangeGradient
1639 readonly property color porcelain
1640 readonly property color purple
1641 readonly property color red
1642 readonly property color silk
1643 readonly property color slate
1644 readonly property color warmGrey
1561Ubuntu.Components.UbuntuListView 1.0 0.1: ListView1645Ubuntu.Components.UbuntuListView 1.0 0.1: ListView
1562 property int expandedIndex1646 property int expandedIndex
1563Ubuntu.Components.UbuntuListView 1.1 UbuntuListView11: UbuntuListView1647Ubuntu.Components.UbuntuListView 1.1 UbuntuListView11: UbuntuListView
15641648
=== modified file 'debian/changelog'
--- debian/changelog 2016-01-06 04:27:02 +0000
+++ debian/changelog 2016-03-08 06:42:31 +0000
@@ -1,3 +1,151 @@
1ubuntu-ui-toolkit (1.3.1872+16.04-0ubuntu1) UNRELEASED; urgency=medium
2
3 [ Timo Jyrinki ]
4 * Fix gles unit test skipping.
5 * Add s390x to the unit test skipping architectures
6 * UITK test plan - wily -> xenial. Fixes LP: #1544490
7
8 [ Christian Dywan ]
9 * Print errors when QuickUtils fails to create a component.
10 * unit tests shouldn't use deprecated Dialog.callera
11 * Correctly count only test case results. The result= value is used in suites
12 and results.
13 * Skip tst_pagehead_visible flakes on non-arm. Fixes LP: #1534651
14 * Skip flaky tst_mousefilterTest::doubleClicked. Fixes LP: #1542215
15 * Suppress click signal if releasing outside of ListItem. Fixes LP: #1541148.
16 * Use gdb in runtest.sh to produce backtraces.
17 * Arrow keys change value of a Slider. Fixes LP: #1523824.
18 * Only use Maliit when enabled explicitly in the environment
19
20 [ Oliver Tilloy ]
21 * Do not try to assign to non-existent property "activeFocusOnPress".
22 Fixes LP: #1532953
23 * Bubble up ESC key press event if there is no popover to close.
24 Fixes LP: #1546627
25
26 [ Loïc Molinari ]
27 * Added private items and nodes for the new component styles.
28 Fixes LP: #1523836
29 * Made use of new private Frame item for the focusing.
30 * Fixed performance monitor crash because of a NULL timer pointer dereference.
31 Fixes LP: #1546986
32 * Fixed performance monitor dangling pointer crash. Fixes LP: #1546984
33 * [ProportionalShape] Ensured width/height ratio is correct with default values.
34 Fixes LP: #1546546
35 * Added a workaround to prevent a crash while changing the QPA scale factor.
36
37 [ Florian Boucault ]
38 * Always on performance monitor that logs frames that too long to render.
39 * MainView: proceed to selecting the theme automatically at startup too.
40 Fixes LP: #1535819
41 * MainView: when no gradient color is needed for the background, rely on
42 QQuickWindow's GL clear color. Lessens overdraw considerably for most
43 apps. Fixes LP: #1439133.
44 * Panel: MathUtils used without import prefix was leading to undefined
45 reference.
46 * Label: use native rendering on low dpi screens (GRID_UNIT_PX <= 10) for
47 sharper looking text.
48 * Gallery: added palette browser to Colors page.
49
50 [ Tim Peeters ]
51 * Support scrolling in ListViews with horizontal orientation to the
52 qquicklistview CPO.
53 * Add background to AppHeader and remove contents clipping from MainView.
54 Fixes LP: #1531016, LP: #1531457.
55 * Hide AppHeader when using AdaptivePageLayout. Fixes bug 1531871.
56 Fixes LP: #1531871.
57 * Implement horizontal flicking in the flickable autopilot CPO.
58 * Re-order to list of pages in the gallery to be alphabetical.
59 * Fix the autopilot failures introduced with the horizontal scrolling in
60 the Flickable CPO.
61 * Update documentation for MainView, Page, AdaptivePageLayout to use the new
62 PageHeader in all examples. Deprecate old properties. Fixes LP: #1540574
63 * Add 'animate' property to new internal AppHeaderBase, and do not show a
64 header animation when starting an app without header.
65 Fixes LP: #1518002, LP: #1524901.
66 * Use the correct string for skipping tests on x86_64 .
67 * Sections scrolling and keyboard navigation. Fixes LP: #1465048, LP: #1489591
68 * Fix autopilot color button failure.
69
70 [ Zoltán Balogh ]
71 * Create a click packaging project for the UITK Component Gallery.
72 * Improve the test plan executor script.
73
74 [ Andrea Bernabei ]
75 * Refer to SlotsLayout.Last instead of SlotsLayout.End in SlotsLayout
76 documentation. Fixes LP: #1536170.
77 * Update "Import Statement:" in docs of Ubuntu.Components. Currently
78 Developer's website shows "import Ubuntu.Components 1.2" and "since
79 Ubuntu.Components 1.3" and that is confusing for all app developers.
80 Fixes LP: #1531817.
81 * Fix ListItemLayout multiline labels positioning and add docs about
82 aliasing labels properties
83 * UbuntuTestCase flick(): default events delay to 1. Fixes LP: #1549256.
84 * Add Scrollbar and ScrollView tests plus implementation fixes.
85
86 [ Benjamin Zeller ]
87 * Fix Bug lp:1535241 "AdaptivePageLayout first example is badly broken".
88 Fixes LP: #1535241.
89 * The click project file is should not be part of the UITK project.
90 * Move MainViewBase to C++.
91 * Move tree.js to C++.
92 * Do not leak the incubator pointer in case a QML engine never took care of
93 it. Delete the object directly.
94 * Move PageWrapper.qml to C++ for 1.3.
95 * Add Ubuntu toolkit shared library
96 * Move ColorUtils to UbuntuToolkit.
97 * Fixes LP: #1540642
98 * Make sure objects are initialized with extra properties before they are
99 instantiated in the QML engine.
100 * Use QQmlProperty::write() instead of QObject::writeProperty()
101
102 [ Zsombor Egri ]
103 * Update Palette values for Ubuntu.Components 1.3 and apply the palette on
104 components. First set of visual updates including ListItem, Text inputs,
105 CheckBox, Switch, Slider, PageHeader, ActionBar and BottomEdge.
106 Fixes LP: #1350915.
107 * Contextual Actions - shortcut (and mnemonics) handling must obey
108 active/inactive contexts, such as Page activation as well as Popups and
109 Dialogs. Fixes LP: #1514856.
110 * Attach default theme to the QML Engine it creates. Fixes LP: #1527546
111 * Palette fix. Update components to use the palette. Fixes LP: #1495477
112 * Disable rendering performance logs for the unit tests.
113 * Specify message severity for the performance logging category.
114 * Link singletons used as context properties in root context of the QML
115 Engine to the engine instance. Fixes LP: #1539558.
116 * Specify message severity for the performance logging category.
117 * Expose Icon.asynchronous property to drive image loading of the icon.
118 Fixes LP: #1535480.
119 * Redo InverseMosueArea tests to not to use shared view for all the tests.
120 Fixes LP: #1544455
121 * Get singletons report fatal error in case the parent is null upon first
122 creation. Adjust failing test cases. Fixes LP: #1542309
123 * Deprecated Theme forces palette to be loaded from 1.2 themes.
124 Fixes LP: #1549830
125 * Introduce AdaptivePageLayout.asynchronous to the API. Fixes LP: #1540449
126 * AbstractButton handles 4x4GU minimal sensing area, exposes sensingMargins
127 to extend sensing area even further. Fixes LP:#1468645, LP: #1508114
128
129 [ Albert Astals Cid ]
130 * Have a default pixelsPerInch value. Otherwise when running unity8 tests
131 under xvfb we get the wrong parameters warning and tests fail.
132
133 [ Robert Ancell ]
134 * Fix documentation typo - Ubunut -> Ubuntu.
135 * Use new QML package name for qml-module-qtfeedback, drop old QML
136 package names.
137 * Fix examples using OptionSelectorDelegate that place it in the Toolkit
138 namespace but don't have the import to match.
139
140 [ Colin Watson ]
141 * Make src/Ubuntu/Test depend on src/Ubuntu/Components, to fix build with
142 high parallelisation.
143
144 [ Pierre Bertet on 2016-02-17
145 * ComboButton: not based on Button anymore + style update.
146
147 -- Zoltán Balogh <zoltan@bakter.hu> Thu, 21 Jan 2016 06:21:26 +0200
148
1ubuntu-ui-toolkit (1.3.1795+16.04.20160106-0ubuntu1) xenial; urgency=medium149ubuntu-ui-toolkit (1.3.1795+16.04.20160106-0ubuntu1) xenial; urgency=medium
2150
3 [ Christian Dywan ]151 [ Christian Dywan ]
4152
=== modified file 'debian/control'
--- debian/control 2015-12-17 15:38:35 +0000
+++ debian/control 2016-03-08 06:42:31 +0000
@@ -16,15 +16,15 @@
16 libqt5sql5-sqlite,16 libqt5sql5-sqlite,
17 qtdeclarative5-dev-tools,17 qtdeclarative5-dev-tools,
18 qtdeclarative5-private-dev,18 qtdeclarative5-private-dev,
19 qml-module-qtquick2 | qtdeclarative5-qtquick2-plugin,19 qml-module-qtquick2,
20 qml-module-qttest | qtdeclarative5-test-plugin,20 qml-module-qttest,
21 qml-module-qtquick-window2 | qtdeclarative5-window-plugin,21 qml-module-qtquick-window2,
22 qml-module-qtquick-layouts,22 qml-module-qtquick-layouts,
23 qtdeclarative5-qtfeedback-plugin,23 qml-module-qtfeedback,
24 qtdeclarative5-unity-action-plugin (>= 1.1.0),24 qtdeclarative5-unity-action-plugin (>= 1.1.0),
25 qtdeclarative5-private-dev,25 qtdeclarative5-private-dev,
26 qml-module-qtquick-localstorage | qtdeclarative5-localstorage-plugin,26 qml-module-qtquick-localstorage,
27 qml-module-qt-labs-settings | qtdeclarative5-settings-plugin,27 qml-module-qt-labs-settings,
28 qml-module-qtqml-models2,28 qml-module-qtqml-models2,
29 qtdeclarative5-doc-html,29 qtdeclarative5-doc-html,
30 qtwebkit5-doc-html,30 qtwebkit5-doc-html,
@@ -42,6 +42,7 @@
42 dbus-test-runner,42 dbus-test-runner,
43 accountsservice,43 accountsservice,
44 xvfb,44 xvfb,
45 gdb,
45 libgl1-mesa-dri,46 libgl1-mesa-dri,
46 locales,47 locales,
47 suru-icon-theme,48 suru-icon-theme,
@@ -66,15 +67,16 @@
66Pre-Depends: dpkg (>= 1.15.6~), ${misc:Pre-Depends}67Pre-Depends: dpkg (>= 1.15.6~), ${misc:Pre-Depends}
67Depends: qml-module-qtgraphicaleffects | libqt5qml-graphicaleffects,68Depends: qml-module-qtgraphicaleffects | libqt5qml-graphicaleffects,
68 libqt5svg5,69 libqt5svg5,
69 qml-module-qtquick2 | qtdeclarative5-qtquick2-plugin,70 qml-module-qtquick2,
70 qml-module-qtquick-window2 | qtdeclarative5-window-plugin,71 qml-module-qtquick-window2,
71 qml-module-qtquick-layouts,72 qml-module-qtquick-layouts,
72 qtdeclarative5-qtfeedback-plugin,73 qml-module-qtfeedback,
73 qtdeclarative5-unity-action-plugin (>= 1.1.0),74 qtdeclarative5-unity-action-plugin (>= 1.1.0),
74 suru-icon-theme,75 suru-icon-theme,
75 ttf-ubuntu-font-family,76 ttf-ubuntu-font-family,
76 ubuntu-ui-toolkit-theme (= ${binary:Version}),77 ubuntu-ui-toolkit-theme (= ${binary:Version}),
77 libubuntugestures5 (= ${binary:Version}),78 libubuntugestures5 (= ${binary:Version}),
79 libubuntutoolkit5 (= ${binary:Version}),
78 ${misc:Depends},80 ${misc:Depends},
79 ${shlibs:Depends},81 ${shlibs:Depends},
80Conflicts: qt-components-ubuntu82Conflicts: qt-components-ubuntu
@@ -104,7 +106,7 @@
104Depends: ${misc:Depends},106Depends: ${misc:Depends},
105 ${shlibs:Depends},107 ${shlibs:Depends},
106Description: Ubuntu gestures library development files108Description: Ubuntu gestures library development files
107 This package contains the development files for 109 This package contains the development files for
108 Ubuntu gestures library with SwipeArea110 Ubuntu gestures library with SwipeArea
109111
110Package: libubuntugestures5-private-dev112Package: libubuntugestures5-private-dev
@@ -117,6 +119,25 @@
117 This package contains the private development files for119 This package contains the private development files for
118 Ubuntu gestures library with SwipeArea120 Ubuntu gestures library with SwipeArea
119121
122Package: libubuntutoolkit5
123Architecture: any
124Multi-Arch: same
125Pre-Depends: dpkg (>= 1.15.6~), ${misc:Pre-Depends}
126Depends: ${misc:Depends},
127 ${shlibs:Depends},
128Description: Ubuntu toolkit common library for Ubuntu UI Toolkit
129 Contains components and helper classes that are shared between the
130 Ubuntu QML plugins
131
132Package: libubuntutoolkit5-dev
133Architecture: any
134Multi-Arch: same
135Pre-Depends: dpkg (>= 1.15.6~), ${misc:Pre-Depends}
136Depends: ${misc:Depends},
137 ${shlibs:Depends},
138Description: Ubuntu toolkit common library development files
139 This package contains the development files for
140 Ubuntu toolkit common library
120141
121Package: ubuntu-ui-toolkit-theme142Package: ubuntu-ui-toolkit-theme
122Architecture: any143Architecture: any
@@ -159,7 +180,7 @@
159Depends: ubuntu-ui-toolkit-tools (>= ${source:Version}),180Depends: ubuntu-ui-toolkit-tools (>= ${source:Version}),
160 qtdeclarative5-ubuntu-ui-toolkit-plugin (= ${binary:Version}) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles,181 qtdeclarative5-ubuntu-ui-toolkit-plugin (= ${binary:Version}) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles,
161 ubuntu-ui-toolkit-theme (= ${binary:Version}),182 ubuntu-ui-toolkit-theme (= ${binary:Version}),
162 qml-module-qtquick-xmllistmodel | qtdeclarative5-xmllistmodel-plugin,183 qml-module-qtquick-xmllistmodel,
163 qml-module-qt-labs-folderlistmodel,184 qml-module-qt-labs-folderlistmodel,
164 ${misc:Depends},185 ${misc:Depends},
165 ${shlibs:Depends}186 ${shlibs:Depends}
@@ -220,4 +241,3 @@
220 .241 .
221 This package contains the application launcher, which is a drop-in242 This package contains the application launcher, which is a drop-in
222 replacement for qmlscene, oxideqmlscene, qml and derivatives.243 replacement for qmlscene, oxideqmlscene, qml and derivatives.
223
224244
=== modified file 'debian/libubuntugestures5-dev.install'
--- debian/libubuntugestures5-dev.install 2015-12-16 09:55:02 +0000
+++ debian/libubuntugestures5-dev.install 2016-03-08 06:42:31 +0000
@@ -1,28 +1,35 @@
1usr/include/*/qt5/UbuntuGestures/ubuntugesturesglobal.h 1usr/include/*/qt5/UbuntuGestures/ubuntugesturesglobal.h
2usr/include/*/qt5/UbuntuGestures/CandidateInactivityTimer 2usr/include/*/qt5/UbuntuGestures/CandidateInactivityTimer
3usr/include/*/qt5/UbuntuGestures/TouchOwnershipEvent 3usr/include/*/qt5/UbuntuGestures/TouchOwnershipEvent
4usr/include/*/qt5/UbuntuGestures/UbuntuGestures 4usr/include/*/qt5/UbuntuGestures/UbuntuGestures
5usr/include/*/qt5/UbuntuGestures/pool.h 5usr/include/*/qt5/UbuntuGestures/pool.h
6usr/include/*/qt5/UbuntuGestures/unownedtouchevent.h 6usr/include/*/qt5/UbuntuGestures/unownedtouchevent.h
7usr/include/*/qt5/UbuntuGestures/DebugHelpers 7usr/include/*/qt5/UbuntuGestures/DebugHelpers
8usr/include/*/qt5/UbuntuGestures/debughelpers.h 8usr/include/*/qt5/UbuntuGestures/debughelpers.h
9usr/include/*/qt5/UbuntuGestures/touchownershipevent.h 9usr/include/*/qt5/UbuntuGestures/touchownershipevent.h
10usr/include/*/qt5/UbuntuGestures/touchregistry.h 10usr/include/*/qt5/UbuntuGestures/touchregistry.h
11usr/include/*/qt5/UbuntuGestures/UbuntuGesturesDepends 11usr/include/*/qt5/UbuntuGestures/UbuntuGesturesDepends
12usr/include/*/qt5/UbuntuGestures/timesource.h 12usr/include/*/qt5/UbuntuGestures/timesource.h
13usr/include/*/qt5/UbuntuGestures/TimeSource 13usr/include/*/qt5/UbuntuGestures/TimeSource
14usr/include/*/qt5/UbuntuGestures/timer.h 14usr/include/*/qt5/UbuntuGestures/timer.h
15usr/include/*/qt5/UbuntuGestures/UnownedTouchEvent 15usr/include/*/qt5/UbuntuGestures/UnownedTouchEvent
16usr/include/*/qt5/UbuntuGestures/TouchRegistry 16usr/include/*/qt5/UbuntuGestures/TouchRegistry
17usr/include/*/qt5/UbuntuGestures/Pool 17usr/include/*/qt5/UbuntuGestures/Pool
18usr/include/*/qt5/UbuntuGestures/ubuntugesturesversion.h 18usr/include/*/qt5/UbuntuGestures/ubuntugesturesversion.h
19usr/include/*/qt5/UbuntuGestures/Timer 19usr/include/*/qt5/UbuntuGestures/Timer
20usr/include/*/qt5/UbuntuGestures/candidateinactivitytimer.h 20usr/include/*/qt5/UbuntuGestures/candidateinactivitytimer.h
21usr/include/*/qt5/UbuntuGestures/UbuntuGesturesVersion 21usr/include/*/qt5/UbuntuGestures/UbuntuGesturesVersion
22usr/include/*/qt5/UbuntuGestures/TimerFactory
23usr/include/*/qt5/UbuntuGestures/AbstractTimer
24usr/include/*/qt5/UbuntuGestures/FakeTimeSource
25usr/include/*/qt5/UbuntuGestures/AbstractTimerFactory
26usr/include/*/qt5/UbuntuGestures/FakeTimerFactory
27usr/include/*/qt5/UbuntuGestures/RealTimeSource
28usr/include/*/qt5/UbuntuGestures/SharedTimeSource
29usr/include/*/qt5/UbuntuGestures/FakeTimer
22usr/lib/*/libUbuntuGestures.prl30usr/lib/*/libUbuntuGestures.prl
23usr/lib/*/libUbuntuGestures.la31usr/lib/*/libUbuntuGestures.la
24usr/lib/*/libUbuntuGestures.so32usr/lib/*/libUbuntuGestures.so
25usr/lib/*/pkgconfig/UbuntuGestures.pc33usr/lib/*/pkgconfig/UbuntuGestures.pc
26usr/lib/*/qt5/mkspecs/modules/qt_lib_UbuntuGestures.pri34usr/lib/*/qt5/mkspecs/modules/qt_lib_UbuntuGestures.pri
27usr/lib/*/qt5/mkspecs/modules/qt_lib_UbuntuGestures_private.pri35usr/lib/*/qt5/mkspecs/modules/qt_lib_UbuntuGestures_private.pri
28
2936
=== added file 'debian/libubuntutoolkit5-dev.install'
--- debian/libubuntutoolkit5-dev.install 1970-01-01 00:00:00 +0000
+++ debian/libubuntutoolkit5-dev.install 2016-03-08 06:42:31 +0000
@@ -0,0 +1,15 @@
1usr/include/*/qt5/UbuntuToolkit/ColorUtils
2usr/include/*/qt5/UbuntuToolkit/colorutils.h
3usr/include/*/qt5/UbuntuToolkit/Tree
4usr/include/*/qt5/UbuntuToolkit/tree.h
5usr/include/*/qt5/UbuntuToolkit/UbuntuToolkit
6usr/include/*/qt5/UbuntuToolkit/UbuntuToolkitDepends
7usr/include/*/qt5/UbuntuToolkit/UbuntuToolkitVersion
8usr/include/*/qt5/UbuntuToolkit/ubuntutoolkitglobal.h
9usr/include/*/qt5/UbuntuToolkit/ubuntutoolkitversion.h
10usr/lib/*/libUbuntuToolkit.prl
11usr/lib/*/libUbuntuToolkit.la
12usr/lib/*/libUbuntuToolkit.so
13usr/lib/*/pkgconfig/UbuntuToolkit.pc
14usr/lib/*/qt5/mkspecs/modules/qt_lib_UbuntuToolkit.pri
15usr/lib/*/qt5/mkspecs/modules/qt_lib_UbuntuToolkit_private.pri
016
=== added file 'debian/libubuntutoolkit5.install'
--- debian/libubuntutoolkit5.install 1970-01-01 00:00:00 +0000
+++ debian/libubuntutoolkit5.install 2016-03-08 06:42:31 +0000
@@ -0,0 +1,1 @@
1usr/lib/*/libUbuntuToolkit.so.*
02
=== modified file 'debian/rules'
--- debian/rules 2015-12-03 10:36:02 +0000
+++ debian/rules 2016-03-08 06:42:31 +0000
@@ -11,7 +11,7 @@
11DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)11DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
1212
13# Skip tests on the archs they are known to be flaky with current configuration13# Skip tests on the archs they are known to be flaky with current configuration
14testskip_architectures := powerpc arm64 ppc64el14testskip_architectures := powerpc arm64 ppc64el s390x
1515
16override_dh_auto_configure:16override_dh_auto_configure:
17 qmake -r17 qmake -r
1818
=== modified file 'documentation/statesaving.qdoc'
--- documentation/statesaving.qdoc 2015-07-22 14:35:48 +0000
+++ documentation/statesaving.qdoc 2016-03-08 06:42:31 +0000
@@ -53,7 +53,7 @@
53 for the application. However runtime application name change would require53 for the application. However runtime application name change would require
54 application restart.54 application restart.
5555
56 Having these preconditions, we can deduct that \l MainViewBase::applicationName56 Having these preconditions, we can deduct that \l MainView::applicationName
57 property is one of the properties which cannot be serialized.57 property is one of the properties which cannot be serialized.
5858
59 \section1 IDs59 \section1 IDs
6060
=== modified file 'documentation/ubuntu-components.qdoc'
--- documentation/ubuntu-components.qdoc 2015-03-03 13:47:48 +0000
+++ documentation/ubuntu-components.qdoc 2016-03-08 06:42:31 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17/*!17/*!
18 \qmlmodule Ubuntu.Components 1.218 \qmlmodule Ubuntu.Components 1.3
19 \title Basic QML Types19 \title Basic QML Types
20 \nextpage {Ubuntu User Interface Toolkit}20 \nextpage {Ubuntu User Interface Toolkit}
21*/21*/
2222
=== modified file 'documentation/ubuntu-theming.qdoc'
--- documentation/ubuntu-theming.qdoc 2015-08-11 10:01:34 +0000
+++ documentation/ubuntu-theming.qdoc 2016-03-08 06:42:31 +0000
@@ -270,17 +270,11 @@
270 * The extended (or even overridden) style component documents must follow the naming270 * The extended (or even overridden) style component documents must follow the naming
271 * convention, and must have the names implied by the components styled.271 * convention, and must have the names implied by the components styled.
272 *272 *
273 * SuruDark theme overrides the Ambiance theme's ListItemStyle, therefore declares the
274 * ListItemStyle.qml document, with the following content:
275 * \snippet Themes/SuruDark/1.3/ListItemStyle.qml 0
276 *
277 * The style imports the Ambiance theme module, and extends the Ambiance ListItemStyle273 * The style imports the Ambiance theme module, and extends the Ambiance ListItemStyle
278 * component. The same is done in the other style components. However, Palette defines274 * component. The same is done in the other style components. However, Palette defines
279 * own values, and does not re-use Ambiance palette values.275 * own values, and does not re-use Ambiance palette values.
280 * \snippet Themes/SuruDark/1.3/Palette.qml 0276 * \snippet Themes/SuruDark/1.3/Palette.qml 0
281 *277 *
282 * The same is done with TabBarStyle and OptionSelectorStyle components.
283 *
284 * \note If a theme derived from SuruDark wants to override style components not present278 * \note If a theme derived from SuruDark wants to override style components not present
285 * in SuruDark, they must import the SuruDark's parent theme in the style component.279 * in SuruDark, they must import the SuruDark's parent theme in the style component.
286 * As example, if FancyTheme would want to override the SwitchStyle, it would need to280 * As example, if FancyTheme would want to override the SwitchStyle, it would need to
287281
=== modified file 'documentation/ubuntu-ui-toolkit-common.qdocconf'
--- documentation/ubuntu-ui-toolkit-common.qdocconf 2015-09-01 11:59:13 +0000
+++ documentation/ubuntu-ui-toolkit-common.qdocconf 2016-03-08 06:42:31 +0000
@@ -29,7 +29,7 @@
29excludefiles += $BLD/../src/Ubuntu/Components/1.3/PageWrapperUtils.js29excludefiles += $BLD/../src/Ubuntu/Components/1.3/PageWrapperUtils.js
30outputdir = $BLD/html30outputdir = $BLD/html
31outputformats = HTML31outputformats = HTML
32version = 1.232version = 1.3
33syntaxhighlighting = true33syntaxhighlighting = true
34sourceencoding = UTF-834sourceencoding = UTF-8
35outputencoding = UTF-835outputencoding = UTF-8
3636
=== modified file 'examples/ubuntu-ui-toolkit-gallery/About.qml'
--- examples/ubuntu-ui-toolkit-gallery/About.qml 2015-10-23 14:46:16 +0000
+++ examples/ubuntu-ui-toolkit-gallery/About.qml 2016-03-08 06:42:31 +0000
@@ -23,7 +23,7 @@
23 theme: ThemeSettings {23 theme: ThemeSettings {
24 name: "Ubuntu.Components.Themes.SuruDark"24 name: "Ubuntu.Components.Themes.SuruDark"
25 palette: Palette {25 palette: Palette {
26 normal.background: UbuntuColors.darkGrey26 normal.background: UbuntuColors.slate
27 }27 }
28 }28 }
29 style: Rectangle {29 style: Rectangle {
3030
=== modified file 'examples/ubuntu-ui-toolkit-gallery/BottomEdgePage.qml'
--- examples/ubuntu-ui-toolkit-gallery/BottomEdgePage.qml 2015-12-02 08:23:14 +0000
+++ examples/ubuntu-ui-toolkit-gallery/BottomEdgePage.qml 2016-03-08 06:42:31 +0000
@@ -132,7 +132,7 @@
132 objectName: "CustomRegion1"132 objectName: "CustomRegion1"
133 enabled: regionConfig.model >= 1133 enabled: regionConfig.model >= 1
134 to: 0.3134 to: 0.3
135 property color baseColor: UbuntuColors.lightGrey135 property color baseColor: UbuntuColors.silk
136 },136 },
137 BottomEdgeRegion {137 BottomEdgeRegion {
138 objectName: "CustomRegion2"138 objectName: "CustomRegion2"
139139
=== modified file 'examples/ubuntu-ui-toolkit-gallery/Buttons.qml'
--- examples/ubuntu-ui-toolkit-gallery/Buttons.qml 2015-12-07 11:47:35 +0000
+++ examples/ubuntu-ui-toolkit-gallery/Buttons.qml 2016-03-08 06:42:31 +0000
@@ -24,7 +24,7 @@
24 TemplateSection {24 TemplateSection {
25 className: "Button"25 className: "Button"
2626
27 TemplateRow {27 TemplateFlow {
28 title: i18n.tr("Standard")28 title: i18n.tr("Standard")
2929
30 Button {30 Button {
@@ -33,7 +33,7 @@
33 }33 }
34 }34 }
3535
36 TemplateRow {36 TemplateFlow {
37 title: i18n.tr("Stroke")37 title: i18n.tr("Stroke")
3838
39 Button {39 Button {
@@ -43,7 +43,7 @@
43 }43 }
44 }44 }
4545
46 TemplateRow {46 TemplateFlow {
47 title: i18n.tr("Color")47 title: i18n.tr("Color")
4848
49 Button {49 Button {
@@ -59,7 +59,7 @@
59 }59 }
60 }60 }
6161
62 TemplateRow {62 TemplateFlow {
63 title: i18n.tr("Icon")63 title: i18n.tr("Icon")
6464
65 Button {65 Button {
@@ -68,7 +68,7 @@
68 }68 }
69 }69 }
7070
71 TemplateRow {71 TemplateFlow {
72 title: i18n.tr("Icon+Text")72 title: i18n.tr("Icon+Text")
7373
74 Button {74 Button {
@@ -87,7 +87,7 @@
87 }87 }
88 }88 }
8989
90 TemplateRow {90 TemplateFlow {
91 title: i18n.tr("Disabled")91 title: i18n.tr("Disabled")
9292
93 Button {93 Button {
@@ -101,12 +101,13 @@
101 TemplateSection {101 TemplateSection {
102 className: "ComboButton"102 className: "ComboButton"
103103
104 TemplateRow {104 TemplateFlow {
105 title: i18n.tr("Collapsed")105 title: i18n.tr("Collapsed")
106106
107 ComboButton {107 ComboButton {
108 text: "Press me"108 text: "Press me"
109 objectName: "combobutton_collapsed"109 objectName: "combobutton_collapsed"
110 width: parent.width < units.gu(30)? parent.width : units.gu(30)
110 comboList: UbuntuListView {111 comboList: UbuntuListView {
111 model: 10112 model: 10
112 delegate: Standard {113 delegate: Standard {
@@ -116,11 +117,12 @@
116 }117 }
117 }118 }
118119
119 TemplateRow {120 TemplateFlow {
120 title: i18n.tr("Icon")121 title: i18n.tr("Icon")
121122
122 ComboButton {123 ComboButton {
123 iconSource: "call.png"124 iconSource: "call.png"
125 width: parent.width < units.gu(30)? parent.width : units.gu(30)
124 comboList: UbuntuListView {126 comboList: UbuntuListView {
125 model: 10127 model: 10
126 delegate: Standard {128 delegate: Standard {
@@ -130,12 +132,13 @@
130 }132 }
131 }133 }
132134
133 TemplateRow {135 TemplateFlow {
134 title: i18n.tr("Icon+Text")136 title: i18n.tr("Icon+Text")
135137
136 ComboButton {138 ComboButton {
137 text: "Answer"139 text: "Answer"
138 iconSource: "call.png"140 iconSource: "call.png"
141 width: parent.width < units.gu(30)? parent.width : units.gu(30)
139 comboList: UbuntuListView {142 comboList: UbuntuListView {
140 model: 10143 model: 10
141 delegate: Standard {144 delegate: Standard {
@@ -144,13 +147,14 @@
144 }147 }
145 }148 }
146 }149 }
147 TemplateRow {150 TemplateFlow {
148 title: i18n.tr("Expanded")151 title: i18n.tr("Expanded")
149152
150 ComboButton {153 ComboButton {
151 text: "Press me"154 text: "Press me"
152 objectName: "combobutton_expanded"155 objectName: "combobutton_expanded"
153 expanded: true156 expanded: true
157 width: parent.width < units.gu(30)? parent.width : units.gu(30)
154 comboList: UbuntuListView {158 comboList: UbuntuListView {
155 model: 10159 model: 10
156 delegate: Standard {160 delegate: Standard {
157161
=== modified file 'examples/ubuntu-ui-toolkit-gallery/Colors.qml'
--- examples/ubuntu-ui-toolkit-gallery/Colors.qml 2015-07-22 13:14:43 +0000
+++ examples/ubuntu-ui-toolkit-gallery/Colors.qml 2016-03-08 06:42:31 +0000
@@ -16,11 +16,131 @@
1616
17import QtQuick 2.417import QtQuick 2.4
18import Ubuntu.Components 1.318import Ubuntu.Components 1.3
19import QtQml.Models 2.1
1920
20Template {21Template {
22 id: colorsTemplate
21 objectName: "colorsTemplate"23 objectName: "colorsTemplate"
2224
23 TemplateSection {25 TemplateSection {
26 id: paletteSection
27
28 title: "Palette"
29 className: "Palette"
30 documentation: "qml-palette.html"
31
32 property var palettes: ["normal", "disabled", "selected", "selectedDisabled", "highlighted"]
33 property var paletteValues: [["background", ["backgroundText", "backgroundSecondaryText", "backgroundTertiaryText"]],
34 ["base", ["baseText"]],
35 ["foreground", ["foregroundText"]],
36 ["field", ["fieldText"]],
37 ["focus", ["focusText"]],
38 ["activity", ["activityText"]],
39 ["negative", ["negativeText"]],
40 ["overlay", ["overlayText", "overlaySecondaryText"]],
41 ["positive", ["positiveText"]],
42 ["raised", ["raisedText", "raisedSecondaryText"]],
43 ["selection", ["selectionText"]]]
44
45 Flow {
46 id: paletteFlow
47 anchors {
48 left: parent.left
49 right: parent.right
50 }
51 spacing: units.gu(2)
52 property var previewed
53
54 Repeater {
55 model: paletteSection.palettes
56 Column {
57 spacing: units.gu(1)
58 width: paletteColorGrid.width
59 property var palette: theme.palette[modelData]
60
61 Label {
62 text: "theme.palette." + modelData
63 textSize: Label.Small
64 }
65
66 Grid {
67 id: paletteColorGrid
68 spacing: units.gu(0)
69
70 Repeater {
71 model: paletteSection.paletteValues
72
73 Item {
74 id: paletteColor
75 property string mainColor: modelData[0]
76 property var textColors: modelData[1]
77 property bool previewed: paletteFlow.previewed == paletteColor
78 width: units.gu(4)
79 height: units.gu(5)
80 z: previewed ? 10 : 0
81
82 MouseArea {
83 id: colorHoverArea
84 anchors.fill: parent
85 hoverEnabled: true
86 onClicked: paletteFlow.previewed = paletteColor
87 onContainsMouseChanged: {
88 if (containsMouse) {
89 paletteFlow.previewed = paletteColor;
90 } else {
91 if (paletteFlow.previewed == paletteColor) {
92 paletteFlow.previewed = null;
93 }
94 }
95 }
96 }
97
98 Rectangle {
99 width: paletteColor.width + (previewed ? units.gu(26) : 0)
100 height: paletteColor.height + (previewed ? units.gu(2.5) : 0)
101 Behavior on height { UbuntuNumberAnimation {duration: UbuntuAnimation.SnapDuration} }
102 color: theme.palette.normal.background
103 parent: previewed ? colorsTemplate : paletteColor
104 x: Math.max(0, paletteColor.mapToItem(parent, 0, 0).x + (previewed ? (paletteColor.width-width)/2 : 0))
105 y: paletteColor.mapToItem(parent, 0, 0).y + (previewed ? (paletteColor.height-height)/2 : 0)
106
107 Rectangle {
108 anchors.fill: parent
109 color: palette[mainColor]
110 border.width: color == theme.palette.normal.background ? units.dp(1) : 0
111 border.color: theme.palette.normal.backgroundText
112 }
113
114 Column {
115 anchors {
116 left: parent.left
117 leftMargin: units.gu(0.5)
118 right: parent.right
119 top: parent.top
120 topMargin: units.gu(0.5)
121 }
122
123 Repeater {
124 model: textColors
125 Label {
126 width: previewed ? implicitWidth : parent.width
127 text: previewed ? modelData : modelData.slice(0, 4)
128 color: palette[modelData]
129 textSize: previewed ? Label.Medium : Label.XSmall
130 elide: Text.ElideRight
131 }
132 }
133 }
134 }
135 }
136 }
137 }
138 }
139 }
140 }
141 }
142
143 TemplateSection {
24 title: "UbuntuColors"144 title: "UbuntuColors"
25 className: "UbuntuColors"145 className: "UbuntuColors"
26146
@@ -33,15 +153,45 @@
33 }153 }
34 }154 }
35 TemplateRow {155 TemplateRow {
36 title: i18n.tr("Light grey")156 title: i18n.tr("Porcelain")
37 UbuntuShape {157 UbuntuShape {
38 backgroundColor: UbuntuColors.lightGrey158 backgroundColor: UbuntuColors.porcelain
39 }159 }
40 }160 }
41 TemplateRow {161 TemplateRow {
42 title: i18n.tr("Dark grey")162 title: i18n.tr("Silk")
43 UbuntuShape {163 UbuntuShape {
44 backgroundColor: UbuntuColors.darkGrey164 backgroundColor: UbuntuColors.silk
165 }
166 }
167 TemplateRow {
168 title: i18n.tr("Ash")
169 UbuntuShape {
170 backgroundColor: UbuntuColors.ash
171 }
172 }
173 TemplateRow {
174 title: i18n.tr("Graphite")
175 UbuntuShape {
176 backgroundColor: UbuntuColors.graphite
177 }
178 }
179 TemplateRow {
180 title: i18n.tr("Slate")
181 UbuntuShape {
182 backgroundColor: UbuntuColors.slate
183 }
184 }
185 TemplateRow {
186 title: i18n.tr("Inkstone")
187 UbuntuShape {
188 backgroundColor: UbuntuColors.inkstone
189 }
190 }
191 TemplateRow {
192 title: i18n.tr("Jet")
193 UbuntuShape {
194 backgroundColor: UbuntuColors.jet
45 }195 }
46 }196 }
47 TemplateRow {197 TemplateRow {
48198
=== modified file 'examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml'
--- examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml 2015-11-10 11:53:53 +0000
+++ examples/ubuntu-ui-toolkit-gallery/ListItemLayouts.qml 2016-03-08 06:42:31 +0000
@@ -79,6 +79,7 @@
79 id: telegramContactsLayout79 id: telegramContactsLayout
80 title.text: "Telegram Name goes here"80 title.text: "Telegram Name goes here"
81 subtitle.text: "last seen 12:02"81 subtitle.text: "last seen 12:02"
82 summary.text: "Oh wow! What a nice layout!"
8283
83 Rectangle {84 Rectangle {
84 id: imageShape85 id: imageShape
8586
=== modified file 'examples/ubuntu-ui-toolkit-gallery/NewListItems.qml'
--- examples/ubuntu-ui-toolkit-gallery/NewListItems.qml 2015-09-28 12:26:13 +0000
+++ examples/ubuntu-ui-toolkit-gallery/NewListItems.qml 2016-03-08 06:42:31 +0000
@@ -163,7 +163,7 @@
163 model: [ i18n.tr("Basic"), i18n.tr("Colored divider"), i18n.tr("Immutable"), i18n.tr("No divider") ]163 model: [ i18n.tr("Basic"), i18n.tr("Colored divider"), i18n.tr("Immutable"), i18n.tr("No divider") ]
164 delegate: ListItemWithLabel {164 delegate: ListItemWithLabel {
165 title.text: modelData165 title.text: modelData
166 color: dragging ? "lightblue" : "transparent"166 color: dragging ? theme.palette.selected.base : "transparent"
167 divider {167 divider {
168 colorFrom: modelData == i18n.tr("Colored divider") ? UbuntuColors.red : Qt.rgba(0.0, 0.0, 0.0, 0.0)168 colorFrom: modelData == i18n.tr("Colored divider") ? UbuntuColors.red : Qt.rgba(0.0, 0.0, 0.0, 0.0)
169 colorTo: modelData == i18n.tr("Colored divider") ? UbuntuColors.green : Qt.rgba(0.0, 0.0, 0.0, 0.0)169 colorTo: modelData == i18n.tr("Colored divider") ? UbuntuColors.green : Qt.rgba(0.0, 0.0, 0.0, 0.0)
170170
=== modified file 'examples/ubuntu-ui-toolkit-gallery/PageHeaders.qml'
--- examples/ubuntu-ui-toolkit-gallery/PageHeaders.qml 2015-12-15 15:08:49 +0000
+++ examples/ubuntu-ui-toolkit-gallery/PageHeaders.qml 2016-03-08 06:42:31 +0000
@@ -44,8 +44,35 @@
44 iconName: "edit"44 iconName: "edit"
45 text: "Edit"45 text: "Edit"
46 onTriggered: page.header = editHeader46 onTriggered: page.header = editHeader
47 },
48 Action {
49 iconName: standardHeader.extension === sections
50 ? "media-playback-stop"
51 : "filters"
52 text: "Sections"
53 onTriggered: {
54 if (standardHeader.extension) {
55 standardHeader.extension = null;
56 } else {
57 standardHeader.extension = sections;
58 }
59 }
47 }60 }
48 ]61 ]
62
63 Sections {
64 id: sections
65 visible: standardHeader.extension === sections
66 anchors {
67 left: parent.left
68 right: parent.right
69 bottom: parent.bottom
70 }
71 model: ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
72 "ten", "eleven", "twelve", "thirteen"]
73 }
74
75
49 }76 }
5077
51 PageHeader {78 PageHeader {
@@ -81,7 +108,7 @@
81 width: label.width + units.gu(4)108 width: label.width + units.gu(4)
82 height: parent.height109 height: parent.height
83 Rectangle {110 Rectangle {
84 color: UbuntuColors.darkGrey111 color: UbuntuColors.slate
85 opacity: 0.1112 opacity: 0.1
86 anchors.fill: parent113 anchors.fill: parent
87 visible: button.pressed114 visible: button.pressed
88115
=== modified file 'examples/ubuntu-ui-toolkit-gallery/Popover.qml'
--- examples/ubuntu-ui-toolkit-gallery/Popover.qml 2015-06-24 16:16:51 +0000
+++ examples/ubuntu-ui-toolkit-gallery/Popover.qml 2016-03-08 06:42:31 +0000
@@ -21,7 +21,7 @@
21Template {21Template {
22 objectName: "popoversTemplate"22 objectName: "popoversTemplate"
2323
24 head.actions: [24 trailingActions: [
25 Action {25 Action {
26 text: "Actions"26 text: "Actions"
27 iconSource: "call_icon.png"27 iconSource: "call_icon.png"
2828
=== modified file 'examples/ubuntu-ui-toolkit-gallery/Sections.qml'
--- examples/ubuntu-ui-toolkit-gallery/Sections.qml 2015-10-23 14:46:16 +0000
+++ examples/ubuntu-ui-toolkit-gallery/Sections.qml 2016-03-08 06:42:31 +0000
@@ -22,10 +22,39 @@
22 id: sectionsTemplate22 id: sectionsTemplate
2323
24 header: PageHeader {24 header: PageHeader {
25 id: h
25 title: sectionsTemplate.title26 title: sectionsTemplate.title
26 sections.model: ["first", "second", "third"]27 extension: Sections {
28 anchors {
29 left: parent.left
30 right: parent.right
31 bottom: parent.bottom
32 }
33 model: h.showManySections ? sectionsTemplate.manyActions
34 : sectionsTemplate.fewActions
35 }
36 property bool showManySections: false
37 trailingActionBar.actions: [
38 Action {
39 iconName: h.showManySections ? "view-collapse" : "view-expand"
40 text: h.showManySections ? "less" : "more"
41 onTriggered: h.showManySections = !h.showManySections;
42 }
43 ]
27 }44 }
2845
46 property list<Action> fewActions: [
47 Action { text: "One" },
48 Action { text: "Two" },
49 Action { text: "Three" }
50 ]
51
52 property var manyActions: [
53 "one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
54 "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen",
55 "sixteen", "seventeen", "eighteen", "nineteen", "twenty"
56 ]
57
29 TemplateSection {58 TemplateSection {
30 title: "Sections"59 title: "Sections"
31 className: "Sections"60 className: "Sections"
@@ -34,19 +63,38 @@
34 title: i18n.tr("Enabled")63 title: i18n.tr("Enabled")
3564
36 Sections {65 Sections {
37 actions: [66 actions: sectionsTemplate.fewActions
38 Action { text: "one" },67 }
39 Action { text: "two" },68 }
40 Action { text: "three" }69 TemplateRow {
41 ]70 title: i18n.tr("Disabled")
42 }71
43 }72 Sections {
44 TemplateRow {73 model: sectionsTemplate.fewActions
45 title: i18n.tr("Disabled")74 enabled: false
4675 }
47 Sections {76 }
48 model: ["one", "two", "three"]77 }
49 enabled: false78
79 TemplateSection {
80 title: "Scrollable sections"
81 className: "Sections"
82
83 TemplateRow {
84 title: i18n.tr("Enabled")
85
86 Sections {
87 model: sectionsTemplate.manyActions
88 width: parent.width
89 }
90 }
91 TemplateRow {
92 title: i18n.tr("Disabled")
93
94 Sections {
95 model: sectionsTemplate.manyActions
96 enabled: false
97 width: parent.width
50 }98 }
51 }99 }
52 }100 }
53101
=== modified file 'examples/ubuntu-ui-toolkit-gallery/Template.qml'
--- examples/ubuntu-ui-toolkit-gallery/Template.qml 2015-12-16 15:02:33 +0000
+++ examples/ubuntu-ui-toolkit-gallery/Template.qml 2016-03-08 06:42:31 +0000
@@ -23,12 +23,14 @@
23 default property alias content: column.children23 default property alias content: column.children
24 property alias spacing: column.spacing24 property alias spacing: column.spacing
25 property alias scrollable: templateFlickable.interactive25 property alias scrollable: templateFlickable.interactive
26 property list<Action> trailingActions
26 flickable: templateFlickable27 flickable: templateFlickable
2728
28 header: PageHeader {29 header: PageHeader {
29 title: template.title30 title: template.title
30 flickable: layout.columns === 1 ? templateFlickable : null31 flickable: layout.columns === 1 ? templateFlickable : null
31 onFlickableChanged: exposed = true;32 onFlickableChanged: exposed = true;
33 trailingActionBar.actions: trailingActions
32 }34 }
3335
34 ScrollView {36 ScrollView {
3537
=== modified file 'examples/ubuntu-ui-toolkit-gallery/WidgetsModel.qml'
--- examples/ubuntu-ui-toolkit-gallery/WidgetsModel.qml 2015-12-16 12:58:03 +0000
+++ examples/ubuntu-ui-toolkit-gallery/WidgetsModel.qml 2016-03-08 06:42:31 +0000
@@ -17,64 +17,100 @@
17import QtQuick 2.017import QtQuick 2.0
1818
19ListModel {19ListModel {
20 // Already in design guidelines
21 ListElement {
22 objectName: "navigationElement"
23 label: "Navigation"
24 source: "Navigation.qml"
25 }
26 ListElement {20 ListElement {
27 objectName: "actionBarElement"21 objectName: "actionBarElement"
28 label: "ActionBar"22 label: "ActionBar"
29 source: "ActionBars.qml"23 source: "ActionBars.qml"
30 }24 }
31 ListElement {25 ListElement {
26 objectName: "animationsElement"
27 label: "Animations"
28 source: "Animations.qml"
29 }
30 ListElement {
31 objectName: "bottomEdgeHintElement"
32 label: "Bottom Edge"
33 source: "BottomEdgePage.qml"
34 }
35 ListElement {
36 objectName: "buttonsElement"
37 label: "Buttons"
38 source: "Buttons.qml"
39 }
40 ListElement {
32 objectName: "colorsElement"41 objectName: "colorsElement"
33 label: "Colors"42 label: "Colors"
34 source: "Colors.qml"43 source: "Colors.qml"
35 }44 }
36 ListElement {45 ListElement {
37 objectName: "togglesElement"46 objectName: "crossFadeImageElement"
38 label: "Toggles"47 label: "CrossFadeImage"
39 source: "Toggles.qml"48 source: "CrossFadeImage.qml"
40 }49 }
41 ListElement {50 ListElement {
42 objectName: "buttonsElement"51 objectName: "dialogsElement"
43 label: "Buttons"52 label: "Dialog"
44 source: "Buttons.qml"53 source: "Dialog.qml"
45 }54 }
46 ListElement {55 ListElement {
47 objectName: "slidersElement"56 objectName: "iconsElement"
48 label: "Slider"57 label: "Icons"
49 source: "Sliders.qml"58 source: "Icons.qml"
50 }59 }
51 ListElement {60 ListElement {
52 objectName: "textinputsElement"61 objectName: "labelsElement"
53 label: "Text Field"62 label: "Label"
54 source: "TextInputs.qml"63 source: "Label.qml"
55 }64 }
5665 ListElement {
66 objectName: "newListItemsElement"
67 label: "List items (new)"
68 source: "NewListItems.qml"
69 }
70 ListElement {
71 objectName: "listItemsElement"
72 label: "List Items (old)"
73 source: "ListItems.qml"
74 }
75 ListElement {
76 objectName: "listItemLayoutElement"
77 label: "ListItem Layouts"
78 source: "ListItemLayouts.qml"
79 }
80 ListElement {
81 objectName: "navigationElement"
82 label: "Navigation"
83 source: "Navigation.qml"
84 }
57 ListElement {85 ListElement {
58 objectName: "optionSelectorsElement"86 objectName: "optionSelectorsElement"
59 label: "Option Selector"87 label: "Option Selector"
60 source: "OptionSelectors.qml"88 source: "OptionSelectors.qml"
61 }89 }
6290 ListElement {
63 // Not in design guidelines yet91 objectName: "pageHeaderElement"
92 label: "Page header"
93 source: "PageHeaders.qml"
94 }
64 ListElement {95 ListElement {
65 objectName: "pickersElement"96 objectName: "pickersElement"
66 label: "Pickers"97 label: "Pickers"
67 source: "Pickers.qml"98 source: "Pickers.qml"
68 }99 }
69 ListElement {100 ListElement {
101 objectName: "popoversElement"
102 label: "Popover"
103 source: "Popover.qml"
104 }
105 ListElement {
70 objectName: "progressBarsElement"106 objectName: "progressBarsElement"
71 label: "Progress and activity"107 label: "Progress and activity"
72 source: "ProgressBars.qml"108 source: "ProgressBars.qml"
73 }109 }
74 ListElement {110 ListElement {
75 objectName: "pageHeaderElement"111 objectName: "proportionalShapesElement"
76 label: "Page header"112 label: "Proportional shapes"
77 source: "PageHeaders.qml"113 source: "ProportionalShape.qml"
78 }114 }
79 ListElement {115 ListElement {
80 objectName: "sectionsElement"116 objectName: "sectionsElement"
@@ -82,29 +118,14 @@
82 source: "Sections.qml"118 source: "Sections.qml"
83 }119 }
84 ListElement {120 ListElement {
85 objectName: "ubuntuShapesElement"121 objectName: "sheetsElement"
86 label: "Ubuntu Shape"122 label: "Sheet"
87 source: "UbuntuShape.qml"123 source: "Sheet.qml"
88 }124 }
89 ListElement {125 ListElement {
90 objectName: "iconsElement"126 objectName: "slidersElement"
91 label: "Icons"127 label: "Slider"
92 source: "Icons.qml"128 source: "Sliders.qml"
93 }
94 ListElement {
95 objectName: "proportionalShapesElement"
96 label: "Proportional shapes"
97 source: "ProportionalShape.qml"
98 }
99 ListElement {
100 objectName: "labelsElement"
101 label: "Label"
102 source: "Label.qml"
103 }
104 ListElement {
105 objectName: "crossFadeImageElement"
106 label: "CrossFadeImage"
107 source: "CrossFadeImage.qml"
108 }129 }
109 ListElement {130 ListElement {
110 objectName: "swipeAreaElement"131 objectName: "swipeAreaElement"
@@ -112,53 +133,23 @@
112 source: "SwipeAreaPage.qml"133 source: "SwipeAreaPage.qml"
113 }134 }
114 ListElement {135 ListElement {
115 objectName: "bottomEdgeHintElement"136 objectName: "textinputsElement"
116 label: "Bottom Edge"137 label: "Text Field"
117 source: "BottomEdgePage.qml"138 source: "TextInputs.qml"
118 }139 }
119140 ListElement {
120 ListElement {141 objectName: "togglesElement"
121 objectName: "newListItemsElement"142 label: "Toggles"
122 label: "New list items (preview)"143 source: "Toggles.qml"
123 source: "NewListItems.qml"
124 }
125 ListElement {
126 objectName: "listItemLayoutElement"
127 label: "ListItemLayouts"
128 source: "ListItemLayouts.qml"
129 }
130 // Already in design guidelines but should be reordered
131 ListElement {
132 objectName: "listItemsElement"
133 label: "List Items"
134 source: "ListItems.qml"
135 }144 }
136 ListElement {145 ListElement {
137 objectName: "ubuntuListViewElement"146 objectName: "ubuntuListViewElement"
138 label: "Ubuntu ListView"147 label: "Ubuntu ListView"
139 source: "UbuntuListViews.qml"148 source: "UbuntuListViews.qml"
140 }149 }
141150 ListElement {
142 ListElement {151 objectName: "ubuntuShapesElement"
143 objectName: "dialogsElement"152 label: "Ubuntu Shape"
144 label: "Dialog"153 source: "UbuntuShape.qml"
145 source: "Dialog.qml"
146 }
147 ListElement {
148 objectName: "popoversElement"
149 label: "Popover"
150 source: "Popover.qml"
151 }
152 ListElement {
153 objectName: "sheetsElement"
154 label: "Sheet"
155 source: "Sheet.qml"
156 }
157
158 // Not in design guidelines yet
159 ListElement {
160 objectName: "animationsElement"
161 label: "Animations"
162 source: "Animations.qml"
163 }154 }
164}155}
165156
=== modified file 'examples/ubuntu-ui-toolkit-gallery/call@30.png'
166Binary 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 differ157Binary 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
=== removed file 'examples/ubuntu-ui-toolkit-gallery/gallery'
--- examples/ubuntu-ui-toolkit-gallery/gallery 2015-12-02 15:13:43 +0000
+++ examples/ubuntu-ui-toolkit-gallery/gallery 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
1#!/bin/bash
2
3. `dirname ${BASH_SOURCE[0]}`/../../export_modules_dir.sh || exit 1
4
5SCRIPT_DIRECTORY=`dirname $0`
6QT_LOGGING_CONF=$SCRIPT_DIRECTORY/gallery-logging.config $BUILD_DIR/ubuntu-ui-toolkit-launcher/ubuntu-ui-toolkit-launcher $@ $SCRIPT_DIRECTORY/ubuntu-ui-toolkit-gallery.qml
70
=== added file 'examples/ubuntu-ui-toolkit-gallery/manifest.json.in'
--- examples/ubuntu-ui-toolkit-gallery/manifest.json.in 1970-01-01 00:00:00 +0000
+++ examples/ubuntu-ui-toolkit-gallery/manifest.json.in 2016-03-08 06:42:31 +0000
@@ -0,0 +1,15 @@
1{
2 "architecture": "all",
3 "description": "Component showcase gallery of the Ubuntu user interface toolkit (UITK)",
4 "framework": "ubuntu-sdk-15.04.3",
5 "hooks": {
6 "ubuntu-ui-toolkit-gallery": {
7 "apparmor": "ubuntu-ui-toolkit-gallery.apparmor",
8 "desktop": "ubuntu-ui-toolkit-gallery.desktop"
9 }
10 },
11 "maintainer": "Zoltán Balogh <zoltan.balogh@ubuntu.com>",
12 "name": "com.ubuntu.developer.bzoltan.ubuntu-ui-toolkit-gallery",
13 "title": "Ubuntu UI Toolkit Gallery",
14 "version": "0.5"
15}
016
=== added file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery-click.pro'
--- examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery-click.pro 1970-01-01 00:00:00 +0000
+++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery-click.pro 2016-03-08 06:42:31 +0000
@@ -0,0 +1,36 @@
1TEMPLATE = subdirs
2
3#load Ubuntu specific features
4load(ubuntu-click)
5
6# specify the manifest file, this file is required for click
7# packaging and for the IDE to create runconfigurations
8UBUNTU_MANIFEST_FILE=manifest.json.in
9
10TARGET = ubuntu-ui-toolkit-gallery
11
12QML_FILES += $$files(*.qml,true) \
13 $$files(*.js,true)
14
15CONF_FILES += ubuntu-ui-toolkit-gallery.apparmor \
16 ubuntu-ui-toolkit-gallery.png
17
18OTHER_FILES += $${CONF_FILES} \
19 $${QML_FILES} \
20 ubuntu-ui-toolkit-gallery.desktop
21
22#specify where the qml/js files are installed to
23qml_files.path = /
24qml_files.files += $${QML_FILES}
25
26#specify where the config files are installed to
27config_files.path = /
28config_files.files += $${CONF_FILES}
29
30#install the desktop file, a translated version is
31#automatically created in the build directory
32desktop_file.path = /
33desktop_file.files = ubuntu-ui-toolkit-gallery.desktop
34desktop_file.CONFIG += no_check_exist
35
36INSTALLS+=config_files qml_files desktop_file
037
=== added file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.apparmor'
--- examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.apparmor 1970-01-01 00:00:00 +0000
+++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.apparmor 2016-03-08 06:42:31 +0000
@@ -0,0 +1,9 @@
1{
2 "policy_groups": [
3 "networking"
4 ],
5 "policy_version": 1.3
6}
7
8
9
010
=== modified file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.desktop'
--- examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.desktop 2015-08-06 11:50:01 +0000
+++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.desktop 2016-03-08 06:42:31 +0000
@@ -1,11 +1,11 @@
1[Desktop Entry]1[Desktop Entry]
2Name=Ubuntu UI Toolkit Gallery2Name=Ubuntu UI Toolkit Gallery
3Exec=/usr/bin/ubuntu-ui-toolkit-launcher $@ /usr/lib/ubuntu-ui-toolkit/examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml3Exec=qmlscene %U ubuntu-ui-toolkit-gallery.qml
4Terminal=false4Terminal=false
5Type=Application5Type=Application
6X-Ubuntu-Touch=true6X-Ubuntu-Touch=true
7X-Ubuntu-Gettext-Domain=ubuntu-ui-toolkit-gallery7X-Ubuntu-Gettext-Domain=com.ubuntu.developer.bzoltan.ubuntu-ui-toolkit-gallery
8# Added Icon and Path as a workaround for http://pad.lv/1227359.8# Added Icon and Path as a workaround for http://pad.lv/1227359.
9# TODO remove them once that bug is fixed. --elopio - 2013-09-189# TODO remove them once that bug is fixed. --elopio - 2013-09-18
10Icon=/usr/lib/ubuntu-ui-toolkit/examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.png10Icon=ubuntu-ui-toolkit-gallery.png
11Path=/usr/lib/ubuntu-ui-toolkit/examples/ubuntu-ui-toolkit-gallery/11
1212
=== modified file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.pro'
--- examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.pro 2015-12-02 15:13:43 +0000
+++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.pro 2016-03-08 06:42:31 +0000
@@ -1,6 +1,6 @@
1TEMPLATE = subdirs1TEMPLATE = subdirs
22
3SUBDIRS += Gallery.pro po3SUBDIRS += po
44
5filetypes = qml png svg js jpg qmlproject desktop5filetypes = qml png svg js jpg qmlproject desktop
66
77
=== modified file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml'
--- examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml 2015-09-30 05:59:49 +0000
+++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml 2016-03-08 06:42:31 +0000
@@ -24,7 +24,7 @@
24 objectName: "mainView"24 objectName: "mainView"
2525
26 // Note! applicationName needs to match the .desktop filename26 // Note! applicationName needs to match the .desktop filename
27 applicationName: "ubuntu-ui-toolkit-gallery"27 applicationName: "com.ubuntu.developer.bzoltan.ubuntu-ui-toolkit-gallery"
2828
29 width: units.gu(120)29 width: units.gu(120)
30 height: units.gu(75)30 height: units.gu(75)
3131
=== modified file 'export_modules_dir.sh'
--- export_modules_dir.sh 2015-12-14 13:36:44 +0000
+++ export_modules_dir.sh 2016-03-08 06:42:31 +0000
@@ -19,7 +19,7 @@
19export QML_IMPORT_PATH=$BUILD_DIR/qml19export QML_IMPORT_PATH=$BUILD_DIR/qml
20export QML2_IMPORT_PATH=$BUILD_DIR/qml20export QML2_IMPORT_PATH=$BUILD_DIR/qml
21export UBUNTU_UI_TOOLKIT_THEMES_PATH=$BUILD_DIR/qml21export UBUNTU_UI_TOOLKIT_THEMES_PATH=$BUILD_DIR/qml
22export LD_LIBRARY_PATH=$BUILD_DIR/lib22export LD_LIBRARY_PATH=$BUILD_DIR/lib:$LD_LIBRARY_PATH
23/sbin/initctl set-env --global QML_IMPORT_PATH=$BUILD_DIR/qml23/sbin/initctl set-env --global QML_IMPORT_PATH=$BUILD_DIR/qml
24/sbin/initctl set-env --global QML2_IMPORT_PATH=$BUILD_DIR/qml24/sbin/initctl set-env --global QML2_IMPORT_PATH=$BUILD_DIR/qml
25/sbin/initctl set-env --global UBUNTU_UI_TOOLKIT_THEMES_PATH=$BUILD_DIR/qml25/sbin/initctl set-env --global UBUNTU_UI_TOOLKIT_THEMES_PATH=$BUILD_DIR/qml
2626
=== modified file 'gallery.sh'
--- gallery.sh 2015-11-17 09:17:58 +0000
+++ gallery.sh 2016-03-08 06:42:31 +0000
@@ -17,8 +17,9 @@
1717
18if [ "$1" == "--autopilot" ]18if [ "$1" == "--autopilot" ]
19then19then
20 examples/ubuntu-ui-toolkit-gallery/gallery -testability &20 tests/Gallery/gallery -testability &
21 autopilot vis21 autopilot vis
22else22else
23 examples/ubuntu-ui-toolkit-gallery/gallery $@23 tests/Gallery/gallery $@
24
24fi25fi
2526
=== modified file 'src/Ubuntu/Components/1.2/MainViewBase.qml'
--- src/Ubuntu/Components/1.2/MainViewBase.qml 2015-09-28 12:55:04 +0000
+++ src/Ubuntu/Components/1.2/MainViewBase.qml 2016-03-08 06:42:31 +0000
@@ -48,7 +48,7 @@
4848
49 Qt bug: https://bugreports.qt-project.org/browse/QTBUG-1171249 Qt bug: https://bugreports.qt-project.org/browse/QTBUG-11712
50 */50 */
51 property string themeName: (ColorUtils.luminance(backgroundColor) >= 0.85) ?51 property string themeName: (Toolkit.ColorUtils.luminance(backgroundColor) >= 0.85) ?
52 "Ambiance" : "SuruDark"52 "Ambiance" : "SuruDark"
53 onThemeNameChanged: {53 onThemeNameChanged: {
54 // only change the theme if the current one is a system one.54 // only change the theme if the current one is a system one.
5555
=== modified file 'src/Ubuntu/Components/1.2/Panel.qml'
--- src/Ubuntu/Components/1.2/Panel.qml 2015-04-30 08:32:44 +0000
+++ src/Ubuntu/Components/1.2/Panel.qml 2016-03-08 06:42:31 +0000
@@ -321,7 +321,7 @@
321 name: "moving"321 name: "moving"
322 PropertyChanges {322 PropertyChanges {
323 target: bar323 target: bar
324 position: MathUtils.clamp(draggingArea.mousePosition - internal.movingDelta, 0, bar.size)324 position: Toolkit.MathUtils.clamp(draggingArea.mousePosition - internal.movingDelta, 0, bar.size)
325 }325 }
326 },326 },
327 State {327 State {
328328
=== removed file 'src/Ubuntu/Components/1.2/colorUtils.js'
--- src/Ubuntu/Components/1.2/colorUtils.js 2015-04-30 08:32:44 +0000
+++ src/Ubuntu/Components/1.2/colorUtils.js 1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17.pragma library
18
19function luminance(hexcolor){
20 hexcolor = String(hexcolor)
21 var r = parseInt(hexcolor.substr(1,2),16);
22 var g = parseInt(hexcolor.substr(3,2),16);
23 var b = parseInt(hexcolor.substr(5,2),16);
24 return ((r*212)+(g*715)+(b*73))/1000/255;
25}
260
=== modified file 'src/Ubuntu/Components/1.3/AdaptivePageLayout.qml'
--- src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2015-10-29 10:03:14 +0000
+++ src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2016-03-08 06:42:31 +0000
@@ -17,7 +17,7 @@
17import QtQuick 2.417import QtQuick 2.4
18import QtQuick.Layouts 1.118import QtQuick.Layouts 1.1
19import Ubuntu.Components 1.319import Ubuntu.Components 1.3
20import "tree.js" as Tree20import Ubuntu.Components.Private 1.3
2121
22/*!22/*!
23 \qmltype AdaptivePageLayout23 \qmltype AdaptivePageLayout
@@ -61,8 +61,12 @@
61 primaryPage: page161 primaryPage: page1
62 Page {62 Page {
63 id: page163 id: page1
64 title: "Main page"64 header: PageHeader {
65 id: header
66 title: "Main Page"
67 }
65 Column {68 Column {
69 anchors.top: header.bottom
66 Button {70 Button {
67 text: "Add Page2 above " + page1.title71 text: "Add Page2 above " + page1.title
68 onClicked: page1.pageStack.addPageToCurrentColumn(page1, page2)72 onClicked: page1.pageStack.addPageToCurrentColumn(page1, page2)
@@ -75,11 +79,15 @@
75 }79 }
76 Page {80 Page {
77 id: page281 id: page2
78 title: "Page #2"82 header: PageHeader {
83 title: "Page #2"
84 }
79 }85 }
80 Page {86 Page {
81 id: page387 id: page3
82 title: "Page #3"88 header: PageHeader {
89 title: "Page #3"
90 }
83 }91 }
84 }92 }
85 }93 }
@@ -133,8 +141,12 @@
133 id: page1Component141 id: page1Component
134 Page {142 Page {
135 id: page1143 id: page1
136 title: "Main page"144 header: PageHeader {
145 id: header
146 title: "Main page"
147 }
137 Column {148 Column {
149 anchors.top: header.bottom
138 Button {150 Button {
139 text: "Add Page2 above " + page1.title151 text: "Add Page2 above " + page1.title
140 onClicked: page1.pageStack.addPageToCurrentColumn(page1, page2)152 onClicked: page1.pageStack.addPageToCurrentColumn(page1, page2)
@@ -148,11 +160,15 @@
148 }160 }
149 Page {161 Page {
150 id: page2162 id: page2
151 title: "Page #2"163 header: PageHeader {
164 title: "Page #2"
165 }
152 }166 }
153 Page {167 Page {
154 id: page3168 id: page3
155 title: "Page #3"169 header: PageHeader {
170 title: "Page #3"
171 }
156 }172 }
157 }173 }
158 }174 }
@@ -200,13 +216,17 @@
200 /*!216 /*!
201 The property specifies the source of the primaryPage in case the primary217 The property specifies the source of the primaryPage in case the primary
202 page is created from a Component or loaded from an external document. It218 page is created from a Component or loaded from an external document. It
203 has precedence over \l primaryPage. The page specified in this way will219 has precedence over \l primaryPage.
204 be cerated asynchronously and the instance will be reported through
205 \l primaryPage property.
206 */220 */
207 property var primaryPageSource221 property var primaryPageSource
208222
209 /*!223 /*!
224 The property drives the way the pages should be loaded, synchronously or
225 asynchronously. Defaults to true.
226 */
227 property bool asynchronous: true
228
229 /*!
210 \qmlproperty int columns230 \qmlproperty int columns
211 \readonly231 \readonly
212 The property holds the number of columns shown in the layout.232 The property holds the number of columns shown in the layout.
@@ -228,62 +248,70 @@
228 is created. \c sourcePage must be active.248 is created. \c sourcePage must be active.
229249
230 The function creates the new page asynchronously if the new \c page to be250 The function creates the new page asynchronously if the new \c page to be
231 added is a Component or a QML document. In this case the function returns251 added is a Component or a QML document and the \l asynchronous property is
232 an incubator which can be used to track the page creation.For more about252 set to true. In this case the function returns an incubator which can be
233 incubation in QML and creating components asynchronously, see253 used to track the page creation. For more about incubation in QML and creating
254 components asynchronously, see
234 \l {http://doc.qt.io/qt-5/qml-qtqml-component.html#incubateObject-method}255 \l {http://doc.qt.io/qt-5/qml-qtqml-component.html#incubateObject-method}
235 {Component.incubateObject()}.256 {Component.incubateObject()}.
236 The following example removes an element from the list model whenever the257 The following example removes an element from the list model whenever the
237 page opened in the second column is closed. Note, the example must be run258 page opened in the second column is closed. Note, the example must be run
238 on desktop or on a device with at least 90 grid units screen width.259 on desktop or on a device with at least 90 grid units screen width.
239 \qml260 \qml
240 import QtQuick 2.4261 import QtQuick 2.4
241 import Ubuntu.Components 1.3262 import Ubuntu.Components 1.3
242263
243 MainView {264 MainView {
244 width: units.gu(90)265 width: units.gu(90)
245 height: units.gu(70)266 height: units.gu(70)
246267
247 Component {268 Component {
248 id: page2Component269 id: page2Component
249 Page {270 Page {
250 title: "Second Page"271 header: PageHeader {
251 Button {272 id: header
252 text: "Close me"273 title: "Second Page"
253 onClicked: pageStack.removePages(pageStack.primaryPage);274 }
254 }275 Button {
255 }276 anchors.top: header.bottom
256 }277 text: "Close me"
257278 onClicked: pageStack.removePages(pageStack.primaryPage);
258 AdaptivePageLayout {279 }
259 id: pageLayout280 }
260 anchors.fill: parent281 }
261 primaryPage: Page {282
262 title: "Primary Page"283 AdaptivePageLayout {
263 ListView {284 id: pageLayout
264 id: listView285 anchors.fill: parent
265 anchors.fill: parent286 primaryPage: Page {
266 model: 10287 header: PageHeader {
267 delegate: ListItem {288 title: "Primary Page"
268 Label { text: modelData }289 flickable: listView
269 onClicked: {290 }
270 var incubator = pageLayout.addPageToNextColumn(pageLayout.primaryPage, page2Component);291 ListView {
271 if (incubator && incubator.status == Component.Loading) {292 id: listView
272 incubator.onStatusChanged = function(status) {293 anchors.fill: parent
273 if (status == Component.Ready) {294 model: 10
274 // connect page's destruction to decrement model295 delegate: ListItem {
275 incubator.object.Component.destruction.connect(function() {296 Label { text: modelData }
276 listView.model--;297 onClicked: {
277 });298 var incubator = pageLayout.addPageToNextColumn(pageLayout.primaryPage, page2Component);
278 }299 if (incubator && incubator.status == Component.Loading) {
279 }300 incubator.onStatusChanged = function(status) {
280 }301 if (status == Component.Ready) {
281 }302 // connect page's destruction to decrement model
282 }303 incubator.object.Component.destruction.connect(function() {
283 }304 listView.model--;
284 }305 });
285 }306 }
286 }307 }
308 }
309 }
310 }
311 }
312 }
313 }
314 }
287 \endqml315 \endqml
288316
289 \sa {http://doc.qt.io/qt-5/qml-qtqml-component.html#incubateObject-method}{Component.incubateObject}317 \sa {http://doc.qt.io/qt-5/qml-qtqml-component.html#incubateObject-method}{Component.incubateObject}
@@ -389,7 +417,7 @@
389417
390 property bool internalUpdate: false418 property bool internalUpdate: false
391 property bool completed: false419 property bool completed: false
392 property var tree: new Tree.Tree()420 property var tree: Tree{}
393421
394 property int columns: !layout.layouts.length ?422 property int columns: !layout.layouts.length ?
395 (layout.width >= units.gu(80) ? 2 : 1) :423 (layout.width >= units.gu(80) ? 2 : 1) :
@@ -440,8 +468,7 @@
440 }468 }
441469
442 function createWrapper(page, properties) {470 function createWrapper(page, properties) {
443 var wrapperComponent = Qt.createComponent("PageWrapper.qml");471 var wrapperObject = pageWrapperComponent.createObject(hiddenPages, {synchronous: !layout.asynchronous});
444 var wrapperObject = wrapperComponent.createObject(hiddenPages, {synchronous: false});
445 wrapperObject.pageStack = layout;472 wrapperObject.pageStack = layout;
446 wrapperObject.properties = properties;473 wrapperObject.properties = properties;
447 // set reference last because it will trigger creation of the object474 // set reference last because it will trigger creation of the object
@@ -650,6 +677,13 @@
650 }677 }
651 }678 }
652679
680 Component{
681 id: pageWrapperComponent
682 PageWrapper{
683 }
684 }
685
686
653 // default metrics687 // default metrics
654 Component {688 Component {
655 id: defaultMetrics689 id: defaultMetrics
@@ -675,13 +709,12 @@
675 onTriggered: layout.removePages(wrapper.object)709 onTriggered: layout.removePages(wrapper.object)
676710
677 visible: {711 visible: {
678 var parentWrapper;712 var parentWrapper = d.tree.parent(wrapper);
679 try {713
680 parentWrapper = d.tree.parent(wrapper);714 if (!parentWrapper)
681 } catch(err) {
682 // Root node has no parent node.715 // Root node has no parent node.
683 return false;716 return false;
684 }717
685 if (!wrapper.pageHolder) {718 if (!wrapper.pageHolder) {
686 // columns are being re-arranged.719 // columns are being re-arranged.
687 return false;720 return false;
@@ -705,7 +738,7 @@
705 id: holder738 id: holder
706 active: false739 active: false
707 objectName: "ColumnHolder" + column740 objectName: "ColumnHolder" + column
708 property PageWrapper pageWrapper741 property var pageWrapper: pageWrapperComponent.createObject()
709 property int column742 property int column
710 property alias config: subHeader.config743 property alias config: subHeader.config
711 property PageColumn metrics: getDefaultMetrics()744 property PageColumn metrics: getDefaultMetrics()
@@ -777,6 +810,7 @@
777810
778 property color dividerColor: layout.__propagated.header.dividerColor811 property color dividerColor: layout.__propagated.header.dividerColor
779 property color panelColor: layout.__propagated.header.panelColor812 property color panelColor: layout.__propagated.header.panelColor
813 property color backgroundColor: layout.__propagated.header.backgroundColor
780814
781 visible: !customHeader && holder.pageWrapper && holder.pageWrapper.active815 visible: !customHeader && holder.pageWrapper && holder.pageWrapper.active
782816
@@ -788,13 +822,13 @@
788 if (!page) {822 if (!page) {
789 return false;823 return false;
790 }824 }
791 var parentWrapper;825 var parentWrapper = d.tree.parent(holder.pageWrapper);
792 try {826
793 parentWrapper = d.tree.parent(holder.pageWrapper);827 if (!parentWrapper) {
794 } catch(err) {
795 // Root node has no parent node.828 // Root node has no parent node.
796 return false;829 return false;
797 }830 }
831
798 var nextInColumn = d.tree.top(holder.column, holder.column < d.columns - 1, 1);832 var nextInColumn = d.tree.top(holder.column, holder.column < d.columns - 1, 1);
799 return parentWrapper === nextInColumn;833 return parentWrapper === nextInColumn;
800 }834 }
@@ -809,7 +843,7 @@
809 rightMargin: dividerThickness843 rightMargin: dividerThickness
810 }844 }
811 width: (column == (d.columns - 1)) || !pageWrapper ? 0 : units.dp(1)845 width: (column == (d.columns - 1)) || !pageWrapper ? 0 : units.dp(1)
812 color: theme.palette.selected.background846 color: theme.palette.normal.base
813 MouseArea {847 MouseArea {
814 id: resizerSensing848 id: resizerSensing
815 objectName: "Divider"849 objectName: "Divider"
@@ -834,7 +868,7 @@
834 when: resizerSensing.pressed868 when: resizerSensing.pressed
835 PropertyChanges {869 PropertyChanges {
836 target: verticalDivider870 target: verticalDivider
837 color: Qt.darker(theme.palette.normal.background, 1.5)871 color: Qt.darker(theme.palette.normal.background, 1.7)
838 }872 }
839 }873 }
840 transitions: Transition {874 transitions: Transition {
@@ -891,10 +925,11 @@
891 /*! \internal */925 /*! \internal */
892 // Pages declared as children will be placed directly into hiddenPages926 // Pages declared as children will be placed directly into hiddenPages
893 default property alias data: hiddenPages.data927 default property alias data: hiddenPages.data
894 Item {928 PageTreeNode {
895 id: hiddenPages929 id: hiddenPages
896 objectName: "HiddenPagePool"930 objectName: "HiddenPagePool"
897 visible: false931 visible: false
932 active: false
898 // make sure nothing is shown eventually933 // make sure nothing is shown eventually
899 clip: true934 clip: true
900 anchors.fill: parent935 anchors.fill: parent
901936
=== modified file 'src/Ubuntu/Components/1.3/AppHeader.qml'
--- src/Ubuntu/Components/1.3/AppHeader.qml 2015-12-14 20:38:59 +0000
+++ src/Ubuntu/Components/1.3/AppHeader.qml 2016-03-08 06:42:31 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.417import QtQuick 2.4
18import Ubuntu.Components 1.3 as Components18import Ubuntu.Components.Private 1.3 as Privates
1919
20/*!20/*!
21 \internal21 \internal
@@ -23,7 +23,8 @@
23 \inqmlmodule Ubuntu.Components 1.123 \inqmlmodule Ubuntu.Components 1.1
24 \ingroup ubuntu24 \ingroup ubuntu
25*/25*/
26Components.Header {26Privates.AppHeaderBase {
27 // Note: styleName is set to "PageHeadStyle" in UCAppHeaderBase.
27 id: header28 id: header
2829
29 anchors {30 anchors {
@@ -32,6 +33,11 @@
32 }33 }
3334
34 /*!35 /*!
36 The background color of the header. Value set by MainView.
37 */
38 property color backgroundColor
39
40 /*!
35 The background color of the divider. Value set by MainView.41 The background color of the divider. Value set by MainView.
36 */42 */
37 property color dividerColor43 property color dividerColor
@@ -112,7 +118,12 @@
112 */118 */
113 property QtObject config: null119 property QtObject config: null
114120
115 Component.onCompleted: internal.updateProperties()121 animate: false
122 exposed: false
123 Component.onCompleted: {
124 internal.updateProperties();
125 header.animate = true;
126 }
116 onConfigChanged: internal.updateProperties()127 onConfigChanged: internal.updateProperties()
117128
118 onExposedChanged: {129 onExposedChanged: {
@@ -158,6 +169,4 @@
158 }169 }
159 }170 }
160 }171 }
161
162 styleName: "PageHeadStyle"
163}172}
164173
=== modified file 'src/Ubuntu/Components/1.3/ComboButton.qml'
--- src/Ubuntu/Components/1.3/ComboButton.qml 2015-08-20 06:56:44 +0000
+++ src/Ubuntu/Components/1.3/ComboButton.qml 2016-03-08 06:42:31 +0000
@@ -161,10 +161,68 @@
161 \section2 Styling161 \section2 Styling
162 The style of the component is defined in \l ComboButtonStyle.162 The style of the component is defined in \l ComboButtonStyle.
163 */163 */
164Button {164AbstractButton {
165 id: combo165 id: combo
166166
167 /*!167 /*!
168 \deprecated
169 If set to a color, the button has a stroke border instead of a filled
170 shape.
171 */
172 property color strokeColor
173 onStrokeColorChanged: console.warn(
174 "WARNING: ComboButton.strokeColor is deprecated."
175 )
176
177 /*!
178 \deprecated
179 The background color of the button.
180 */
181 property color color
182 onColorChanged: console.warn("WARNING: ComboButton.color is deprecated.")
183
184 /*!
185 \deprecated
186 The gradient used to fill the background of the button.
187 Standard Ubuntu gradients are defined in \l UbuntuColors.
188 If both a gradient and a color are specified, the gradient will be used.
189 */
190 property Gradient gradient
191 onGradientChanged: console.warn(
192 "WARNING: ComboButton.gradient is deprecated."
193 )
194
195 /*!
196 \deprecated
197 The property specifies the color of the dropdown button and the combo
198 list for both collapsed and expanded states. You can use \l expanded to
199 define different colors for expanded or collapsed states.
200 */
201 property color dropdownColor
202 onDropdownColorChanged: console.warn(
203 "WARNING: ComboButton.dropdownColor is deprecated."
204 )
205
206 /*!
207 The font used for the button's text.
208 */
209 property font font: __styleInstance.defaultFont
210
211 /*!
212 The position of the icon relative to the text. Options
213 are "left" and "right". The default value is "left".
214
215 If only text or only an icon is defined, this
216 property is ignored and the text or icon is
217 centered horizontally and vertically in the button.
218
219 Currently this is a string value. We are waiting for
220 support for enums:
221 https://bugreports.qt-project.org/browse/QTBUG-14861
222 */
223 property string iconPosition: "left"
224
225 /*!
168 Specifies whether the combo list is expanded or not. The default falue is226 Specifies whether the combo list is expanded or not. The default falue is
169 false.227 false.
170 */228 */
@@ -239,33 +297,16 @@
239 */297 */
240 default property alias comboList: comboListHolder.data298 default property alias comboList: comboListHolder.data
241299
242 /* ----------------- Color and font configurations ----------------- */
243 /*!
244 The property specifies the color of the dropdown button and the combo list
245 for both collapsed and expanded states. You can use \l expanded to define
246 different colors for expanded or collapsed states.
247 */
248 property color dropdownColor: __styleInstance ? __styleInstance.defaultDropdownColor : color
249
250
251 styleName: "ComboButtonStyle"300 styleName: "ComboButtonStyle"
252301
253 Component.onCompleted: {302 // update sensing area to report clicks only on the main button area
254 // update mouse area to report clicks only on the main button area303 // area excluding dropDown button and combo list
255 // area excluding dropDown button and combo list304 sensingMargins {
256 // we must do separate bindings as __mouseArea is a read-only property305 bottom: -(combo.height - combo.collapsedHeight)
257 __mouseArea.anchors.fill = undefined;306 right: -combo.__styleInstance.dropDownWidth
258 __mouseArea.anchors.left = Qt.binding(function() {return combo.left;});
259 __mouseArea.anchors.top = Qt.binding(function() {return combo.top;});
260 __mouseArea.anchors.right = Qt.binding(function() {return combo.right;});
261 __mouseArea.anchors.rightMargin = Qt.binding(function() {return combo.__styleInstance.dropDownWidth + combo.__styleInstance.dropDownSeparatorWidth;});
262 __mouseArea.height = Qt.binding(function() {return collapsedHeight;});
263 // for autopilot, set the main button name
264 __mouseArea.objectName = "combobutton_mainbutton";
265
266 // bind a height calculation to avoid unwanted change
267 combo.height = Qt.binding(function() {return collapsedHeight + __styleInstance.comboListPanel.height});
268 }307 }
308 __mouseArea.objectName: "combobutton_mainbutton"
309 height: collapsedHeight + __styleInstance.comboListPanel.height
269310
270 // dropdown button311 // dropdown button
271 AbstractButton {312 AbstractButton {
272313
=== removed file 'src/Ubuntu/Components/1.3/Icon.qdoc'
--- src/Ubuntu/Components/1.3/Icon.qdoc 2015-04-25 08:54:58 +0000
+++ src/Ubuntu/Components/1.3/Icon.qdoc 1970-01-01 00:00:00 +0000
@@ -1,87 +0,0 @@
1/*
2 * Copyright (C) 2014 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17/*!
18 \qmltype Icon
19 \inqmlmodule Ubuntu.Components 1.1
20 \ingroup ubuntu
21 \brief The Icon component displays an icon from the icon theme.
22
23 The icon theme contains a set of standard icons referred to by their name.
24 Using icons whenever possible enhances consistency accross applications.
25 Each icon has a name and can have different visual representations depending
26 on the size requested.
27
28 Icons can also be colorized. Setting the \l color property will make all pixels
29 with the \l keyColor (by default #808080) colored.
30
31 Example:
32 \qml
33 Icon {
34 width: 64
35 height: 64
36 name: "search"
37 }
38 \endqml
39
40 Example of colorization:
41 \qml
42 Icon {
43 width: 64
44 height: 64
45 name: "search"
46 color: UbuntuColors.warmGrey
47 }
48 \endqml
49
50 Icon themes are created following the
51 \l{http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html}{Freedesktop Icon Theme Specification}.
52*/
53
54/*!
55 The name of the icon to display.
56 \qmlproperty string Icon::name
57
58 If both name and source are set, name will be ignored.
59
60 \note The complete list of icons available in Ubuntu is not published yet.
61 For now please refer to the folders where the icon themes are installed:
62 \list
63 \li Ubuntu Touch: \l file:/usr/share/icons/suru
64 \li Ubuntu Desktop: \l file:/usr/share/icons/ubuntu-mono-dark
65 \endlist
66 These 2 separate icon themes will be merged soon.
67*/
68
69/*!
70 The source url of the icon to display. It has precedence over name.
71
72 If both name and source are set, name will be ignored.
73
74 \since Ubuntu.Components 1.1
75 \qmlproperty url Icon::source
76*/
77
78/*!
79 The color that all pixels that originally are of color \l keyColor should take.
80 \qmlproperty color Icon::color
81*/
82
83/*!
84 The color of the pixels that should be colorized.
85 By default it is set to #808080.
86 \qmlproperty color Icon::keyColor
87*/
880
=== added file 'src/Ubuntu/Components/1.3/Icon.qml'
--- src/Ubuntu/Components/1.3/Icon.qml 1970-01-01 00:00:00 +0000
+++ src/Ubuntu/Components/1.3/Icon.qml 2016-03-08 06:42:31 +0000
@@ -0,0 +1,157 @@
1/*
2 * Copyright (C) 2015 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Zsombor Egri <zsombor.egri@canonical.com>
17 * Loic Molinari <loic.molinari@canonical.com>
18 */
19
20import QtQuick 2.4
21
22/*!
23 \qmltype Icon
24 \inqmlmodule Ubuntu.Components 1.3
25 \inherits Item
26 \ingroup ubuntu
27 \brief The Icon component displays an icon from the icon theme.
28
29 The icon theme contains a set of standard icons referred to by their name.
30 Using icons whenever possible enhances consistency accross applications.
31 Each icon has a name and can have different visual representations depending
32 on the size requested.
33
34 Icons can also be colorized. Setting the \l color property will make all pixels
35 with the \l keyColor (by default #808080) colored.
36
37 Example:
38 \qml
39 Icon {
40 width: 64
41 height: 64
42 name: "search"
43 }
44 \endqml
45
46 Example of colorization:
47 \qml
48 Icon {
49 width: 64
50 height: 64
51 name: "search"
52 color: UbuntuColors.warmGrey
53 }
54 \endqml
55
56 Icon themes are created following the
57 \l{http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html}{Freedesktop Icon Theme Specification}.
58*/
59
60Item {
61 id: icon
62
63 /*!
64 The name of the icon to display.
65 \qmlproperty string Icon::name
66
67 If both name and source are set, name will be ignored.
68
69 \note The complete list of icons available in Ubuntu is not published yet.
70 For now please refer to the folders where the icon themes are installed:
71 \list
72 \li Ubuntu Touch: \l file:/usr/share/icons/suru
73 \li Ubuntu Desktop: \l file:/usr/share/icons/ubuntu-mono-dark
74 \endlist
75 These 2 separate icon themes will be merged soon.
76 */
77 property string name
78
79 /*!
80 The color that all pixels that originally are of color \l keyColor should take.
81 \qmlproperty color Icon::color
82 */
83
84 property alias color: colorizedImage.keyColorOut
85
86 /*!
87 The color of the pixels that should be colorized.
88 By default it is set to #808080.
89 \qmlproperty color Icon::keyColor
90 */
91 property alias keyColor: colorizedImage.keyColorIn
92
93 /*!
94 The source url of the icon to display. It has precedence over name.
95
96 If both name and source are set, name will be ignored.
97
98 \since Ubuntu.Components 1.1
99 \qmlproperty url Icon::source
100 */
101
102 property alias source: image.source
103
104 /*!
105 \qmlproperty bool Icon::asynchronous
106 The property drives the image loading of the icon. Defaults to false.
107 */
108 property alias asynchronous: image.asynchronous
109
110 implicitWidth: image.implicitWidth
111 implicitHeight: image.implicitHeight
112
113 Image {
114 id: image
115 objectName: "image"
116 anchors.fill: parent
117 fillMode: Image.PreserveAspectFit
118
119 sourceSize {
120 width: icon.width
121 height: icon.height
122 }
123
124 source: icon.name ? "image://theme/%1".arg(icon.name) : ""
125
126 cache: true
127 visible: !colorizedImage.visible
128 asynchronous: false
129 }
130
131 ShaderEffect {
132 id: colorizedImage
133 objectName: "shader"
134
135 anchors.fill: parent
136
137 // Whether or not a color has been set.
138 visible: image.status == Image.Ready && keyColorOut != Qt.rgba(0.0, 0.0, 0.0, 0.0)
139
140 property Image source: image
141 property color keyColorOut: Qt.rgba(0.0, 0.0, 0.0, 0.0)
142 property color keyColorIn: "#808080"
143 property real threshold: 0.1
144
145 fragmentShader: "
146 varying highp vec2 qt_TexCoord0;
147 uniform sampler2D source;
148 uniform highp vec4 keyColorOut;
149 uniform highp vec4 keyColorIn;
150 uniform lowp float threshold;
151 uniform lowp float qt_Opacity;
152 void main() {
153 lowp vec4 sourceColor = texture2D(source, qt_TexCoord0);
154 gl_FragColor = mix(keyColorOut * vec4(sourceColor.a), sourceColor, step(threshold, distance(sourceColor.rgb / sourceColor.a, keyColorIn.rgb))) * qt_Opacity;
155 }"
156 }
157}
0158
=== modified file 'src/Ubuntu/Components/1.3/MainView.qml'
--- src/Ubuntu/Components/1.3/MainView.qml 2015-10-13 13:37:43 +0000
+++ src/Ubuntu/Components/1.3/MainView.qml 2016-03-08 06:42:31 +0000
@@ -23,9 +23,8 @@
23 \qmltype MainView23 \qmltype MainView
24 \inqmlmodule Ubuntu.Components 1.324 \inqmlmodule Ubuntu.Components 1.3
25 \ingroup ubuntu25 \ingroup ubuntu
26 \inherits StyledItem
26 \brief MainView is the root Item that should be used for all applications.27 \brief MainView is the root Item that should be used for all applications.
27 It automatically adds a header and toolbar for its contents and can
28 rotate its content based on the device orientation.
2928
30 The simplest way to use a MainView is to include a single \l Page object29 The simplest way to use a MainView is to include a single \l Page object
31 inside the MainView:30 inside the MainView:
@@ -38,27 +37,30 @@
38 height: units.gu(60)37 height: units.gu(60)
3938
40 Page {39 Page {
41 title: "Simple page"40 header: PageHeader {
41 id: pageHeader
42 title: "Simple page"
43 }
42 Button {44 Button {
43 anchors.centerIn: parent45 anchors {
46 horizontalCenter: parent.horizontalCenter
47 top: pageHeader.bottom
48 topMargin: units.gu(5)
49 }
50 width: units.gu(15)
44 text: "Push me"51 text: "Push me"
45 width: units.gu(15)
46 onClicked: print("Click!")52 onClicked: print("Click!")
47 }53 }
48 }54 }
49 }55 }
50 \endqml56 \endqml
51 It is not required to set the anchors of the \l Page as it will automatically fill its parent.57 It is not required to set the anchors of the \l Page as it will automatically fill its parent.
52 The MainView has a header that automatically shows the title of the \l Page.58
5359 Do not include multiple Pages directly inside the MainView, but use \l AdaptivePageLayout
54 Do not include multiple Pages directly inside the MainView, but use \l Tabs60 inside MainView to navigate between several Pages.
55 or \l PageStack inside MainView to navigate between several Pages.61
5662 If the \l Page inside the MainView includes a Flickable, set the flickable property of
57 For the MainView to automatically rotate its content following the orientation63 the PageHeader to automatically hide and show the header when the user scrolls up or down:
58 of the device, set the \l automaticOrientation property to true.
59
60 If the \l Page inside the MainView includes a Flickable with enough contents for scrolling,
61 the header will automatically hide and show when the user scrolls up or down:
62 \qml64 \qml
63 import QtQuick 2.465 import QtQuick 2.4
64 import Ubuntu.Components 1.366 import Ubuntu.Components 1.3
@@ -68,9 +70,13 @@
68 height: units.gu(60)70 height: units.gu(60)
6971
70 Page {72 Page {
71 title: "Page with Flickable"73 header: PageHeader {
74 title: "Page with Flickable"
75 flickable: myFlickable
76 }
7277
73 Flickable {78 Flickable {
79 id: myFlickable
74 anchors.fill: parent80 anchors.fill: parent
75 contentHeight: column.height81 contentHeight: column.height
7682
@@ -91,20 +97,12 @@
91 example.97 example.
9298
93 The examples above show how to include a single \l Page inside a MainView, but more99 The examples above show how to include a single \l Page inside a MainView, but more
94 advanced application structures are possible using \l PageStack and \l Tabs.100 advanced application structures are possible using \l AdaptivePageLayout.
95*/101*/
96MainViewBase {102Toolkit.MainViewBase {
97 id: mainView103 id: mainView
98104
99 /*!105 /*! \deprecated */
100 \qmlproperty bool MainView::automaticOrientation
101 \deprecated
102
103 Sets whether the application will be automatically rotating when the
104 device is.
105
106 This property has no significance anymore as the shell rotates.
107 */
108 property bool automaticOrientation: false106 property bool automaticOrientation: false
109107
110 /*!108 /*!
@@ -121,28 +119,10 @@
121 UbuntuApplication.inputMethod.keyboardRectangle.height : 0119 UbuntuApplication.inputMethod.keyboardRectangle.height : 0
122 }120 }
123121
124 // clip the contents so that it does not overlap the header
125 Item {122 Item {
126 id: contentsClipper123 id: contents
127 anchors {124 anchors {
128 left: parent.left125 fill: parent
129 right: parent.right
130 top: headerItem.bottom
131 bottom: parent.bottom
132 }
133 // only clip when necessary
134 // ListView headers may be positioned at the top, independent from
135 // flickable.contentY, so do not clip depending on activePage.flickable.contentY.
136 clip: headerItem.bottomY > 0 && internal.activePage && internal.activePage.flickable
137
138 Item {
139 id: contents
140 anchors {
141 fill: parent
142
143 // compensate so that the actual y is always 0
144 topMargin: -parent.y
145 }
146 }126 }
147 }127 }
148128
@@ -159,6 +139,7 @@
159 property real bottomY: headerItem.y + headerItem.height139 property real bottomY: headerItem.y + headerItem.height
160 dividerColor: Qt.darker(mainView.headerColor, 1.1)140 dividerColor: Qt.darker(mainView.headerColor, 1.1)
161 panelColor: Qt.lighter(mainView.headerColor, 1.1)141 panelColor: Qt.lighter(mainView.headerColor, 1.1)
142 backgroundColor: mainView.headerColor
162143
163 title: internal.activePage ? internal.activePage.title : ""144 title: internal.activePage ? internal.activePage.title : ""
164 pageStack: internal.activePage ? internal.activePage.pageStack : null145 pageStack: internal.activePage ? internal.activePage.pageStack : null
@@ -179,7 +160,8 @@
179 // don't show the application header if the page has its own header.160 // don't show the application header if the page has its own header.
180 visible: !(internal.activePage &&161 visible: !(internal.activePage &&
181 internal.activePage.hasOwnProperty("header") &&162 internal.activePage.hasOwnProperty("header") &&
182 internal.activePage.header)163 internal.activePage.header) &&
164 internal.activePage
183165
184 height: visible ? implicitHeight : 0166 height: visible ? implicitHeight : 0
185167
@@ -250,12 +232,12 @@
250 Used by PageStack. This property only exists in MainView 1.2 and later.232 Used by PageStack. This property only exists in MainView 1.2 and later.
251 */233 */
252 readonly property bool animateHeader: false234 readonly property bool animateHeader: false
253235 }
254 // FIXME: Currently disabled to prevent bug 1461729236
255// readonly property bool animateHeader: headerItem.__styleInstance &&237 backgroundColor: theme.palette.normal.background
256// headerItem.__styleInstance.hasOwnProperty("animateIn") &&238
257// headerItem.__styleInstance.hasOwnProperty("animateOut") &&239 PerformanceOverlay {
258// headerItem.__styleInstance.hasOwnProperty("animateInFinished") &&240 id: performanceOverlay
259// headerItem.__styleInstance.hasOwnProperty("animateOutFinished")241 active: false
260 }242 }
261}243}
262244
=== removed file 'src/Ubuntu/Components/1.3/MainViewBase.qml'
--- src/Ubuntu/Components/1.3/MainViewBase.qml 2015-12-08 18:34:40 +0000
+++ src/Ubuntu/Components/1.3/MainViewBase.qml 1970-01-01 00:00:00 +0000
@@ -1,173 +0,0 @@
1/*
2 * Copyright 2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3 as Toolkit
19import Ubuntu.PerformanceMetrics 1.0
20import QtQuick.Window 2.0
21
22/*!
23 \internal
24 \qmlabstract MainViewBase
25 \inqmlmodule Ubuntu.Components 1.3
26 \ingroup ubuntu
27 \brief The base class for MainView and MultiColumnView.
28*/
29Toolkit.PageTreeNode {
30 id: mainView
31 styleName: "MainViewStyle"
32
33 /*!
34 The property holds the application's name, which must be the same as the
35 desktop file's name.
36 The name also sets the name of the QCoreApplication and defaults for data
37 and cache folders that work on the desktop and under confinement, as well as
38 the default gettext domain.
39 C++ code that writes files may use QStandardPaths::writableLocation with
40 QStandardPaths::DataLocation or QStandardPaths::CacheLocation.
41 */
42 property string applicationName: ""
43
44 /*!
45 The property holds if the application should automatically resize the
46 contents when the input method appears
47
48 The default value is false.
49 */
50 property bool anchorToKeyboard: false
51
52 /*!
53 \qmlproperty color MainView::headerColor
54 Color of the header's background.
55
56 \sa backgroundColor, footerColor
57 */
58 property color headerColor: backgroundColor
59
60 /*!
61 \qmlproperty color MainView::backgroundColor
62 Color of the background.
63
64 The background is usually a single color. However if \l headerColor
65 or \l footerColor are set then a gradient of colors will be drawn.
66
67 For example, in order for the MainView to draw a color gradient beneath
68 the content:
69 \qml
70 import QtQuick 2.4
71 import Ubuntu.Components 1.2
72
73 MainView {
74 width: units.gu(40)
75 height: units.gu(60)
76
77 headerColor: "#343C60"
78 backgroundColor: "#6A69A2"
79 footerColor: "#8896D5"
80 }
81 \endqml
82
83 \sa footerColor, headerColor
84 */
85 property color backgroundColor: theme.palette.normal.background
86
87 /*!
88 \qmlproperty color MainView::footerColor
89 Color of the footer's background.
90
91 \sa backgroundColor, headerColor
92 */
93 property color footerColor: backgroundColor
94
95 Toolkit.Object {
96 id: autoTheme
97 // FIXME: Define the background colors in MainViewStyle and get rid of the properties
98 // in MainViewBase. That removes the need for auto-theming.
99
100 /*
101 As we don't know the order the property bindings and onXXXChanged signals are evaluated
102 we should rely only on one property when changing the theme to avoid intermediate
103 theme changes due to properties being evaluated separately.
104
105 Qt bug: https://bugreports.qt-project.org/browse/QTBUG-11712
106 */
107
108 Connections {
109 target: mainView
110
111 onBackgroundColorChanged: {
112 if (mainView.backgroundColor != theme.palette.normal.background) {
113 // custom color, proceed with auto-theming
114 autoTheme.themeName = (ColorUtils.luminance(backgroundColor) >= 0.85) ?
115 "Ambiance" : "SuruDark";
116 }
117 }
118 }
119
120 property string themeName
121 onThemeNameChanged: {
122 // only change the theme if the current one is a system one.
123 if (themeName !== "" && (theme.name.search("Ubuntu.Components.Themes") == 0)) {
124 mainView.theme.name = "Ubuntu.Components.Themes.%1".arg(themeName);
125 }
126 }
127 }
128
129 /*!
130 \qmlproperty bool MainViewBase::active
131 Root views are active by default.
132 */
133 active: true
134
135 /*!
136 \qmlproperty list<Action> MainViewBase::actions
137 A global list of actions that will be available to the system (including HUD)
138 as long as the application is running. For actions that are not always available to the
139 system, but only when a certain \l Page is active, see the actions property of \l Page.
140 */
141 property alias actions: unityActionManager.actions
142
143 /*!
144 \qmlproperty ActionManager MainView::actionManager
145 \readonly
146
147 The ActionManager that supervises the global and local ActionContexts.
148 The \l actions property should be used preferably since it covers most
149 use cases. The ActionManager is accessible to have a more refined control
150 over the actions, e.g. if one wants to add/remove actions dynamically, create
151 specific action contexts, etc.
152 */
153 property alias actionManager: unityActionManager
154 Toolkit.ActionManager {
155 id: unityActionManager
156 onQuit: {
157 // FIXME Wire this up to the application lifecycle management API instead of quit().
158 Qt.quit()
159 }
160 }
161
162 onApplicationNameChanged: {
163 if (applicationName !== "") {
164 i18n.domain = applicationName;
165 UbuntuApplication.applicationName = applicationName
166 }
167 }
168
169 PerformanceOverlay {
170 id: performanceOverlay
171 active: false
172 }
173}
1740
=== modified file 'src/Ubuntu/Components/1.3/OptionSelector.qml'
--- src/Ubuntu/Components/1.3/OptionSelector.qml 2015-09-28 14:36:54 +0000
+++ src/Ubuntu/Components/1.3/OptionSelector.qml 2016-03-08 06:42:31 +0000
@@ -216,7 +216,7 @@
216216
217 readonly property url chevron: __styleInstance.chevron217 readonly property url chevron: __styleInstance.chevron
218 readonly property url tick: __styleInstance.tick218 readonly property url tick: __styleInstance.tick
219 readonly property color themeColour: theme.palette.selected.fieldText219 readonly property color themeColour: theme.palette.normal.backgroundText
220 readonly property alias colourImage: optionSelector.colourImage220 readonly property alias colourImage: optionSelector.colourImage
221 property bool currentlyExpanded: expanded || multiSelection221 property bool currentlyExpanded: expanded || multiSelection
222222
@@ -264,6 +264,7 @@
264264
265 ListView {265 ListView {
266 id: list266 id: list
267 parent: listContainer.__styleInstance.content
267268
268 property int previousIndex: -1269 property int previousIndex: -1
269 readonly property alias expanded: optionSelector.expanded270 readonly property alias expanded: optionSelector.expanded
270271
=== modified file 'src/Ubuntu/Components/1.3/Page.qml'
--- src/Ubuntu/Components/1.3/Page.qml 2015-12-08 18:34:40 +0000
+++ src/Ubuntu/Components/1.3/Page.qml 2016-03-08 06:42:31 +0000
@@ -15,61 +15,62 @@
15 */15 */
1616
17import QtQuick 2.417import QtQuick 2.4
18import Ubuntu.Components 1.3 as Toolkit1318import Ubuntu.Components 1.3
19import "pageUtils.js" as Utils19import "pageUtils.js" as Utils
2020
21/*!21/*!
22 \qmltype Page22 \qmltype Page
23 \inqmlmodule Ubuntu.Components 1.123 \inqmlmodule Ubuntu.Components 1.3
24 \inherits StyledItem
24 \ingroup ubuntu25 \ingroup ubuntu
25 \brief A page is the basic Item that must be used inside the \l MainView,26 \brief A page is the basic Item that represents a single view in
26 \l PageStack and \l Tabs.27 an Ubuntu application. It is recommended to use the Page inside
28 the \l MainView or \l AdaptivePageLayout.
29
30 \l MainView provides a header for Pages it includes if no
31 \l header property was set. However, the application header is deprecated
32 and it is recommended to set the \l header property instead.
33
27 Anchors and height of a Page are automatically determined to align with34 Anchors and height of a Page are automatically determined to align with
28 the header of the \l MainView, but can be overridden.35 the header of the \l MainView, but can be overridden.
2936 Page contents does not automatically leave space for the Page \l header,
3037 so this must be taken into account when anchoring the contents of the Page.
31 \l MainView provides a header for Pages it includes if no38
32 \l header property was set.39 Example:
33 The text and actions of the header are determined by the \l title40 \qml
34 and \l head properties of the page:41 import QtQuick 2.4
3542 import Ubuntu.Components 1.3
36 \qml43
37 import QtQuick 2.444 MainView {
38 import Ubuntu.Components 1.245 width: units.gu(48)
3946 height: units.gu(60)
40 MainView {47
41 width: units.gu(48)48 Page {
42 height: units.gu(60)49 header: PageHeader {
4350 id: pageHeader
44 Page {51 title: i18n.tr("Example page")
45 title: i18n.tr("Example page")52
4653 trailingActionBar.actions: [
47 Label {54 Action {
48 anchors.centerIn: parent55 iconName: "search"
49 text: i18n.tr("Hello world!")56 text: i18n.tr("Search")
57 }
58 ]
59 }
60
61 Label {
62 anchors {
63 horizontalCenter: parent.horizontalCenter
64 top: pageHeader.bottom
65 topMargin: units.gu(5)
66 }
67 text: i18n.tr("Hello world!")
68 }
50 }69 }
51
52 head.actions: [
53 Action {
54 iconName: "search"
55 text: i18n.tr("Search")
56 },
57 Action {
58 iconName: "contacts"
59 text: i18n.tr("Contacts")
60 }
61 ]
62 }70 }
63 }71 \endqml
64 \endqml
65
66 The Page automatically anchors to the left and bottom of its parent. The width of the Page
67 will be the full width of its parent \l MainView or \l PageStack or \l Tab,
68 and the height will adapt to leave space for the header when needed. It is possible to
69 use a Page inside a Loader, but in that case do not set the anchors or size of the Loader
70 so that the Page can control its width and height.
71*/72*/
72Toolkit13.PageTreeNode {73PageTreeNode {
73 id: page74 id: page
74 anchors {75 anchors {
75 left: parent ? parent.left : undefined76 left: parent ? parent.left : undefined
@@ -78,25 +79,47 @@
78 // Set width and height so that a parent Loader can be automatically resized79 // Set width and height so that a parent Loader can be automatically resized
79 // to the size of the loaded Page.80 // to the size of the loaded Page.
80 width: parentNode ? parentNode.width - page.x : undefined81 width: parentNode ? parentNode.width - page.x : undefined
82 // FIXME: We no longer need to take the internal header height into account
83 // when we remove MainView's AppHeader.
81 height: parentNode ? page.flickable ? parentNode.height : parentNode.height - internal.headerHeight : undefined84 height: parentNode ? page.flickable ? parentNode.height : parentNode.height - internal.headerHeight : undefined
8285
83 /*!86 /*!
87 \qmlproperty ActrionContext Page::actionContext
88 \readonly
89 \since Ubuntu.Components 1.3
90 The action context of the page.
91 */
92 readonly property alias actionContext: localContext
93 ActionContext {
94 id: localContext
95 active: page.active
96 objectName: page.objectName + "Context"
97 }
98
99 /*!
100 \since Ubuntu.Components 1.3
84 The header property for this page. Setting this property will reparent the101 The header property for this page. Setting this property will reparent the
85 header to the page and disable the \l MainView's application header.102 header to the page and disable the \l MainView's application header.
86 \qml103 \qml
87 Page {104 Page {
88 id: page105 id: page
89 title: "Page with header"
90 header: PageHeader {106 header: PageHeader {
91 title: page.title107 title: "Page with header"
92 trailingActionBar.actions: [108 trailingActionBar.actions: [
93 Action { iconName: "settings" },109 Action { iconName: "settings" },
94 Action { iconName: "info" }110 Action { iconName: "info" }
95 ]111 ]
112 flickable: myFlickable
96 }113 }
97 }114 }
98 \endqml115 \endqml
99 \sa PageHeader116 To avoid Page content being occluded by the header, the contents of the Page
117 should anchor to the bottom of the header. When the Page contents is flickable,
118 the contents does not need to be anchored to the header, but it is recommended
119 to use a \l PageHeader or \l Header component as the Page header, and set its
120 \l Header::flickable property so that the Flickable gets a top-margin that
121 leaves enough space for the header.
122 \sa PageHeader, Header
100 */123 */
101 property Item header124 property Item header
102 onHeaderChanged: internal.updateHeader()125 onHeaderChanged: internal.updateHeader()
@@ -105,70 +128,43 @@
105 /*! \internal */128 /*! \internal */
106 isLeaf: true129 isLeaf: true
107130
108 /*!131 /*! \deprecated */
109 The title of the page. Will be shown in the header of the \l MainView.
110 If the page is used inside a \l Tab, the default title is the \l Tab title.
111 For a Page not inside a \l Tab, the default title is an empty string.
112 */
113 property string title: parentNode && parentNode.hasOwnProperty("title") ? parentNode.title : ""132 property string title: parentNode && parentNode.hasOwnProperty("title") ? parentNode.title : ""
114133 /*! \deprecated */
115 /*!
116 Optional flickable that controls the MainView header. This property
117 is automatically set to the first child of the page that is Flickable
118 and anchors to the top of the page or fills the page. For example:
119 \qml
120 import QtQuick 2.4
121 import Ubuntu.Components 1.2
122
123 MainView {
124 width: units.gu(30)
125 height: units.gu(50)
126 Page {
127 id: page
128 title: "example"
129 //flickable: null // uncomment for a fixed header
130 Flickable {
131 id: content
132 anchors.fill: parent
133 contentHeight: units.gu(70)
134 Label {
135 text: "hello"
136 anchors.centerIn: parent
137 }
138 }
139 }
140 }
141 \endqml
142 In this example, page.flickable will automatically be set to content because it is
143 a Flickable and it fills its parent. Thus, scrolling down in the Flickable will automatically
144 hide the header.
145
146 Set this property to null to avoid automatic flickable detection, which disables hiding
147 of the header by scrolling in the Flickable. In cases where a flickable should control the header,
148 but it is not automatically detected, the flickable property can be set.
149 */
150 property Flickable flickable: Utils.getFlickableChild(page)134 property Flickable flickable: Utils.getFlickableChild(page)
151135 /*! \deprecated */
152 /*!
153 \qmlproperty PageHeadConfiguration Page::head
154 \readonly
155 \deprecated
156 Configuration of the header for this page.
157 Deprecated: This configuration will be replaced by setting the \l header property.
158 */
159 readonly property alias head: headerConfig136 readonly property alias head: headerConfig
160 Toolkit13.PageHeadConfiguration {137 PageHeadConfiguration {
161 id: headerConfig138 id: headerConfig
162 title: page.title139 title: page.title
163 flickable: page.flickable140 flickable: page.flickable
141 onFlickableChanged: internal.printDeprecationWarning()
142 onTitleChanged: internal.printDeprecationWarning()
143 onActionsChanged: internal.printDeprecationWarning()
144 onBackActionChanged: internal.printDeprecationWarning()
164 }145 }
165146
166 Toolkit13.Object {147 Object {
167 id: internal148 id: internal
168149
150 property bool showDeprecationWarning: true
151 function printDeprecationWarning() {
152 if (internal.showDeprecationWarning) {
153 var titleStr = page;
154 if (page.title) {
155 titleStr += "\"" + page.title + "\"";
156 }
157 titleStr += ": "
158 print(titleStr + "In Ubuntu.Components 1.3, the use of Page.title, Page.flickable and" +
159 " Page.head is deprecated. Use Page.header and the PageHeader component instead.");
160 internal.showDeprecationWarning = false;
161 }
162 }
163
169 property Item previousHeader: null164 property Item previousHeader: null
170 property Item previousHeaderParent: null165 property Item previousHeaderParent: null
171 function updateHeader() {166 function updateHeader() {
167 internal.showDeprecationWarning = false;
172 if (internal.previousHeader) {168 if (internal.previousHeader) {
173 internal.previousHeader.parent = internal.previousHeaderParent;169 internal.previousHeader.parent = internal.previousHeaderParent;
174 }170 }
175171
=== modified file 'src/Ubuntu/Components/1.3/PageHeadConfiguration.qml'
--- src/Ubuntu/Components/1.3/PageHeadConfiguration.qml 2015-10-01 12:54:32 +0000
+++ src/Ubuntu/Components/1.3/PageHeadConfiguration.qml 2016-03-08 06:42:31 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2015 Canonical Ltd.2 * Copyright 2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -50,7 +50,7 @@
50 PageHeadSections {50 PageHeadSections {
51 id: headSections51 id: headSections
52 }52 }
53 property color foregroundColor: theme.palette.selected.backgroundText53 property color foregroundColor: theme.palette.normal.backgroundText
5454
55 property bool locked: false55 property bool locked: false
5656
5757
=== modified file 'src/Ubuntu/Components/1.3/PageHeader.qml'
--- src/Ubuntu/Components/1.3/PageHeader.qml 2015-12-15 14:20:33 +0000
+++ src/Ubuntu/Components/1.3/PageHeader.qml 2016-03-08 06:42:31 +0000
@@ -32,10 +32,13 @@
32 StyleHints {32 StyleHints {
33 foregroundColor: UbuntuColors.orange33 foregroundColor: UbuntuColors.orange
34 backgroundColor: "black"34 backgroundColor: "black"
35 dividerColor: UbuntuColors.darkGrey35 dividerColor: UbuntuColors.slate
36 }36 }
37 }37 }
38 \endqml38 \endqml
39
40 See \l Header properties that are inherited by PageHeader to control
41 the visibility of the header.
39*/42*/
40Header {43Header {
41 id: header44 id: header
4245
=== modified file 'src/Ubuntu/Components/1.3/PageStack.qml'
--- src/Ubuntu/Components/1.3/PageStack.qml 2015-10-21 19:28:41 +0000
+++ src/Ubuntu/Components/1.3/PageStack.qml 2016-03-08 06:42:31 +0000
@@ -17,6 +17,7 @@
17import QtQuick 2.417import QtQuick 2.4
18import "../1.2/stack.js" as Stack18import "../1.2/stack.js" as Stack
19import Ubuntu.Components 1.319import Ubuntu.Components 1.3
20import Ubuntu.Components.Private 1.3
2021
21/*!22/*!
22 \qmltype PageStack23 \qmltype PageStack
@@ -224,6 +225,13 @@
224 objectName: "pagestack_back_action"225 objectName: "pagestack_back_action"
225 }226 }
226227
228
229 Component {
230 id: pageWrapperComponent
231 PageWrapper{
232 }
233 }
234
227 QtObject {235 QtObject {
228 id: internal236 id: internal
229 property Item headStyle: (pageStack.__propagated237 property Item headStyle: (pageStack.__propagated
@@ -282,8 +290,7 @@
282 property var stack: new Stack.Stack()290 property var stack: new Stack.Stack()
283291
284 function createWrapper(page, properties) {292 function createWrapper(page, properties) {
285 var wrapperComponent = Qt.createComponent("PageWrapper.qml");293 var wrapperObject = pageWrapperComponent.createObject(pageStack);
286 var wrapperObject = wrapperComponent.createObject(pageStack);
287 wrapperObject.pageStack = pageStack;294 wrapperObject.pageStack = pageStack;
288 wrapperObject.properties = properties;295 wrapperObject.properties = properties;
289 // set reference last because it will trigger creation of the object296 // set reference last because it will trigger creation of the object
290297
=== removed file 'src/Ubuntu/Components/1.3/PageWrapper.qml'
--- src/Ubuntu/Components/1.3/PageWrapper.qml 2015-12-08 18:34:40 +0000
+++ src/Ubuntu/Components/1.3/PageWrapper.qml 1970-01-01 00:00:00 +0000
@@ -1,160 +0,0 @@
1/*
2 * Copyright 2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3 as Toolkit
19import "PageWrapperUtils.js" as Utils
20
21/*!
22 \internal
23 \qmltype PageWrapper
24 \inqmlmodule Ubuntu.Components 1.1
25 \ingroup ubuntu
26 \brief Internal class used by \l PageStack
27*/
28Toolkit.PageTreeNode {
29 id: pageWrapper
30 anchors.fill: parent
31
32 /*!
33 The reference to the page object. This can be the page
34 itself (which is an Item), but also a url pointing to a QML file.
35 */
36 property var reference
37
38 /*!
39 The initialized page object, or null if the object needs to be created.
40 */
41 property Item object: null
42
43 /*!
44 This variable will be true if \l object holds an object that was created
45 from the given reference, and thus can be destroyed when no the page is deactivated.
46 */
47 property bool canDestroy: false
48
49 /*!
50 Column number in AdaptivePageLayout.
51 */
52 property int column: 0
53
54 /*!
55 Parent page.
56 */
57 property Item parentPage
58
59 /*!
60 Parent PageWrapper or the parentPage.
61 */
62 property Item parentWrapper
63
64 /*!
65 Page holder in AdaptivePageLayout.
66 */
67 property Item pageHolder
68
69 /*!
70 Instructs to load the page synchronously or not. Used by AdaptivePageLayout.
71 True by default to keep PageStack integrity.
72 */
73 property bool synchronous: true
74
75 /*!
76 Incubator for the asynchronous page creation
77 */
78 property var incubator: null
79
80 /*!
81 Signal emitted when incubator completes page loading.
82 */
83 signal pageLoaded()
84
85 /*!
86 Returns true if the current PageWrapper is a child of the given page
87 */
88 function childOf(page) {
89 if (parentPage == page) return true;
90 if (page && parentWrapper) {
91 var wrapper = parentWrapper;
92 while (wrapper) {
93 if (wrapper.object == page) {
94 return true;
95 }
96 wrapper = wrapper.parentWrapper;
97 }
98 }
99 return false;
100 }
101
102 /*!
103 This value is updated when a PageWrapper is pushed to/popped from a PageStack.
104 */
105 active: false
106
107 /*!
108 \internal
109 */
110 onActiveChanged: {
111 if (reference) {
112 if (pageWrapper.active) Utils.activate(pageWrapper);
113 else Utils.deactivate(pageWrapper);
114 }
115 }
116
117 visible: active
118
119 /*!
120 Properties are use to initialize a new object, or if reference
121 is already an object, properties are copied to the object when activated.
122 Set properties before setting the reference.
123 */
124 property var properties
125
126 /*!
127 \internal
128 */
129 onReferenceChanged: {
130 Utils.deactivate(pageWrapper);
131 if (pageWrapper.object) pageWrapper.object = null;
132 Utils.initPage(pageWrapper);
133 if (pageWrapper.active && reference) {
134 if ((pageWrapper.incubator && pageWrapper.incubator.status == Component.Ready) || pageWrapper.object) {
135 Utils.activate(pageWrapper);
136 } else {
137 // asynchronous, connect page activation
138 pageLoaded.connect(function () {
139 Utils.activate(pageWrapper);
140 });
141 }
142 }
143 }
144
145 /*!
146 \internal
147 */
148 Component.onDestruction: {
149 Utils.deactivate(pageWrapper);
150 if (pageWrapper.canDestroy) Utils.destroyObject(pageWrapper);
151 }
152
153 /*!
154 \internal
155 Destroy \l object. Only call this function if \l canDestroy
156 */
157 function destroyObject() {
158 Utils.destroyObject(pageWrapper);
159 }
160}
1610
=== removed file 'src/Ubuntu/Components/1.3/PageWrapperUtils.js'
--- src/Ubuntu/Components/1.3/PageWrapperUtils.js 2015-10-16 09:18:03 +0000
+++ src/Ubuntu/Components/1.3/PageWrapperUtils.js 1970-01-01 00:00:00 +0000
@@ -1,202 +0,0 @@
1/*
2 * Copyright 2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17/*!
18 \qmltype PageWrapperUtils
19 \inqmlmodule Ubuntu.Components 1.3
20 \ingroup ubuntu
21 \internal
22 \brief Internal book-keeping used by AdaptivePageLayout.
23 */
24
25//.pragma library // FIXME: cannot refer to Component.Error if I use this.
26// FIXME: ideally we would make this a stateless library, but that breaks applications
27// that rely on accessing context variables in pages that were pushed on a PageStack
28// by url (PageStack.push("FileName.qml")) because of a Qt bug:
29// https://bugreports.qt-project.org/browse/QTBUG-31347
30
31/*!
32 \internal
33 \qmlmethod PageWrapperUtils::Incubator(pageWrapper, pageComponent)
34 Incubator wrapper object. Used when page is loaded asynchronously.
35 */
36
37function Incubator(pageWrapper, pageComponent) {
38 // private variable for QmlIncubatorObject
39 var incubator = null;
40
41 // public API
42 this.status = Component.Ready;
43 this.object = null;
44 this.onStatusChanged = null;
45 this.forceCompletion = function () {
46 if (incubator) {
47 incubator.forceCompletion();
48 }
49 }
50
51 // internal function to catch status changes
52 function incubatorStatusChanged(status) {
53 // update wrapper incubator fields
54 pageWrapper.incubator.status = status;
55 pageWrapper.incubator.object = pageWrapper.object = incubator.object;
56
57 // forward state change to the user
58 if (pageWrapper.incubator.onStatusChanged) {
59 // call onStatusChanged
60 pageWrapper.incubator.onStatusChanged(status);
61 }
62
63 // emit pageWrapper's pageLoaded signal to complete page activation
64 if (status === Component.Ready) {
65 pageWrapper.pageLoaded();
66 }
67
68 // cleanup of ready or error
69 if (status !== Component.Loading) {
70 pageWrapper.incubator = null;
71 }
72 }
73
74 function incubatePage() {
75 if (pageComponent.status == Component.Loading) {
76 return;
77 }
78
79 if (pageWrapper.properties) {
80 incubator = pageComponent.incubateObject(pageWrapper, pageWrapper.properties);
81 } else {
82 incubator = pageComponent.incubateObject(pageWrapper);
83 }
84
85 if (!incubator) {
86 throw new Error("Error while loading page: " + pageComponent.errorString());
87 } else if (incubator.status != Component.Ready) {
88 pageWrapper.incubator.status = incubator.status;
89 incubator.onStatusChanged = incubatorStatusChanged;
90 } else {
91 incubatorStatusChanged(incubator.status);
92 }
93 }
94
95 // main
96 pageWrapper.incubator = this;
97 if (pageComponent.status == Component.Loading) {
98 pageComponent.statusChanged.connect(incubatePage);
99 this.status = Component.Loading;
100 }
101 incubatePage();
102}
103
104/*******************************************************
105 *
106 */
107/*!
108 \internal
109 \qmlmethod PageWrapperUtils::initPage(pageWrapper)
110 Initialize pageWrapper.object.
111 */
112function initPage(pageWrapper) {
113 var pageComponent;
114
115 if (pageWrapper.reference.createObject) {
116 // page reference is a component
117 pageComponent = pageWrapper.reference;
118 } else if (typeof pageWrapper.reference == "string") {
119 // page reference is a string (url)
120 if (pageWrapper.synchronous) {
121 pageComponent = Qt.createComponent(pageWrapper.reference);
122 } else {
123 pageComponent = Qt.createComponent(pageWrapper.reference, Component.Asynchronous);
124 }
125 }
126
127 if (pageComponent) {
128 if (pageComponent.status === Component.Error) {
129 throw new Error("Error while loading page: " + pageComponent.errorString());
130 } else {
131 // create the object
132 if (pageWrapper.synchronous) {
133 if (pageWrapper.properties) {
134 // initialize the object with the given properties
135 pageWrapper.object = pageComponent.createObject(pageWrapper, pageWrapper.properties);
136 } else {
137 pageWrapper.object = pageComponent.createObject(pageWrapper);
138 }
139 } else {
140 pageWrapper.incubator = new Incubator(pageWrapper, pageComponent);
141 }
142 pageWrapper.canDestroy = true;
143 }
144 } else {
145 // page reference is an object
146 pageWrapper.object = pageWrapper.reference;
147 pageWrapper.object.parent = pageWrapper;
148 pageWrapper.canDestroy = false;
149
150 // copy the properties to the page object
151 for (var prop in pageWrapper.properties) {
152 if (pageWrapper.properties.hasOwnProperty(prop)) {
153 pageWrapper.object[prop] = pageWrapper.properties[prop];
154 }
155 }
156 }
157
158 return pageWrapper.object;
159}
160
161/*!
162 \internal
163 \qmlmethod PageWrapperUtils::activate(pageWrapper)
164 Create the page object if needed, and make the page object visible.
165 */
166function activate(pageWrapper) {
167 if (!pageWrapper.object) {
168 initPage(pageWrapper);
169 }
170
171 // Having the same page pushed multiple times on a stack changes
172 // the parent of the page object. Change it back here.
173 pageWrapper.object.parent = pageWrapper;
174
175 // Some page objects are invisible initially. Make visible.
176
177 pageWrapper.object.visible = true;
178 pageWrapper.active = true;
179}
180
181/*!
182 \internal
183 \qmlmethod PageWrapperUtils::deactivate(pageWrapper)
184 Hide page object.
185 */
186function deactivate(pageWrapper) {
187 pageWrapper.active = false;
188}
189
190/*!
191 \internal
192 \qmlmethod PageWrapperUtils::destroyObject(pageWrapper)
193 Destroy the page object if pageWrapper.canDestroy is true.
194 Do nothing if pageWrapper.canDestroy is false.
195 */
196function destroyObject(pageWrapper) {
197 if (pageWrapper.canDestroy) {
198 pageWrapper.object.destroy();
199 pageWrapper.object = null;
200 pageWrapper.canDestroy = false;
201 }
202}
2030
=== modified file 'src/Ubuntu/Components/1.3/Panel.qml'
--- src/Ubuntu/Components/1.3/Panel.qml 2015-04-25 08:54:58 +0000
+++ src/Ubuntu/Components/1.3/Panel.qml 2016-03-08 06:42:31 +0000
@@ -321,7 +321,7 @@
321 name: "moving"321 name: "moving"
322 PropertyChanges {322 PropertyChanges {
323 target: bar323 target: bar
324 position: MathUtils.clamp(draggingArea.mousePosition - internal.movingDelta, 0, bar.size)324 position: Toolkit.MathUtils.clamp(draggingArea.mousePosition - internal.movingDelta, 0, bar.size)
325 }325 }
326 },326 },
327 State {327 State {
328328
=== modified file 'src/Ubuntu/Components/1.3/ScrollView.qml'
--- src/Ubuntu/Components/1.3/ScrollView.qml 2015-12-16 15:01:29 +0000
+++ src/Ubuntu/Components/1.3/ScrollView.qml 2016-03-08 06:42:31 +0000
@@ -99,45 +99,45 @@
99 Keys.enabled: true99 Keys.enabled: true
100 Keys.onLeftPressed: {100 Keys.onLeftPressed: {
101 if (horizontalScrollbar.__styleInstance !== null) {101 if (horizontalScrollbar.__styleInstance !== null) {
102 horizontalScrollbar.__styleInstance.scroll(-flickableItem.width*internal.shortScrollingRatio)102 horizontalScrollbar.__styleInstance.scrollBy(-flickableItem.width*internal.shortScrollingRatio, true)
103 }103 }
104 }104 }
105 Keys.onRightPressed: {105 Keys.onRightPressed: {
106 if (horizontalScrollbar.__styleInstance !== null) {106 if (horizontalScrollbar.__styleInstance !== null) {
107 horizontalScrollbar.__styleInstance.scroll(flickableItem.width*internal.shortScrollingRatio)107 horizontalScrollbar.__styleInstance.scrollBy(flickableItem.width*internal.shortScrollingRatio, true)
108 }108 }
109 }109 }
110 Keys.onDownPressed: {110 Keys.onDownPressed: {
111 if (verticalScrollbar.__styleInstance !== null) {111 if (verticalScrollbar.__styleInstance !== null) {
112 verticalScrollbar.__styleInstance.scroll(flickableItem.height*internal.shortScrollingRatio)112 verticalScrollbar.__styleInstance.scrollBy(flickableItem.height*internal.shortScrollingRatio, true)
113 }113 }
114 }114 }
115 Keys.onUpPressed: {115 Keys.onUpPressed: {
116 if (verticalScrollbar.__styleInstance !== null) {116 if (verticalScrollbar.__styleInstance !== null) {
117 verticalScrollbar.__styleInstance.scroll(-flickableItem.height*internal.shortScrollingRatio)117 verticalScrollbar.__styleInstance.scrollBy(-flickableItem.height*internal.shortScrollingRatio, true)
118 }118 }
119 }119 }
120 Keys.onPressed: {120 Keys.onPressed: {
121 if (event.key == Qt.Key_Escape) {121 if (event.key == Qt.Key_Escape) {
122 var scrollbarWithActiveDrag = (horizontalScrollbar.__styleInstance && horizontalScrollbar.__styleInstance.draggingThumb)122 var scrollbarWithActiveDrag = (horizontalScrollbar.__styleInstance && horizontalScrollbar.__styleInstance.draggingThumb && horizontalScrollbar)
123 || (verticalScrollbar.__styleInstance && verticalScrollbar.__styleInstance.draggingThumb)123 || (verticalScrollbar.__styleInstance && verticalScrollbar.__styleInstance.draggingThumb && verticalScrollbar)
124 || null124 || null
125 if (scrollbarWithActiveDrag !== null) {125 if (scrollbarWithActiveDrag !== null) {
126 scrollbarWithActiveDrag.__styleInstance.resetScrollingToPreDrag()126 scrollbarWithActiveDrag.__styleInstance.resetScrollingToPreDrag()
127 event.accepted = true
127 }128 }
128 event.accepted = true
129 } else if (verticalScrollbar.__styleInstance !== null) {129 } else if (verticalScrollbar.__styleInstance !== null) {
130 if (event.key == Qt.Key_PageDown) {130 if (event.key == Qt.Key_PageDown) {
131 verticalScrollbar.__styleInstance.scroll(flickableItem.height*internal.longScrollingRatio)131 verticalScrollbar.__styleInstance.scrollBy(flickableItem.height*internal.longScrollingRatio, true)
132 event.accepted = true132 event.accepted = true
133 } else if (event.key == Qt.Key_PageUp) {133 } else if (event.key == Qt.Key_PageUp) {
134 verticalScrollbar.__styleInstance.scroll(-flickableItem.height*internal.longScrollingRatio)134 verticalScrollbar.__styleInstance.scrollBy(-flickableItem.height*internal.longScrollingRatio, true)
135 event.accepted = true135 event.accepted = true
136 } else if (event.key == Qt.Key_Home) {136 } else if (event.key == Qt.Key_Home) {
137 verticalScrollbar.__styleInstance.scrollToBeginning()137 verticalScrollbar.__styleInstance.scrollToBeginning(true)
138 event.accepted = true138 event.accepted = true
139 } else if (event.key == Qt.Key_End) {139 } else if (event.key == Qt.Key_End) {
140 verticalScrollbar.__styleInstance.scrollToEnd()140 verticalScrollbar.__styleInstance.scrollToEnd(true)
141 event.accepted = true141 event.accepted = true
142 }142 }
143 }143 }
144144
=== modified file 'src/Ubuntu/Components/1.3/Scrollbar.qml'
--- src/Ubuntu/Components/1.3/Scrollbar.qml 2015-12-08 10:58:38 +0000
+++ src/Ubuntu/Components/1.3/Scrollbar.qml 2016-03-08 06:42:31 +0000
@@ -112,11 +112,13 @@
112 simulate the system setting (which will be implemented in unity8, I guess)112 simulate the system setting (which will be implemented in unity8, I guess)
113 True --> Steppers style, non-overlay scrollbars113 True --> Steppers style, non-overlay scrollbars
114 False --> Indicator and Trough styles114 False --> Indicator and Trough styles
115 CURRENTLY UNUSED
115 */116 */
116 property bool __alwaysOnScrollbars: false117 property bool __alwaysOnScrollbars: false
117118
118 /*! internal119 /*! internal
119 Used by ScrollView to tweak Scrollbar's anchoring logic for the always-on scrollbars.120 Used by ScrollView to tweak Scrollbar's anchoring logic for the always-on scrollbars.
121 CURRENTLY UNUSED
120 */122 */
121 property Item __viewport: null123 property Item __viewport: null
122124
123125
=== modified file 'src/Ubuntu/Components/1.3/Sections.qml'
--- src/Ubuntu/Components/1.3/Sections.qml 2015-12-08 21:38:59 +0000
+++ src/Ubuntu/Components/1.3/Sections.qml 2016-03-08 06:42:31 +0000
@@ -80,10 +80,6 @@
80 */80 */
81 property var model: actions81 property var model: actions
82 onModelChanged: {82 onModelChanged: {
83 if (model && model.length > 3) {
84 // FIXME: Make the Sections scrollable for more than 3 sections.
85 console.warn("It is not YET recommended or supported to use more than three sections.");
86 }
87 if (internal.done) {83 if (internal.done) {
88 if (!model || model.length === 0) {84 if (!model || model.length === 0) {
89 selectedIndex = -1;85 selectedIndex = -1;
9086
=== modified file 'src/Ubuntu/Components/1.3/Slider.qml'
--- src/Ubuntu/Components/1.3/Slider.qml 2015-11-18 15:07:15 +0000
+++ src/Ubuntu/Components/1.3/Slider.qml 2016-03-08 06:42:31 +0000
@@ -63,11 +63,11 @@
6363
64 // FIXME(loicm) Add Support for the stepSize property.64 // FIXME(loicm) Add Support for the stepSize property.
6565
66 // /*!66 /*!
67 // The distance between two selectable values in the range defined by67 The distance between two selectable values in the range defined by
68 // [minimumValue, maximumValue].68 [minimumValue, maximumValue].
69 // */69 */
70 // property real stepSize: 1.070 property real stepSize: (Math.abs(minimumValue) + Math.abs(maximumValue)) / 100.0
7171
72 /*!72 /*!
73 The current value of the slider. This property is not changed while the73 The current value of the slider. This property is not changed while the
@@ -175,6 +175,12 @@
175 }175 }
176 }176 }
177177
178 function adjustValue(increment) {
179 if (Qt.application.layoutDirection == Qt.RightToLeft)
180 increment *= -1;
181 slider.value = Toolkit.MathUtils.clamp(slider.value + increment, slider.minimumValue, slider.maximumValue);
182 }
183
178 /* Mimic the behaviour of the 'pressed' property with one important difference:184 /* Mimic the behaviour of the 'pressed' property with one important difference:
179 'pressed' is set to true only after the onPressed handler has been executed.185 'pressed' is set to true only after the onPressed handler has been executed.
180 That prevents us from doing interesting animations upon press.186 That prevents us from doing interesting animations upon press.
@@ -206,5 +212,14 @@
206 onLiveValueChanged: if (isPressed) slider.requestFocus(Qt.MouseFocusReason)212 onLiveValueChanged: if (isPressed) slider.requestFocus(Qt.MouseFocusReason)
207 }213 }
208214
215 Keys.onLeftPressed: {
216 if (event.modifiers === Qt.NoModifier)
217 __internals.adjustValue(-slider.stepSize);
218 }
219 Keys.onRightPressed: {
220 if (event.modifiers === Qt.NoModifier)
221 __internals.adjustValue(slider.stepSize);
222 }
223
209 styleName: "SliderStyle"224 styleName: "SliderStyle"
210}225}
211226
=== modified file 'src/Ubuntu/Components/1.3/TextArea.qml'
--- src/Ubuntu/Components/1.3/TextArea.qml 2015-12-14 15:15:46 +0000
+++ src/Ubuntu/Components/1.3/TextArea.qml 2016-03-08 06:42:31 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2015 Canonical Ltd.2 * Copyright 2015-2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -757,7 +757,6 @@
757757
758 //internals758 //internals
759759
760 opacity: enabled ? 1.0 : 0.3
761 activeFocusOnPress: true760 activeFocusOnPress: true
762 activeFocusOnTab: true761 activeFocusOnTab: true
763762
@@ -768,7 +767,13 @@
768 }767 }
769768
770 // Escape should close the context menu even if the menu takes no input focus769 // Escape should close the context menu even if the menu takes no input focus
771 Keys.onEscapePressed: if (activeFocus && inputHandler.popover) PopupUtils.close(inputHandler.popover)770 Keys.onEscapePressed: {
771 if (activeFocus && inputHandler.popover) {
772 PopupUtils.close(inputHandler.popover)
773 } else {
774 event.accepted = false
775 }
776 }
772777
773 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft778 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
774 LayoutMirroring.childrenInherit: true779 LayoutMirroring.childrenInherit: true
@@ -827,7 +832,7 @@
827 }832 }
828 // hint is shown till user types something in the field833 // hint is shown till user types something in the field
829 visible: (editor.text == "") && !editor.inputMethodComposing834 visible: (editor.text == "") && !editor.inputMethodComposing
830 color: theme.palette.normal.backgroundText835 color: theme.palette.normal.base
831 font: editor.font836 font: editor.font
832 elide: Text.ElideRight837 elide: Text.ElideRight
833 wrapMode: Text.WordWrap838 wrapMode: Text.WordWrap
834839
=== modified file 'src/Ubuntu/Components/1.3/TextField.qml'
--- src/Ubuntu/Components/1.3/TextField.qml 2015-12-22 09:56:19 +0000
+++ src/Ubuntu/Components/1.3/TextField.qml 2016-03-08 06:42:31 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2015 Canonical Ltd.2 * Copyright 2015-2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -833,7 +833,6 @@
833833
834 // internals834 // internals
835835
836 opacity: enabled ? 1.0 : 0.3
837 activeFocusOnPress: true836 activeFocusOnPress: true
838 activeFocusOnTab: true837 activeFocusOnTab: true
839838
@@ -844,7 +843,13 @@
844 }843 }
845844
846 // Escape should close the context menu even if the menu takes no input focus845 // Escape should close the context menu even if the menu takes no input focus
847 Keys.onEscapePressed: if (activeFocus && inputHandler.popover) PopupUtils.close(inputHandler.popover)846 Keys.onEscapePressed: {
847 if (activeFocus && inputHandler.popover) {
848 PopupUtils.close(inputHandler.popover)
849 } else {
850 event.accepted = false
851 }
852 }
848853
849 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft854 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
850 LayoutMirroring.childrenInherit: true855 LayoutMirroring.childrenInherit: true
@@ -897,10 +902,13 @@
897 onChildrenChanged: {902 onChildrenChanged: {
898 // reparenting903 // reparenting
899 for (var i = 0; i < children.length; i++) {904 for (var i = 0; i < children.length; i++) {
900 children[i].parent = leftPane;905 var child = children[i];
901 children[i].anchors.verticalCenter = verticalCenter;906 child.parent = leftPane;
902 children[i].activeFocusOnPress = false;907 child.anchors.verticalCenter = verticalCenter;
903 children[i].activeFocusOnTab = false;908 if (child.hasOwnProperty("activeFocusOnPress")) {
909 child.activeFocusOnPress = false;
910 }
911 child.activeFocusOnTab = false;
904 }912 }
905 }913 }
906 }914 }
@@ -921,10 +929,13 @@
921 onChildrenChanged: {929 onChildrenChanged: {
922 // reparenting930 // reparenting
923 for (var i = 0; i < children.length; i++) {931 for (var i = 0; i < children.length; i++) {
924 children[i].parent = rightPane;932 var child = children[i];
925 children[i].anchors.verticalCenter = verticalCenter;933 child.parent = rightPane;
926 children[i].activeFocusOnPress = false;934 child.anchors.verticalCenter = verticalCenter;
927 children[i].activeFocusOnTab = false;935 if (child.hasOwnProperty("activeFocusOnPress")) {
936 child.activeFocusOnPress = false;
937 }
938 child.activeFocusOnTab = false;
928 }939 }
929 }940 }
930 }941 }
@@ -977,7 +988,7 @@
977 }988 }
978 // hint is shown till user types something in the field989 // hint is shown till user types something in the field
979 visible: (editor.text == "") && !editor.inputMethodComposing990 visible: (editor.text == "") && !editor.inputMethodComposing
980 color: theme.palette.normal.backgroundText991 color: theme.palette.normal.baseText
981 font: editor.font992 font: editor.font
982 elide: Text.ElideRight993 elide: Text.ElideRight
983 }994 }
984995
=== modified file 'src/Ubuntu/Components/1.3/Toolbar.qml'
--- src/Ubuntu/Components/1.3/Toolbar.qml 2015-12-15 15:08:49 +0000
+++ src/Ubuntu/Components/1.3/Toolbar.qml 2016-03-08 06:42:31 +0000
@@ -35,7 +35,7 @@
35 width: label.width + units.gu(4)35 width: label.width + units.gu(4)
36 height: parent.height36 height: parent.height
37 Rectangle {37 Rectangle {
38 color: UbuntuColors.darkGrey38 color: UbuntuColors.slate
39 opacity: 0.139 opacity: 0.1
40 anchors.fill: parent40 anchors.fill: parent
41 visible: button.pressed41 visible: button.pressed
4242
=== modified file 'src/Ubuntu/Components/1.3/UbuntuColors.qml'
--- src/Ubuntu/Components/1.3/UbuntuColors.qml 2015-04-25 08:54:58 +0000
+++ src/Ubuntu/Components/1.3/UbuntuColors.qml 2016-03-08 06:42:31 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 Copyright 2014 Canonical Ltd.2 Copyright 2016 Canonical Ltd.
3 *3 *
4 This program is free software; you can redistribute it and/or modify4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by5 it under the terms of the GNU Lesser General Public License as published by
@@ -19,7 +19,7 @@
1919
20/*!20/*!
21 \qmltype UbuntuColors21 \qmltype UbuntuColors
22 \inqmlmodule Ubuntu.Components 1.122 \inqmlmodule Ubuntu.Components 1.3
23 \ingroup ubuntu23 \ingroup ubuntu
24 \brief Singleton defining the Ubuntu color palette.24 \brief Singleton defining the Ubuntu color palette.
2525
@@ -37,13 +37,10 @@
37 \endqml37 \endqml
38*/38*/
39QtObject {39QtObject {
40 // old colors from UbuntuColors 1.0:
4140
42 /*!41 /*---------------------------------------------------------------
43 Orange. Recommended for branded elements, display progress42 Deprecated colors
44 and intensity, textual links on light backgrounds.43 ---------------------------------------------------------------*/
45 */
46 readonly property color orange: "#DD4814"
47 /*!44 /*!
48 \deprecated45 \deprecated
49 Ubuntu supporting color: light aubergine46 Ubuntu supporting color: light aubergine
@@ -72,7 +69,7 @@
7269
73 /*!70 /*!
74 Ubuntu orange gradient71 Ubuntu orange gradient
7572 \deprecated
76 \sa Button::gradient73 \sa Button::gradient
77 */74 */
78 property Gradient orangeGradient: Gradient {75 property Gradient orangeGradient: Gradient {
@@ -81,7 +78,7 @@
81 }78 }
82 /*!79 /*!
83 Ubuntu grey gradient80 Ubuntu grey gradient
8481 \deprecated
85 \sa Button::gradient82 \sa Button::gradient
86 */83 */
87 property Gradient greyGradient: Gradient {84 property Gradient greyGradient: Gradient {
@@ -89,39 +86,61 @@
89 GradientStop { position: 1.0; color: "#BBBBBB" }86 GradientStop { position: 1.0; color: "#BBBBBB" }
90 }87 }
9188
92 // New colors introduced in UbuntuColors 1.1:89 /*---------------------------------------------------------------
90 Supported colors
91 ---------------------------------------------------------------*/
92 /*!
93 Orange. Recommended for branded elements, display progress
94 and intensity, textual links on light backgrounds.
95 */
96 readonly property color orange: "#E95420"
9397
94 /*!98 /*!
99 \deprecated
95 Light grey. Recommended for neutral action buttons and100 Light grey. Recommended for neutral action buttons and
96 secondary text.101 secondary text.
97 \since Ubuntu.Components 1.1102 \since Ubuntu.Components 1.1
98 */103 */
99 readonly property color lightGrey: "#929292"104 readonly property color lightGrey: "#cdcdcd"
100105
101 /*!106 /*!
107 Silk. Recommended for neutral action buttons and
108 secondary text.
109 \since Ubuntu.Components 1.3
110 */
111 readonly property color silk: "#cdcdcd"
112
113 /*!
114 \deprecated
102 Dark grey. Recommended for text and action icons.115 Dark grey. Recommended for text and action icons.
103 \since Ubuntu.Components 1.1116 \since Ubuntu.Components 1.1
104 */117 */
105 readonly property color darkGrey: "#5d5d5d"118 readonly property color darkGrey: "#5d5d5d"
106119
107 /*!120 /*!
121 Slate. Recommended for text and action icons.
122 \since Ubuntu.Components 1.3
123 */
124 readonly property color slate: "#5d5d5d"
125
126 /*!
108 Red. Recommended for negative and irreversible action127 Red. Recommended for negative and irreversible action
109 buttons, errors and alerts.128 buttons, errors and alerts.
110 \since Ubuntu.Components 1.1129 \since Ubuntu.Components 1.1
111 */130 */
112 readonly property color red: "#f32c36"131 readonly property color red: "#ed3146"
113132
114 /*!133 /*!
115 Green. Recommended for positive action buttons.134 Green. Recommended for positive action buttons.
116 \since Ubuntu.Components 1.1135 \since Ubuntu.Components 1.1
117 */136 */
118 readonly property color green: "#00a132"137 readonly property color green: "#3eb34f"
119138
120 /*!139 /*!
121 Blue. Recommended for text selection and text cursor.140 Blue. Recommended for text selection and text cursor.
122 \since Ubuntu.Components 1.1141 \since Ubuntu.Components 1.1
123 */142 */
124 readonly property color blue: "#12a3d8"143 readonly property color blue: "#19b6ee"
125144
126 /*!145 /*!
127 Purple. Recommended for proper nouns in146 Purple. Recommended for proper nouns in
@@ -129,4 +148,34 @@
129 \since Ubuntu.Components 1.1148 \since Ubuntu.Components 1.1
130 */149 */
131 readonly property color purple: "#762572"150 readonly property color purple: "#762572"
151
152 /*!
153 Porcelain. Recommended for foregrounds.
154 \since Ubuntu.Components 1.3
155 */
156 readonly property color porcelain: "#f7f7f7"
157
158 /*!
159 Ash. Recommended for subtitles and other tertiary content.
160 \since Ubuntu.Components 1.3
161 */
162 readonly property color ash: "#888888"
163
164 /*!
165 Graphite. Recommended for coloring dark themes' background.
166 \since Ubuntu.Components 1.3
167 */
168 readonly property color graphite: "#666666"
169
170 /*!
171 Inkstone. Recommended for foreground colors in dark themes.
172 \since Ubuntu.Components 1.3
173 */
174 readonly property color inkstone: "#3b3b3b"
175
176 /*!
177 Jet. Recommended for content coloring.
178 \since Ubuntu.Components 1.3
179 */
180 readonly property color jet: "#111111"
132}181}
133182
=== removed file 'src/Ubuntu/Components/1.3/colorUtils.js'
--- src/Ubuntu/Components/1.3/colorUtils.js 2015-07-24 18:25:07 +0000
+++ src/Ubuntu/Components/1.3/colorUtils.js 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
1/*
2 * Copyright (C) 2013-2015 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17/*!
18 \internal
19 \qmltype colorUtils
20 \inqmlmodule Ubuntu.Components 1.3
21 \ingroup ubuntu
22 \brief Various chromatic utility functions.
23 */
24
25.pragma library
26
27/*!
28 \qmlmethod colorUtils::luminance(hexcolor)
29 Get the luminance for a color.
30 */
31function luminance(hexcolor){
32 hexcolor = String(hexcolor)
33 var r = parseInt(hexcolor.substr(1,2),16);
34 var g = parseInt(hexcolor.substr(3,2),16);
35 var b = parseInt(hexcolor.substr(5,2),16);
36 return ((r*212)+(g*715)+(b*73))/1000/255;
37}
380
=== removed file 'src/Ubuntu/Components/1.3/tree.js'
--- src/Ubuntu/Components/1.3/tree.js 2015-07-17 16:27:55 +0000
+++ src/Ubuntu/Components/1.3/tree.js 1970-01-01 00:00:00 +0000
@@ -1,182 +0,0 @@
1/*
2 * Copyright 2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17.pragma library
18
19function Tree() {
20 // list<object> of nodes
21 var nodes = [];
22
23 // list<int> of stems
24 var stems = [];
25
26 // list<int> of indices of parent nodes
27 var parents = [];
28
29 // int number of nodes in the tree
30 var size = 0;
31
32 // Return the index of the given node.
33 // Returns -1 the node was not found.
34 this.index = function(node) {
35 return nodes.indexOf(node);
36 }
37
38 // Add newNode to the tree in the specified stem, with the specified parent node.
39 // The root node should be added with parentNode null. All other nodes must be added
40 // with a parentNode that is already in the tree.
41 this.add = function(stem, parentNode, newNode) {
42 if (this.index(newNode) !== -1) {
43 throw "Cannot add the same node twice to a tree.";
44 }
45 if (size === 0) {
46 // adding root node
47 if (parentNode !== null) {
48 throw "Root node must have parentNode null.";
49 }
50 } else {
51 // adding non-root node
52 if (parentNode === null) {
53 throw "Only root node has parentNode null."
54 }
55 if (this.index(parentNode) === -1) {
56 throw "Cannot add non-root node if parentNode is not in the tree.";
57 }
58 }
59 nodes.push(newNode);
60 stems.push(stem);
61 parents.push(parentNode);
62 size++;
63 }
64
65 // Remove all nodes from the specified stem and higher stems.
66 //
67 // Returns the removed nodes.
68 this.prune = function(stem) {
69 var newNodes = [];
70 var newStems = [];
71 var newParents = [];
72 var removedNodes = [];
73 for (var i = 0; i < nodes.length; i++) {
74 if (stems[i] < stem) {
75 newNodes.push(nodes[i]);
76 newStems.push(stems[i]);
77 newParents.push(parents[i]);
78 } else {
79 removedNodes.push(nodes[i]);
80 }
81 }
82 nodes = newNodes;
83 stems = newStems;
84 parents = newParents;
85 size = nodes.length;
86 return removedNodes;
87 }
88
89 // Chops all nodes with an index higher than the given node which
90 // are in the same stem or a higher stem.
91 //
92 // If, and only if, (inclusive) then also chop the given node.
93 //
94 // Default values for node and inclusive are top() and true.
95 // Returns a list that contains the nodes that were chopped.
96 this.chop = function(node, inclusive) {
97 node = typeof node !== 'undefined' ? node : this.top();
98 inclusive = typeof inclusive !== 'undefined' ? inclusive : true
99 var nodeIndex = this.index(node);
100 if (nodeIndex < 0) {
101 // given node is not in the tree.
102 return [];
103 }
104 if (inclusive) {
105 size = nodeIndex;
106 } else {
107 size = nodeIndex + 1;
108 }
109
110 // Nodes with index(node) >= nodeIndex && stem >= stems[nodeIndex];
111 var badNodes = []; // to fill below
112
113 // Nodes with index(node) >= nodeIndex (any stem).
114 // Potential bad nodes to be removed.
115 var uglyNodes = nodes.slice(size);
116 var uglyStems = stems.slice(size); // to check below
117 var uglyParents = parents.slice(size);
118
119 var stem = stems[nodeIndex];
120 // Good nodes, with index(node) < nodeIndex && stem < stems[nodeIndex]:
121 nodes = nodes.slice(0, size);
122 stems = stems.slice(0, size);
123 parents = parents.slice(0, size);
124
125 // Add nodes with index(node) > nodeIndex && stem < stems[nodeIndex] back:
126 for (var i = 0; i < uglyNodes.length; i++) {
127 if (uglyStems[i] < stem) {
128 // Because the stem of the parentNode <= stem of the node,
129 // the node that is added back has the parentNode in nodes.
130 nodes.push(uglyNodes[i]);
131 stems.push(uglyStems[i]);
132 parents.push(uglyParents[i]);
133 size++;
134 } else {
135 badNodes.push(uglyNodes[i]);
136 }
137 }
138 return badNodes;
139 }
140
141 // Returns the n'th node when traversing one or more stems from the
142 // top down. When exactMatch, only the specified stem is traversed, and
143 // when !exactMatch the specified stem and all higher stems are traversed.
144 //
145 // Returns null if no matching node was found.
146 //
147 // Default value for stem: 0
148 // Default value for exactMatch: false
149 // Default value for n: 0 (first node)
150 //
151 // Calling top() with no parameters returns top(0, false, 0) which is the
152 // last node that was added to the tree.
153 this.top = function(stem, exactMatch, n) {
154 stem = typeof stem !== 'undefined' ? stem : 0
155 exactMatch = typeof exactMatch !== 'undefined' ? exactMatch : false
156 n = typeof n !== 'undefined' ? n : 0
157
158 var st;
159 var count = n;
160 for (var i = size - 1; i >= 0; i--) {
161 st = stems[i];
162 if ((exactMatch && st === stem) || (!exactMatch && st >= stem)) {
163 count--;
164 }
165 if (count < 0) {
166 return nodes[i];
167 }
168 }
169 return null;
170 }
171
172 // Return the parent node of the specified node in the tree
173 this.parent = function(node) {
174 var i = nodes.indexOf(node);
175 if (i === -1) {
176 throw "Specified node not found in tree.";
177 } else if (i === 0) {
178 throw "Root node has no parent node.";
179 }
180 return parents[i];
181 }
182}
1830
=== modified file 'src/Ubuntu/Components/ComponentModule.pro'
--- src/Ubuntu/Components/ComponentModule.pro 2015-12-17 13:48:23 +0000
+++ src/Ubuntu/Components/ComponentModule.pro 2016-03-08 06:42:31 +0000
@@ -31,7 +31,6 @@
31 1.2/AppHeader.qml \31 1.2/AppHeader.qml \
32 1.2/Captions.qml \32 1.2/Captions.qml \
33 1.2/CheckBox.qml \33 1.2/CheckBox.qml \
34 1.2/colorUtils.js \
35 1.2/ComboButton.qml \34 1.2/ComboButton.qml \
36 1.2/CrossFadeImage10.qml \35 1.2/CrossFadeImage10.qml \
37 1.2/CrossFadeImage11.qml \36 1.2/CrossFadeImage11.qml \
@@ -92,7 +91,6 @@
92 1.3/dateUtils.js \91 1.3/dateUtils.js \
93 1.3/DraggingArea.qml \92 1.3/DraggingArea.qml \
94 1.3/InputHandler.qml \93 1.3/InputHandler.qml \
95 1.3/MainViewBase.qml \
96 1.3/MainView.qml \94 1.3/MainView.qml \
97 1.3/OptionSelectorDelegate.qml \95 1.3/OptionSelectorDelegate.qml \
98 1.3/OptionSelector.qml \96 1.3/OptionSelector.qml \
@@ -103,8 +101,6 @@
103 1.3/Page.qml \101 1.3/Page.qml \
104 1.3/PageStack.qml \102 1.3/PageStack.qml \
105 1.3/pageUtils.js \103 1.3/pageUtils.js \
106 1.3/PageWrapper.qml \
107 1.3/PageWrapperUtils.js \
108 1.3/Panel.qml \104 1.3/Panel.qml \
109 1.3/ProgressBar.qml \105 1.3/ProgressBar.qml \
110 1.3/PullToRefresh.qml \106 1.3/PullToRefresh.qml \
@@ -122,7 +118,6 @@
122 1.3/Toolbar.qml \118 1.3/Toolbar.qml \
123 1.3/ToolbarButton.qml \119 1.3/ToolbarButton.qml \
124 1.3/ToolbarItems.qml \120 1.3/ToolbarItems.qml \
125 1.3/tree.js \
126 1.3/UbuntuColors.qml \121 1.3/UbuntuColors.qml \
127 1.3/UbuntuListView.qml \122 1.3/UbuntuListView.qml \
128 1.3/UbuntuNumberAnimation.qml \123 1.3/UbuntuNumberAnimation.qml \
@@ -131,7 +126,8 @@
131 1.3/PageColumnsLayout.qml \126 1.3/PageColumnsLayout.qml \
132 1.3/ProgressionSlot.qml \127 1.3/ProgressionSlot.qml \
133 1.3/ScrollView.qml \128 1.3/ScrollView.qml \
134 1.3/PageHeader.qml129 1.3/PageHeader.qml \
130 1.3/Icon.qml
135131
136OTHER_FILES+= qmldir \132OTHER_FILES+= qmldir \
137 1.3/CrossFadeImage.qdoc \133 1.3/CrossFadeImage.qdoc \
138134
=== modified file 'src/Ubuntu/Components/ListItems/1.2/ItemSelector.qml'
--- src/Ubuntu/Components/ListItems/1.2/ItemSelector.qml 2015-04-30 08:32:44 +0000
+++ src/Ubuntu/Components/ListItems/1.2/ItemSelector.qml 2016-03-08 06:42:31 +0000
@@ -70,7 +70,7 @@
7070
71 Component {71 Component {
72 id: selectorDelegate72 id: selectorDelegate
73 Toolkit.OptionSelectorDelegate { text: name; subText: description; iconSource: image }73 OptionSelectorDelegate { text: name; subText: description; iconSource: image }
74 }74 }
7575
76 ListModel {76 ListModel {
7777
=== modified file 'src/Ubuntu/Components/ListItems/1.3/Empty.qml'
--- src/Ubuntu/Components/ListItems/1.3/Empty.qml 2015-09-21 14:44:13 +0000
+++ src/Ubuntu/Components/ListItems/1.3/Empty.qml 2016-03-08 06:42:31 +0000
@@ -277,6 +277,8 @@
277 }277 }
278 }278 }
279279
280 // exposed for OptionSelector
281 property alias __highlight: highlight
280 Rectangle {282 Rectangle {
281 id: highlight283 id: highlight
282284
@@ -291,7 +293,7 @@
291 top: parent.top293 top: parent.top
292 }294 }
293 height: emptyListItem.height - bottomDividerLine.height295 height: emptyListItem.height - bottomDividerLine.height
294 color: theme.palette.selected.background296 color: theme.palette.highlighted.background
295 }297 }
296298
297 ThinDivider {299 ThinDivider {
298300
=== modified file 'src/Ubuntu/Components/ListItems/1.3/ItemSelector.qml'
--- src/Ubuntu/Components/ListItems/1.3/ItemSelector.qml 2015-09-28 14:36:54 +0000
+++ src/Ubuntu/Components/ListItems/1.3/ItemSelector.qml 2016-03-08 06:42:31 +0000
@@ -70,7 +70,7 @@
7070
71 Component {71 Component {
72 id: selectorDelegate72 id: selectorDelegate
73 Toolkit.OptionSelectorDelegate { text: name; subText: description; iconSource: image }73 OptionSelectorDelegate { text: name; subText: description; iconSource: image }
74 }74 }
7575
76 ListModel {76 ListModel {
7777
=== modified file 'src/Ubuntu/Components/ListItems/1.3/LabelVisual.qml'
--- src/Ubuntu/Components/ListItems/1.3/LabelVisual.qml 2015-09-07 10:05:58 +0000
+++ src/Ubuntu/Components/ListItems/1.3/LabelVisual.qml 2016-03-08 06:42:31 +0000
@@ -31,7 +31,14 @@
31 }31 }
3232
33 elide: Text.ElideRight33 elide: Text.ElideRight
34 color: selected ? UbuntuColors.orange : secondary ? overlay ? theme.palette.normal.overlayText : theme.palette.normal.backgroundText34 color: selected
35 : overlay ? theme.palette.selected.overlayText : theme.palette.selected.backgroundText35 ? theme.palette.selected.backgroundText
36 : (secondary
37 ? (overlay
38 ? theme.palette.normal.overlaySecondaryText
39 : theme.palette.normal.backgroundSecondaryText)
40 : (overlay
41 ? theme.palette.normal.overlayText
42 : theme.palette.normal.backgroundText))
36 opacity: label.enabled ? 1.0 : 0.543 opacity: label.enabled ? 1.0 : 0.5
37}44}
3845
=== modified file 'src/Ubuntu/Components/ListItems/1.3/Standard.qml'
--- src/Ubuntu/Components/ListItems/1.3/Standard.qml 2015-12-21 19:43:34 +0000
+++ src/Ubuntu/Components/ListItems/1.3/Standard.qml 2016-03-08 06:42:31 +0000
@@ -172,7 +172,7 @@
172 bottom: parent.bottom172 bottom: parent.bottom
173 left: parent.left173 left: parent.left
174 }174 }
175 color: theme.palette.selected.background175 color: theme.palette.highlighted.background
176 }176 }
177177
178 Rectangle {178 Rectangle {
@@ -185,7 +185,7 @@
185 bottom: parent.bottom185 bottom: parent.bottom
186 right: parent.right186 right: parent.right
187 }187 }
188 color: theme.palette.selected.background188 color: theme.palette.highlighted.background
189 }189 }
190190
191 IconVisual {191 IconVisual {
192192
=== modified file 'src/Ubuntu/Components/Popups/1.3/Dialog.qml'
--- src/Ubuntu/Components/Popups/1.3/Dialog.qml 2015-12-14 08:27:39 +0000
+++ src/Ubuntu/Components/Popups/1.3/Dialog.qml 2016-03-08 06:42:31 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2015 Canonical Ltd.2 * Copyright 2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -99,7 +99,7 @@
99 the caller, if possible.99 the caller, if possible.
100 */100 */
101 property Item caller101 property Item caller
102 onCallerChanged: console.debug("caller DEPRECATED")102 onCallerChanged: console.warn("'caller' is DEPRECATED. It has no effect.")
103103
104 /*!104 /*!
105 The property holds the margins from the dialog's dismissArea. The property105 The property holds the margins from the dialog's dismissArea. The property
@@ -180,6 +180,13 @@
180 height: childrenRect.height + foreground.margins180 height: childrenRect.height + foreground.margins
181 onWidthChanged: updateChildrenWidths();181 onWidthChanged: updateChildrenWidths();
182182
183 // put the context into this component to save ActionContext lookup
184 PopupContext {
185 id: localContext
186 objectName: dialog.objectName + "DialogContext"
187 active: foreground.visible
188 }
189
183 Label {190 Label {
184 horizontalAlignment: Text.AlignHCenter191 horizontalAlignment: Text.AlignHCenter
185 text: dialog.title192 text: dialog.title
@@ -187,14 +194,14 @@
187 maximumLineCount: 2194 maximumLineCount: 2
188 elide: Text.ElideRight195 elide: Text.ElideRight
189 textSize: Label.Large196 textSize: Label.Large
190 color: UbuntuColors.darkGrey197 color: theme.palette.normal.overlayText
191 visible: (text !== "")198 visible: (text !== "")
192 }199 }
193200
194 Label {201 Label {
195 horizontalAlignment: Text.AlignHCenter202 horizontalAlignment: Text.AlignHCenter
196 text: dialog.text203 text: dialog.text
197 color: UbuntuColors.darkGrey204 color: theme.palette.normal.overlayText
198 wrapMode: Text.Wrap205 wrapMode: Text.Wrap
199 visible: (text !== "")206 visible: (text !== "")
200 }207 }
201208
=== modified file 'src/Ubuntu/Components/Popups/1.3/Popover.qml'
--- src/Ubuntu/Components/Popups/1.3/Popover.qml 2015-12-09 12:34:18 +0000
+++ src/Ubuntu/Components/Popups/1.3/Popover.qml 2016-03-08 06:42:31 +0000
@@ -227,6 +227,14 @@
227 right: parent.right227 right: parent.right
228 }228 }
229 height: childrenRect.height229 height: childrenRect.height
230
231 // put the PopupContext inside the container to save one step
232 // in the context lookup
233 PopupContext {
234 id: popupContext
235 objectName: popover.objectName + "PopupContext"
236 active: foreground.visible
237 }
230 }238 }
231239
232 onWidthChanged: internal.updatePosition()240 onWidthChanged: internal.updatePosition()
233241
=== modified file 'src/Ubuntu/Components/Themes/1.3/Palette.qml'
--- src/Ubuntu/Components/Themes/1.3/Palette.qml 2015-04-24 14:34:39 +0000
+++ src/Ubuntu/Components/Themes/1.3/Palette.qml 2016-03-08 06:42:31 +0000
@@ -48,12 +48,32 @@
48*/48*/
49QtObject {49QtObject {
50 /*!50 /*!
51 Color palette to use when the widget is not in any particular state.51 Color palette to use when the widget is in the default state.
52 */52 */
53 property PaletteValues normal: PaletteValues{}53 property PaletteValues normal: PaletteValues{}
54
55 /*!
56 Color palette to use when the widget is in the disabled (enabled: false)
57 state.
58 \since Ubuntu.Components.Themes 1.3
59 */
60 property PaletteValues disabled: PaletteValues{}
61
54 /*!62 /*!
55 Color palette to use when the widget is selected, for example when63 Color palette to use when the widget is selected, for example when
56 a tab is the current one.64 a tab is the current one.
57 */65 */
58 property PaletteValues selected: PaletteValues{}66 property PaletteValues selected: PaletteValues{}
67
68 /*!
69 Color palette to use when the widget is selected and disabled.
70 \since Ubuntu.Components.Themes 1.3
71 */
72 property PaletteValues selectedDisabled: PaletteValues{}
73
74 /*!
75 Color palette values to use when the widget is highlighted.
76 \since Ubuntu.Components.Themes 1.3
77 */
78 property PaletteValues highlighted: PaletteValues{}
59}79}
6080
=== modified file 'src/Ubuntu/Components/Themes/1.3/PaletteValues.qml'
--- src/Ubuntu/Components/Themes/1.3/PaletteValues.qml 2015-04-24 14:34:39 +0000
+++ src/Ubuntu/Components/Themes/1.3/PaletteValues.qml 2016-03-08 06:42:31 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2013 Canonical Ltd.2 * Copyright 2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -33,6 +33,17 @@
33 */33 */
34 property color backgroundText34 property color backgroundText
35 /*!35 /*!
36 Color applied to secondary content on the \l background color.
37 \since Ubuntu.Components.Themes 1.3
38 */
39 property color backgroundSecondaryText
40 /*!
41 Color applied to tertiary content on the \l background color.
42 \since Ubuntu.Components.Themes 1.3
43 */
44 property color backgroundTertiaryText
45
46 /*!
36 Color applied to the background of widgets.47 Color applied to the background of widgets.
37 */48 */
38 property color base49 property color base
@@ -41,6 +52,7 @@
41 Typically used for labels and images.52 Typically used for labels and images.
42 */53 */
43 property color baseText54 property color baseText
55
44 /*!56 /*!
45 Color applied to widgets on top of the base colour.57 Color applied to widgets on top of the base colour.
46 */58 */
@@ -50,9 +62,26 @@
50 Typically used for labels and images.62 Typically used for labels and images.
51 */63 */
52 property color foregroundText64 property color foregroundText
65
66 /*!
67 Color applied to widgets on top of any layer, background or base.
68 \since Ubuntu.Components.Themes 1.3
69 */
70 property color raised
71 /*!
72 Color applied to elements placed on top of the \l raised color.
73 \since Ubuntu.Components.Themes 1.3
74 */
75 property color raisedText
76 /*!
77 Color applied to seconday elements placed on top of the \l raised color.
78 \since Ubuntu.Components.Themes 1.3
79 */
80 property color raisedSecondaryText
81
53 /*!82 /*!
54 Color applied to the background of widgets floating over other widgets.83 Color applied to the background of widgets floating over other widgets.
55 For example: popovers, Toolbar.84 For example popovers, menus, dialogs.
56 */85 */
57 property color overlay86 property color overlay
58 /*!87 /*!
@@ -61,7 +90,13 @@
61 */90 */
62 property color overlayText91 property color overlayText
63 /*!92 /*!
64 Colour applied to the backgrouhnd of text input fields.93 Color applied to secondary elements placed on top of the \l overlay color.
94 \since Ubuntu.Components.Themes 1.3
95 */
96 property color overlaySecondaryText
97
98 /*!
99 Colour applied to the background of text input fields.
65 */100 */
66 property color field101 property color field
67 /*!102 /*!
@@ -69,8 +104,59 @@
69 Typically used for labels and images.104 Typically used for labels and images.
70 */105 */
71 property color fieldText106 property color fieldText
107
108 /*!
109 Colour applied to the positive actions.
110 \since Ubuntu.Components.Themes 1.3
111 */
112 property color positive
113 /*!
114 Color applied to elements placed on top of the \l positive color.
115 \since Ubuntu.Components.Themes 1.3
116 */
117 property color positiveText
118
119 /*!
120 Colour applied to the negative actions.
121 \since Ubuntu.Components.Themes 1.3
122 */
123 property color negative
124 /*!
125 Color applied to elements placed on top of the \l negative color.
126 \since Ubuntu.Components.Themes 1.3
127 */
128 property color negativeText
129
130 /*!
131 Colour applied to the activity colors. Typical example is progress indication,
132 activity indication.
133 \since Ubuntu.Components.Themes 1.3
134 */
135 property color activity
136 /*!
137 Color applied to elements placed on top of the \l activity color.
138 \since Ubuntu.Components.Themes 1.3
139 */
140 property color activityText
141
72 /*!142 /*!
73 Color applied to selected text in editable components.143 Color applied to selected text in editable components.
74 */144 */
75 property color selection145 property color selection
146 /*!
147 Color applied to elements placed on top of the \l selection color.
148 \since Ubuntu.Components.Themes 1.3
149 */
150 property color selectionText
151
152 /*!
153 Color applied for the focus frame drawn around the active focus component
154 if it was focused using keyboard navigation.
155 */
156 property color focus
157
158 /*!
159 Color applied to elements placed on top of the \l focus color.
160 */
161 property color focusText
76}162}
77163
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.2/MainViewStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.2/MainViewStyle.qml 2015-04-24 14:52:19 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.2/MainViewStyle.qml 2016-03-08 06:42:31 +0000
@@ -40,6 +40,13 @@
40 anchors.fill: parent40 anchors.fill: parent
41 color: styledItem.backgroundColor41 color: styledItem.backgroundColor
42 gradient: internals.isGradient ? backgroundGradient : null42 gradient: internals.isGradient ? backgroundGradient : null
43 visible: internals.isGradient
44 }
45
46 Binding {
47 target: typeof window != 'undefined' ? window : null
48 property: "color"
49 value: styledItem.backgroundColor
43 }50 }
4451
45 Image {52 Image {
4653
=== added file 'src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml 1970-01-01 00:00:00 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml 2016-03-08 06:42:31 +0000
@@ -0,0 +1,49 @@
1/*
2 * Copyright 2016 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19import Ubuntu.Components.Themes 1.3
20
21PaletteValues {
22 background: "#FFFFFF"
23 backgroundText: UbuntuColors.jet
24 backgroundSecondaryText: UbuntuColors.slate
25 backgroundTertiaryText: UbuntuColors.ash
26 base: UbuntuColors.silk
27 baseText: UbuntuColors.ash
28 foreground: UbuntuColors.porcelain
29 foregroundText: UbuntuColors.jet
30 raised: "#FFFFFF"
31 raisedText: UbuntuColors.slate
32 raisedSecondaryText: UbuntuColors.silk
33 overlay: "#FFFFFF"
34 overlayText: UbuntuColors.slate
35 overlaySecondaryText: UbuntuColors.silk
36 field: "#FFFFFF"
37 fieldText: UbuntuColors.jet
38 focus: UbuntuColors.orange
39 focusText: "#FFFFFF"
40 selection: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.2)
41 selectionText: UbuntuColors.jet
42 positive: UbuntuColors.green
43 positiveText: "#FFFFFF"
44 negative: UbuntuColors.red
45 negativeText: "#FFFFFF"
46 activity: UbuntuColors.blue
47 activityText: "#FFFFFF"
48}
49
050
=== added file 'src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml 1970-01-01 00:00:00 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml 2016-03-08 06:42:31 +0000
@@ -0,0 +1,27 @@
1/*
2 * Copyright 2016 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19
20AmbianceNormal {
21 background: UbuntuColors.porcelain
22 backgroundText: UbuntuColors.blue
23 backgroundTertiaryText: UbuntuColors.blue
24 base: UbuntuColors.ash
25 baseText: UbuntuColors.blue
26 foreground: UbuntuColors.ash
27}
028
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeHintStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeHintStyle.qml 2015-11-06 06:29:11 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeHintStyle.qml 2016-03-08 06:42:31 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2015 Canonical Ltd.2 * Copyright 2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -25,6 +25,14 @@
2525
26 readonly property BottomEdgeHint hint: styledItem26 readonly property BottomEdgeHint hint: styledItem
2727
28 property color backgroundColor: styledItem.enabled
29 ? theme.palette.normal.overlay
30 : theme.palette.disabled.overlay
31
32 property color foregroundColor: styledItem.enabled
33 ? theme.palette.normal.overlayText
34 : theme.palette.disabled.overlayText
35
28 // translate hint status into state36 // translate hint status into state
29 state: {37 state: {
30 switch (hint.status) {38 switch (hint.status) {
@@ -102,7 +110,8 @@
102 centerIn: parent110 centerIn: parent
103 topMargin: styledItem.height111 topMargin: styledItem.height
104 }112 }
105 name: "up"113 name: "toolkit_bottom-edge-hint"
114 color: foregroundColor
106 }115 }
107116
108 Rectangle {117 Rectangle {
@@ -114,7 +123,7 @@
114 topMargin: styledItem.height123 topMargin: styledItem.height
115 }124 }
116 height: styledItem.height125 height: styledItem.height
117 color: theme.palette.normal.overlay126 color: backgroundColor
118 ThinDivider {127 ThinDivider {
119 anchors.top: parent.top128 anchors.top: parent.top
120 }129 }
@@ -133,13 +142,13 @@
133 width: height142 width: height
134 height: units.gu(2)143 height: units.gu(2)
135 anchors.verticalCenter: parent.verticalCenter144 anchors.verticalCenter: parent.verticalCenter
136 color: theme.palette.normal.overlayText145 color: foregroundColor
137 }146 }
138 Label {147 Label {
139 id: label148 id: label
140 text: styledItem.text149 text: styledItem.text
141 textSize: Label.Medium150 textSize: Label.Medium
142 color: theme.palette.normal.overlayText151 color: foregroundColor
143 height: styledItem.height152 height: styledItem.height
144 anchors.verticalCenter: parent.verticalCenter153 anchors.verticalCenter: parent.verticalCenter
145 verticalAlignment: Text.AlignVCenter154 verticalAlignment: Text.AlignVCenter
146155
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeStyle.qml 2015-12-10 16:39:45 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/BottomEdgeStyle.qml 2016-03-08 06:42:31 +0000
@@ -27,7 +27,9 @@
27 revealThreshold: bottomEdge.hint.height + units.gu(2)27 revealThreshold: bottomEdge.hint.height + units.gu(2)
2828
29 // own styling properties29 // own styling properties
30 property color backgroundColor: Qt.rgba(0, 0, 0, Math.min(0.25, (height - revealThreshold - panelItem.y) / (height - revealThreshold)))30 property color backgroundColor: !panelItem.collapsing
31 ? Qt.rgba(0, 0, 0, Math.min(0.25, (height - revealThreshold - panelItem.y) / (height - revealThreshold)))
32 : "transparent"
31 property color panelColor: theme.palette.normal.overlay33 property color panelColor: theme.palette.normal.overlay
32 property color shadowColor: "#000000"34 property color shadowColor: "#000000"
3335
@@ -43,6 +45,7 @@
43 Rectangle {45 Rectangle {
44 id: panelItem46 id: panelItem
45 objectName: "bottomedge_panel"47 objectName: "bottomedge_panel"
48 property bool collapsing: false
46 anchors {49 anchors {
47 left: parent.left50 left: parent.left
48 right: parent.right51 right: parent.right
@@ -57,6 +60,12 @@
5760
58 Behavior on anchors.topMargin { UbuntuNumberAnimation { id: panelBehavior } }61 Behavior on anchors.topMargin { UbuntuNumberAnimation { id: panelBehavior } }
5962
63 Connections {
64 target: bottomEdge
65 onCollapseStarted: panelItem.collapsing = true
66 onCollapseCompleted: panelItem.collapsing = false
67 }
68
60 state: bottomEdge.status > BottomEdge.Hidden ? "drop-hint" : ""69 state: bottomEdge.status > BottomEdge.Hidden ? "drop-hint" : ""
61 states: [70 states: [
62 State {71 State {
6372
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/BubbleShape.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/BubbleShape.qml 2015-07-22 13:14:43 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/BubbleShape.qml 2016-03-08 06:42:31 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2015 Canonical Ltd.2 * Copyright 2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -28,15 +28,14 @@
28 /*!28 /*!
29 The background color of the bubble.29 The background color of the bubble.
30 */30 */
31 property color color: square ? theme.palette.normal.background : theme.palette.normal.overlay31 property color color: square
32 ? theme.palette.normal.background
33 : theme.palette.normal.overlay
3234
33 property point target35 property point target
34 property string direction: "down"36 property string direction: "down"
35 property bool clipContent: false37 property bool clipContent: false
36 default property alias children: content.children38 default property alias children: content.children
37 // FIXME: This should not be necessary. See
38 // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1214978
39 property alias arrowSource: arrow.source
4039
41 implicitWidth: units.gu(10)40 implicitWidth: units.gu(10)
42 implicitHeight: units.gu(8)41 implicitHeight: units.gu(8)
@@ -111,7 +110,7 @@
111 UbuntuShape {110 UbuntuShape {
112 anchors.fill: parent111 anchors.fill: parent
113 aspect: UbuntuShape.Flat112 aspect: UbuntuShape.Flat
114 backgroundColor: theme.palette.normal.overlay113 backgroundColor: bubbleShape.color
115 source: bubbleShape.clipContent ? shapeSource : null114 source: bubbleShape.clipContent ? shapeSource : null
116 visible: !square115 visible: !square
117 }116 }
@@ -139,34 +138,4 @@
139 visible: bubbleShape.clipContent138 visible: bubbleShape.clipContent
140 }139 }
141 }140 }
142
143 Item {
144 x: target.x
145 y: target.y
146
147 Image {
148 id: arrow
149
150 visible: !square && bubbleShape.direction != "none"
151
152 function directionToRotation(direction) {
153 switch (direction) {
154 case "up":
155 return 180;
156 case "left":
157 return 90;
158 case "right":
159 return -90;
160 default: // "down" or "none"
161 return 0;
162 }
163 }
164
165 x: -width / 2.0
166 y: -height
167 transformOrigin: Item.Bottom
168 rotation: directionToRotation(bubbleShape.direction)
169 source: Qt.resolvedUrl("../artwork/bubble_arrow.png")
170 }
171 }
172}141}
173142
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/CheckBoxStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/CheckBoxStyle.qml 2015-12-09 14:45:54 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/CheckBoxStyle.qml 2016-03-08 06:42:31 +0000
@@ -23,19 +23,21 @@
23 /*!23 /*!
24 The padding between the background shape and the outside border of the checkbox.24 The padding between the background shape and the outside border of the checkbox.
25 */25 */
26 property real backgroundPadding: units.gu(0.33)26 property real backgroundPadding: 0
2727
28 /*!28 /*!
29 The background color when the checkbox is not checked.29 The background color when the checkbox is not checked.
30 */30 */
31 property color uncheckedBackgroundColor: Qt.rgba(theme.palette.normal.foreground.r,31 property color uncheckedBackgroundColor: styledItem.enabled
32 theme.palette.normal.foreground.g,32 ? theme.palette.normal.foreground
33 theme.palette.normal.foreground.b, 0.2)33 : theme.palette.disabled.foreground
3434
35 /*!35 /*!
36 The background color when the checkbox is checked.36 The background color when the checkbox is checked.
37 */37 */
38 property color checkedBackgroundColor: UbuntuColors.green38 property color checkedBackgroundColor: styledItem.enabled
39 ? theme.palette.normal.positive
40 : theme.palette.disabled.raised
3941
40 /*!42 /*!
41 The image to show inside the checkbox when it is checked.43 The image to show inside the checkbox when it is checked.
@@ -45,17 +47,17 @@
45 /*!47 /*!
46 The color of the icon.48 The color of the icon.
47 */49 */
48 property color iconColor: theme.palette.normal.foregroundText50 property color iconColor: styledItem.enabled
51 ? theme.palette.normal.positiveText
52 : theme.palette.disabled.raisedText
4953
50 /*!54 /*!
51 The padding between the icon and the border of the thumb.55 The padding between the icon and the border of the thumb.
52 */56 */
53 property real iconPadding: backgroundPadding57 property real iconPadding: units.gu(0.4)
5458
55 opacity: enabled ? 1.0 : 0.559 implicitWidth: units.gu(2)
5660 implicitHeight: units.gu(2)
57 implicitWidth: units.gu(3)
58 implicitHeight: units.gu(3)
5961
60 FocusShape {62 FocusShape {
61 }63 }
6264
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/ComboButtonStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/ComboButtonStyle.qml 2015-12-09 14:25:50 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/ComboButtonStyle.qml 2016-03-08 06:42:31 +0000
@@ -23,20 +23,16 @@
2323
24 // configurations24 // configurations
25 dropDownWidth: units.gu(5)25 dropDownWidth: units.gu(5)
26 dropDownSeparatorWidth: units.dp(2)
27 comboListMargin: units.gu(0.8)26 comboListMargin: units.gu(0.8)
28 comboListHolder: comboListContent27 comboListHolder: comboListContent
29 comboListPanel: panelItem28 comboListPanel: panelItem
30 defaultColor: mainButton.defaultColor29 defaultColor: mainButton.defaultColor
31 defaultGradient: mainButton.defaultGradient30 defaultGradient: mainButton.defaultGradient
32 defaultDropdownColor: combo.expanded ? Qt.rgba(0, 0, 0, 0.05) : defaultColor31 defaultDropdownColor: mainButton.defaultColor
33 defaultFont: mainButton.defaultFont32 defaultFont: mainButton.defaultFont
3433
3534 width: styledItem.width
36 width: combo.width35 height: styledItem.collapsedHeight
37 height: combo.collapsedHeight
38
39 property ComboButton combo: styledItem
4036
41 implicitWidth: mainButton.implicitWidth37 implicitWidth: mainButton.implicitWidth
42 implicitHeight: mainButton.implicitHeight38 implicitHeight: mainButton.implicitHeight
@@ -44,25 +40,159 @@
44 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft40 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
45 LayoutMirroring.childrenInherit: true41 LayoutMirroring.childrenInherit: true
4642
47 ButtonStyle {43 Item {
48 id: mainButton44 id: mainButton
45
46 property real minimumWidth: units.gu(36)
47 property real horizontalPadding: units.gu(4)
48 property color defaultColor: theme.palette.normal.foreground
49 property font defaultFont: Qt.font({family: "Ubuntu", pixelSize: FontUtils.sizeToPixels("medium")})
50 property Gradient defaultGradient: null
51 property real buttonFaceOffset: -dropDownWidth/2
52 property bool stroke: false
53
54 /*!
55 The property overrides the button's default background with an item. This
56 item can be used by derived styles to reuse the ButtonStyle and override
57 the default coloured background with an image or any other drawing.
58 The default value is null.
59 */
60 property Item backgroundSource: comboFace
61
49 anchors {62 anchors {
50 left: parent.left63 left: parent.left
51 top: parent.top64 top: parent.top
52 right: parent.right65 right: parent.right
53 }66 }
54 height: combo.collapsedHeight67 width: styledItem.width
55 // overrides68 height: styledItem.collapsedHeight
56 backgroundSource: comboFace69 implicitWidth: Math.max(
57 buttonFaceOffset: -dropDownWidth/2 - dropDownSeparatorWidth70 minimumWidth, foreground.implicitWidth + 2 * mainButton.horizontalPadding
58 horizontalPadding: units.gu(4) - dropDownSeparatorWidth71 )
59 minimumWidth: units.gu(36)72 implicitHeight: units.gu(4)
6073
61 // FIXME: use hardcoded color while we get the theme palette updated74 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
62 defaultColor: "#b2b2b2"75 LayoutMirroring.childrenInherit: true
63 defaultGradient: null76
6477 UbuntuShape {
65 // button face78 id: background
79 anchors.fill: parent
80 borderSource: "radius_idle.sci" // Deprecated, use a dedicated shape.
81 visible: mainButton.stroke ? false : ((backgroundColor.a != 0.0) || mainButton.backgroundSource)
82 source: mainButton.backgroundSource
83
84 backgroundColor: defaultColor
85 backgroundMode: UbuntuShape.SolidColor
86 opacity: styledItem.enabled ? 1.0 : 0.6
87 }
88
89 Item {
90 id: foreground
91
92 property string iconPosition: styledItem.iconPosition
93 property real iconSize: units.gu(2)
94 property real spacing: mainButton.horizontalPadding
95 property bool hasIcon: styledItem.iconSource != ""
96 property bool hasText: styledItem.text != ""
97
98 anchors {
99 centerIn: parent
100 horizontalCenterOffset: mainButton.buttonFaceOffset
101 }
102 transformOrigin: Item.Top
103 width: parent.width - 2*mainButton.horizontalPadding
104 implicitHeight: Math.max(foregroundIcon.height, foregroundLabel.height)
105 scale: styledItem.pressed ? 0.98 : 1.0
106 Behavior on scale {
107 NumberAnimation {
108 duration: UbuntuAnimation.SnapDuration
109 easing.type: Easing.Linear
110 }
111 }
112 state: foreground.hasIcon && hasText ? iconPosition : "center"
113
114 Icon {
115 id: foregroundIcon
116 visible: foreground.hasIcon
117 anchors.verticalCenter: parent.verticalCenter
118 width: foreground.iconSize
119 height: foreground.iconSize
120 color: foregroundLabel.color
121 source: styledItem.iconSource
122 }
123
124 Label {
125 id: foregroundLabel
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to status/vote changes: