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