Merge lp:~elopio/ubuntu-ui-toolkit/swipe_into_view into lp:ubuntu-ui-toolkit
- swipe_into_view
- Merge into trunk
Proposed by
Leo Arias
Status: | Superseded | ||||||||
---|---|---|---|---|---|---|---|---|---|
Proposed branch: | lp:~elopio/ubuntu-ui-toolkit/swipe_into_view | ||||||||
Merge into: | lp:ubuntu-ui-toolkit | ||||||||
Prerequisite: | lp:~elopio/ubuntu-ui-toolkit/fix1275060-list_view_out_of_view | ||||||||
Diff against target: |
19699 lines (+8258/-3744) 442 files modified
CHANGES (+23/-9) components.api (+108/-98) debian/control (+5/-1) debian/rules (+2/-2) documentation/overview.qdoc (+15/-10) documentation/resolution-independence.qdoc (+3/-3) documentation/snippets/layouts/SimpleLayout.qml (+2/-2) documentation/snippets/layouts/layout1.qml (+2/-2) documentation/snippets/layouts/layout2.qml (+2/-2) documentation/snippets/layouts/layout3.qml (+2/-2) documentation/snippets/layouts/layout6.qml (+2/-2) documentation/snippets/layouts/layout7.qml (+2/-2) documentation/snippets/statesaver/ColorChanger.qml (+1/-1) documentation/snippets/statesaver/MultiplePropertySaver.qml (+1/-1) documentation/snippets/statesaver/PropertyGroupSaver.qml (+1/-1) documentation/snippets/statesaver/PropertyGroupSaver2.qml (+1/-1) documentation/ubuntu-components-listitems.qdoc (+1/-1) documentation/ubuntu-components-pickers.qdoc (+1/-1) documentation/ubuntu-components-popups.qdoc (+1/-1) documentation/ubuntu-components.qdoc (+1/-1) documentation/ubuntu-layouts.qdoc (+6/-1) examples/calculator/calculator.qml (+2/-2) examples/calculator/components/DefaultLayout.qml (+2/-2) examples/calculator/components/Functions.qml (+2/-2) examples/jokes/jokes.qml (+1/-1) examples/locale/locale.qml (+2/-2) examples/ubuntu-ui-toolkit-gallery/Buttons.qml (+65/-1) examples/ubuntu-ui-toolkit-gallery/Label.qml (+1/-1) examples/unit-converter/unit-converter.qml (+1/-1) manual-tests/button.qml (+1/-1) modules/Ubuntu/Components/AbstractButton.qml (+1/-1) modules/Ubuntu/Components/Action.qml (+1/-1) modules/Ubuntu/Components/ActionItem.qml (+10/-1) modules/Ubuntu/Components/ActionList.qml (+1/-1) modules/Ubuntu/Components/ActivityIndicator.qml (+1/-1) modules/Ubuntu/Components/AnimatedItem.qml (+1/-1) modules/Ubuntu/Components/Button.qml (+6/-1) modules/Ubuntu/Components/CheckBox.qml (+1/-1) modules/Ubuntu/Components/ComboButton.qml (+366/-0) modules/Ubuntu/Components/CrossFadeImage.qml (+2/-2) modules/Ubuntu/Components/Header.qml (+44/-12) modules/Ubuntu/Components/Icon.qml (+1/-1) modules/Ubuntu/Components/InputHandler.qml (+317/-0) modules/Ubuntu/Components/Label.qml (+1/-1) modules/Ubuntu/Components/ListItems/Base.qml (+2/-28) modules/Ubuntu/Components/ListItems/Caption.qml (+3/-3) modules/Ubuntu/Components/ListItems/Divider.qml (+1/-1) modules/Ubuntu/Components/ListItems/Empty.qml (+4/-4) modules/Ubuntu/Components/ListItems/Expandable.qml (+4/-4) modules/Ubuntu/Components/ListItems/ExpandablesColumn.qml (+4/-4) modules/Ubuntu/Components/ListItems/Header.qml (+2/-2) modules/Ubuntu/Components/ListItems/IconVisual.qml (+1/-1) modules/Ubuntu/Components/ListItems/ItemSelector.qml (+3/-3) modules/Ubuntu/Components/ListItems/LabelVisual.qml (+1/-1) modules/Ubuntu/Components/ListItems/MultiValue.qml (+2/-2) modules/Ubuntu/Components/ListItems/ProgressionVisual.qml (+1/-1) modules/Ubuntu/Components/ListItems/SingleControl.qml (+5/-5) modules/Ubuntu/Components/ListItems/SingleValue.qml (+2/-2) modules/Ubuntu/Components/ListItems/Standard.qml (+4/-30) modules/Ubuntu/Components/ListItems/Subtitled.qml (+4/-10) modules/Ubuntu/Components/ListItems/ThinDivider.qml (+2/-2) modules/Ubuntu/Components/ListItems/ValueSelector.qml (+3/-29) modules/Ubuntu/Components/ListItems/qmldir (+18/-0) modules/Ubuntu/Components/MainView.qml (+18/-13) modules/Ubuntu/Components/Object.qml (+1/-1) modules/Ubuntu/Components/OptionSelector.qml (+3/-3) modules/Ubuntu/Components/OptionSelectorDelegate.qml (+5/-35) modules/Ubuntu/Components/OrientationHelper.qml (+4/-4) modules/Ubuntu/Components/Page.qml (+11/-4) modules/Ubuntu/Components/PageStack.qml (+3/-3) modules/Ubuntu/Components/PageTreeNode.qml (+1/-1) modules/Ubuntu/Components/PageWrapper.qml (+1/-1) modules/Ubuntu/Components/Panel.qml (+8/-7) modules/Ubuntu/Components/Pickers/DatePicker.qml (+10/-10) modules/Ubuntu/Components/Pickers/DayModel.qml (+1/-1) modules/Ubuntu/Components/Pickers/Dialer.qml (+3/-3) modules/Ubuntu/Components/Pickers/DialerHand.qml (+2/-2) modules/Ubuntu/Components/Pickers/DialerHandGroup.qml (+1/-1) modules/Ubuntu/Components/Pickers/HoursModel.qml (+1/-1) modules/Ubuntu/Components/Pickers/MinutesModel.qml (+1/-1) modules/Ubuntu/Components/Pickers/MonthModel.qml (+1/-1) modules/Ubuntu/Components/Pickers/Picker.qml (+4/-4) modules/Ubuntu/Components/Pickers/PickerDelegate.qml (+2/-2) modules/Ubuntu/Components/Pickers/PickerPanel.qml (+5/-5) modules/Ubuntu/Components/Pickers/PickerRow.qml (+1/-1) modules/Ubuntu/Components/Pickers/SecondsModel.qml (+1/-1) modules/Ubuntu/Components/Pickers/YearModel.qml (+1/-1) modules/Ubuntu/Components/Pickers/qmldir (+7/-0) modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml (+3/-3) modules/Ubuntu/Components/Popups/ComposerSheet.qml (+4/-4) modules/Ubuntu/Components/Popups/DefaultSheet.qml (+4/-4) modules/Ubuntu/Components/Popups/Dialog.qml (+4/-4) modules/Ubuntu/Components/Popups/Popover.qml (+6/-5) modules/Ubuntu/Components/Popups/PopupBase.qml (+3/-2) modules/Ubuntu/Components/Popups/SheetBase.qml (+2/-2) modules/Ubuntu/Components/Popups/qmldir (+11/-0) modules/Ubuntu/Components/ProgressBar.qml (+1/-1) modules/Ubuntu/Components/Scrollbar.qml (+1/-1) modules/Ubuntu/Components/Slider.qml (+1/-1) modules/Ubuntu/Components/StyledItem.qml (+1/-1) modules/Ubuntu/Components/Switch.qml (+1/-1) modules/Ubuntu/Components/Tab.qml (+1/-1) modules/Ubuntu/Components/TabBar.qml (+26/-6) modules/Ubuntu/Components/Tabs.qml (+25/-19) modules/Ubuntu/Components/TextArea.qml (+47/-131) modules/Ubuntu/Components/TextCursor.qml (+1/-1) modules/Ubuntu/Components/TextField.qml (+85/-136) modules/Ubuntu/Components/TextInputPopover.qml (+2/-2) modules/Ubuntu/Components/Themes/Ambiance/ActivityIndicatorStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/ButtonForeground.qml (+2/-1) modules/Ubuntu/Components/Themes/Ambiance/ButtonStyle.qml (+30/-12) modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/ComboButtonStyle.qml (+243/-0) modules/Ubuntu/Components/Themes/Ambiance/DatePickerStyle.qml (+2/-2) modules/Ubuntu/Components/Themes/Ambiance/DialerHandStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/DialerStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/DialogForegroundStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/HeaderStyle.qml (+24/-2) modules/Ubuntu/Components/Themes/Ambiance/ListItemOptionSelectorStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/NewHeaderStyle.qml (+168/-0) modules/Ubuntu/Components/Themes/Ambiance/OptionSelectorStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/PickerDelegateStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/PickerStyle.qml (+2/-2) modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/ProgressionVisualStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/ScrollbarStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/SelectionCursorStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/SheetForegroundStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/SliderStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml (+2/-2) modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml (+6/-6) modules/Ubuntu/Components/Themes/Ambiance/ToolbarButtonStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/ToolbarStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/qmldir (+19/-0) modules/Ubuntu/Components/Toolbar.qml (+1/-1) modules/Ubuntu/Components/ToolbarButton.qml (+2/-2) modules/Ubuntu/Components/ToolbarItems.qml (+4/-4) modules/Ubuntu/Components/UbuntuListView.qml (+4/-4) modules/Ubuntu/Components/UbuntuNumberAnimation.qml (+5/-5) modules/Ubuntu/Components/UbuntuShape.qml (+5/-5) modules/Ubuntu/Components/plugin/adapters/alarmsadapter_organizer.cpp (+61/-24) modules/Ubuntu/Components/plugin/adapters/alarmsadapter_p.h (+2/-0) modules/Ubuntu/Components/plugin/alarmmanager_p.h (+10/-0) modules/Ubuntu/Components/plugin/i18n.cpp (+1/-1) modules/Ubuntu/Components/plugin/inversemouseareatype.cpp (+4/-4) modules/Ubuntu/Components/plugin/plugin.cpp (+31/-26) modules/Ubuntu/Components/plugin/plugin.h (+3/-0) modules/Ubuntu/Components/plugin/qquickclipboard.cpp (+1/-1) modules/Ubuntu/Components/plugin/qquickmimedata.cpp (+1/-1) modules/Ubuntu/Components/plugin/quickutils.cpp (+5/-1) modules/Ubuntu/Components/plugin/ucalarm.cpp (+35/-29) modules/Ubuntu/Components/plugin/ucalarm_p.h (+1/-1) modules/Ubuntu/Components/plugin/ucalarmmodel.cpp (+3/-3) modules/Ubuntu/Components/plugin/ucapplication.cpp (+1/-1) modules/Ubuntu/Components/plugin/ucargument.cpp (+1/-1) modules/Ubuntu/Components/plugin/ucarguments.cpp (+1/-1) modules/Ubuntu/Components/plugin/ucfontutils.cpp (+3/-3) modules/Ubuntu/Components/plugin/ucmouse.h (+52/-11) modules/Ubuntu/Components/plugin/ucmousefilters.cpp (+228/-92) modules/Ubuntu/Components/plugin/ucstatesaver.cpp (+2/-2) modules/Ubuntu/Components/plugin/uctheme.cpp (+3/-3) modules/Ubuntu/Components/plugin/ucubuntuanimation.cpp (+1/-1) modules/Ubuntu/Components/plugin/ucunits.cpp (+2/-2) modules/Ubuntu/Components/plugin/ucurihandler.cpp (+1/-1) modules/Ubuntu/Components/qmldir (+45/-0) modules/Ubuntu/Layouts/plugin/ulconditionallayout.cpp (+1/-1) modules/Ubuntu/Layouts/plugin/ulitemlayout.cpp (+1/-1) modules/Ubuntu/Layouts/plugin/ullayouts.cpp (+1/-1) modules/Ubuntu/Layouts/plugin/ulplugin.cpp (+9/-3) modules/Ubuntu/Layouts/plugin/ulplugin.h (+2/-0) modules/Ubuntu/PerformanceMetrics/BarGraph.qml (+2/-2) modules/Ubuntu/PerformanceMetrics/PerformanceOverlay.qml (+1/-1) modules/Ubuntu/PerformanceMetrics/plugin/upmplugin.cpp (+10/-5) modules/Ubuntu/PerformanceMetrics/plugin/upmplugin.h (+2/-0) modules/Ubuntu/PerformanceMetrics/qmldir (+3/-0) modules/Ubuntu/Test/UbuntuTestCase.qml (+71/-2) modules/Ubuntu/Test/deployment.pri (+6/-1) modules/Ubuntu/Test/plugin/uctestcase.cpp (+12/-0) modules/Ubuntu/Test/plugin/uctestcase.h (+1/-1) modules/Ubuntu/Test/qmldir (+4/-0) run_tests.sh (+4/-2) tests/autopilot/ubuntuuitoolkit/__init__.py (+0/-17) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/__init__.py (+46/-781) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_checkbox.py (+65/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_common.py (+113/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_flickable.py (+154/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py (+123/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_mainview.py (+182/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_optionselector.py (+104/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_qquicklistview.py (+65/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_tabbar.py (+68/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_tabs.py (+41/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_textfield.py (+88/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_toolbar.py (+106/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/listitems.py (+114/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py (+82/-0) tests/autopilot/ubuntuuitoolkit/emulators.py (+89/-0) tests/autopilot/ubuntuuitoolkit/fixture_setup.py (+1/-1) tests/autopilot/ubuntuuitoolkit/tests/__init__.py (+1/-1) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_checkbox.py (+136/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_common.py (+68/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py (+116/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py (+41/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitems.py (+170/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_main_view.py (+143/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_optionselector.py (+194/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_popups.py (+172/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquicklistview.py (+193/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_tabs.py (+159/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_textfield.py (+93/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_toolbar.py (+121/-0) tests/autopilot/ubuntuuitoolkit/tests/test_emulators.py (+82/-1066) tests/qmlapicheck.py (+17/-2) tests/qmlapicheck.sh (+6/-10) tests/resources/alarm/AlarmDays.qml (+3/-3) tests/resources/alarm/Alarms.qml (+9/-5) tests/resources/buttons/ComboTest.qml (+143/-0) tests/resources/filters/MouseFilters.qml (+1/-1) tests/resources/inputs/TextInputs.qml (+85/-0) tests/resources/navigation/MyCustomPage.qml (+1/-1) tests/resources/navigation/PageStack.qml (+3/-2) tests/resources/navigation/RepeaterTabs.qml (+1/-1) tests/resources/navigation/SimpleTabs.qml (+3/-1) tests/resources/navigation/StackWithTabs.qml (+2/-1) tests/resources/navigation/TabView.qml (+5/-12) tests/resources/navigation/Tabs.qml (+6/-4) tests/resources/pickers/DatePickerTest.qml (+2/-2) tests/resources/pickers/PanelTest.qml (+2/-2) tests/resources/pickers/PickerTest.qml (+2/-2) tests/resources/popover/PopoverTest.qml (+3/-3) tests/resources/statesaver/StateSaver.qml (+1/-1) tests/resources/toolbar/LockedToolbar.qml (+1/-1) tests/resources/toolbar/oldToolbarWithActions.qml (+1/-1) tests/resources/toolbar/panels.qml (+1/-1) tests/resources/toolbar/toolbar.qml (+1/-1) tests/resources/urihandler/UriHandlerTest.qml (+1/-1) tests/unit/runtest.sh (+1/-2) tests/unit/tst_alarms/tst_alarms.cpp (+204/-21) tests/unit/tst_components/tst_CrossFadeImage.qml (+1/-1) tests/unit/tst_components/tst_abstractbutton.qml (+1/-1) tests/unit/tst_components/tst_action.qml (+1/-1) tests/unit/tst_components/tst_actionitem.qml (+1/-1) tests/unit/tst_components/tst_activityindicator.qml (+1/-1) tests/unit/tst_components/tst_button.qml (+5/-1) tests/unit/tst_components/tst_checkbox.qml (+1/-1) tests/unit/tst_components/tst_clipboard.qml (+1/-1) tests/unit/tst_components/tst_dateutils.qml (+2/-2) tests/unit/tst_components/tst_fontutils.qml (+1/-1) tests/unit/tst_components/tst_label.qml (+1/-1) tests/unit/tst_components/tst_listitems_base.qml (+1/-1) tests/unit/tst_components/tst_listitems_caption.qml (+1/-1) tests/unit/tst_components/tst_listitems_divider.qml (+1/-1) tests/unit/tst_components/tst_listitems_empty.qml (+1/-1) tests/unit/tst_components/tst_listitems_header.qml (+1/-1) tests/unit/tst_components/tst_listitems_multivalue.qml (+1/-1) tests/unit/tst_components/tst_listitems_singlecontrol.qml (+2/-2) tests/unit/tst_components/tst_listitems_singlevalue.qml (+1/-1) tests/unit/tst_components/tst_listitems_subtitled.qml (+1/-1) tests/unit/tst_components/tst_listitems_thindivider.qml (+1/-1) tests/unit/tst_components/tst_listitems_valueselector.qml (+1/-1) tests/unit/tst_components/tst_mainview.qml (+1/-1) tests/unit/tst_components/tst_page.qml (+1/-1) tests/unit/tst_components/tst_pagestack.qml (+4/-4) tests/unit/tst_components/tst_plugin_ucunits.qml (+1/-1) tests/unit/tst_components/tst_popups_actionselectionpopover.qml (+2/-2) tests/unit/tst_components/tst_popups_composersheet.qml (+2/-2) tests/unit/tst_components/tst_popups_defaultsheet.qml (+2/-2) tests/unit/tst_components/tst_popups_dialog.qml (+2/-2) tests/unit/tst_components/tst_popups_popover.qml (+2/-2) tests/unit/tst_components/tst_progressbar.qml (+1/-1) tests/unit/tst_components/tst_quickutils.qml (+2/-2) tests/unit/tst_components/tst_scrollbar.qml (+1/-1) tests/unit/tst_components/tst_slider.qml (+1/-1) tests/unit/tst_components/tst_switch.qml (+1/-1) tests/unit/tst_components/tst_tab.qml (+1/-1) tests/unit/tst_components/tst_toolbaritems.qml (+1/-1) tests/unit/tst_components/tst_ubuntushape.qml (+1/-1) tests/unit/tst_i18n/src/LocalizedApp.qml (+1/-1) tests/unit/tst_mainview/AppName.qml (+1/-1) tests/unit/tst_mainview/LocalStorage.qml (+1/-1) tests/unit/tst_mainview/PageStack.qml (+1/-1) tests/unit/tst_mainview/PageTitle.qml (+1/-1) tests/unit/tst_mainview/TabsTitle.qml (+1/-1) tests/unit/tst_mainview/tst_mainview.cpp (+3/-6) tests/unit/tst_page/AnchorToPage.qml (+1/-1) tests/unit/tst_page/tst_page.cpp (+3/-39) tests/unit/tst_performance/ButtonGrid.qml (+1/-1) tests/unit/tst_performance/ButtonStyleGrid.qml (+1/-1) tests/unit/tst_performance/CheckBoxGrid.qml (+1/-1) tests/unit/tst_performance/CheckBoxStyleGrid.qml (+1/-1) tests/unit/tst_performance/LabelGrid.qml (+1/-1) tests/unit/tst_performance/PairOfUbuntuShapeGrid.qml (+1/-1) tests/unit/tst_performance/SliderGrid.qml (+1/-1) tests/unit/tst_performance/SliderStyleGrid.qml (+1/-1) tests/unit/tst_performance/SwitchGrid.qml (+1/-1) tests/unit/tst_performance/SwitchStyleGrid.qml (+1/-1) tests/unit/tst_performance/TextWithImport.qml (+1/-1) tests/unit/tst_performance/TextWithImportPopups.qml (+1/-1) tests/unit/tst_performance/UbuntuShapeGrid.qml (+1/-1) tests/unit/tst_qmltemplate/tst_example_benchmark.qml (+1/-1) tests/unit/tst_qmltemplate/tst_example_checks.qml (+1/-1) tests/unit/tst_qmltemplate/tst_example_keyboard.qml (+1/-1) tests/unit/tst_qmltemplate/tst_example_mouse.qml (+1/-1) tests/unit/tst_qmltemplate/tst_example_property.qml (+1/-1) tests/unit/tst_qmltemplate/tst_example_signals.qml (+2/-2) tests/unit/tst_theme/tst_popoverforegroundstyle.qml (+2/-2) tests/unit/tst_ubuntu_shape/no_distortion.qml (+1/-1) tests/unit_x11/tst_components/tst_alarms.qml (+2/-2) tests/unit_x11/tst_components/tst_combobutton.qml (+244/-0) tests/unit_x11/tst_components/tst_datepicker.qml (+3/-3) tests/unit_x11/tst_components/tst_dialer.qml (+3/-3) tests/unit_x11/tst_components/tst_expandable.qml (+3/-3) tests/unit_x11/tst_components/tst_expandablescolumn.qml (+3/-3) tests/unit_x11/tst_components/tst_header.qml (+1/-1) tests/unit_x11/tst_components/tst_hide_chrome.qml (+2/-2) tests/unit_x11/tst_components/tst_listitems_itemselector.qml (+3/-3) tests/unit_x11/tst_components/tst_listitems_standard.qml (+2/-2) tests/unit_x11/tst_components/tst_optionselector.qml (+2/-2) tests/unit_x11/tst_components/tst_panel.qml (+1/-1) tests/unit_x11/tst_components/tst_picker.qml (+3/-3) tests/unit_x11/tst_components/tst_pickerpanel.qml (+3/-3) tests/unit_x11/tst_components/tst_popover.qml (+83/-0) tests/unit_x11/tst_components/tst_tabbar.qml (+8/-1) tests/unit_x11/tst_components/tst_tabs.qml (+10/-10) tests/unit_x11/tst_components/tst_textarea.qml (+358/-63) tests/unit_x11/tst_components/tst_textarea_in_flickable.qml (+65/-39) tests/unit_x11/tst_components/tst_textfield.qml (+354/-64) tests/unit_x11/tst_components/tst_toolbar.qml (+1/-1) tests/unit_x11/tst_components/tst_ubuntulistview.qml (+3/-3) tests/unit_x11/tst_inversemousearea/Defaults.qml (+1/-1) tests/unit_x11/tst_inversemousearea/InverseMouseAreaClip.qml (+1/-1) tests/unit_x11/tst_inversemousearea/InverseMouseAreaDoNotPropagateEvents.qml (+1/-1) tests/unit_x11/tst_inversemousearea/InverseMouseAreaInFlickable.qml (+2/-2) tests/unit_x11/tst_inversemousearea/InverseMouseAreaInListView.qml (+2/-2) tests/unit_x11/tst_inversemousearea/InverseMouseAreaInPage.qml (+1/-1) tests/unit_x11/tst_inversemousearea/InverseMouseAreaInWindow.qml (+1/-1) tests/unit_x11/tst_inversemousearea/InverseMouseAreaNormalEventStack.qml (+1/-1) tests/unit_x11/tst_inversemousearea/InverseMouseAreaOnTop.qml (+1/-1) tests/unit_x11/tst_inversemousearea/InverseMouseAreaOnTopNoAccept.qml (+1/-1) tests/unit_x11/tst_inversemousearea/InverseMouseAreaParentClipped.qml (+1/-1) tests/unit_x11/tst_inversemousearea/InverseMouseAreaPropagateEvents.qml (+1/-1) tests/unit_x11/tst_inversemousearea/InverseMouseAreaSensingArea.qml (+1/-1) tests/unit_x11/tst_inversemousearea/InverseMouseAreaSignals.qml (+1/-1) tests/unit_x11/tst_inversemousearea/InverseMouseAreaTopmostItem.qml (+1/-1) tests/unit_x11/tst_inversemousearea/OverlappedMouseArea.qml (+1/-1) tests/unit_x11/tst_inversemousearea/SensingAreaError.qml (+1/-1) tests/unit_x11/tst_layouts/AnchorAll.qml (+1/-1) tests/unit_x11/tst_layouts/AnchorBottom.qml (+1/-1) tests/unit_x11/tst_layouts/AnchorCenterWithOffset.qml (+1/-1) tests/unit_x11/tst_layouts/AnchorCenteredInDefault.qml (+1/-1) tests/unit_x11/tst_layouts/AnchorFilledMargins.qml (+1/-1) tests/unit_x11/tst_layouts/AnchorFilledReparenting.qml (+1/-1) tests/unit_x11/tst_layouts/AnchorFilledSeparateMargins.qml (+1/-1) tests/unit_x11/tst_layouts/AnchorHorizontalCenter.qml (+1/-1) tests/unit_x11/tst_layouts/AnchorHorizontalCenterOffset.qml (+1/-1) tests/unit_x11/tst_layouts/AnchorLeft.qml (+1/-1) tests/unit_x11/tst_layouts/AnchorRight.qml (+1/-1) tests/unit_x11/tst_layouts/AnchorTop.qml (+1/-1) tests/unit_x11/tst_layouts/AnchorVerticalCenter.qml (+1/-1) tests/unit_x11/tst_layouts/AnchorVerticalCenterOffset.qml (+1/-1) tests/unit_x11/tst_layouts/CurrentLayoutChange.qml (+1/-1) tests/unit_x11/tst_layouts/DefaultLayout.qml (+2/-2) tests/unit_x11/tst_layouts/DialerCrash.qml (+3/-3) tests/unit_x11/tst_layouts/ExcludedItemDeleted.qml (+2/-2) tests/unit_x11/tst_layouts/ExternalLayouts.qml (+2/-2) tests/unit_x11/tst_layouts/ItemInstanceAsProperty.qml (+2/-2) tests/unit_x11/tst_layouts/LaidOutItemsOutsideOfLayout.qml (+1/-1) tests/unit_x11/tst_layouts/LargeLayout.qml (+2/-2) tests/unit_x11/tst_layouts/MediumLayout.qml (+2/-2) tests/unit_x11/tst_layouts/NestedLayouts.qml (+2/-2) tests/unit_x11/tst_layouts/NoLayouts.qml (+2/-2) tests/unit_x11/tst_layouts/OverlaidInItemLayout.qml (+1/-1) tests/unit_x11/tst_layouts/OverlappingCondition.qml (+2/-2) tests/unit_x11/tst_layouts/PositioningOnLayoutChange.qml (+1/-1) tests/unit_x11/tst_layouts/ResizingContainers.qml (+2/-2) tests/unit_x11/tst_layouts/SimpleLayouts.qml (+2/-2) tests/unit_x11/tst_layouts/SizedDefaultLayout.qml (+2/-2) tests/unit_x11/tst_layouts/SmallLayout.qml (+2/-2) tests/unit_x11/tst_mousefilters/AttachedToItem.qml (+1/-1) tests/unit_x11/tst_mousefilters/DoubleClicked.qml (+1/-1) tests/unit_x11/tst_mousefilters/FilterFlickable.qml (+1/-1) tests/unit_x11/tst_mousefilters/FilterFlickableAfter.qml (+1/-1) tests/unit_x11/tst_mousefilters/FilterInverseTextInput.qml (+1/-1) tests/unit_x11/tst_mousefilters/FilterInverseTextInputAfter.qml (+1/-1) tests/unit_x11/tst_mousefilters/FilterInverseTextInputOSKExcluded.qml (+1/-1) tests/unit_x11/tst_mousefilters/FilterInverseTextInputTolerance.qml (+1/-1) tests/unit_x11/tst_mousefilters/FilterTextInput.qml (+1/-1) tests/unit_x11/tst_mousefilters/FilterTextInputAfter.qml (+1/-1) tests/unit_x11/tst_mousefilters/FilterTextInputTolerance.qml (+1/-1) tests/unit_x11/tst_mousefilters/ForwardComposedEvents.qml (+55/-0) tests/unit_x11/tst_mousefilters/ForwardDblClickToTransparentMouseArea.qml (+1/-1) tests/unit_x11/tst_mousefilters/ForwardEventChained.qml (+51/-0) tests/unit_x11/tst_mousefilters/ForwardToInverseMouseArea.qml (+1/-1) tests/unit_x11/tst_mousefilters/ForwardToMouseArea.qml (+1/-1) tests/unit_x11/tst_mousefilters/ForwardToTransparentMouseArea.qml (+1/-1) tests/unit_x11/tst_mousefilters/ForwardedEventsStoppedInForwards.qml (+1/-1) tests/unit_x11/tst_mousefilters/ForwardedEventsToTargetBlocked.qml (+1/-1) tests/unit_x11/tst_mousefilters/ForwardedMouseEvents.qml (+1/-1) tests/unit_x11/tst_mousefilters/ForwardedMouseEventsStopped.qml (+1/-1) tests/unit_x11/tst_mousefilters/Hover.qml (+1/-1) tests/unit_x11/tst_mousefilters/HoverEvent.qml (+38/-0) tests/unit_x11/tst_mousefilters/InverseAttachedToItem.qml (+1/-1) tests/unit_x11/tst_mousefilters/InverseHover.qml (+1/-1) tests/unit_x11/tst_mousefilters/InverseMouseFilterAttachedToNonItem.qml (+1/-1) tests/unit_x11/tst_mousefilters/MouseFilterAttachedToNonItem.qml (+1/-1) tests/unit_x11/tst_mousefilters/PressAndHoldAcceptedEatsClick.qml (+1/-1) tests/unit_x11/tst_mousefilters/PressAndHoldAndClicked.qml (+1/-1) tests/unit_x11/tst_mousefilters/tst_mousefilters.pro (+4/-1) tests/unit_x11/tst_mousefilters/tst_mousefilterstest.cpp (+396/-201) tests/unit_x11/tst_orientation/Defaults.qml (+1/-1) tests/unit_x11/tst_orientation/ManualAngle.qml (+1/-1) tests/unit_x11/tst_orientation/tst_orientation.cpp (+9/-47) tests/unit_x11/tst_recreateview/SimpleApp.qml (+1/-1) tests/unit_x11/tst_statesaver/ComponentsWithStateSavers.qml (+1/-1) tests/unit_x11/tst_statesaver/ComponentsWithStateSaversNoId.qml (+1/-1) tests/unit_x11/tst_statesaver/CustomControl.qml (+1/-1) tests/unit_x11/tst_statesaver/DisabledStateSaver.qml (+1/-1) tests/unit_x11/tst_statesaver/Dynamic.qml (+1/-1) tests/unit_x11/tst_statesaver/FirstComponent.qml (+1/-1) tests/unit_x11/tst_statesaver/GridViewItems.qml (+1/-1) tests/unit_x11/tst_statesaver/InvalidGroupProperty.qml (+1/-1) tests/unit_x11/tst_statesaver/InvalidUID.qml (+1/-1) tests/unit_x11/tst_statesaver/ListViewItems.qml (+1/-1) tests/unit_x11/tst_statesaver/NestedDynamics.qml (+1/-1) tests/unit_x11/tst_statesaver/NormalAppClose.qml (+1/-1) tests/unit_x11/tst_statesaver/RepeaterStates.qml (+1/-1) tests/unit_x11/tst_statesaver/SameIdsInDifferentComponents.qml (+1/-1) tests/unit_x11/tst_statesaver/SaveArrays.qml (+1/-1) tests/unit_x11/tst_statesaver/SaveObject.qml (+1/-1) tests/unit_x11/tst_statesaver/SavePropertyGroups.qml (+1/-1) tests/unit_x11/tst_statesaver/SaveSupportedTypes.qml (+1/-1) tests/unit_x11/tst_statesaver/SecondComponent.qml (+1/-1) tests/unit_x11/tst_statesaver/SimpleApp.qml (+1/-1) tests/unit_x11/tst_statesaver/TwoDynamics.qml (+1/-1) tests/unit_x11/tst_statesaver/ValidGroupProperty.qml (+1/-1) tests/unit_x11/tst_statesaver/ValidUID.qml (+1/-1) tests/unit_x11/tst_statesaver/tst_statesaver.cpp (+29/-37) tests/unit_x11/tst_test/tst_ubuntutestcase.qml (+104/-16) tests/unit_x11/tst_theme_engine/tst_theme_enginetest.cpp (+3/-0) |
||||||||
To merge this branch: | bzr merge lp:~elopio/ubuntu-ui-toolkit/swipe_into_view | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu SDK team | Pending | ||
Review via email: mp+212276@code.launchpad.net |
This proposal has been superseded by a proposal from 2014-04-29.
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote : | # |
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CHANGES' |
2 | --- CHANGES 2014-02-24 22:03:55 +0000 |
3 | +++ CHANGES 2014-04-29 23:04:44 +0000 |
4 | @@ -4,11 +4,22 @@ |
5 | .. contents:: List of Releases |
6 | :depth: 1 |
7 | |
8 | -UNRELEASED |
9 | -########## |
10 | - |
11 | -API Changes |
12 | -*********** |
13 | +Ubuntu.Components 1.1 |
14 | +##################### |
15 | + |
16 | +API Changes |
17 | +*********** |
18 | + |
19 | +Compatibility Breaks |
20 | +******************** |
21 | + |
22 | + |
23 | +Ubuntu.Components 1.0 |
24 | +##################### |
25 | + |
26 | +API Changes |
27 | +*********** |
28 | +* ADDED IN: all modules exported as 0.1 as well as 1.0 version |
29 | * ADDED IN: PickerDelegate: readonly property Picker picker |
30 | * CHANGED IN: OptionSelector: readonly property bool currentlyExpanded TO property bool currentlyExpanded |
31 | * CHANGED IN: ItemSelector: readonly property bool currentlyExpanded TO property bool currentlyExpanded |
32 | @@ -85,14 +96,17 @@ |
33 | * ADDED IN: Empty: property bool waitingConfirmationForRemoval |
34 | * ADDED IN: Empty: function cancelItemRemoval() |
35 | * CHANGED in CrossFadeImage: readonly property size sourceSize TO property size sourceSize |
36 | +* DEPRECATED in Header: property Item contents |
37 | +* DEPRECATED IN Tabs: property TabBar tabBar |
38 | |
39 | Compatibility Breaks |
40 | ******************** |
41 | |
42 | -- CHANGED IN Tabs: Automatically show the header when the title of the active tab changes |
43 | -- CHANGED IN Page/MainView: Only enable auto-hide behavior of header when the Page's flickable can be flicked vertically, so that manual setting of anchors is no longer needed for flickables that only flick horizontally |
44 | -- CHANGED IN Page: Automatic detection of flickable inside a Page to control the header is now limited to Flickables that are anchored to the top of the Page or fill the Page. Header automatically shows when flickable.contentHeight becomes <= flickable.height. |
45 | -- CHANGED IN Action, ActionItem, OptionSelectorDelegate: Setting iconName now always selects the requested icon from ubuntu-mobile theme, not the system icon theme. |
46 | +* CHANGED IN Tabs: Automatically show the header when the title of the active tab changes |
47 | +* CHANGED IN Page/MainView: Only enable auto-hide behavior of header when the Page's flickable can be flicked vertically, so that manual setting of anchors is no longer needed for flickables that only flick horizontally |
48 | +* CHANGED IN Page: Automatic detection of flickable inside a Page to control the header is now limited to Flickables that are anchored to the top of the Page or fill the Page. Header automatically shows when flickable.contentHeight becomes <= flickable.height. |
49 | +* CHANGED IN Action, ActionItem, OptionSelectorDelegate: Setting iconName now always selects the requested icon from ubuntu-mobile theme, not the system icon theme. |
50 | +* CHANGED IN TabBar: The model now needs to have a selectedIndex property. |
51 | |
52 | SDK 0.1.46 |
53 | ########## |
54 | |
55 | === modified file 'components.api' |
56 | --- components.api 2014-04-01 12:57:27 +0000 |
57 | +++ components.api 2014-04-29 23:04:44 +0000 |
58 | @@ -1,4 +1,4 @@ |
59 | -modules/Ubuntu/Components/AbstractButton.qml |
60 | +AbstractButton 0.1 1.0 |
61 | ActionItem |
62 | signal clicked() |
63 | signal pressAndHold() |
64 | @@ -6,13 +6,13 @@ |
65 | property bool hovered |
66 | property bool __acceptEvents |
67 | property internal __mouseArea |
68 | -modules/Ubuntu/Components/Action.qml |
69 | +Action 0.1 1.0 |
70 | UnityActions.Action |
71 | property url iconSource |
72 | property string iconName |
73 | property bool visible |
74 | property Component itemHint |
75 | -modules/Ubuntu/Components/ActionItem.qml |
76 | +ActionItem 0.1 1.0 |
77 | StyledItem |
78 | property Action action |
79 | property string text |
80 | @@ -20,19 +20,19 @@ |
81 | property string iconName |
82 | signal triggered(var value) |
83 | function trigger(value) |
84 | -modules/Ubuntu/Components/ActionList.qml |
85 | +ActionList 0.1 1.0 |
86 | QtObject |
87 | default property list<Action> children |
88 | property list<Action> actions |
89 | -modules/Ubuntu/Components/ActivityIndicator.qml |
90 | +ActivityIndicator 0.1 1.0 |
91 | AnimatedItem |
92 | property bool running |
93 | -modules/Ubuntu/Components/Button.qml |
94 | +Button 0.1 1.0 |
95 | AbstractButton |
96 | property color color |
97 | property Gradient gradient |
98 | property string iconPosition |
99 | -modules/Ubuntu/Components/CheckBox.qml |
100 | +CheckBox 0.1 1.0 |
101 | AbstractButton |
102 | property bool checked |
103 | modules/Ubuntu/Components/Colors/UbuntuColors.qml |
104 | @@ -45,7 +45,15 @@ |
105 | readonly property color coolGrey |
106 | property Gradient orangeGradient |
107 | property Gradient greyGradient |
108 | -modules/Ubuntu/Components/CrossFadeImage.qml |
109 | +ComboButton 1.1 |
110 | +Button |
111 | + property bool expanded |
112 | + property real collapsedHeight |
113 | + property real expandedHeight |
114 | + readonly property real comboListHeight |
115 | + default property list<Item> comboList |
116 | + property color dropdownColor |
117 | +CrossFadeImage 0.1 1.0 |
118 | Item |
119 | property url source |
120 | property int fillMode |
121 | @@ -53,27 +61,28 @@ |
122 | readonly property bool running |
123 | property size sourceSize |
124 | readonly property int status |
125 | -modules/Ubuntu/Components/Header.qml |
126 | +Header 0.1 1.0 |
127 | StyledItem |
128 | property bool animate |
129 | function show() |
130 | function hide() |
131 | property string title |
132 | property Item contents |
133 | + property var tabsModel |
134 | + property var pageStack |
135 | property Flickable flickable |
136 | -modules/Ubuntu/Components/Icon.qml |
137 | + property bool useDeprecatedToolbar |
138 | +Icon 0.1 1.0 |
139 | Item |
140 | property string name |
141 | property color color |
142 | property color keyColor |
143 | -modules/Ubuntu/Components/Label.qml |
144 | +Label 0.1 1.0 |
145 | Text |
146 | property string fontSize |
147 | -modules/Ubuntu/Components/ListItems/Base.qml |
148 | +Base 0.1 1.0 |
149 | Empty |
150 | property variant icon |
151 | - property url iconSource |
152 | - property string iconName |
153 | property url fallbackIconSource |
154 | property string fallbackIconName |
155 | property bool progression |
156 | @@ -84,12 +93,12 @@ |
157 | property real __rightIconMargin |
158 | property bool __iconIsItem |
159 | property internal children |
160 | -modules/Ubuntu/Components/ListItems/Caption.qml |
161 | +Caption 0.1 1.0 |
162 | Item |
163 | property string text |
164 | -modules/Ubuntu/Components/ListItems/Divider.qml |
165 | +Divider 0.1 1.0 |
166 | Image |
167 | -modules/Ubuntu/Components/ListItems/Empty.qml |
168 | +Empty 0.1 1.0 |
169 | AbstractButton |
170 | property bool selected |
171 | property bool highlightWhenPressed |
172 | @@ -106,24 +115,24 @@ |
173 | property ThinDivider divider |
174 | property real __contentsMargins |
175 | function cancelItemRemoval() |
176 | -modules/Ubuntu/Components/ListItems/Expandable.qml |
177 | +Expandable 0.1 1.0 |
178 | Empty |
179 | property bool expanded |
180 | property real collapsedHeight |
181 | property real expandedHeight |
182 | property bool collapseOnClick |
183 | default property QtObject children |
184 | -modules/Ubuntu/Components/ListItems/ExpandablesColumn.qml |
185 | +ExpandablesColumn 0.1 1.0 |
186 | Flickable |
187 | readonly property Item expandedItem |
188 | function expandItem(item) |
189 | function collapse() |
190 | default property QtObject children |
191 | -modules/Ubuntu/Components/ListItems/Header.qml |
192 | +Header 0.1 1.0 |
193 | Item |
194 | property string text |
195 | property internal __foregroundColor |
196 | -modules/Ubuntu/Components/ListItems/ItemSelector.qml |
197 | +ItemSelector 0.1 1.0 |
198 | ListItem.Empty |
199 | property var model |
200 | property bool expanded |
201 | @@ -135,21 +144,19 @@ |
202 | readonly property real itemHeight |
203 | signal delegateClicked(int index) |
204 | signal expansionCompleted() |
205 | -modules/Ubuntu/Components/ListItems/MultiValue.qml |
206 | +MultiValue 0.1 1.0 |
207 | Base |
208 | property variant values |
209 | -modules/Ubuntu/Components/ListItems/SingleControl.qml |
210 | +SingleControl 0.1 1.0 |
211 | Empty |
212 | property Item control |
213 | function __updateControl() |
214 | -modules/Ubuntu/Components/ListItems/SingleValue.qml |
215 | +SingleValue 0.1 1.0 |
216 | Base |
217 | property string value |
218 | -modules/Ubuntu/Components/ListItems/Standard.qml |
219 | +Standard 0.1 1.0 |
220 | Empty |
221 | property variant icon |
222 | - property url iconSource |
223 | - property string iconName |
224 | property url fallbackIconSource |
225 | property string fallbackIconName |
226 | property bool progression |
227 | @@ -162,17 +169,14 @@ |
228 | property bool __controlAreaPressed |
229 | property bool __iconIsItem |
230 | property internal __foregroundColor |
231 | -modules/Ubuntu/Components/ListItems/Subtitled.qml |
232 | +Subtitled 0.1 1.0 |
233 | Base |
234 | - property string text |
235 | property string subText |
236 | -modules/Ubuntu/Components/ListItems/ThinDivider.qml |
237 | +ThinDivider 0.1 1.0 |
238 | Image |
239 | -modules/Ubuntu/Components/ListItems/ValueSelector.qml |
240 | +ValueSelector 0.1 1.0 |
241 | Empty |
242 | property variant icon |
243 | - property url iconSource |
244 | - property string iconName |
245 | property url fallbackIconSource |
246 | property string fallbackIconName |
247 | property real __iconWidth |
248 | @@ -183,7 +187,7 @@ |
249 | property variant values |
250 | property int selectedIndex |
251 | property bool expanded |
252 | -modules/Ubuntu/Components/MainView.qml |
253 | +MainView 0.1 1.0 |
254 | PageTreeNode |
255 | property string applicationName |
256 | property bool anchorToKeyboard |
257 | @@ -195,10 +199,10 @@ |
258 | default property internal contentsItem |
259 | property list<Action> actions |
260 | property UnityActions.ActionManager actionManager |
261 | -modules/Ubuntu/Components/Object.qml |
262 | +Object 0.1 1.0 |
263 | QtObject |
264 | default property internal children |
265 | -modules/Ubuntu/Components/OptionSelector.qml |
266 | +OptionSelector 0.1 1.0 |
267 | ListItem.Empty |
268 | property var model |
269 | property bool expanded |
270 | @@ -210,31 +214,28 @@ |
271 | readonly property real itemHeight |
272 | signal delegateClicked(int index) |
273 | signal expansionCompleted() |
274 | -modules/Ubuntu/Components/OptionSelectorDelegate.qml |
275 | -ListItem.Standard |
276 | - property string text |
277 | +OptionSelectorDelegate 0.1 1.0 |
278 | +ListItem.Empty |
279 | property string subText |
280 | property url icon |
281 | - property url iconSource |
282 | - property string iconName |
283 | property bool constrainImage |
284 | property bool colourImage |
285 | property color assetColour |
286 | readonly property ListView listView |
287 | readonly property string fragColourShader |
288 | -modules/Ubuntu/Components/OrientationHelper.qml |
289 | +OrientationHelper 0.1 1.0 |
290 | Item |
291 | property bool automaticOrientation |
292 | property bool transitionEnabled |
293 | property alias rotating |
294 | property int __orientationAngle |
295 | property int orientationAngle |
296 | -modules/Ubuntu/Components/Page.qml |
297 | +Page 0.1 1.0 |
298 | PageTreeNode |
299 | property string title |
300 | property Flickable flickable |
301 | property list<Action> actions |
302 | -modules/Ubuntu/Components/PageStack.qml |
303 | +PageStack 0.1 1.0 |
304 | PageTreeNode |
305 | property bool __showHeader |
306 | property int depth |
307 | @@ -242,7 +243,7 @@ |
308 | function push(page, properties) |
309 | function pop() |
310 | function clear() |
311 | -modules/Ubuntu/Components/Panel.qml |
312 | +Panel 0.1 1.0 |
313 | Item |
314 | default property list<Object> contents |
315 | property int align |
316 | @@ -259,7 +260,7 @@ |
317 | property bool __closeOnContentsClicks |
318 | property bool __openOnHover |
319 | property bool pressed |
320 | -modules/Ubuntu/Components/Pickers/DatePicker.qml |
321 | +DatePicker 0.1 1.0 |
322 | StyledItem |
323 | property string mode |
324 | property date date |
325 | @@ -274,7 +275,7 @@ |
326 | readonly property int seconds |
327 | property var locale |
328 | readonly property bool moving |
329 | -modules/Ubuntu/Components/Pickers/Dialer.qml |
330 | +Dialer 0.1 1.0 |
331 | StyledItem |
332 | property real minimumValue |
333 | property real maximumValue |
334 | @@ -284,7 +285,7 @@ |
335 | property list<var> centerContent |
336 | readonly property list<DialerHands> hands |
337 | signal handUpdated(var hand) |
338 | -modules/Ubuntu/Components/Pickers/DialerHand.qml |
339 | +DialerHand 0.1 1.0 |
340 | StyledItem |
341 | property real value |
342 | property DialerHandGroup hand |
343 | @@ -292,7 +293,7 @@ |
344 | default property list<QtObject> overlay |
345 | readonly property int index |
346 | property internal __grabber |
347 | -modules/Ubuntu/Components/Pickers/Picker.qml |
348 | +Picker 0.1 1.0 |
349 | StyledItem |
350 | property bool circular |
351 | property var model |
352 | @@ -302,27 +303,27 @@ |
353 | readonly property bool moving |
354 | function positionViewAtIndex(index) |
355 | property int __clickedIndex |
356 | -modules/Ubuntu/Components/Pickers/PickerDelegate.qml |
357 | +PickerDelegate 0.1 1.0 |
358 | AbstractButton |
359 | readonly property Picker picker |
360 | modules/Ubuntu/Components/Pickers/PickerPanel.qml |
361 | Object |
362 | function openDatePicker(caller, property, mode) |
363 | -modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml |
364 | +ActionSelectionPopover 0.1 1.0 |
365 | Popover |
366 | property Item target |
367 | property var actions |
368 | property Component delegate |
369 | -modules/Ubuntu/Components/Popups/ComposerSheet.qml |
370 | +ComposerSheet 0.1 1.0 |
371 | SheetBase |
372 | signal cancelClicked |
373 | signal confirmClicked |
374 | -modules/Ubuntu/Components/Popups/DefaultSheet.qml |
375 | +DefaultSheet 0.1 1.0 |
376 | SheetBase |
377 | property bool doneButton |
378 | signal closeClicked |
379 | signal doneClicked |
380 | -modules/Ubuntu/Components/Popups/Dialog.qml |
381 | +Dialog 0.1 1.0 |
382 | PopupBase |
383 | default property list<Object> contents |
384 | property string title |
385 | @@ -332,7 +333,7 @@ |
386 | property real edgeMargins |
387 | property real callerMargin |
388 | property bool modal |
389 | -modules/Ubuntu/Components/Popups/Popover.qml |
390 | +Popover 0.1 1.0 |
391 | PopupBase |
392 | default property list<Object> container |
393 | property real contentWidth |
394 | @@ -346,7 +347,7 @@ |
395 | function show() |
396 | function hide() |
397 | function __makeInvisible() |
398 | -modules/Ubuntu/Components/Popups/PopupBase.qml |
399 | +PopupBase 0.1 1.0 |
400 | OrientationHelper |
401 | property Item dismissArea |
402 | property bool grabDismissAreaEvents |
403 | @@ -358,7 +359,7 @@ |
404 | property bool __closeOnDismissAreaPress |
405 | property internal __dimBackground |
406 | property internal __eventGrabber |
407 | -modules/Ubuntu/Components/Popups/SheetBase.qml |
408 | +SheetBase 0.1 1.0 |
409 | PopupBase |
410 | default property list<Object> container |
411 | property real contentsWidth |
412 | @@ -367,19 +368,19 @@ |
413 | property bool modal |
414 | property internal __leftButton |
415 | property internal __rightButton |
416 | -modules/Ubuntu/Components/ProgressBar.qml |
417 | +ProgressBar 0.1 1.0 |
418 | AnimatedItem |
419 | property bool indeterminate |
420 | property real minimumValue |
421 | property real maximumValue |
422 | property real value |
423 | -modules/Ubuntu/Components/Scrollbar.qml |
424 | +Scrollbar 0.1 1.0 |
425 | StyledItem |
426 | property Flickable flickableItem |
427 | property int align |
428 | property bool __interactive |
429 | property internal __private |
430 | -modules/Ubuntu/Components/Slider.qml |
431 | +Slider 0.1 1.0 |
432 | StyledItem |
433 | property real minimumValue |
434 | property real maximumValue |
435 | @@ -389,20 +390,20 @@ |
436 | signal touched(bool onThumb) |
437 | function formatValue(v) |
438 | property internal __internals |
439 | -modules/Ubuntu/Components/StyledItem.qml |
440 | +StyledItem 0.1 1.0 |
441 | FocusScope |
442 | property Component style |
443 | readonly property Item __styleInstance |
444 | -modules/Ubuntu/Components/Switch.qml |
445 | +Switch 0.1 1.0 |
446 | CheckBox |
447 | -modules/Ubuntu/Components/Tab.qml |
448 | +Tab 0.1 1.0 |
449 | PageTreeNode |
450 | property string title |
451 | property url iconSource |
452 | property Item page |
453 | readonly property int index |
454 | property internal __protected |
455 | -modules/Ubuntu/Components/TabBar.qml |
456 | +TabBar 0.1 1.0 |
457 | StyledItem |
458 | property Item tabsItem |
459 | property var model |
460 | @@ -411,7 +412,7 @@ |
461 | property int selectedIndex |
462 | property bool alwaysSelectionMode |
463 | property bool animate |
464 | -modules/Ubuntu/Components/Tabs.qml |
465 | +Tabs 0.1 1.0 |
466 | PageTreeNode |
467 | property int selectedTabIndex |
468 | readonly property Tab selectedTab |
469 | @@ -420,7 +421,8 @@ |
470 | default property list<Item> tabChildren |
471 | readonly property int count |
472 | signal modelChanged() |
473 | -modules/Ubuntu/Components/TextArea.qml |
474 | + property var __model |
475 | +TextArea 0.1 1.0 |
476 | StyledItem |
477 | property bool highlighted |
478 | property string placeholderText |
479 | @@ -481,8 +483,7 @@ |
480 | function remove(start, end) |
481 | function undo() |
482 | function forceActiveFocus() |
483 | - property internal __internal |
484 | -modules/Ubuntu/Components/TextField.qml |
485 | +TextField 0.1 1.0 |
486 | ActionItem |
487 | property bool highlighted |
488 | property string placeholderText |
489 | @@ -547,12 +548,11 @@ |
490 | function undo() |
491 | function remove(start, end) |
492 | function getText(start, end) |
493 | - property internal __internal |
494 | -modules/Ubuntu/Components/Themes/Palette.qml |
495 | +Palette 0.1 |
496 | QtObject |
497 | property PaletteValues normal |
498 | property PaletteValues selected |
499 | -modules/Ubuntu/Components/Themes/PaletteValues.qml |
500 | +PaletteValues 0.1 |
501 | QtObject |
502 | property color background |
503 | property color backgroundText |
504 | @@ -564,40 +564,42 @@ |
505 | property color overlayText |
506 | property color field |
507 | property color fieldText |
508 | -modules/Ubuntu/Components/ToolbarButton.qml |
509 | +ToolbarButton 0.1 1.0 |
510 | ActionItem |
511 | -modules/Ubuntu/Components/ToolbarItems.qml |
512 | +ToolbarItems 0.1 1.0 |
513 | Item |
514 | default property list<Object> contents |
515 | property Item back |
516 | property Item pageStack |
517 | property bool opened |
518 | property bool locked |
519 | -modules/Ubuntu/Components/UbuntuListView.qml |
520 | +UbuntuListView 0.1 1.0 |
521 | ListView |
522 | property int expandedIndex |
523 | -modules/Ubuntu/Components/UbuntuNumberAnimation.qml |
524 | +UbuntuNumberAnimation 0.1 1.0 |
525 | NumberAnimation |
526 | -modules/Ubuntu/Components/UbuntuShape.qml |
527 | +UbuntuShape 0.1 1.0 |
528 | Item |
529 | property color color |
530 | property color gradientColor |
531 | property string radius |
532 | property Item image |
533 | property url borderSource |
534 | -modules/Ubuntu/PerformanceMetrics/PerformanceOverlay.qml |
535 | +PerformanceOverlay 0.1 1.0 |
536 | Item |
537 | property bool active |
538 | -modules/Ubuntu/Test/UbuntuTestCase.qml |
539 | +UbuntuTestCase 0.1 1.0 |
540 | TestCase |
541 | function findChild(obj,objectName) |
542 | function findInvisibleChild(obj,objectName) |
543 | function mouseMoveSlowly(item,x,y,dx,dy,steps,stepdelay) |
544 | + function flick(item, x, y, dx, dy, pressTimeout, steps, button, modifiers, delay) |
545 | + function mouseLongPress(item, x, y, button, modifiers, delay) |
546 | function tryCompareFunction(func, expectedResult, timeout) |
547 | plugins.qmltypes |
548 | name: "InverseMouseAreaType" |
549 | prototype: "QQuickMouseArea" |
550 | - exports: ["InverseMouseArea 0.1"] |
551 | + exports: ["InverseMouseArea 0.1", "InverseMouseArea 1.0"] |
552 | Property { name: "sensingArea"; type: "QQuickItem"; isPointer: true } |
553 | Property { name: "topmostItem"; type: "bool" } |
554 | Method { |
555 | @@ -605,7 +607,7 @@ |
556 | Parameter { name: "point"; type: "QPointF" } |
557 | name: "ShapeItem" |
558 | prototype: "QQuickItem" |
559 | - exports: ["Shape 0.1"] |
560 | + exports: ["Shape 0.1", "Shape 1.0"] |
561 | name: "HAlignment" |
562 | name: "VAlignment" |
563 | Property { name: "color"; type: "QColor" } |
564 | @@ -620,7 +622,7 @@ |
565 | Method { name: "gridUnitChanged" } |
566 | name: "UCAlarm" |
567 | prototype: "QObject" |
568 | - exports: ["Alarm 0.1"] |
569 | + exports: ["Alarm 0.1", "Alarm 1.0"] |
570 | name: "Status" |
571 | name: "Operation" |
572 | name: "Error" |
573 | @@ -643,14 +645,14 @@ |
574 | Method { name: "reset" } |
575 | name: "UCAlarmModel" |
576 | prototype: "QAbstractListModel" |
577 | - exports: ["AlarmModel 0.1"] |
578 | + exports: ["AlarmModel 0.1", "AlarmModel 1.0"] |
579 | Property { name: "count"; type: "int"; isReadonly: true } |
580 | Method { |
581 | name: "get" |
582 | Parameter { name: "index"; type: "int" } |
583 | name: "UCArgument" |
584 | prototype: "QObject" |
585 | - exports: ["Argument 0.1"] |
586 | + exports: ["Argument 0.1", "Argument 1.0"] |
587 | Property { name: "name"; type: "string" } |
588 | Property { name: "help"; type: "string" } |
589 | Property { name: "required"; type: "bool" } |
590 | @@ -660,7 +662,7 @@ |
591 | Parameter { name: "i"; type: "int" } |
592 | name: "UCArguments" |
593 | prototype: "QObject" |
594 | - exports: ["Arguments 0.1"] |
595 | + exports: ["Arguments 0.1", "Arguments 1.0"] |
596 | Property { name: "defaultArgument"; type: "UCArgument"; isPointer: true } |
597 | Property { name: "arguments"; type: "UCArgument"; isList: true; isReadonly: true } |
598 | Property { name: "values"; type: "QQmlPropertyMap"; isReadonly: true; isPointer: true } |
599 | @@ -673,10 +675,10 @@ |
600 | Method { name: "quitWithError" } |
601 | name: "UCInverseMouse" |
602 | prototype: "UCMouse" |
603 | - exports: ["InverseMouse 0.1"] |
604 | + exports: ["InverseMouse 0.1", "InverseMouse 1.0"] |
605 | name: "UCMouse" |
606 | prototype: "QObject" |
607 | - exports: ["Mouse 0.1"] |
608 | + exports: ["Mouse 0.1", "Mouse 1.0"] |
609 | name: "Priority" |
610 | Property { name: "enabled"; type: "bool" } |
611 | Property { name: "acceptedButtons"; type: "Qt::MouseButtons"; isReadonly: true } |
612 | @@ -687,30 +689,38 @@ |
613 | Signal { |
614 | name: "pressed" |
615 | Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true } |
616 | + Parameter { name: "host"; type: "QQuickItem"; isPointer: true } |
617 | Signal { |
618 | name: "released" |
619 | Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true } |
620 | + Parameter { name: "host"; type: "QQuickItem"; isPointer: true } |
621 | Signal { |
622 | name: "clicked" |
623 | Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true } |
624 | + Parameter { name: "host"; type: "QQuickItem"; isPointer: true } |
625 | Signal { |
626 | name: "pressAndHold" |
627 | Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true } |
628 | + Parameter { name: "host"; type: "QQuickItem"; isPointer: true } |
629 | Signal { |
630 | name: "doubleClicked" |
631 | Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true } |
632 | + Parameter { name: "host"; type: "QQuickItem"; isPointer: true } |
633 | Signal { |
634 | name: "positionChanged" |
635 | Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true } |
636 | + Parameter { name: "host"; type: "QQuickItem"; isPointer: true } |
637 | Signal { |
638 | name: "entered" |
639 | Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true } |
640 | + Parameter { name: "host"; type: "QQuickItem"; isPointer: true } |
641 | Signal { |
642 | name: "exited" |
643 | Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true } |
644 | + Parameter { name: "host"; type: "QQuickItem"; isPointer: true } |
645 | name: "UCQQuickImageExtension" |
646 | prototype: "QQuickImageBase" |
647 | - exports: ["QQuickImageBase 0.1"] |
648 | + exports: ["QQuickImageBase 0.1", "QQuickImageBase 1.0"] |
649 | Property { name: "source"; type: "QUrl" } |
650 | Signal { |
651 | name: "sourceChanged" |
652 | @@ -720,14 +730,14 @@ |
653 | Parameter { type: "QUrl" } |
654 | name: "UCStateSaver" |
655 | prototype: "QObject" |
656 | - exports: ["StateSaver 0.1"] |
657 | + exports: ["StateSaver 0.1", "StateSaver 1.0"] |
658 | name: "UCStateSaverAttached" |
659 | prototype: "QObject" |
660 | Property { name: "enabled"; type: "bool" } |
661 | Property { name: "properties"; type: "string" } |
662 | name: "UCUbuntuAnimation" |
663 | prototype: "QObject" |
664 | - exports: ["UbuntuAnimation 0.1"] |
665 | + exports: ["UbuntuAnimation 0.1", "UbuntuAnimation 1.0"] |
666 | Property { name: "SnapDuration"; type: "int"; isReadonly: true } |
667 | Property { name: "FastDuration"; type: "int"; isReadonly: true } |
668 | Property { name: "BriskDuration"; type: "int"; isReadonly: true } |
669 | @@ -737,7 +747,7 @@ |
670 | Property { name: "StandardEasingReverse"; type: "QEasingCurve"; isReadonly: true } |
671 | name: "UCUnits" |
672 | prototype: "QObject" |
673 | - exports: ["UCUnits 0.1"] |
674 | + exports: ["UCUnits 0.1", "UCUnits 1.0"] |
675 | Property { name: "gridUnit"; type: "float" } |
676 | Method { |
677 | name: "dp" |
678 | @@ -747,13 +757,13 @@ |
679 | Parameter { name: "value"; type: "float" } |
680 | name: "UCUriHandler" |
681 | prototype: "QObject" |
682 | - exports: ["UriHandler 0.1"] |
683 | + exports: ["UriHandler 0.1", "UriHandler 1.0"] |
684 | Signal { |
685 | name: "opened" |
686 | Parameter { name: "uris"; type: "QStringList" } |
687 | name: "UbuntuI18n" |
688 | prototype: "QObject" |
689 | - exports: ["i18n 0.1"] |
690 | + exports: ["i18n 0.1", "i18n 1.0"] |
691 | Property { name: "domain"; type: "string" } |
692 | Property { name: "language"; type: "string" } |
693 | Method { |
694 | @@ -780,17 +790,17 @@ |
695 | Parameter { name: "n"; type: "int" } |
696 | name: "ULConditionalLayout" |
697 | prototype: "QObject" |
698 | - exports: ["ConditionalLayout 0.1"] |
699 | + exports: ["ConditionalLayout 0.1", "ConditionalLayout 1.0"] |
700 | Property { name: "name"; type: "string" } |
701 | Property { name: "when"; type: "QQmlBinding"; isPointer: true } |
702 | Property { name: "layout"; type: "QQmlComponent"; isPointer: true } |
703 | name: "ULItemLayout" |
704 | prototype: "QQuickItem" |
705 | - exports: ["ItemLayout 0.1"] |
706 | + exports: ["ItemLayout 0.1", "ItemLayout 1.0"] |
707 | Property { name: "item"; type: "string" } |
708 | name: "ULLayouts" |
709 | prototype: "QQuickItem" |
710 | - exports: ["Layouts 0.1"] |
711 | + exports: ["Layouts 0.1", "Layouts 1.0"] |
712 | Property { name: "currentLayout"; type: "string"; isReadonly: true } |
713 | Property { name: "layouts"; type: "ULConditionalLayout"; isList: true; isReadonly: true } |
714 | name: "ULLayoutsAttached" |
715 | @@ -798,7 +808,7 @@ |
716 | Property { name: "item"; type: "string" } |
717 | name: "UPMCpuUsage" |
718 | prototype: "QQuickItem" |
719 | - exports: ["CpuUsage 0.1"] |
720 | + exports: ["CpuUsage 0.1", "CpuUsage 1.0"] |
721 | Property { name: "graphModel"; type: "UPMGraphModel"; isReadonly: true; isPointer: true } |
722 | Property { name: "period"; type: "int" } |
723 | Property { name: "samplingInterval"; type: "int" } |
724 | @@ -810,7 +820,7 @@ |
725 | Property { name: "currentValue"; type: "int"; isReadonly: true } |
726 | name: "UPMRenderingTimes" |
727 | prototype: "QQuickItem" |
728 | - exports: ["RenderingTimes 0.1"] |
729 | + exports: ["RenderingTimes 0.1", "RenderingTimes 1.0"] |
730 | Property { name: "period"; type: "int" } |
731 | Property { name: "samples"; type: "int" } |
732 | Property { name: "graphModel"; type: "UPMGraphModel"; isReadonly: true; isPointer: true } |
733 | @@ -820,5 +830,5 @@ |
734 | Parameter { name: "renderTime"; type: "qlonglong" } |
735 | name: "UPMTextureFromImage" |
736 | prototype: "QQuickItem" |
737 | - exports: ["TextureFromImage 0.1"] |
738 | + exports: ["TextureFromImage 0.1", "TextureFromImage 1.0"] |
739 | Property { name: "image"; type: "QImage" } |
740 | |
741 | === modified file 'debian/control' |
742 | --- debian/control 2014-03-17 09:02:58 +0000 |
743 | +++ debian/control 2014-04-29 23:04:44 +0000 |
744 | @@ -8,6 +8,7 @@ |
745 | libglib2.0-dev, |
746 | python3, |
747 | python, |
748 | + python3-flake8, |
749 | libqt5qml-graphicaleffects | libqt5graphicaleffects5, |
750 | qt5-default, |
751 | qtbase5-dev, |
752 | @@ -134,9 +135,12 @@ |
753 | python-autopilot (>= 1.4), |
754 | python-fixtures, |
755 | python-mock, |
756 | + python-testscenarios, |
757 | + python-testtools, |
758 | python3-fixtures, |
759 | + python3-testscenarios, |
760 | + python3-testtools, |
761 | python3-autopilot (>= 1.4), |
762 | ubuntu-ui-toolkit-examples (>= ${source:Version}), |
763 | Description: Test package for Ubuntu UI Toolkit |
764 | Autopilot tests for the ubuntu-ui-toolkit package |
765 | - |
766 | |
767 | === modified file 'debian/rules' |
768 | --- debian/rules 2014-03-27 08:59:19 +0000 |
769 | +++ debian/rules 2014-04-29 23:04:44 +0000 |
770 | @@ -9,6 +9,7 @@ |
771 | dh $@ --fail-missing |
772 | |
773 | override_dh_auto_test: |
774 | + flake8 tests/autopilot/ubuntuuitoolkit/ |
775 | ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
776 | mkdir -p debian/tmp/home/run |
777 | chmod +x tests/xvfb.sh |
778 | @@ -20,8 +21,7 @@ |
779 | dh_auto_build -- docs |
780 | |
781 | override_dh_install: |
782 | - mkdir -p debian/tmp/`qmake -query QT_INSTALL_DOCS`/qch |
783 | + mkdir -p debian/tmp/`qmake -query QT_INSTALL_DOCS`/qch |
784 | mkdir -p debian/tmp/usr/share/ubuntu-ui-toolkit/doc |
785 | cp -r $(CURDIR)/documentation/*qch debian/tmp/`qmake -query QT_INSTALL_DOCS`/qch |
786 | dh_install --fail-missing |
787 | - |
788 | |
789 | === modified file 'documentation/overview.qdoc' |
790 | --- documentation/overview.qdoc 2014-01-23 17:13:24 +0000 |
791 | +++ documentation/overview.qdoc 2014-04-29 23:04:44 +0000 |
792 | @@ -31,70 +31,75 @@ |
793 | \part Basic QML Types |
794 | Available through: |
795 | \code |
796 | - import Ubuntu.Components 0.1 |
797 | + import Ubuntu.Components 1.1 |
798 | \endcode |
799 | \annotatedlist ubuntu |
800 | |
801 | \part List Items |
802 | Available through: |
803 | \code |
804 | - import Ubuntu.Components.ListItems 0.1 |
805 | + import Ubuntu.Components.ListItems 1.0 |
806 | \endcode |
807 | \annotatedlist ubuntu-listitems |
808 | |
809 | \part Pickers |
810 | Available through: |
811 | \code |
812 | - import Ubuntu.Components.Pickers 0.1 |
813 | + import Ubuntu.Components.Pickers 1.0 |
814 | \endcode |
815 | \annotatedlist ubuntu-pickers |
816 | |
817 | \part Popovers, Sheets and Dialogs |
818 | Available through: |
819 | \code |
820 | - import Ubuntu.Components.Popups 0.1 |
821 | + import Ubuntu.Components.Popups 1.0 |
822 | \endcode |
823 | \annotatedlist ubuntu-popups |
824 | |
825 | \part Layouting |
826 | Available through: |
827 | \code |
828 | - import Ubuntu.Layouts 0.1 |
829 | + import Ubuntu.Layouts 1.0 |
830 | \endcode |
831 | \annotatedlist ubuntu-layouts |
832 | |
833 | \part Theming Elements |
834 | Available through: |
835 | \code |
836 | - import Ubuntu.Components 0.1 |
837 | + import Ubuntu.Components 1.1 |
838 | \endcode |
839 | \annotatedlist theming |
840 | |
841 | + \part Style API |
842 | + The Style API defines the interface components use to style the visuals. |
843 | + Themes must make sure that these interfaces are all implemented. |
844 | + \annotatedlist style-api |
845 | + |
846 | \part Resolution Independence Items |
847 | Available through: |
848 | \code |
849 | - import Ubuntu.Components 0.1 |
850 | + import Ubuntu.Components 1.1 |
851 | \endcode |
852 | \annotatedlist resolution-independence |
853 | |
854 | \part Parsing Command-Line Arguments |
855 | Available through: |
856 | \code |
857 | - import Ubuntu.Components 0.1 |
858 | + import Ubuntu.Components 1.1 |
859 | \endcode |
860 | \annotatedlist ubuntu-commandline |
861 | |
862 | \part Services |
863 | Available through: |
864 | \code |
865 | - import Ubuntu.Components 0.1 |
866 | + import Ubuntu.Components 1.1 |
867 | \endcode |
868 | \annotatedlist ubuntu-services |
869 | |
870 | \part Performance Metrics |
871 | Available through: |
872 | \code |
873 | - import Ubuntu.PerformanceMetrics 0.1 |
874 | + import Ubuntu.PerformanceMetrics 1.0 |
875 | \endcode |
876 | \annotatedlist ubuntu-performance-metrics |
877 | */ |
878 | |
879 | === modified file 'documentation/resolution-independence.qdoc' |
880 | --- documentation/resolution-independence.qdoc 2013-09-25 15:29:26 +0000 |
881 | +++ documentation/resolution-independence.qdoc 2014-04-29 23:04:44 +0000 |
882 | @@ -64,7 +64,7 @@ |
883 | |
884 | Example Usage: |
885 | \code |
886 | - import Ubuntu.Components 0.1 |
887 | + import Ubuntu.Components 1.1 |
888 | |
889 | Item { |
890 | width: units.gu(2) |
891 | @@ -79,7 +79,7 @@ |
892 | |
893 | Example Usage: |
894 | \code |
895 | - import Ubuntu.Components 0.1 |
896 | + import Ubuntu.Components 1.1 |
897 | |
898 | Rectangle { |
899 | height: units.dp(1) |
900 | @@ -143,7 +143,7 @@ |
901 | |
902 | Example Usage: |
903 | \code |
904 | - import Ubuntu.Components 0.1 |
905 | + import Ubuntu.Components 1.1 |
906 | |
907 | Label { |
908 | fontSize: "small" |
909 | |
910 | === modified file 'documentation/snippets/layouts/SimpleLayout.qml' |
911 | --- documentation/snippets/layouts/SimpleLayout.qml 2013-06-25 14:25:43 +0000 |
912 | +++ documentation/snippets/layouts/SimpleLayout.qml 2014-04-29 23:04:44 +0000 |
913 | @@ -15,8 +15,8 @@ |
914 | */ |
915 | |
916 | import QtQuick 2.0 |
917 | -import Ubuntu.Components 0.1 |
918 | -import Ubuntu.Layouts 0.1 |
919 | +import Ubuntu.Components 1.1 |
920 | +import Ubuntu.Layouts 1.0 |
921 | |
922 | Item { |
923 | id: root |
924 | |
925 | === modified file 'documentation/snippets/layouts/layout1.qml' |
926 | --- documentation/snippets/layouts/layout1.qml 2013-06-25 14:19:12 +0000 |
927 | +++ documentation/snippets/layouts/layout1.qml 2014-04-29 23:04:44 +0000 |
928 | @@ -16,8 +16,8 @@ |
929 | |
930 | //![0] |
931 | import QtQuick 2.0 |
932 | -import Ubuntu.Components 0.1 |
933 | -import Ubuntu.Layouts 0.1 |
934 | +import Ubuntu.Components 1.1 |
935 | +import Ubuntu.Layouts 1.0 |
936 | |
937 | Item { |
938 | id: root |
939 | |
940 | === modified file 'documentation/snippets/layouts/layout2.qml' |
941 | --- documentation/snippets/layouts/layout2.qml 2013-06-25 14:19:12 +0000 |
942 | +++ documentation/snippets/layouts/layout2.qml 2014-04-29 23:04:44 +0000 |
943 | @@ -16,8 +16,8 @@ |
944 | |
945 | //![0] |
946 | import QtQuick 2.0 |
947 | -import Ubuntu.Components 0.1 |
948 | -import Ubuntu.Layouts 0.1 |
949 | +import Ubuntu.Components 1.1 |
950 | +import Ubuntu.Layouts 1.0 |
951 | |
952 | Item { |
953 | id: root |
954 | |
955 | === modified file 'documentation/snippets/layouts/layout3.qml' |
956 | --- documentation/snippets/layouts/layout3.qml 2013-06-25 14:19:12 +0000 |
957 | +++ documentation/snippets/layouts/layout3.qml 2014-04-29 23:04:44 +0000 |
958 | @@ -16,8 +16,8 @@ |
959 | |
960 | //![0] |
961 | import QtQuick 2.0 |
962 | -import Ubuntu.Components 0.1 |
963 | -import Ubuntu.Layouts 0.1 |
964 | +import Ubuntu.Components 1.1 |
965 | +import Ubuntu.Layouts 1.0 |
966 | |
967 | Item { |
968 | id: root |
969 | |
970 | === modified file 'documentation/snippets/layouts/layout6.qml' |
971 | --- documentation/snippets/layouts/layout6.qml 2013-06-25 14:19:12 +0000 |
972 | +++ documentation/snippets/layouts/layout6.qml 2014-04-29 23:04:44 +0000 |
973 | @@ -16,8 +16,8 @@ |
974 | |
975 | //![0] |
976 | import QtQuick 2.0 |
977 | -import Ubuntu.Components 0.1 |
978 | -import Ubuntu.Layouts 0.1 |
979 | +import Ubuntu.Components 1.1 |
980 | +import Ubuntu.Layouts 1.0 |
981 | |
982 | Item { |
983 | id: root |
984 | |
985 | === modified file 'documentation/snippets/layouts/layout7.qml' |
986 | --- documentation/snippets/layouts/layout7.qml 2013-06-25 14:19:12 +0000 |
987 | +++ documentation/snippets/layouts/layout7.qml 2014-04-29 23:04:44 +0000 |
988 | @@ -16,8 +16,8 @@ |
989 | |
990 | //![0] |
991 | import QtQuick 2.0 |
992 | -import Ubuntu.Components 0.1 |
993 | -import Ubuntu.Layouts 0.1 |
994 | +import Ubuntu.Components 1.1 |
995 | +import Ubuntu.Layouts 1.0 |
996 | |
997 | Item { |
998 | id: root |
999 | |
1000 | === modified file 'documentation/snippets/statesaver/ColorChanger.qml' |
1001 | --- documentation/snippets/statesaver/ColorChanger.qml 2013-09-24 06:20:26 +0000 |
1002 | +++ documentation/snippets/statesaver/ColorChanger.qml 2014-04-29 23:04:44 +0000 |
1003 | @@ -16,7 +16,7 @@ |
1004 | |
1005 | //![color-saver] |
1006 | import QtQuick 2.0 |
1007 | -import Ubuntu.Components 0.1 |
1008 | +import Ubuntu.Components 1.1 |
1009 | |
1010 | Rectangle { |
1011 | id: root |
1012 | |
1013 | === modified file 'documentation/snippets/statesaver/MultiplePropertySaver.qml' |
1014 | --- documentation/snippets/statesaver/MultiplePropertySaver.qml 2013-09-24 06:20:26 +0000 |
1015 | +++ documentation/snippets/statesaver/MultiplePropertySaver.qml 2014-04-29 23:04:44 +0000 |
1016 | @@ -16,7 +16,7 @@ |
1017 | |
1018 | //![group-saver] |
1019 | import QtQuick 2.0 |
1020 | -import Ubuntu.Components 0.1 |
1021 | +import Ubuntu.Components 1.1 |
1022 | |
1023 | Rectangle { |
1024 | id: root |
1025 | |
1026 | === modified file 'documentation/snippets/statesaver/PropertyGroupSaver.qml' |
1027 | --- documentation/snippets/statesaver/PropertyGroupSaver.qml 2013-09-24 06:20:26 +0000 |
1028 | +++ documentation/snippets/statesaver/PropertyGroupSaver.qml 2014-04-29 23:04:44 +0000 |
1029 | @@ -16,7 +16,7 @@ |
1030 | |
1031 | //![property-group-saver] |
1032 | import QtQuick 2.0 |
1033 | -import Ubuntu.Components 0.1 |
1034 | +import Ubuntu.Components 1.1 |
1035 | |
1036 | Rectangle { |
1037 | id: root |
1038 | |
1039 | === modified file 'documentation/snippets/statesaver/PropertyGroupSaver2.qml' |
1040 | --- documentation/snippets/statesaver/PropertyGroupSaver2.qml 2013-09-24 06:20:26 +0000 |
1041 | +++ documentation/snippets/statesaver/PropertyGroupSaver2.qml 2014-04-29 23:04:44 +0000 |
1042 | @@ -16,7 +16,7 @@ |
1043 | |
1044 | //![property-group-saver] |
1045 | import QtQuick 2.0 |
1046 | -import Ubuntu.Components 0.1 |
1047 | +import Ubuntu.Components 1.1 |
1048 | |
1049 | Rectangle { |
1050 | id: root |
1051 | |
1052 | === modified file 'documentation/ubuntu-components-listitems.qdoc' |
1053 | --- documentation/ubuntu-components-listitems.qdoc 2013-09-25 15:29:26 +0000 |
1054 | +++ documentation/ubuntu-components-listitems.qdoc 2014-04-29 23:04:44 +0000 |
1055 | @@ -15,6 +15,6 @@ |
1056 | */ |
1057 | |
1058 | /*! |
1059 | - \qmlmodule Ubuntu.Components.ListItems 0.1 |
1060 | + \qmlmodule Ubuntu.Components.ListItems 1.0 |
1061 | \title List Items |
1062 | */ |
1063 | |
1064 | === modified file 'documentation/ubuntu-components-pickers.qdoc' |
1065 | --- documentation/ubuntu-components-pickers.qdoc 2013-09-25 15:29:26 +0000 |
1066 | +++ documentation/ubuntu-components-pickers.qdoc 2014-04-29 23:04:44 +0000 |
1067 | @@ -15,6 +15,6 @@ |
1068 | */ |
1069 | |
1070 | /*! |
1071 | - \qmlmodule Ubuntu.Components.Pickers 0.1 |
1072 | + \qmlmodule Ubuntu.Components.Pickers 1.0 |
1073 | \title Pickers |
1074 | */ |
1075 | |
1076 | === modified file 'documentation/ubuntu-components-popups.qdoc' |
1077 | --- documentation/ubuntu-components-popups.qdoc 2013-09-25 15:29:26 +0000 |
1078 | +++ documentation/ubuntu-components-popups.qdoc 2014-04-29 23:04:44 +0000 |
1079 | @@ -15,6 +15,6 @@ |
1080 | */ |
1081 | |
1082 | /*! |
1083 | - \qmlmodule Ubuntu.Components.Popups 0.1 |
1084 | + \qmlmodule Ubuntu.Components.Popups 1.0 |
1085 | \title Popovers, Sheets and Dialogs |
1086 | */ |
1087 | |
1088 | === modified file 'documentation/ubuntu-components.qdoc' |
1089 | --- documentation/ubuntu-components.qdoc 2013-09-25 15:29:26 +0000 |
1090 | +++ documentation/ubuntu-components.qdoc 2014-04-29 23:04:44 +0000 |
1091 | @@ -15,7 +15,7 @@ |
1092 | */ |
1093 | |
1094 | /*! |
1095 | - \qmlmodule Ubuntu.Components 0.1 |
1096 | + \qmlmodule Ubuntu.Components 1.1 |
1097 | \title Basic QML Types |
1098 | \nextpage {Ubuntu User Interface Toolkit} |
1099 | */ |
1100 | |
1101 | === modified file 'documentation/ubuntu-layouts.qdoc' |
1102 | --- documentation/ubuntu-layouts.qdoc 2013-09-25 15:29:26 +0000 |
1103 | +++ documentation/ubuntu-layouts.qdoc 2014-04-29 23:04:44 +0000 |
1104 | @@ -15,6 +15,11 @@ |
1105 | */ |
1106 | |
1107 | /*! |
1108 | + \qmlmodule Ubuntu.Layouts 1.0 |
1109 | + \title Layouts |
1110 | +*/ |
1111 | + |
1112 | +/*! |
1113 | \page ubuntu-layouts.html |
1114 | \title Layouts - Introduction |
1115 | \nextpage Layouts - Terminology |
1116 | @@ -177,7 +182,7 @@ |
1117 | \section2 Import |
1118 | First of all, in order to use the layouting abilities, you need to import Ubuntu.Layouts. |
1119 | \code |
1120 | - import Ubuntu.Layouts 0.1 |
1121 | + import Ubuntu.Layouts 1.0 |
1122 | \endcode |
1123 | |
1124 | This layout will have the red button anchored to the parent's left, top and bottom, having |
1125 | |
1126 | === modified file 'examples/calculator/calculator.qml' |
1127 | --- examples/calculator/calculator.qml 2013-07-03 06:41:54 +0000 |
1128 | +++ examples/calculator/calculator.qml 2014-04-29 23:04:44 +0000 |
1129 | @@ -17,8 +17,8 @@ |
1130 | */ |
1131 | |
1132 | import QtQuick 2.0 |
1133 | -import Ubuntu.Components 0.1 |
1134 | -import Ubuntu.Layouts 0.1 |
1135 | +import Ubuntu.Components 1.1 |
1136 | +import Ubuntu.Layouts 1.0 |
1137 | import "components" |
1138 | import "components/calculator.js" as Calculator |
1139 | |
1140 | |
1141 | === modified file 'examples/calculator/components/DefaultLayout.qml' |
1142 | --- examples/calculator/components/DefaultLayout.qml 2013-07-02 14:42:23 +0000 |
1143 | +++ examples/calculator/components/DefaultLayout.qml 2014-04-29 23:04:44 +0000 |
1144 | @@ -17,8 +17,8 @@ |
1145 | */ |
1146 | |
1147 | import QtQuick 2.0 |
1148 | -import Ubuntu.Components 0.1 |
1149 | -import Ubuntu.Layouts 0.1 |
1150 | +import Ubuntu.Components 1.1 |
1151 | +import Ubuntu.Layouts 1.0 |
1152 | |
1153 | Item { |
1154 | id: buttonGrid |
1155 | |
1156 | === modified file 'examples/calculator/components/Functions.qml' |
1157 | --- examples/calculator/components/Functions.qml 2013-07-02 14:42:23 +0000 |
1158 | +++ examples/calculator/components/Functions.qml 2014-04-29 23:04:44 +0000 |
1159 | @@ -17,8 +17,8 @@ |
1160 | */ |
1161 | |
1162 | import QtQuick 2.0 |
1163 | -import Ubuntu.Components 0.1 |
1164 | -import Ubuntu.Layouts 0.1 |
1165 | +import Ubuntu.Components 1.1 |
1166 | +import Ubuntu.Layouts 1.0 |
1167 | |
1168 | Grid { |
1169 | id: buttonGrid |
1170 | |
1171 | === modified file 'examples/jokes/jokes.qml' |
1172 | --- examples/jokes/jokes.qml 2013-07-04 21:36:23 +0000 |
1173 | +++ examples/jokes/jokes.qml 2014-04-29 23:04:44 +0000 |
1174 | @@ -16,7 +16,7 @@ |
1175 | */ |
1176 | |
1177 | import QtQuick 2.0 |
1178 | -import Ubuntu.Components 0.1 |
1179 | +import Ubuntu.Components 1.1 |
1180 | import QtMultimedia 5.0 |
1181 | |
1182 | /*! |
1183 | |
1184 | === modified file 'examples/locale/locale.qml' |
1185 | --- examples/locale/locale.qml 2013-07-04 21:36:23 +0000 |
1186 | +++ examples/locale/locale.qml 2014-04-29 23:04:44 +0000 |
1187 | @@ -16,8 +16,8 @@ |
1188 | */ |
1189 | |
1190 | import QtQuick 2.0 |
1191 | -import Ubuntu.Components 0.1 |
1192 | -import Ubuntu.Components.ListItems 0.1 as ListItem |
1193 | +import Ubuntu.Components 1.1 |
1194 | +import Ubuntu.Components.ListItems 1.0 as ListItem |
1195 | |
1196 | /*! |
1197 | \brief An application to test locales on the device |
1198 | |
1199 | === modified file 'examples/ubuntu-ui-toolkit-gallery/Buttons.qml' |
1200 | --- examples/ubuntu-ui-toolkit-gallery/Buttons.qml 2014-03-04 12:16:38 +0000 |
1201 | +++ examples/ubuntu-ui-toolkit-gallery/Buttons.qml 2014-04-29 23:04:44 +0000 |
1202 | @@ -15,7 +15,8 @@ |
1203 | */ |
1204 | |
1205 | import QtQuick 2.0 |
1206 | -import Ubuntu.Components 0.1 |
1207 | +import Ubuntu.Components 1.1 |
1208 | +import Ubuntu.Components.ListItems 1.0 |
1209 | |
1210 | Template { |
1211 | objectName: "buttonsTemplate" |
1212 | @@ -80,4 +81,67 @@ |
1213 | } |
1214 | } |
1215 | } |
1216 | + |
1217 | + TemplateSection { |
1218 | + className: "ComboButton" |
1219 | + |
1220 | + TemplateRow { |
1221 | + title: i18n.tr("Collapsed") |
1222 | + |
1223 | + ComboButton { |
1224 | + text: "Press me" |
1225 | + objectName: "combobutton_collapsed" |
1226 | + comboList: UbuntuListView { |
1227 | + model: 10 |
1228 | + delegate: Standard { |
1229 | + text: "item #" + modelData |
1230 | + } |
1231 | + } |
1232 | + } |
1233 | + } |
1234 | + |
1235 | + TemplateRow { |
1236 | + title: i18n.tr("Icon") |
1237 | + |
1238 | + ComboButton { |
1239 | + iconSource: "call.png" |
1240 | + comboList: UbuntuListView { |
1241 | + model: 10 |
1242 | + delegate: Standard { |
1243 | + text: "item #" + modelData |
1244 | + } |
1245 | + } |
1246 | + } |
1247 | + } |
1248 | + |
1249 | + TemplateRow { |
1250 | + title: i18n.tr("Icon+Text") |
1251 | + |
1252 | + ComboButton { |
1253 | + text: "Answer" |
1254 | + iconSource: "call.png" |
1255 | + comboList: UbuntuListView { |
1256 | + model: 10 |
1257 | + delegate: Standard { |
1258 | + text: "item #" + modelData |
1259 | + } |
1260 | + } |
1261 | + } |
1262 | + } |
1263 | + TemplateRow { |
1264 | + title: i18n.tr("Expanded") |
1265 | + |
1266 | + ComboButton { |
1267 | + text: "Press me" |
1268 | + objectName: "combobutton_expanded" |
1269 | + expanded: true |
1270 | + comboList: UbuntuListView { |
1271 | + model: 10 |
1272 | + delegate: Standard { |
1273 | + text: "item #" + modelData |
1274 | + } |
1275 | + } |
1276 | + } |
1277 | + } |
1278 | + } |
1279 | } |
1280 | |
1281 | === modified file 'examples/ubuntu-ui-toolkit-gallery/Label.qml' |
1282 | --- examples/ubuntu-ui-toolkit-gallery/Label.qml 2013-11-28 11:11:55 +0000 |
1283 | +++ examples/ubuntu-ui-toolkit-gallery/Label.qml 2014-04-29 23:04:44 +0000 |
1284 | @@ -15,7 +15,7 @@ |
1285 | */ |
1286 | |
1287 | import QtQuick 2.0 |
1288 | -import Ubuntu.Components 0.1 |
1289 | +import Ubuntu.Components 1.0 |
1290 | |
1291 | Template { |
1292 | objectName: "labelsTemplate" |
1293 | |
1294 | === modified file 'examples/unit-converter/unit-converter.qml' |
1295 | --- examples/unit-converter/unit-converter.qml 2013-05-06 16:24:50 +0000 |
1296 | +++ examples/unit-converter/unit-converter.qml 2014-04-29 23:04:44 +0000 |
1297 | @@ -15,7 +15,7 @@ |
1298 | */ |
1299 | |
1300 | import QtQuick 2.0 |
1301 | -import Ubuntu.Components 0.1 |
1302 | +import Ubuntu.Components 1.1 |
1303 | import "conversion.js" as Converter |
1304 | |
1305 | /*! |
1306 | |
1307 | === modified file 'manual-tests/button.qml' |
1308 | --- manual-tests/button.qml 2012-11-14 07:40:05 +0000 |
1309 | +++ manual-tests/button.qml 2014-04-29 23:04:44 +0000 |
1310 | @@ -15,7 +15,7 @@ |
1311 | */ |
1312 | |
1313 | import QtQuick 2.0 |
1314 | -import Ubuntu.Components 0.1 |
1315 | +import Ubuntu.Components 1.1 |
1316 | |
1317 | Button { |
1318 | id: button |
1319 | |
1320 | === modified file 'modules/Ubuntu/Components/AbstractButton.qml' |
1321 | --- modules/Ubuntu/Components/AbstractButton.qml 2013-11-06 22:52:15 +0000 |
1322 | +++ modules/Ubuntu/Components/AbstractButton.qml 2014-04-29 23:04:44 +0000 |
1323 | @@ -19,7 +19,7 @@ |
1324 | |
1325 | /*! |
1326 | \qmlabstract AbstractButton |
1327 | - \inqmlmodule Ubuntu.Components 0.1 |
1328 | + \inqmlmodule Ubuntu.Components 1.1 |
1329 | \ingroup ubuntu |
1330 | \brief The AbstractButton class defines the behavior of the button. |
1331 | |
1332 | |
1333 | === modified file 'modules/Ubuntu/Components/Action.qml' |
1334 | --- modules/Ubuntu/Components/Action.qml 2014-02-24 18:24:59 +0000 |
1335 | +++ modules/Ubuntu/Components/Action.qml 2014-04-29 23:04:44 +0000 |
1336 | @@ -19,7 +19,7 @@ |
1337 | |
1338 | /*! |
1339 | \qmltype Action |
1340 | - \inqmlmodule Ubuntu.Components 0.1 |
1341 | + \inqmlmodule Ubuntu.Components 1.1 |
1342 | \ingroup ubuntu |
1343 | \brief Describe an action that can be re-used in, for example a \l Button |
1344 | |
1345 | |
1346 | === modified file 'modules/Ubuntu/Components/ActionItem.qml' |
1347 | --- modules/Ubuntu/Components/ActionItem.qml 2014-02-24 18:24:59 +0000 |
1348 | +++ modules/Ubuntu/Components/ActionItem.qml 2014-04-29 23:04:44 +0000 |
1349 | @@ -18,7 +18,7 @@ |
1350 | |
1351 | /*! |
1352 | \qmlabstract ActionItem |
1353 | - \inqmlmodule Ubuntu.Components 0.1 |
1354 | + \inqmlmodule Ubuntu.Components 1.1 |
1355 | \ingroup ubuntu |
1356 | \brief A visual representation of an Action. The API of ActionItem is a |
1357 | copy of the API of \l Action, with additional properties to define |
1358 | @@ -54,6 +54,7 @@ |
1359 | The image associated with the actionItem. |
1360 | Default value: action.iconSource. |
1361 | |
1362 | + This is the URL of any image file |
1363 | If both iconSource and iconName are defined, iconName will be ignored. |
1364 | */ |
1365 | property url iconSource: action ? action.iconSource : (iconName ? "image://theme/" + iconName : "") |
1366 | @@ -62,6 +63,14 @@ |
1367 | The icon associated with the actionItem in the ubuntu-mobile icon theme. |
1368 | Default value: action.iconName. |
1369 | |
1370 | + \note The complete list of icons available in Ubuntu is not published yet. |
1371 | + For now please refer to the folders where the icon themes are installed: |
1372 | + \list |
1373 | + \li Ubuntu Touch: \l file:/usr/share/icons/ubuntu-mobile |
1374 | + \li Ubuntu Desktop: \l file:/usr/share/icons/ubuntu-mono-dark |
1375 | + \endlist |
1376 | + These 2 separate icon themes will be merged soon. |
1377 | + |
1378 | If both iconSource and iconName are defined, iconName will be ignored. |
1379 | */ |
1380 | property string iconName: action ? action.iconName : "" |
1381 | |
1382 | === modified file 'modules/Ubuntu/Components/ActionList.qml' |
1383 | --- modules/Ubuntu/Components/ActionList.qml 2013-08-28 10:41:42 +0000 |
1384 | +++ modules/Ubuntu/Components/ActionList.qml 2014-04-29 23:04:44 +0000 |
1385 | @@ -18,7 +18,7 @@ |
1386 | |
1387 | /*! |
1388 | \qmltype ActionList |
1389 | - \inqmlmodule Ubuntu.Components 0.1 |
1390 | + \inqmlmodule Ubuntu.Components 1.1 |
1391 | \ingroup ubuntu |
1392 | \brief List of \l Action items |
1393 | */ |
1394 | |
1395 | === modified file 'modules/Ubuntu/Components/ActivityIndicator.qml' |
1396 | --- modules/Ubuntu/Components/ActivityIndicator.qml 2013-06-27 15:20:12 +0000 |
1397 | +++ modules/Ubuntu/Components/ActivityIndicator.qml 2014-04-29 23:04:44 +0000 |
1398 | @@ -18,7 +18,7 @@ |
1399 | |
1400 | /*! |
1401 | \qmltype ActivityIndicator |
1402 | - \inqmlmodule Ubuntu.Components 0.1 |
1403 | + \inqmlmodule Ubuntu.Components 1.1 |
1404 | \ingroup ubuntu |
1405 | \brief The ActivityIndicator component visually indicates that a task of |
1406 | unknown duration is in progress, e.g. busy indication, connection in progress |
1407 | |
1408 | === modified file 'modules/Ubuntu/Components/AnimatedItem.qml' |
1409 | --- modules/Ubuntu/Components/AnimatedItem.qml 2013-06-26 19:25:09 +0000 |
1410 | +++ modules/Ubuntu/Components/AnimatedItem.qml 2014-04-29 23:04:44 +0000 |
1411 | @@ -16,7 +16,7 @@ |
1412 | |
1413 | /*! |
1414 | \qmltype AnimatedItem |
1415 | - \inqmlmodule Ubuntu.Components 0.1 |
1416 | + \inqmlmodule Ubuntu.Components 1.1 |
1417 | \ingroup ubuntu |
1418 | \brief The AnimatedItem drives the animated components behavior inside a Flickable. |
1419 | Reports whether the component whos parent is a Flickable is in the visible area or not, |
1420 | |
1421 | === modified file 'modules/Ubuntu/Components/Button.qml' |
1422 | --- modules/Ubuntu/Components/Button.qml 2013-11-06 22:52:15 +0000 |
1423 | +++ modules/Ubuntu/Components/Button.qml 2014-04-29 23:04:44 +0000 |
1424 | @@ -18,7 +18,7 @@ |
1425 | |
1426 | /*! |
1427 | \qmltype Button |
1428 | - \inqmlmodule Ubuntu.Components 0.1 |
1429 | + \inqmlmodule Ubuntu.Components 1.1 |
1430 | \ingroup ubuntu |
1431 | \brief Standard Ubuntu button. |
1432 | |
1433 | @@ -83,6 +83,11 @@ |
1434 | property Gradient gradient: __styleInstance.defaultGradient |
1435 | |
1436 | /*! |
1437 | + The font used for the button's text. |
1438 | + */ |
1439 | + property font font: __styleInstance ? __styleInstance.defaultFont : Qt.font({family: "Ubuntu", pixelSize: FontUtils.sizeToPixels("medium")}) |
1440 | + |
1441 | + /*! |
1442 | The source URL of the icon to display inside the button. |
1443 | Leave this value blank for a text-only button. |
1444 | If \l action is set, the default iconSource is that of the action. |
1445 | |
1446 | === modified file 'modules/Ubuntu/Components/CheckBox.qml' |
1447 | --- modules/Ubuntu/Components/CheckBox.qml 2013-10-01 14:46:11 +0000 |
1448 | +++ modules/Ubuntu/Components/CheckBox.qml 2014-04-29 23:04:44 +0000 |
1449 | @@ -18,7 +18,7 @@ |
1450 | |
1451 | /*! |
1452 | \qmltype CheckBox |
1453 | - \inqmlmodule Ubuntu.Components 0.1 |
1454 | + \inqmlmodule Ubuntu.Components 1.1 |
1455 | \ingroup ubuntu |
1456 | \brief CheckBox is a component with two states, checked or unchecked. It can |
1457 | be used to set boolean options. The behavior is the same as \l Switch, the |
1458 | |
1459 | === added file 'modules/Ubuntu/Components/ComboButton.qml' |
1460 | --- modules/Ubuntu/Components/ComboButton.qml 1970-01-01 00:00:00 +0000 |
1461 | +++ modules/Ubuntu/Components/ComboButton.qml 2014-04-29 23:04:44 +0000 |
1462 | @@ -0,0 +1,366 @@ |
1463 | +/* |
1464 | + * Copyright 2014 Canonical Ltd. |
1465 | + * |
1466 | + * This program is free software; you can redistribute it and/or modify |
1467 | + * it under the terms of the GNU Lesser General Public License as published by |
1468 | + * the Free Software Foundation; version 3. |
1469 | + * |
1470 | + * This program is distributed in the hope that it will be useful, |
1471 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1472 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1473 | + * GNU Lesser General Public License for more details. |
1474 | + * |
1475 | + * You should have received a copy of the GNU Lesser General Public License |
1476 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1477 | + */ |
1478 | + |
1479 | +import QtQuick 2.0 |
1480 | +import Ubuntu.Components.Popups 1.0 |
1481 | +import "mathUtils.js" as MathUtils |
1482 | + |
1483 | +/*! |
1484 | + \qmltype ComboButton |
1485 | + \inqmlmodule Ubuntu.Components 1.1 |
1486 | + \ingroup ubuntu |
1487 | + \brief Ubuntu button providing a drop-down panel visualizing custom options. |
1488 | + |
1489 | + The component is composed of three main blocks: \b {main button}, \b {dropdown} |
1490 | + and \b {combo list}. |
1491 | + |
1492 | + The \a {main button} holds the main functionailty of the component, and it is |
1493 | + located at the left-top side of the expanded button. The \a clicked() signal |
1494 | + is triggered only when this button is pressed. |
1495 | + |
1496 | + The \a {dropdown} is a button located on the right of the main button. Its |
1497 | + functionality is to drive the component's expanded state. |
1498 | + |
1499 | + The \a {combo list} is a panel showing the content specified in \l comboList |
1500 | + property when expanded. The content is stretched horizontally to the component's |
1501 | + width, and its height is controlled by the \l expandedHeight property as follows: |
1502 | + \list |
1503 | + \li If the content height is smaller than the value of \l expandedHeight, the combo |
1504 | + list will be expanded only to the height of the content. |
1505 | + \qml |
1506 | + import QtQuick 2.0 |
1507 | + import Ubuntu.Components 1.1 |
1508 | + ComboButton { |
1509 | + text: "smaller content" |
1510 | + Rectangle { |
1511 | + height: units.gu(5) // smaller than the default expandedHeight |
1512 | + color: "blue" |
1513 | + } |
1514 | + } |
1515 | + \endqml |
1516 | + \li If the content height is greater than \l expandedHeight, the combo list will |
1517 | + expand till the height specified by the property and the content will be |
1518 | + scrolled; in case the combo list content is one single Flickable, ListView, |
1519 | + GridView or PathView, the content scrolling will be provided by the content |
1520 | + itself. |
1521 | + \qml |
1522 | + import QtQuick 2.0 |
1523 | + import Ubuntu.Components 1.1 |
1524 | + ComboButton { |
1525 | + text: "long scrolled content" |
1526 | + Column { |
1527 | + Repeater { |
1528 | + model: 5 |
1529 | + spacing: units.gu(1) |
1530 | + Rectangle { |
1531 | + height: units.gu(5) |
1532 | + color: "blue" |
1533 | + } |
1534 | + } |
1535 | + } |
1536 | + } |
1537 | + \endqml |
1538 | + \li In case the content is a single Flickable, ListView, GridView or PathView, |
1539 | + the content will be filling the entire combo list area defined. |
1540 | + \qml |
1541 | + import QtQuick 2.0 |
1542 | + import Ubuntu.Components 1.1 |
1543 | + import Ubuntu.Components.ListItems 1.0 |
1544 | + ComboButton { |
1545 | + text: "listview" |
1546 | + ListView { |
1547 | + model: 10 |
1548 | + delegate: Standard { |
1549 | + text: "Item #" + modelData |
1550 | + } |
1551 | + } |
1552 | + } |
1553 | + \endqml |
1554 | + \li Vertical anchoring of combo list content to its parent is not possible |
1555 | + as the expansion calculation is done based on the combo list content height. |
1556 | + If the content wants to take the size of the entire combo list, it should |
1557 | + bind its height to the \l comboListHeight property. |
1558 | + \qml |
1559 | + import QtQuick 2.0 |
1560 | + import Ubuntu.Components 1.1 |
1561 | + ComboButton { |
1562 | + id: combo |
1563 | + text: "smaller content" |
1564 | + Rectangle { |
1565 | + height: combo.comboListHeight |
1566 | + color: "blue" |
1567 | + } |
1568 | + } |
1569 | + \endqml |
1570 | + \li In case the expansion needs to be the size of the combo list content, the \l |
1571 | + expandedHeight should be set to -1. |
1572 | + \qml |
1573 | + import QtQuick 2.0 |
1574 | + import Ubuntu.Components 1.1 |
1575 | + ComboButton { |
1576 | + text: "auto-sized content" |
1577 | + expandedHeight: -1 |
1578 | + Column { |
1579 | + Repeater { |
1580 | + model: 5 |
1581 | + spacing: units.gu(1) |
1582 | + Button { |
1583 | + text: "Button #" + modelData |
1584 | + } |
1585 | + } |
1586 | + } |
1587 | + } |
1588 | + \endqml |
1589 | + \endlist |
1590 | + |
1591 | + The combo list can be expanded/collapsed either through the \l expanded property |
1592 | + or by clicking on the dropdown button. It is not collapsed when pressing the main |
1593 | + button or clicking on the combo list. In order to do an auto-collapsing button |
1594 | + you must reset the expanded property (set it to false) when the main button is |
1595 | + clicked or when a selection is taken from the combo list content. The following |
1596 | + example illustrates a possible implementation. |
1597 | + |
1598 | + \qml |
1599 | + import QtQuick 2.0 |
1600 | + import Ubuntu.Components 1.1 |
1601 | + |
1602 | + ComboButton { |
1603 | + id: combo |
1604 | + text: "Auto closing" |
1605 | + expanded: true |
1606 | + expandedHeight: units.gu(30) |
1607 | + onClicked: expanded = false |
1608 | + UbuntuListView { |
1609 | + width: parent.width |
1610 | + height: combo.comboListHeight |
1611 | + model: 20 |
1612 | + delegate: Standard { |
1613 | + text: "Action #" + modelData |
1614 | + onClicked: { |
1615 | + combo.text = text; |
1616 | + combo.expanded = false; |
1617 | + } |
1618 | + } |
1619 | + } |
1620 | + } |
1621 | + \endqml |
1622 | + |
1623 | + \section2 Styling |
1624 | + The style of the component is defined in \l ComboButtonStyle. |
1625 | + */ |
1626 | +Button { |
1627 | + id: combo |
1628 | + |
1629 | + /*! |
1630 | + Specifies whether the combo list is expanded or not. The default falue is |
1631 | + false. |
1632 | + */ |
1633 | + property bool expanded: false |
1634 | + |
1635 | + /*! |
1636 | + The property holds the height of the component when collapsed. By default |
1637 | + the value is the implicit height of the component. |
1638 | + */ |
1639 | + property real collapsedHeight: implicitHeight |
1640 | + |
1641 | + /*! |
1642 | + The property holds the maximum height value the component should expand. |
1643 | + When setting the property, remember to take into account the \l collapsedHeight |
1644 | + value. The best practice is to use bind it with collapsedHeight. |
1645 | + \qml |
1646 | + ComboButton { |
1647 | + text: "altered expandedHeight" |
1648 | + expandedHeight: collapsedHeight + units.gu(25) |
1649 | + } |
1650 | + \endqml |
1651 | + |
1652 | + A value of -1 will instruct the component to expand the combo list as |
1653 | + much as its content height is. |
1654 | + |
1655 | + The default value is \l collapsedHeight + 19.5 GU, so at least 3 ListItems |
1656 | + can fit in the combo list. |
1657 | + \sa collapsedHeight |
1658 | + */ |
1659 | + property real expandedHeight: collapsedHeight + units.gu(19.5) |
1660 | + |
1661 | + /*! |
1662 | + The property holds the maximum combo list height allowed based on the |
1663 | + \l expandedHeight and \l collapsedHeight values. It is a convenience property |
1664 | + that can be used to size the combo list content. |
1665 | + \qml |
1666 | + import QtQuick 2.0 |
1667 | + import Ubuntu.Components 1.1 |
1668 | + import Ubuntu.Components.ListItems 0.1 |
1669 | + ComboButton { |
1670 | + id: combo |
1671 | + text: "Full comboList size" |
1672 | + ListView { |
1673 | + anchors { |
1674 | + left: parent.left |
1675 | + right: parent.right |
1676 | + } |
1677 | + height: combo.comboListHeight |
1678 | + model: 20 |
1679 | + delegate: Standard { |
1680 | + text: "Action #" + modelData |
1681 | + } |
1682 | + } |
1683 | + } |
1684 | + \endqml |
1685 | + |
1686 | + \sa collapsedHeight, expandedHeight |
1687 | + */ |
1688 | + readonly property real comboListHeight: (expandedHeight < 0) ? |
1689 | + comboListHolder.height : |
1690 | + (expandedHeight - collapsedHeight - |
1691 | + (combo.__styleInstance ? combo.__styleInstance.comboListMargin : 0)) |
1692 | + |
1693 | + /*! |
1694 | + \qmlproperty list<Item> comboList |
1695 | + \default |
1696 | + Property holding the list of items to be shown in the combo list. Being |
1697 | + a default property children items declared will land in the combo list. |
1698 | + \note The component is not responsible for layouting the content. It only |
1699 | + provides scrolling abilities for the case the content exceeds the defined |
1700 | + expanded height. |
1701 | + */ |
1702 | + default property alias comboList: comboListHolder.data |
1703 | + |
1704 | + /* ----------------- Color and font configurations ----------------- */ |
1705 | + /*! |
1706 | + The property specifies the color of the dropdown button and the combo list |
1707 | + for both collapsed and expanded states. You can use \l expanded to define |
1708 | + different colors for expanded or collapsed states. |
1709 | + */ |
1710 | + property color dropdownColor: __styleInstance ? __styleInstance.defaultDropdownColor : color |
1711 | + |
1712 | + |
1713 | + style: Theme.createStyleComponent("ComboButtonStyle.qml", combo) |
1714 | + |
1715 | + Component.onCompleted: { |
1716 | + // update mouse area to report clicks only on the main button area |
1717 | + // area excluding dropDown button and combo list |
1718 | + // we must do separate bindings as __mouseArea is a read-only property |
1719 | + __mouseArea.anchors.fill = undefined; |
1720 | + __mouseArea.anchors.left = Qt.binding(function() {return combo.left;}); |
1721 | + __mouseArea.anchors.top = Qt.binding(function() {return combo.top;}); |
1722 | + __mouseArea.anchors.right = Qt.binding(function() {return combo.right;}); |
1723 | + __mouseArea.anchors.rightMargin = Qt.binding(function() {return combo.__styleInstance.dropDownWidth + combo.__styleInstance.dropDownSeparatorWidth;}); |
1724 | + __mouseArea.height = Qt.binding(function() {return collapsedHeight;}); |
1725 | + // for autopilot, set the main button name |
1726 | + __mouseArea.objectName = "combobutton_mainbutton"; |
1727 | + |
1728 | + // bind a height calculation to avoid unwanted change |
1729 | + combo.height = Qt.binding(function() {return collapsedHeight + __styleInstance.comboListPanel.height}); |
1730 | + } |
1731 | + |
1732 | + // dropdown button |
1733 | + AbstractButton { |
1734 | + id: dropDown |
1735 | + objectName: "combobutton_dropdown" |
1736 | + anchors { |
1737 | + right: parent.right |
1738 | + top: parent.top |
1739 | + } |
1740 | + width: combo.__styleInstance ? combo.__styleInstance.dropDownWidth : 0 |
1741 | + height: combo.collapsedHeight |
1742 | + // open dropdown when pressed, not when clicked |
1743 | + onClicked: { |
1744 | + // toggle expanded |
1745 | + combo.expanded = !combo.expanded; |
1746 | + } |
1747 | + } |
1748 | + |
1749 | + // expansion list |
1750 | + Flickable { |
1751 | + id: comboHolder |
1752 | + parent: combo.__styleInstance ? combo.__styleInstance.comboListHolder : combo |
1753 | + anchors.fill: parent |
1754 | + interactive: combo.expanded && !contentIsFlickable() && (combo.expandedHeight > 0) |
1755 | + flickableDirection: Flickable.VerticalFlick |
1756 | + contentHeight: comboListHolder.height |
1757 | + |
1758 | + // consider PathView as Flickable in this case as well! |
1759 | + function contentIsFlickable() { |
1760 | + return (comboListHolder.children.length === 1) && |
1761 | + comboListHolder.children[0].hasOwnProperty("flicking"); |
1762 | + } |
1763 | + |
1764 | + Item { |
1765 | + id: comboListHolder |
1766 | + objectName: "combobutton_combolist" |
1767 | + anchors { |
1768 | + left: parent.left |
1769 | + right: parent.right |
1770 | + } |
1771 | + |
1772 | + // stretch children width to holder's width |
1773 | + // must do binding to height manually to avoid binding loops caused |
1774 | + // by the vertical stretching when the component is a single flickable |
1775 | + property bool stretch: (combo.expandedHeight > 0 && comboHolder.contentIsFlickable()) |
1776 | + onStretchChanged: stretchChildren() |
1777 | + onChildrenChanged: stretchChildren() |
1778 | + function stretchChildren() { |
1779 | + for (var i in comboListHolder.children) { |
1780 | + var child = comboListHolder.children[i]; |
1781 | + if (comboListHolder.stretch) { |
1782 | + child.anchors.left = undefined; |
1783 | + child.anchors.right = undefined; |
1784 | + child.anchors.fill = comboListHolder; |
1785 | + comboListHolder.height = Qt.binding(function() { |
1786 | + return combo.comboListHeight; |
1787 | + }); |
1788 | + } else { |
1789 | + child.anchors.left = comboListHolder.left; |
1790 | + child.anchors.right = comboListHolder.right; |
1791 | + comboListHolder.height = Qt.binding(function() { |
1792 | + return comboListHolder.childrenRect.height; |
1793 | + }); |
1794 | + } |
1795 | + } |
1796 | + } |
1797 | + } |
1798 | + } |
1799 | + Scrollbar { |
1800 | + flickableItem: comboHolder |
1801 | + } |
1802 | + |
1803 | + /* |
1804 | + Drive the expansion height of the combo list holder |
1805 | + This is a common functionaity in all combo buttons, therefore we can have it |
1806 | + in the main component. |
1807 | + */ |
1808 | + Binding { |
1809 | + target: combo.__styleInstance.comboListPanel |
1810 | + property: "height" |
1811 | + value: { |
1812 | + if (!expanded) { |
1813 | + return 0; |
1814 | + } |
1815 | + if (comboListHolder.stretch) { |
1816 | + return combo.comboListHeight + combo.__styleInstance.comboListMargin; |
1817 | + } |
1818 | + |
1819 | + var h = comboListHolder.height; |
1820 | + var max = combo.comboListHeight + combo.__styleInstance.comboListMargin; |
1821 | + if (combo.expandedHeight < 0) { |
1822 | + return max; |
1823 | + } |
1824 | + |
1825 | + return MathUtils.clamp(h, 0, max); |
1826 | + } |
1827 | + } |
1828 | +} |
1829 | |
1830 | === modified file 'modules/Ubuntu/Components/CrossFadeImage.qml' |
1831 | --- modules/Ubuntu/Components/CrossFadeImage.qml 2013-10-08 20:10:59 +0000 |
1832 | +++ modules/Ubuntu/Components/CrossFadeImage.qml 2014-04-29 23:04:44 +0000 |
1833 | @@ -19,7 +19,7 @@ |
1834 | // we need to use named imports otherwise namespace collision is reported |
1835 | // by the QML engine. As workaround, we use Ubuntu named import. |
1836 | // Bug to watch: https://bugreports.qt-project.org/browse/QTBUG-27645 |
1837 | -import Ubuntu.Components 0.1 as Ubuntu |
1838 | +import Ubuntu.Components 1.1 as Ubuntu |
1839 | |
1840 | /*! |
1841 | \qmltype CrossFadeImage |
1842 | @@ -28,7 +28,7 @@ |
1843 | |
1844 | \qml |
1845 | import QtQuick 2.0 |
1846 | - import Ubuntu.Components 0.1 |
1847 | + import Ubuntu.Components 1.1 |
1848 | |
1849 | CrossFadeImage { |
1850 | width: units.gu(100) |
1851 | |
1852 | === modified file 'modules/Ubuntu/Components/Header.qml' |
1853 | --- modules/Ubuntu/Components/Header.qml 2014-03-12 09:36:00 +0000 |
1854 | +++ modules/Ubuntu/Components/Header.qml 2014-04-29 23:04:44 +0000 |
1855 | @@ -1,5 +1,5 @@ |
1856 | /* |
1857 | - * Copyright 2013 Canonical Ltd. |
1858 | + * Copyright 2013-2014 Canonical Ltd. |
1859 | * |
1860 | * This program is free software; you can redistribute it and/or modify |
1861 | * it under the terms of the GNU Lesser General Public License as published by |
1862 | @@ -15,16 +15,12 @@ |
1863 | */ |
1864 | |
1865 | import QtQuick 2.0 |
1866 | -// FIXME: When a module contains QML, C++ and JavaScript elements exported, |
1867 | -// we need to use named imports otherwise namespace collision is reported |
1868 | -// by the QML engine. As workaround, we use Ubuntu named import. |
1869 | -// Bug to watch: https://bugreports.qt-project.org/browse/QTBUG-27645 |
1870 | -import Ubuntu.Components 0.1 as Ubuntu |
1871 | +import Ubuntu.Components 1.0 |
1872 | |
1873 | /*! |
1874 | \internal |
1875 | \qmltype Header |
1876 | - \inqmlmodule Ubuntu.Components 0.1 |
1877 | + \inqmlmodule Ubuntu.Components 1.1 |
1878 | \ingroup ubuntu |
1879 | */ |
1880 | StyledItem { |
1881 | @@ -44,7 +40,7 @@ |
1882 | Behavior on y { |
1883 | enabled: animate && !(header.flickable && header.flickable.moving) |
1884 | SmoothedAnimation { |
1885 | - duration: Ubuntu.UbuntuAnimation.BriskDuration |
1886 | + duration: UbuntuAnimation.BriskDuration |
1887 | } |
1888 | } |
1889 | |
1890 | @@ -54,7 +50,7 @@ |
1891 | internal.movementEnded(); |
1892 | } |
1893 | |
1894 | - visible: title || contents |
1895 | + visible: title || contents || tabsModel |
1896 | onVisibleChanged: { |
1897 | internal.checkFlickableMargins(); |
1898 | } |
1899 | @@ -77,13 +73,43 @@ |
1900 | The text to display in the header |
1901 | */ |
1902 | property string title: "" |
1903 | - onTitleChanged: contentsChanged() |
1904 | + onTitleChanged: { |
1905 | + header.show(); |
1906 | + } |
1907 | |
1908 | /*! |
1909 | + \deprecated |
1910 | The contents of the header. If this is set, \l title will be ignored. |
1911 | + This property is now DEPRECATED. Set tabsModel to show tabs navigation in header. |
1912 | */ |
1913 | property Item contents: null |
1914 | - onContentsChanged: header.show() |
1915 | + onContentsChanged: { |
1916 | + print("Header.contents property is now DEPRECATED. Set tabsModel to show tabs navigation."); |
1917 | + header.show(); |
1918 | + } |
1919 | + |
1920 | + /*! |
1921 | + A model of tabs to represent in the header. |
1922 | + This is automatically set by \l Tabs. |
1923 | + */ |
1924 | + property var tabsModel: null |
1925 | + |
1926 | + /*! |
1927 | + If it is possible to pop this PageStack, a back button will be |
1928 | + shown in the header. |
1929 | + */ |
1930 | + property var pageStack: null |
1931 | + |
1932 | + // FIXME: Currently autopilot can only get visual items, but once bug #1273956 |
1933 | + // is fixed to support non-visual items, a QtObject may be used. |
1934 | + // --timp - 2014-03-20 |
1935 | + Item { |
1936 | + // FIXME: This is a workaround to be able to get the properties of |
1937 | + // tabsModel in an autopilot test. |
1938 | + objectName: "tabsModelProperties" |
1939 | + property int count: tabsModel ? tabsModel.count : 0 |
1940 | + property int selectedIndex: tabsModel ? tabsModel.selectedIndex : -1 |
1941 | + } |
1942 | |
1943 | /*! |
1944 | The flickable that controls the movement of the header. |
1945 | @@ -97,6 +123,11 @@ |
1946 | header.show(); |
1947 | } |
1948 | |
1949 | + /*! |
1950 | + Set by \l MainView |
1951 | + */ |
1952 | + property bool useDeprecatedToolbar: true |
1953 | + |
1954 | QtObject { |
1955 | id: internal |
1956 | |
1957 | @@ -184,5 +215,6 @@ |
1958 | } |
1959 | } |
1960 | |
1961 | - style: Theme.createStyleComponent("HeaderStyle.qml", header) |
1962 | + style: header.useDeprecatedToolbar ? Theme.createStyleComponent("HeaderStyle.qml", header) : |
1963 | + Theme.createStyleComponent("NewHeaderStyle.qml", header) |
1964 | } |
1965 | |
1966 | === modified file 'modules/Ubuntu/Components/Icon.qml' |
1967 | --- modules/Ubuntu/Components/Icon.qml 2013-11-06 22:52:15 +0000 |
1968 | +++ modules/Ubuntu/Components/Icon.qml 2014-04-29 23:04:44 +0000 |
1969 | @@ -18,7 +18,7 @@ |
1970 | |
1971 | /*! |
1972 | \qmltype Icon |
1973 | - \inqmlmodule Ubuntu.Components 0.1 |
1974 | + \inqmlmodule Ubuntu.Components 1.1 |
1975 | \ingroup ubuntu |
1976 | \brief The Icon component displays an icon from the icon theme. |
1977 | |
1978 | |
1979 | === added file 'modules/Ubuntu/Components/InputHandler.qml' |
1980 | --- modules/Ubuntu/Components/InputHandler.qml 1970-01-01 00:00:00 +0000 |
1981 | +++ modules/Ubuntu/Components/InputHandler.qml 2014-04-29 23:04:44 +0000 |
1982 | @@ -0,0 +1,317 @@ |
1983 | +/* |
1984 | + * Copyright 2014 Canonical Ltd. |
1985 | + * |
1986 | + * This program is free software; you can redistribute it and/or modify |
1987 | + * it under the terms of the GNU Lesser General Public License as published by |
1988 | + * the Free Software Foundation; version 3. |
1989 | + * |
1990 | + * This program is distributed in the hope that it will be useful, |
1991 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1992 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1993 | + * GNU Lesser General Public License for more details. |
1994 | + * |
1995 | + * You should have received a copy of the GNU Lesser General Public License |
1996 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1997 | + */ |
1998 | + |
1999 | +import QtQuick 2.0 |
2000 | +import Ubuntu.Components 1.1 |
2001 | + |
2002 | +/* |
2003 | + This component is a unified text selection and scrolling handler for both |
2004 | + TextField and TextArea components. |
2005 | + */ |
2006 | + |
2007 | +Item { |
2008 | + id: inputHandler |
2009 | + objectName: "input_handler" |
2010 | + // the root control |
2011 | + property Item main |
2012 | + // the input instance |
2013 | + property Item input |
2014 | + // the Flickable holdiong the input instance |
2015 | + property Flickable flickable |
2016 | + // selection cursor mode |
2017 | + property bool selectionCursor: input && input.selectedText !== "" |
2018 | + // True if mouse handlig is enabled, false if flicking mode is enabled |
2019 | + readonly property bool mouseHandlingEnabled: !flickable.interactive |
2020 | + // property holding the selection mode timeout |
2021 | + property int selectionModeTimeout: 200 |
2022 | + |
2023 | + // signal triggered when popup shoudl be opened |
2024 | + signal pressAndHold(int pos) |
2025 | + |
2026 | + function activateInput() { |
2027 | + if (!input.activeFocus) { |
2028 | + input.forceActiveFocus(); |
2029 | + } else { |
2030 | + showInputPanel(); |
2031 | + } |
2032 | + } |
2033 | + |
2034 | + function showInputPanel() { |
2035 | + if (!Qt.inputMethod.visible) { |
2036 | + Qt.inputMethod.show(); |
2037 | + } |
2038 | + textChanged = false; |
2039 | + } |
2040 | + function hideInputPanel() { |
2041 | + Qt.inputMethod.hide(); |
2042 | + // emit accepted signal if changed |
2043 | + if (textChanged && input.hasOwnProperty("accepted")) { |
2044 | + input.accepted(); |
2045 | + } |
2046 | + } |
2047 | + |
2048 | + // internal properties/functions |
2049 | + readonly property bool singleLine: input && input.hasOwnProperty("validator") |
2050 | + property var flickableList: new Array() |
2051 | + property bool textChanged: false |
2052 | + property int pressedPosition: -1 |
2053 | + // move properties |
2054 | + property int moveStarts: -1 |
2055 | + property int moveEnds: -1 |
2056 | + // set scroller to the first Flickable that scrolls the input |
2057 | + // this can be the internal Flickable if the full autosize is disabled |
2058 | + // or one of the input's parent Flickable |
2059 | + readonly property bool scrollingDisabled: main && main.hasOwnProperty("autoSize") ? |
2060 | + (main.autoSize && (main.maximumLineCount <= 0)) : false |
2061 | + onScrollingDisabledChanged: if (state == "") flickable.interactive = !scrollingDisabled |
2062 | + readonly property Flickable grandScroller: firstFlickableParent(main) |
2063 | + readonly property Flickable scroller: (scrollingDisabled && grandScroller) ? grandScroller : flickable |
2064 | + |
2065 | + // ensures the text cusrorRectangle is always in the internal Flickable's visible area |
2066 | + function ensureVisible() |
2067 | + { |
2068 | + var rect = input.cursorRectangle; |
2069 | + if (flickable.moving || flickable.flicking) |
2070 | + return; |
2071 | + if (flickable.contentX >= rect.x) |
2072 | + flickable.contentX = rect.x; |
2073 | + else if (flickable.contentX + flickable.width <= rect.x + rect.width) |
2074 | + flickable.contentX = rect.x + rect.width - flickable.width; |
2075 | + if (flickable.contentY >= rect.y) |
2076 | + flickable.contentY = rect.y; |
2077 | + else if (flickable.contentY + flickable.height <= rect.y + rect.height) |
2078 | + flickable.contentY = rect.y + rect.height - flickable.height; |
2079 | + } |
2080 | + // returns the mouse position |
2081 | + function mousePosition(mouse) { |
2082 | + return singleLine ? input.positionAt(mouse.x) : input.positionAt(mouse.x, mouse.y); |
2083 | + } |
2084 | + // checks whether the position is in the selected text |
2085 | + function positionInSelection(pos) { |
2086 | + return (input.selectionStart !== input.selectionEnd) |
2087 | + && (pos >= Math.min(input.selectionStart, input.selectionEnd)) |
2088 | + && (pos <= Math.max(input.selectionStart, input.selectionEnd)); |
2089 | + } |
2090 | + |
2091 | + // check whether the mouse is inside a selected text area |
2092 | + function mouseInSelection(mouse) { |
2093 | + var pos = mousePosition(mouse); |
2094 | + return positionInSelection(pos); |
2095 | + } |
2096 | + // selects text |
2097 | + function selectText(mouse) { |
2098 | + moveEnds = mousePosition(mouse); |
2099 | + if (moveStarts < 0) { |
2100 | + moveStarts = moveEnds; |
2101 | + } |
2102 | + input.select(moveStarts, moveEnds); |
2103 | + } |
2104 | + // returns the first Flickable parent of a given item |
2105 | + function firstFlickableParent(item) { |
2106 | + var p = item ? item.parent : null; |
2107 | + while (p && !p.hasOwnProperty("flicking")) { |
2108 | + p = p.parent; |
2109 | + } |
2110 | + return p; |
2111 | + } |
2112 | + // focuses the input if not yet focused, and shows the context menu |
2113 | + function openContextMenu(mouse) { |
2114 | + var pos = mousePosition(mouse); |
2115 | + if (!main.focus || !mouseInSelection(mouse)) { |
2116 | + activateInput(); |
2117 | + input.cursorPosition = pressedPosition = mousePosition(mouse); |
2118 | + } |
2119 | + // open context menu at the cursor position |
2120 | + inputHandler.pressAndHold(input.cursorPosition); |
2121 | + // if opened with left press (touch falls into this criteria as well), we need to set state to inactive |
2122 | + // so the mouse moves won't result in selected text loss/change |
2123 | + if (mouse.button === Qt.LeftButton) { |
2124 | + state = "inactive"; |
2125 | + } |
2126 | + } |
2127 | + |
2128 | + // disables interactive Flickable parents, stops at the first non-interactive flickable. |
2129 | + function toggleFlickablesInteractive(turnOn) { |
2130 | + var p; |
2131 | + if (!turnOn) { |
2132 | + // handle the scroller separately |
2133 | + p = firstFlickableParent(scroller) |
2134 | + while (p) { |
2135 | + if (p.interactive) { |
2136 | + flickableList.push(p); |
2137 | + p.interactive = false; |
2138 | + } else { |
2139 | + break; |
2140 | + } |
2141 | + p = firstFlickableParent(p); |
2142 | + } |
2143 | + } else { |
2144 | + while (flickableList.length > 0) { |
2145 | + p = flickableList.pop(); |
2146 | + p.interactive = true; |
2147 | + } |
2148 | + } |
2149 | + } |
2150 | + |
2151 | + Component.onCompleted: { |
2152 | + state = (main.focus) ? "" : "inactive"; |
2153 | + } |
2154 | + |
2155 | + // states |
2156 | + states: [ |
2157 | + // override default state to turn on the saved Flickable interactive mode |
2158 | + State { |
2159 | + name: "" |
2160 | + StateChangeScript { |
2161 | + // restore interactive for all Flickable parents |
2162 | + script: toggleFlickablesInteractive(true); |
2163 | + } |
2164 | + }, |
2165 | + State { |
2166 | + name: "inactive" |
2167 | + // we do not disable scroller here as in case the internal scrolling |
2168 | + // is disabled (scrollingDisabled = true) the outer scroller (grandScroller) |
2169 | + // would be blocked as well, which we don't want to |
2170 | + PropertyChanges { |
2171 | + target: flickable |
2172 | + interactive: false |
2173 | + } |
2174 | + }, |
2175 | + State { |
2176 | + name: "scrolling" |
2177 | + StateChangeScript { |
2178 | + script: { |
2179 | + // stop scrolling all the parents |
2180 | + toggleFlickablesInteractive(false); |
2181 | + // stop selection timeout |
2182 | + selectionTimeout.running = false; |
2183 | + } |
2184 | + } |
2185 | + }, |
2186 | + State { |
2187 | + name: "select" |
2188 | + // during select state all the flickables are blocked (interactive = false) |
2189 | + // we can use scroller here as we need to disable the outer scroller too! |
2190 | + PropertyChanges { |
2191 | + target: scroller |
2192 | + interactive: false |
2193 | + } |
2194 | + StateChangeScript { |
2195 | + script: { |
2196 | + // turn off interactive for all parent flickables |
2197 | + toggleFlickablesInteractive(false); |
2198 | + if (!positionInSelection(pressedPosition)) { |
2199 | + input.cursorPosition = pressedPosition; |
2200 | + } |
2201 | + } |
2202 | + } |
2203 | + } |
2204 | + ] |
2205 | + |
2206 | + // brings the state back to default when the component looses focuse |
2207 | + Connections { |
2208 | + target: main |
2209 | + ignoreUnknownSignals: true |
2210 | + onFocusChanged: { |
2211 | + state = (main.focus) ? "" : "inactive"; |
2212 | + } |
2213 | + } |
2214 | + |
2215 | + // input specific signals |
2216 | + Connections { |
2217 | + target: input |
2218 | + onCursorRectangleChanged: if (!scrollingDisabled) ensureVisible() |
2219 | + onTextChanged: textChanged = true; |
2220 | + } |
2221 | + |
2222 | + // inner or outer Flickable controlling |
2223 | + Connections { |
2224 | + target: scroller |
2225 | + // turn scrolling state on |
2226 | + onFlickStarted: if (!scrollingDisabled) state = "scrolling" |
2227 | + onMovementStarted: if (!scrollingDisabled) state = "scrolling" |
2228 | + // reset to default state |
2229 | + onMovementEnded: state = "" |
2230 | + } |
2231 | + |
2232 | + // switches the state to selection |
2233 | + Timer { |
2234 | + id: selectionTimeout |
2235 | + interval: selectionModeTimeout |
2236 | + onTriggered: { |
2237 | + if (scroller && !scroller.moving) { |
2238 | + state = "select"; |
2239 | + } |
2240 | + } |
2241 | + } |
2242 | + |
2243 | + // Mouse handling |
2244 | + Mouse.forwardTo: [main] |
2245 | + Mouse.onPressed: { |
2246 | + if (input.activeFocus) { |
2247 | + // start selection timeout |
2248 | + selectionTimeout.restart(); |
2249 | + } |
2250 | + // remember pressed position as we need it when entering into selection state |
2251 | + pressedPosition = mousePosition(mouse); |
2252 | + // consume event so it does not get forwarded to the input |
2253 | + mouse.accepted = true; |
2254 | + } |
2255 | + Mouse.onReleased: { |
2256 | + if (!main.focus && !main.activeFocusOnPress) { |
2257 | + return; |
2258 | + } |
2259 | + |
2260 | + activateInput(); |
2261 | + // stop text selection timer |
2262 | + selectionTimeout.running = false; |
2263 | + if (state === "") { |
2264 | + input.cursorPosition = mousePosition(mouse); |
2265 | + } |
2266 | + moveStarts = moveEnds = -1; |
2267 | + state = ""; |
2268 | + // check if we get right-click from the frame or the area that has no text |
2269 | + if (mouse.button === Qt.RightButton) { |
2270 | + // open the popover |
2271 | + inputHandler.pressAndHold(input.cursorPosition); |
2272 | + } |
2273 | + } |
2274 | + Mouse.onPositionChanged: { |
2275 | + // leave if not focus, not the left button or not in select state |
2276 | + if (!input.activeFocus || (mouse.button !== Qt.LeftButton) || (state !== "select") || !main.selectByMouse) { |
2277 | + return; |
2278 | + } |
2279 | + // stop text selection timer |
2280 | + selectionTimeout.running = false; |
2281 | + selectText(mouse); |
2282 | + } |
2283 | + Mouse.onDoubleClicked: { |
2284 | + if (main.selectByMouse) { |
2285 | + input.selectWord(); |
2286 | + // turn selection state temporarily so the selection is not cleared on release |
2287 | + state = "selection"; |
2288 | + } |
2289 | + } |
2290 | + Mouse.onPressAndHold: openContextMenu(mouse) |
2291 | + |
2292 | + // right button handling |
2293 | + MouseArea { |
2294 | + anchors.fill: parent |
2295 | + acceptedButtons: Qt.RightButton |
2296 | + // trigger pressAndHold |
2297 | + onReleased: openContextMenu(mouse) |
2298 | + } |
2299 | +} |
2300 | |
2301 | === modified file 'modules/Ubuntu/Components/Label.qml' |
2302 | --- modules/Ubuntu/Components/Label.qml 2014-01-23 19:01:47 +0000 |
2303 | +++ modules/Ubuntu/Components/Label.qml 2014-04-29 23:04:44 +0000 |
2304 | @@ -18,7 +18,7 @@ |
2305 | |
2306 | /*! |
2307 | \qmltype Label |
2308 | - \inqmlmodule Ubuntu.Components 0.1 |
2309 | + \inqmlmodule Ubuntu.Components 1.1 |
2310 | \ingroup ubuntu |
2311 | \brief Text with Ubuntu styling. |
2312 | |
2313 | |
2314 | === modified file 'modules/Ubuntu/Components/ListItems/Base.qml' |
2315 | --- modules/Ubuntu/Components/ListItems/Base.qml 2014-02-13 10:27:14 +0000 |
2316 | +++ modules/Ubuntu/Components/ListItems/Base.qml 2014-04-29 23:04:44 +0000 |
2317 | @@ -15,11 +15,11 @@ |
2318 | */ |
2319 | |
2320 | import QtQuick 2.0 |
2321 | -import Ubuntu.Components 0.1 |
2322 | +import Ubuntu.Components 1.1 |
2323 | |
2324 | /*! |
2325 | \qmltype Base |
2326 | - \inqmlmodule Ubuntu.Components.ListItems 0.1 |
2327 | + \inqmlmodule Ubuntu.Components.ListItems 1.0 |
2328 | \ingroup ubuntu-listitems |
2329 | \brief Parent class of various list item classes that can have |
2330 | an icon and a progression symbol. |
2331 | @@ -44,32 +44,6 @@ |
2332 | property variant icon: iconSource != "" ? iconSource : undefined |
2333 | |
2334 | /*! |
2335 | - The image shown in the list item. |
2336 | - \qmlproperty url iconSource |
2337 | - |
2338 | - This is a URL to any image file. |
2339 | - In order to use an icon from the Ubuntu theme, use the iconName property instead. |
2340 | - */ |
2341 | - property url iconSource: iconName ? "image://theme/" + iconName : "" |
2342 | - |
2343 | - /*! |
2344 | - The icon shown in the list item. |
2345 | - |
2346 | - \qmlproperty string iconName |
2347 | - |
2348 | - If both iconSource and iconName are defined, iconName will be ignored. |
2349 | - |
2350 | - \note The complete list of icons available in Ubuntu is not published yet. |
2351 | - For now please refer to the folders where the icon themes are installed: |
2352 | - \list |
2353 | - \li Ubuntu Touch: \l file:/usr/share/icons/ubuntu-mobile |
2354 | - \li Ubuntu Desktop: \l file:/usr/share/icons/ubuntu-mono-dark |
2355 | - \endlist |
2356 | - These 2 separate icon themes will be merged soon. |
2357 | - */ |
2358 | - property string iconName |
2359 | - |
2360 | - /*! |
2361 | \preliminary |
2362 | The location of the icon to show in the list item if iconSource failed to load (optional). |
2363 | \qmlproperty url fallbackIconSource |
2364 | |
2365 | === modified file 'modules/Ubuntu/Components/ListItems/Caption.qml' |
2366 | --- modules/Ubuntu/Components/ListItems/Caption.qml 2013-07-04 22:12:37 +0000 |
2367 | +++ modules/Ubuntu/Components/ListItems/Caption.qml 2014-04-29 23:04:44 +0000 |
2368 | @@ -15,17 +15,17 @@ |
2369 | */ |
2370 | |
2371 | import QtQuick 2.0 |
2372 | -import Ubuntu.Components 0.1 |
2373 | +import Ubuntu.Components 1.1 |
2374 | |
2375 | /*! |
2376 | \qmltype Caption |
2377 | - \inqmlmodule Ubuntu.Components.ListItems 0.1 |
2378 | + \inqmlmodule Ubuntu.Components.ListItems 1.0 |
2379 | \ingroup ubuntu-listitems |
2380 | \brief List item that shows a piece of text. |
2381 | |
2382 | Examples: |
2383 | \qml |
2384 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
2385 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
2386 | Column { |
2387 | ListItem.Standard { |
2388 | text: "Default list item." |
2389 | |
2390 | === modified file 'modules/Ubuntu/Components/ListItems/Divider.qml' |
2391 | --- modules/Ubuntu/Components/ListItems/Divider.qml 2012-10-19 01:09:07 +0000 |
2392 | +++ modules/Ubuntu/Components/ListItems/Divider.qml 2014-04-29 23:04:44 +0000 |
2393 | @@ -18,7 +18,7 @@ |
2394 | |
2395 | /*! |
2396 | \qmltype Divider |
2397 | - \inqmlmodule Ubuntu.Components.ListItems 0.1 |
2398 | + \inqmlmodule Ubuntu.Components.ListItems 1.0 |
2399 | \ingroup ubuntu-listitems |
2400 | \brief Divider to break up list items into groups. |
2401 | |
2402 | |
2403 | === modified file 'modules/Ubuntu/Components/ListItems/Empty.qml' |
2404 | --- modules/Ubuntu/Components/ListItems/Empty.qml 2014-02-04 14:39:53 +0000 |
2405 | +++ modules/Ubuntu/Components/ListItems/Empty.qml 2014-04-29 23:04:44 +0000 |
2406 | @@ -15,11 +15,11 @@ |
2407 | */ |
2408 | |
2409 | import QtQuick 2.0 |
2410 | -import Ubuntu.Components 0.1 |
2411 | +import Ubuntu.Components 1.1 |
2412 | |
2413 | /*! |
2414 | \qmltype Empty |
2415 | - \inqmlmodule Ubuntu.Components.ListItems 0.1 |
2416 | + \inqmlmodule Ubuntu.Components.ListItems 1.0 |
2417 | \ingroup ubuntu-listitems |
2418 | \brief A list item with no contents. |
2419 | The Empty class can be used for generic list items containing other |
2420 | @@ -34,8 +34,8 @@ |
2421 | |
2422 | Examples: |
2423 | \qml |
2424 | - import Ubuntu.Components 0.1 |
2425 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
2426 | + import Ubuntu.Components 1.1 |
2427 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
2428 | |
2429 | Item { |
2430 | Model { |
2431 | |
2432 | === modified file 'modules/Ubuntu/Components/ListItems/Expandable.qml' |
2433 | --- modules/Ubuntu/Components/ListItems/Expandable.qml 2014-03-17 16:35:27 +0000 |
2434 | +++ modules/Ubuntu/Components/ListItems/Expandable.qml 2014-04-29 23:04:44 +0000 |
2435 | @@ -14,11 +14,11 @@ |
2436 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2437 | */ |
2438 | import QtQuick 2.0 |
2439 | -import Ubuntu.Components 0.1 |
2440 | +import Ubuntu.Components 1.1 |
2441 | |
2442 | /*! |
2443 | \qmltype Expandable |
2444 | - \inqmlmodule Ubuntu.Components.ListItems 0.1 |
2445 | + \inqmlmodule Ubuntu.Components.ListItems 1.0 |
2446 | \ingroup ubuntu-listitems |
2447 | \brief An expandable list item with no contents. |
2448 | The Expandable class can be used for generic list items containing other |
2449 | @@ -35,8 +35,8 @@ |
2450 | |
2451 | Examples: |
2452 | \qml |
2453 | - import Ubuntu.Components 0.1 |
2454 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
2455 | + import Ubuntu.Components 1.1 |
2456 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
2457 | |
2458 | Item { |
2459 | ListModel { |
2460 | |
2461 | === modified file 'modules/Ubuntu/Components/ListItems/ExpandablesColumn.qml' |
2462 | --- modules/Ubuntu/Components/ListItems/ExpandablesColumn.qml 2014-02-26 09:46:30 +0000 |
2463 | +++ modules/Ubuntu/Components/ListItems/ExpandablesColumn.qml 2014-04-29 23:04:44 +0000 |
2464 | @@ -15,11 +15,11 @@ |
2465 | */ |
2466 | |
2467 | import QtQuick 2.0 |
2468 | -import Ubuntu.Components 0.1 |
2469 | +import Ubuntu.Components 1.1 |
2470 | |
2471 | /*! |
2472 | \qmltype ExpandablesColumn |
2473 | - \inqmlmodule Ubuntu.Components.ListItems 0.1 |
2474 | + \inqmlmodule Ubuntu.Components.ListItems 1.0 |
2475 | \ingroup ubuntu-listitems |
2476 | \brief A column to be used together with the \l Expandable item. |
2477 | This lays out its content just like a regular Column inside a Flickable but |
2478 | @@ -29,8 +29,8 @@ |
2479 | |
2480 | Examples: |
2481 | \qml |
2482 | - import Ubuntu.Components 0.1 |
2483 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
2484 | + import Ubuntu.Components 1.1 |
2485 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
2486 | |
2487 | ListItem.ExpandablesColumn { |
2488 | anchors { left: parent.left; right: parent.right } |
2489 | |
2490 | === modified file 'modules/Ubuntu/Components/ListItems/Header.qml' |
2491 | --- modules/Ubuntu/Components/ListItems/Header.qml 2013-02-06 11:40:31 +0000 |
2492 | +++ modules/Ubuntu/Components/ListItems/Header.qml 2014-04-29 23:04:44 +0000 |
2493 | @@ -18,13 +18,13 @@ |
2494 | |
2495 | /*! |
2496 | \qmltype Header |
2497 | - \inqmlmodule Ubuntu.Components.ListItems 0.1 |
2498 | + \inqmlmodule Ubuntu.Components.ListItems 1.0 |
2499 | \ingroup ubuntu-listitems |
2500 | \brief Header for grouping list items together |
2501 | |
2502 | Examples: |
2503 | \qml |
2504 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
2505 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
2506 | Column { |
2507 | ListItem.Header { text: "Title" } |
2508 | ListItem.Standard { text: "Item one" } |
2509 | |
2510 | === modified file 'modules/Ubuntu/Components/ListItems/IconVisual.qml' |
2511 | --- modules/Ubuntu/Components/ListItems/IconVisual.qml 2013-11-06 22:52:15 +0000 |
2512 | +++ modules/Ubuntu/Components/ListItems/IconVisual.qml 2014-04-29 23:04:44 +0000 |
2513 | @@ -15,7 +15,7 @@ |
2514 | */ |
2515 | |
2516 | import QtQuick 2.0 |
2517 | -import Ubuntu.Components 0.1 |
2518 | +import Ubuntu.Components 1.1 |
2519 | |
2520 | // internal helper class to create the visuals |
2521 | // for the icon. |
2522 | |
2523 | === modified file 'modules/Ubuntu/Components/ListItems/ItemSelector.qml' |
2524 | --- modules/Ubuntu/Components/ListItems/ItemSelector.qml 2014-02-18 14:23:57 +0000 |
2525 | +++ modules/Ubuntu/Components/ListItems/ItemSelector.qml 2014-04-29 23:04:44 +0000 |
2526 | @@ -16,11 +16,11 @@ |
2527 | |
2528 | import QtQuick 2.0 |
2529 | import "." as ListItem |
2530 | -import Ubuntu.Components 0.1 |
2531 | +import Ubuntu.Components 1.1 |
2532 | |
2533 | /*! |
2534 | \qmltype ItemSelector |
2535 | - \inqmlmodule Ubuntu.Components.ListItems 0.1 |
2536 | + \inqmlmodule Ubuntu.Components.ListItems 1.0 |
2537 | \ingroup ubuntu-listitems |
2538 | \brief ListItem displaying either a single selected value or expanded multiple choice with an optional image and subtext when not expanded, when expanding it opens a |
2539 | listing of all the possible values for selection with an additional option of always being expanded. If multiple choice is selected the list is expanded automatically. |
2540 | @@ -29,7 +29,7 @@ |
2541 | |
2542 | Examples: |
2543 | \qml |
2544 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
2545 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
2546 | Column { |
2547 | anchors.left: parent.left |
2548 | anchors.right: parent.right |
2549 | |
2550 | === modified file 'modules/Ubuntu/Components/ListItems/LabelVisual.qml' |
2551 | --- modules/Ubuntu/Components/ListItems/LabelVisual.qml 2013-08-29 18:47:30 +0000 |
2552 | +++ modules/Ubuntu/Components/ListItems/LabelVisual.qml 2014-04-29 23:04:44 +0000 |
2553 | @@ -15,7 +15,7 @@ |
2554 | */ |
2555 | |
2556 | import QtQuick 2.0 |
2557 | -import Ubuntu.Components 0.1 |
2558 | +import Ubuntu.Components 1.1 |
2559 | |
2560 | // internal helper class for text inside the list items. |
2561 | Label { |
2562 | |
2563 | === modified file 'modules/Ubuntu/Components/ListItems/MultiValue.qml' |
2564 | --- modules/Ubuntu/Components/ListItems/MultiValue.qml 2013-11-06 22:52:15 +0000 |
2565 | +++ modules/Ubuntu/Components/ListItems/MultiValue.qml 2014-04-29 23:04:44 +0000 |
2566 | @@ -18,14 +18,14 @@ |
2567 | |
2568 | /*! |
2569 | \qmltype MultiValue |
2570 | - \inqmlmodule Ubuntu.Components.ListItems 0.1 |
2571 | + \inqmlmodule Ubuntu.Components.ListItems 1.0 |
2572 | \ingroup ubuntu-listitems |
2573 | \brief List item displaying multiple values. |
2574 | \b{This component is under heavy development.} |
2575 | |
2576 | Examples: |
2577 | \qml |
2578 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
2579 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
2580 | Column { |
2581 | ListItem.MultiValue { |
2582 | text: "Label" |
2583 | |
2584 | === modified file 'modules/Ubuntu/Components/ListItems/ProgressionVisual.qml' |
2585 | --- modules/Ubuntu/Components/ListItems/ProgressionVisual.qml 2013-12-09 12:23:15 +0000 |
2586 | +++ modules/Ubuntu/Components/ListItems/ProgressionVisual.qml 2014-04-29 23:04:44 +0000 |
2587 | @@ -15,7 +15,7 @@ |
2588 | */ |
2589 | |
2590 | import QtQuick 2.0 |
2591 | -import Ubuntu.Components 0.1 |
2592 | +import Ubuntu.Components 1.1 |
2593 | |
2594 | // Internal helper class for the visuals of |
2595 | // the progression symbol. |
2596 | |
2597 | === modified file 'modules/Ubuntu/Components/ListItems/SingleControl.qml' |
2598 | --- modules/Ubuntu/Components/ListItems/SingleControl.qml 2013-07-14 20:18:08 +0000 |
2599 | +++ modules/Ubuntu/Components/ListItems/SingleControl.qml 2014-04-29 23:04:44 +0000 |
2600 | @@ -15,19 +15,19 @@ |
2601 | */ |
2602 | |
2603 | import QtQuick 2.0 |
2604 | -import Ubuntu.Components 0.1 |
2605 | -import Ubuntu.Components.ListItems 0.1 |
2606 | +import Ubuntu.Components 1.1 |
2607 | +import Ubuntu.Components.ListItems 1.0 |
2608 | |
2609 | /*! |
2610 | \qmltype SingleControl |
2611 | - \inqmlmodule Ubuntu.Components.ListItems 0.1 |
2612 | + \inqmlmodule Ubuntu.Components.ListItems 1.0 |
2613 | \ingroup ubuntu-listitems |
2614 | \brief A list item containing a single control |
2615 | |
2616 | Examples: |
2617 | \qml |
2618 | - import Ubuntu.Components 0.1 |
2619 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
2620 | + import Ubuntu.Components 1.1 |
2621 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
2622 | Column { |
2623 | ListItem.SingleControl { |
2624 | control: Button { |
2625 | |
2626 | === modified file 'modules/Ubuntu/Components/ListItems/SingleValue.qml' |
2627 | --- modules/Ubuntu/Components/ListItems/SingleValue.qml 2013-11-06 22:52:15 +0000 |
2628 | +++ modules/Ubuntu/Components/ListItems/SingleValue.qml 2014-04-29 23:04:44 +0000 |
2629 | @@ -18,13 +18,13 @@ |
2630 | |
2631 | /*! |
2632 | \qmltype SingleValue |
2633 | - \inqmlmodule Ubuntu.Components.ListItems 0.1 |
2634 | + \inqmlmodule Ubuntu.Components.ListItems 1.0 |
2635 | \ingroup ubuntu-listitems |
2636 | \brief A list item displaying a single value |
2637 | |
2638 | Examples: |
2639 | \qml |
2640 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
2641 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
2642 | Column { |
2643 | ListItem.SingleValue { |
2644 | text: "Label" |
2645 | |
2646 | === modified file 'modules/Ubuntu/Components/ListItems/Standard.qml' |
2647 | --- modules/Ubuntu/Components/ListItems/Standard.qml 2013-11-07 19:45:58 +0000 |
2648 | +++ modules/Ubuntu/Components/ListItems/Standard.qml 2014-04-29 23:04:44 +0000 |
2649 | @@ -15,11 +15,11 @@ |
2650 | */ |
2651 | |
2652 | import QtQuick 2.0 |
2653 | -import Ubuntu.Components 0.1 |
2654 | +import Ubuntu.Components 1.1 |
2655 | |
2656 | /*! |
2657 | \qmltype Standard |
2658 | - \inqmlmodule Ubuntu.Components.ListItems 0.1 |
2659 | + \inqmlmodule Ubuntu.Components.ListItems 1.0 |
2660 | \ingroup ubuntu-listitems |
2661 | \brief The standard list item class. It shows a basic list item |
2662 | with a label (text), and optionally an icon, a progression arrow, |
2663 | @@ -30,8 +30,8 @@ |
2664 | |
2665 | Examples: |
2666 | \qml |
2667 | - import Ubuntu.Components 0.1 |
2668 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
2669 | + import Ubuntu.Components 1.1 |
2670 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
2671 | Column { |
2672 | ListItem.Standard { |
2673 | text: "Selectable standard list item" |
2674 | @@ -76,32 +76,6 @@ |
2675 | property variant icon: iconSource != "" ? iconSource : undefined |
2676 | |
2677 | /*! |
2678 | - The image shown in the list item. |
2679 | - \qmlproperty url iconSource |
2680 | - |
2681 | - This is a URL to any image file. |
2682 | - In order to use an icon from the Ubuntu theme, use the iconName property instead. |
2683 | - */ |
2684 | - property url iconSource: iconName ? "image://theme/" + iconName : "" |
2685 | - |
2686 | - /*! |
2687 | - The icon shown in the list item. |
2688 | - |
2689 | - \qmlproperty string iconName |
2690 | - |
2691 | - If both iconSource and iconName are defined, iconName will be ignored. |
2692 | - |
2693 | - \note The complete list of icons available in Ubuntu is not published yet. |
2694 | - For now please refer to the folders where the icon themes are installed: |
2695 | - \list |
2696 | - \li Ubuntu Touch: \l file:/usr/share/icons/ubuntu-mobile |
2697 | - \li Ubuntu Desktop: \l file:/usr/share/icons/ubuntu-mono-dark |
2698 | - \endlist |
2699 | - These 2 separate icon themes will be merged soon. |
2700 | - */ |
2701 | - property string iconName |
2702 | - |
2703 | - /*! |
2704 | \preliminary |
2705 | The location of the icon to show in the list item if iconSource failed to load (optional). |
2706 | \qmlproperty url fallbackIconSource |
2707 | |
2708 | === modified file 'modules/Ubuntu/Components/ListItems/Subtitled.qml' |
2709 | --- modules/Ubuntu/Components/ListItems/Subtitled.qml 2013-11-06 22:52:15 +0000 |
2710 | +++ modules/Ubuntu/Components/ListItems/Subtitled.qml 2014-04-29 23:04:44 +0000 |
2711 | @@ -15,18 +15,18 @@ |
2712 | */ |
2713 | |
2714 | import QtQuick 2.0 |
2715 | -import Ubuntu.Components 0.1 |
2716 | +import Ubuntu.Components 1.1 |
2717 | |
2718 | /*! |
2719 | \qmltype MultiValue |
2720 | - \inqmlmodule Ubuntu.Components.ListItems 0.1 |
2721 | + \inqmlmodule Ubuntu.Components.ListItems 1.0 |
2722 | \ingroup ubuntu-listitems |
2723 | \brief List item displaying a second string under the main label. |
2724 | \b{This component is under heavy development.} |
2725 | |
2726 | Examples: |
2727 | \qml |
2728 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
2729 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
2730 | Column { |
2731 | ListItem.Subtitled { |
2732 | text: "Idle" |
2733 | @@ -71,13 +71,6 @@ |
2734 | |
2735 | /*! |
2736 | \preliminary |
2737 | - The text that is shown in the list item as a label. |
2738 | - \qmlproperty string text |
2739 | - */ |
2740 | - property alias text: label.text |
2741 | - |
2742 | - /*! |
2743 | - \preliminary |
2744 | The list of strings that will be shown under the label text |
2745 | \qmlproperty string subText |
2746 | */ |
2747 | @@ -94,6 +87,7 @@ |
2748 | |
2749 | LabelVisual { |
2750 | id: label |
2751 | + text: subtitledListItem.text |
2752 | selected: subtitledListItem.selected |
2753 | anchors { |
2754 | top: parent.top |
2755 | |
2756 | === modified file 'modules/Ubuntu/Components/ListItems/ThinDivider.qml' |
2757 | --- modules/Ubuntu/Components/ListItems/ThinDivider.qml 2013-11-19 08:51:02 +0000 |
2758 | +++ modules/Ubuntu/Components/ListItems/ThinDivider.qml 2014-04-29 23:04:44 +0000 |
2759 | @@ -18,7 +18,7 @@ |
2760 | |
2761 | /*! |
2762 | \qmltype ThinDivider |
2763 | - \inqmlmodule Ubuntu.Components.ListItems 0.1 |
2764 | + \inqmlmodule Ubuntu.Components.ListItems 1.0 |
2765 | \ingroup ubuntu-listitems |
2766 | \brief Narrow line used as a divider between ListItems. |
2767 | |
2768 | @@ -29,7 +29,7 @@ |
2769 | |
2770 | Examples: |
2771 | \qml |
2772 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
2773 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
2774 | Column { |
2775 | width: 250 |
2776 | ListItem.ThinDivider {} //can be used as header for list |
2777 | |
2778 | === modified file 'modules/Ubuntu/Components/ListItems/ValueSelector.qml' |
2779 | --- modules/Ubuntu/Components/ListItems/ValueSelector.qml 2013-11-06 22:52:15 +0000 |
2780 | +++ modules/Ubuntu/Components/ListItems/ValueSelector.qml 2014-04-29 23:04:44 +0000 |
2781 | @@ -15,13 +15,13 @@ |
2782 | */ |
2783 | |
2784 | import QtQuick 2.0 |
2785 | -import Ubuntu.Components 0.1 |
2786 | +import Ubuntu.Components 1.1 |
2787 | |
2788 | /*! |
2789 | ****DEPRECATED! PLEASE USE ITEM SELECTOR OR FOR THE UBUNTU SHAPE VERSION THE OPTION SELECTOR.**** |
2790 | |
2791 | \qmltype ValueSelector |
2792 | - \inqmlmodule Ubuntu.Components.ListItems 0.1 |
2793 | + \inqmlmodule Ubuntu.Components.ListItems 1.0 |
2794 | \ingroup ubuntu-listitems |
2795 | \brief List item displaying single selected value when not expanded, |
2796 | where expanding it opens a listing of all the possible values for selection. |
2797 | @@ -30,7 +30,7 @@ |
2798 | |
2799 | Examples: |
2800 | \qml |
2801 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
2802 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
2803 | Column { |
2804 | width: 250 |
2805 | ListItem.ValueSelector { |
2806 | @@ -80,32 +80,6 @@ |
2807 | property alias icon: selectorMain.icon |
2808 | |
2809 | /*! |
2810 | - The image shown in the list item. |
2811 | - \qmlproperty url iconSource |
2812 | - |
2813 | - This is a URL to any image file. |
2814 | - In order to use an icon from the Ubuntu theme, use the iconName property instead. |
2815 | - */ |
2816 | - property url iconSource: iconName ? "image://theme/" + iconName : "" |
2817 | - |
2818 | - /*! |
2819 | - The icon shown in the list item. |
2820 | - |
2821 | - \qmlproperty string iconName |
2822 | - |
2823 | - If both iconSource and iconName are defined, iconName will be ignored. |
2824 | - |
2825 | - \note The complete list of icons available in Ubuntu is not published yet. |
2826 | - For now please refer to the folders where the icon themes are installed: |
2827 | - \list |
2828 | - \li Ubuntu Touch: \l file:/usr/share/icons/ubuntu-mobile |
2829 | - \li Ubuntu Desktop: \l file:/usr/share/icons/ubuntu-mono-dark |
2830 | - \endlist |
2831 | - These 2 separate icon themes will be merged soon. |
2832 | - */ |
2833 | - property string iconName |
2834 | - |
2835 | - /*! |
2836 | \preliminary |
2837 | The location of the icon to show in the list item if iconSource failed to load (optional). |
2838 | \qmlproperty url fallbackIconSource |
2839 | |
2840 | === modified file 'modules/Ubuntu/Components/ListItems/qmldir' |
2841 | --- modules/Ubuntu/Components/ListItems/qmldir 2014-02-13 11:33:09 +0000 |
2842 | +++ modules/Ubuntu/Components/ListItems/qmldir 2014-04-29 23:04:44 +0000 |
2843 | @@ -1,3 +1,4 @@ |
2844 | +module Ubuntu.Components.ListItems |
2845 | Empty 0.1 Empty.qml |
2846 | Base 0.1 Base.qml |
2847 | Caption 0.1 Caption.qml |
2848 | @@ -16,3 +17,20 @@ |
2849 | ThinDivider 0.1 ThinDivider.qml |
2850 | Expandable 0.1 Expandable.qml |
2851 | ExpandablesColumn 0.1 ExpandablesColumn.qml |
2852 | + |
2853 | +#version 1.0 |
2854 | +Empty 1.0 Empty.qml |
2855 | +Base 1.0 Base.qml |
2856 | +Caption 1.0 Caption.qml |
2857 | +Divider 1.0 Divider.qml |
2858 | +Header 1.0 Header.qml |
2859 | +MultiValue 1.0 MultiValue.qml |
2860 | +ItemSelector 1.0 ItemSelector.qml |
2861 | +ValueSelector 1.0 ValueSelector.qml |
2862 | +SingleValue 1.0 SingleValue.qml |
2863 | +Standard 1.0 Standard.qml |
2864 | +Subtitled 1.0 Subtitled.qml |
2865 | +SingleControl 1.0 SingleControl.qml |
2866 | +ThinDivider 1.0 ThinDivider.qml |
2867 | +Expandable 1.0 Expandable.qml |
2868 | +ExpandablesColumn 1.0 ExpandablesColumn.qml |
2869 | |
2870 | === modified file 'modules/Ubuntu/Components/MainView.qml' |
2871 | --- modules/Ubuntu/Components/MainView.qml 2014-04-04 11:03:45 +0000 |
2872 | +++ modules/Ubuntu/Components/MainView.qml 2014-04-29 23:04:44 +0000 |
2873 | @@ -1,5 +1,5 @@ |
2874 | /* |
2875 | - * Copyright 2012-2013 Canonical Ltd. |
2876 | + * Copyright 2012-2014 Canonical Ltd. |
2877 | * |
2878 | * This program is free software; you can redistribute it and/or modify |
2879 | * it under the terms of the GNU Lesser General Public License as published by |
2880 | @@ -16,12 +16,12 @@ |
2881 | |
2882 | import QtQuick 2.0 |
2883 | import Ubuntu.Unity.Action 1.1 as UnityActions |
2884 | -import Ubuntu.PerformanceMetrics 0.1 |
2885 | +import Ubuntu.PerformanceMetrics 1.0 |
2886 | import QtQuick.Window 2.0 |
2887 | |
2888 | /*! |
2889 | \qmltype MainView |
2890 | - \inqmlmodule Ubuntu.Components 0.1 |
2891 | + \inqmlmodule Ubuntu.Components 1.1 |
2892 | \ingroup ubuntu |
2893 | \brief MainView is the root Item that should be used for all applications. |
2894 | It automatically adds a header and toolbar for its contents and can |
2895 | @@ -30,7 +30,7 @@ |
2896 | The simplest way to use a MainView is to include a \l Page object inside the MainView: |
2897 | \qml |
2898 | import QtQuick 2.0 |
2899 | - import Ubuntu.Components 0.1 |
2900 | + import Ubuntu.Components 1.1 |
2901 | |
2902 | MainView { |
2903 | width: units.gu(48) |
2904 | @@ -57,7 +57,7 @@ |
2905 | will automatically hide and show when the user scrolls up or down: |
2906 | \qml |
2907 | import QtQuick 2.0 |
2908 | - import Ubuntu.Components 0.1 |
2909 | + import Ubuntu.Components 1.1 |
2910 | |
2911 | MainView { |
2912 | width: units.gu(48) |
2913 | @@ -89,7 +89,7 @@ |
2914 | A toolbar can be added to the application by setting the tools property of the \l Page: |
2915 | \qml |
2916 | import QtQuick 2.0 |
2917 | - import Ubuntu.Components 0.1 |
2918 | + import Ubuntu.Components 1.1 |
2919 | |
2920 | MainView { |
2921 | width: units.gu(48) |
2922 | @@ -169,7 +169,7 @@ |
2923 | the content: |
2924 | \qml |
2925 | import QtQuick 2.0 |
2926 | - import Ubuntu.Components 0.1 |
2927 | + import Ubuntu.Components 1.1 |
2928 | |
2929 | MainView { |
2930 | width: units.gu(40) |
2931 | @@ -349,12 +349,9 @@ |
2932 | Binding { |
2933 | target: headerItem |
2934 | property: "tabBar" |
2935 | - value: headerItem.contents |
2936 | - when: headerItem.contents && |
2937 | - headerItem.contents.hasOwnProperty("selectionMode") && |
2938 | - headerItem.contents.hasOwnProperty("alwaysSelectionMode") && |
2939 | - headerItem.contents.hasOwnProperty("selectedIndex") && |
2940 | - headerItem.contents.hasOwnProperty("pressed") |
2941 | + value: headerItem.__styleInstance.__tabBar |
2942 | + when: headerItem.__styleInstance && |
2943 | + headerItem.__styleInstance.hasOwnProperty("__tabBar") |
2944 | } |
2945 | |
2946 | Connections { |
2947 | @@ -383,6 +380,8 @@ |
2948 | window.title = headerItem.title |
2949 | } |
2950 | } |
2951 | + |
2952 | + useDeprecatedToolbar: mainView.useDeprecatedToolbar |
2953 | } |
2954 | |
2955 | Connections { |
2956 | @@ -451,6 +450,12 @@ |
2957 | |
2958 | /*! |
2959 | \internal |
2960 | + Tabs needs to know whether to use a TabBar or the new header. |
2961 | + */ |
2962 | + property alias useDeprecatedToolbar: mainView.useDeprecatedToolbar |
2963 | + |
2964 | + /*! |
2965 | + \internal |
2966 | The action manager that has the global context for the MainView's actions, |
2967 | and to which a local context can be added for each Page that has actions.actions. |
2968 | */ |
2969 | |
2970 | === modified file 'modules/Ubuntu/Components/Object.qml' |
2971 | --- modules/Ubuntu/Components/Object.qml 2012-11-14 11:01:37 +0000 |
2972 | +++ modules/Ubuntu/Components/Object.qml 2014-04-29 23:04:44 +0000 |
2973 | @@ -19,7 +19,7 @@ |
2974 | /*! |
2975 | \qmltype Object |
2976 | \internal |
2977 | - \inqmlmodule Ubuntu.Components 0.1 |
2978 | + \inqmlmodule Ubuntu.Components 1.1 |
2979 | \ingroup ubuntu |
2980 | \brief Internal type used for lightweight objects that can have children. |
2981 | */ |
2982 | |
2983 | === modified file 'modules/Ubuntu/Components/OptionSelector.qml' |
2984 | --- modules/Ubuntu/Components/OptionSelector.qml 2013-12-13 15:50:35 +0000 |
2985 | +++ modules/Ubuntu/Components/OptionSelector.qml 2014-04-29 23:04:44 +0000 |
2986 | @@ -16,11 +16,11 @@ |
2987 | |
2988 | import QtQuick 2.0 |
2989 | import "ListItems" as ListItem |
2990 | -import Ubuntu.Components 0.1 as Toolkit |
2991 | +import Ubuntu.Components 1.1 as Toolkit |
2992 | |
2993 | /*! |
2994 | \qmltype OptionSelector |
2995 | - \inqmlmodule Ubuntu.Components 0.1 |
2996 | + \inqmlmodule Ubuntu.Components 1.1 |
2997 | \ingroup ubuntu-components |
2998 | \brief Component displaying either a single selected value or expanded multiple choice with an optional image and subtext when not expanded, when expanding it opens a |
2999 | listing of all the possible values for selection with an additional option of always being expanded. If multiple choice is selected the list is expanded automatically. |
3000 | @@ -29,7 +29,7 @@ |
3001 | |
3002 | Examples: |
3003 | \qml |
3004 | - import Ubuntu.Components 0.1 |
3005 | + import Ubuntu.Components 1.1 |
3006 | Column { |
3007 | spacing: units.gu(3) |
3008 | |
3009 | |
3010 | === modified file 'modules/Ubuntu/Components/OptionSelectorDelegate.qml' |
3011 | --- modules/Ubuntu/Components/OptionSelectorDelegate.qml 2014-03-04 12:16:38 +0000 |
3012 | +++ modules/Ubuntu/Components/OptionSelectorDelegate.qml 2014-04-29 23:04:44 +0000 |
3013 | @@ -16,7 +16,7 @@ |
3014 | |
3015 | /*! |
3016 | \qmltype OptionSelectorDelegate |
3017 | - \inqmlmodule Ubuntu.Components 0.1 |
3018 | + \inqmlmodule Ubuntu.Components 1.1 |
3019 | \ingroup ubuntu-components |
3020 | \brief OptionSelector delegate which can display text, subtext and an image from a custom model. |
3021 | |
3022 | @@ -24,7 +24,7 @@ |
3023 | |
3024 | Examples: |
3025 | \qml |
3026 | - import Ubuntu.Components 0.1 |
3027 | + import Ubuntu.Components 1.1 |
3028 | Column { |
3029 | width: 250 |
3030 | OptionSelector { |
3031 | @@ -45,21 +45,15 @@ |
3032 | |
3033 | import QtQuick 2.0 |
3034 | import "ListItems" as ListItem |
3035 | -import Ubuntu.Components 0.1 as Toolkit |
3036 | +import Ubuntu.Components 1.1 as Toolkit |
3037 | |
3038 | -ListItem.Standard { |
3039 | +ListItem.Empty { |
3040 | id: option |
3041 | |
3042 | __height: units.gu(5) |
3043 | |
3044 | /*! |
3045 | \preliminary |
3046 | - Main text. |
3047 | - */ |
3048 | - property string text |
3049 | - |
3050 | - /*! |
3051 | - \preliminary |
3052 | Subtext which appears below the main text. |
3053 | */ |
3054 | property string subText |
3055 | @@ -78,30 +72,6 @@ |
3056 | } |
3057 | |
3058 | /*! |
3059 | - The image shown for that option. |
3060 | - \qmlproperty url iconSource |
3061 | - |
3062 | - This is a URL to any image file. |
3063 | - In order to use an icon from the Ubuntu theme, use the iconName property instead. |
3064 | - */ |
3065 | - property url iconSource: iconName ? "image://theme/" + iconName : "" |
3066 | - |
3067 | - /*! |
3068 | - The icon shown for that option. |
3069 | - |
3070 | - \qmlproperty string iconName |
3071 | - |
3072 | - If both iconSource and iconName are defined, iconName will be ignored. |
3073 | - |
3074 | - \note The complete list of icons available in Ubuntu is not published yet. |
3075 | - For now please refer to the folders where the icon theme is installed: |
3076 | - \list |
3077 | - \li Ubuntu Touch: \l file:/usr/share/icons/ubuntu-mobile |
3078 | - \endlist |
3079 | - */ |
3080 | - property string iconName |
3081 | - |
3082 | - /*! |
3083 | \preliminary |
3084 | Constrains the size of the image to nothing greater than that of the delegate. Changes fillMode to Image.PreserveAspectFit. |
3085 | */ |
3086 | @@ -337,7 +307,7 @@ |
3087 | objectName: "icon" |
3088 | |
3089 | height: constrainImage ? option.height : sourceSize.height |
3090 | - source: icon |
3091 | + source: option.iconSource |
3092 | fillMode: constrainImage ? Image.PreserveAspectFit : Image.Stretch |
3093 | |
3094 | ShaderEffect { |
3095 | |
3096 | === modified file 'modules/Ubuntu/Components/OrientationHelper.qml' |
3097 | --- modules/Ubuntu/Components/OrientationHelper.qml 2013-11-27 11:15:17 +0000 |
3098 | +++ modules/Ubuntu/Components/OrientationHelper.qml 2014-04-29 23:04:44 +0000 |
3099 | @@ -16,11 +16,11 @@ |
3100 | |
3101 | import QtQuick 2.0 |
3102 | import QtQuick.Window 2.0 |
3103 | -import Ubuntu.Components 0.1 as Ubuntu |
3104 | +import Ubuntu.Components 1.0 |
3105 | |
3106 | /*! |
3107 | \qmltype OrientationHelper |
3108 | - \inqmlmodule Ubuntu.Components 0.1 |
3109 | + \inqmlmodule Ubuntu.Components 1.1 |
3110 | \ingroup ubuntu |
3111 | \brief The OrientationHelper automatically rotates its children following the |
3112 | orientation of the device. |
3113 | @@ -188,8 +188,8 @@ |
3114 | RotationAnimation { |
3115 | target: orientationHelper |
3116 | properties: "rotation" |
3117 | - duration: Ubuntu.UbuntuAnimation.FastDuration |
3118 | - easing: Ubuntu.UbuntuAnimation.StandardEasing |
3119 | + duration: UbuntuAnimation.FastDuration |
3120 | + easing: UbuntuAnimation.StandardEasing |
3121 | direction: RotationAnimation.Shortest |
3122 | } |
3123 | } |
3124 | |
3125 | === modified file 'modules/Ubuntu/Components/Page.qml' |
3126 | --- modules/Ubuntu/Components/Page.qml 2014-04-07 10:03:39 +0000 |
3127 | +++ modules/Ubuntu/Components/Page.qml 2014-04-29 23:04:44 +0000 |
3128 | @@ -1,5 +1,5 @@ |
3129 | /* |
3130 | - * Copyright 2012 Canonical Ltd. |
3131 | + * Copyright 2012-2014 Canonical Ltd. |
3132 | * |
3133 | * This program is free software; you can redistribute it and/or modify |
3134 | * it under the terms of the GNU Lesser General Public License as published by |
3135 | @@ -19,7 +19,7 @@ |
3136 | |
3137 | /*! |
3138 | \qmltype Page |
3139 | - \inqmlmodule Ubuntu.Components 0.1 |
3140 | + \inqmlmodule Ubuntu.Components 1.1 |
3141 | \ingroup ubuntu |
3142 | \brief A page is the basic Item that must be used inside the \l MainView, |
3143 | \l PageStack and \l Tabs. |
3144 | @@ -33,7 +33,7 @@ |
3145 | |
3146 | \qml |
3147 | import QtQuick 2.0 |
3148 | - import Ubuntu.Components 0.1 |
3149 | + import Ubuntu.Components 1.1 |
3150 | |
3151 | MainView { |
3152 | width: units.gu(48) |
3153 | @@ -94,7 +94,7 @@ |
3154 | and anchors to the top of the page or fills the page. For example: |
3155 | \qml |
3156 | import QtQuick 2.0 |
3157 | - import Ubuntu.Components 0.1 |
3158 | + import Ubuntu.Components 1.1 |
3159 | |
3160 | MainView { |
3161 | width: units.gu(30) |
3162 | @@ -151,6 +151,13 @@ |
3163 | Object { |
3164 | id: internal |
3165 | |
3166 | + Binding { |
3167 | + target: internal.header |
3168 | + property: "pageStack" |
3169 | + value: page.pageStack |
3170 | + when: page.active && internal.header != null && page.pageStack != null |
3171 | + } |
3172 | + |
3173 | UnityActions.ActionContext { |
3174 | id: actionContext |
3175 | |
3176 | |
3177 | === modified file 'modules/Ubuntu/Components/PageStack.qml' |
3178 | --- modules/Ubuntu/Components/PageStack.qml 2013-08-22 17:15:35 +0000 |
3179 | +++ modules/Ubuntu/Components/PageStack.qml 2014-04-29 23:04:44 +0000 |
3180 | @@ -19,7 +19,7 @@ |
3181 | |
3182 | /*! |
3183 | \qmltype PageStack |
3184 | - \inqmlmodule Ubuntu.Components 0.1 |
3185 | + \inqmlmodule Ubuntu.Components 1.1 |
3186 | \ingroup ubuntu |
3187 | \brief A stack of \l Page items that is used for inter-Page navigation. |
3188 | Pages on the stack can be popped, and new Pages can be pushed. |
3189 | @@ -39,8 +39,8 @@ |
3190 | Example: |
3191 | \qml |
3192 | import QtQuick 2.0 |
3193 | - import Ubuntu.Components 0.1 |
3194 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
3195 | + import Ubuntu.Components 1.1 |
3196 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
3197 | |
3198 | MainView { |
3199 | width: units.gu(48) |
3200 | |
3201 | === modified file 'modules/Ubuntu/Components/PageTreeNode.qml' |
3202 | --- modules/Ubuntu/Components/PageTreeNode.qml 2013-07-18 16:42:06 +0000 |
3203 | +++ modules/Ubuntu/Components/PageTreeNode.qml 2014-04-29 23:04:44 +0000 |
3204 | @@ -19,7 +19,7 @@ |
3205 | /*! |
3206 | \internal |
3207 | \qmltype PageTreeNode |
3208 | - \inqmlmodule Ubuntu.Components 0.1 |
3209 | + \inqmlmodule Ubuntu.Components 1.1 |
3210 | \ingroup ubuntu |
3211 | \brief The common parent of \l Page, \l MainView, \l PageStack and \l Tabs. |
3212 | |
3213 | |
3214 | === modified file 'modules/Ubuntu/Components/PageWrapper.qml' |
3215 | --- modules/Ubuntu/Components/PageWrapper.qml 2013-03-11 16:20:14 +0000 |
3216 | +++ modules/Ubuntu/Components/PageWrapper.qml 2014-04-29 23:04:44 +0000 |
3217 | @@ -20,7 +20,7 @@ |
3218 | /*! |
3219 | \internal |
3220 | \qmltype PageWrapper |
3221 | - \inqmlmodule Ubuntu.Components 0.1 |
3222 | + \inqmlmodule Ubuntu.Components 1.1 |
3223 | \ingroup ubuntu |
3224 | \brief Internal class used by \l PageStack |
3225 | |
3226 | |
3227 | === modified file 'modules/Ubuntu/Components/Panel.qml' |
3228 | --- modules/Ubuntu/Components/Panel.qml 2014-04-02 09:47:42 +0000 |
3229 | +++ modules/Ubuntu/Components/Panel.qml 2014-04-29 23:04:44 +0000 |
3230 | @@ -15,11 +15,11 @@ |
3231 | */ |
3232 | |
3233 | import QtQuick 2.0 |
3234 | -import Ubuntu.Components 0.1 as Toolkit |
3235 | +import Ubuntu.Components 1.1 as Toolkit |
3236 | |
3237 | /*! |
3238 | \qmltype Panel |
3239 | - \inqmlmodule Ubuntu.Components 0.1 |
3240 | + \inqmlmodule Ubuntu.Components 1.1 |
3241 | \ingroup ubuntu |
3242 | \brief A panel that can be swiped in and out from an edge of the window by the user. |
3243 | For most applications, it is highly recommended to use the \l MainView instead which includes |
3244 | @@ -38,7 +38,7 @@ |
3245 | A black panel that can be swiped in from the lower-right of the window can be created like this: |
3246 | \qml |
3247 | import QtQuick 2.0 |
3248 | - import Ubuntu.Components 0.1 |
3249 | + import Ubuntu.Components 1.1 |
3250 | |
3251 | Item { |
3252 | width: units.gu(80) |
3253 | @@ -69,7 +69,7 @@ |
3254 | A panel that looks like the standard (bottom-aligned) toolbar, but with custom contents, can be created like this: |
3255 | \qml |
3256 | import QtQuick 2.0 |
3257 | - import Ubuntu.Components 0.1 |
3258 | + import Ubuntu.Components 1.1 |
3259 | |
3260 | Item { |
3261 | width: units.gu(80) |
3262 | @@ -106,7 +106,7 @@ |
3263 | signals are forwarded from the panel by calling the child's trigger() function. Example: |
3264 | \qml |
3265 | import QtQuick 2.0 |
3266 | - import Ubuntu.Components 0.1 |
3267 | + import Ubuntu.Components 1.1 |
3268 | |
3269 | Rectangle { |
3270 | color: Theme.palette.normal.background |
3271 | @@ -583,8 +583,9 @@ |
3272 | } |
3273 | |
3274 | onEntered: { |
3275 | - // panel.__openOnHover |
3276 | - panel.open(); |
3277 | + if (panel.__openOnHover) { |
3278 | + panel.open(); |
3279 | + } |
3280 | hideTimer.stop(); |
3281 | } |
3282 | |
3283 | |
3284 | === modified file 'modules/Ubuntu/Components/Pickers/DatePicker.qml' |
3285 | --- modules/Ubuntu/Components/Pickers/DatePicker.qml 2014-03-06 10:46:17 +0000 |
3286 | +++ modules/Ubuntu/Components/Pickers/DatePicker.qml 2014-04-29 23:04:44 +0000 |
3287 | @@ -15,11 +15,11 @@ |
3288 | */ |
3289 | |
3290 | import QtQuick 2.0 |
3291 | -import Ubuntu.Components 0.1 |
3292 | +import Ubuntu.Components 1.1 |
3293 | |
3294 | /*! |
3295 | \qmltype DatePicker |
3296 | - \inqmlmodule Ubuntu.Components.Pickers 0.1 |
3297 | + \inqmlmodule Ubuntu.Components.Pickers 1.0 |
3298 | \ingroup ubuntu-pickers |
3299 | \brief DatePicker component provides date and time value picking functionality. |
3300 | |
3301 | @@ -36,8 +36,8 @@ |
3302 | |
3303 | \qml |
3304 | import QtQuick 2.0 |
3305 | - import Ubuntu.Components 0.1 |
3306 | - import Ubuntu.Components.Pickers 0.1 |
3307 | + import Ubuntu.Components 1.1 |
3308 | + import Ubuntu.Components.Pickers 1.0 |
3309 | |
3310 | Column { |
3311 | Label { |
3312 | @@ -56,8 +56,8 @@ |
3313 | which shows only year and month date units would look as follows: |
3314 | \qml |
3315 | import QtQuick 2.0 |
3316 | - import Ubuntu.Components 0.1 |
3317 | - import Ubuntu.Components.Pickers 0.1 |
3318 | + import Ubuntu.Components 1.1 |
3319 | + import Ubuntu.Components.Pickers 1.0 |
3320 | |
3321 | Column { |
3322 | Label { |
3323 | @@ -75,8 +75,8 @@ |
3324 | The following example demonstrates how to use DatePicker for time picking. |
3325 | \qml |
3326 | import QtQuick 2.0 |
3327 | - import Ubuntu.Components 0.1 |
3328 | - import Ubuntu.Components.Pickers 0.1 |
3329 | + import Ubuntu.Components 1.1 |
3330 | + import Ubuntu.Components.Pickers 1.0 |
3331 | |
3332 | Column { |
3333 | Label { |
3334 | @@ -112,8 +112,8 @@ |
3335 | \endlist |
3336 | \qml |
3337 | import QtQuick 2.0 |
3338 | - import Ubuntu.Components 0.1 |
3339 | - import Ubuntu.Components.Pickers 0.1 |
3340 | + import Ubuntu.Components 1.1 |
3341 | + import Ubuntu.Components.Pickers 1.0 |
3342 | |
3343 | Column { |
3344 | Label { |
3345 | |
3346 | === modified file 'modules/Ubuntu/Components/Pickers/DayModel.qml' |
3347 | --- modules/Ubuntu/Components/Pickers/DayModel.qml 2013-12-10 16:52:07 +0000 |
3348 | +++ modules/Ubuntu/Components/Pickers/DayModel.qml 2014-04-29 23:04:44 +0000 |
3349 | @@ -15,7 +15,7 @@ |
3350 | */ |
3351 | |
3352 | import QtQuick 2.0 |
3353 | -import Ubuntu.Components 0.1 |
3354 | +import Ubuntu.Components 1.1 |
3355 | |
3356 | PickerModelBase { |
3357 | circular: true |
3358 | |
3359 | === modified file 'modules/Ubuntu/Components/Pickers/Dialer.qml' |
3360 | --- modules/Ubuntu/Components/Pickers/Dialer.qml 2013-09-24 10:42:52 +0000 |
3361 | +++ modules/Ubuntu/Components/Pickers/Dialer.qml 2014-04-29 23:04:44 +0000 |
3362 | @@ -15,11 +15,11 @@ |
3363 | */ |
3364 | |
3365 | import QtQuick 2.0 |
3366 | -import "../" 0.1 |
3367 | +import Ubuntu.Components 1.1 |
3368 | |
3369 | /*! |
3370 | \qmltype Dialer |
3371 | - \inqmlmodule Ubuntu.Components.Pickers 0.1 |
3372 | + \inqmlmodule Ubuntu.Components.Pickers 1.0 |
3373 | \ingroup ubuntu-pickers |
3374 | \brief Dialer is a phone dialer style picker component. |
3375 | |
3376 | @@ -35,7 +35,7 @@ |
3377 | |
3378 | \qml |
3379 | import QtQuick 2.0 |
3380 | - import Ubuntu.Components.Pickers 0.1 |
3381 | + import Ubuntu.Components.Pickers 1.0 |
3382 | |
3383 | Dialer { |
3384 | size: units.gu(20) |
3385 | |
3386 | === modified file 'modules/Ubuntu/Components/Pickers/DialerHand.qml' |
3387 | --- modules/Ubuntu/Components/Pickers/DialerHand.qml 2013-09-24 11:02:17 +0000 |
3388 | +++ modules/Ubuntu/Components/Pickers/DialerHand.qml 2014-04-29 23:04:44 +0000 |
3389 | @@ -15,11 +15,11 @@ |
3390 | */ |
3391 | |
3392 | import QtQuick 2.0 |
3393 | -import "../" 0.1 |
3394 | +import Ubuntu.Components 1.1 |
3395 | |
3396 | /*! |
3397 | \qmltype DialerHand |
3398 | - \inqmlmodule Ubuntu.Components.Pickers 0.1 |
3399 | + \inqmlmodule Ubuntu.Components.Pickers 1.0 |
3400 | \ingroup ubuntu-pickers |
3401 | \brief DialerHand represents a value selector on a Dialer. |
3402 | |
3403 | |
3404 | === modified file 'modules/Ubuntu/Components/Pickers/DialerHandGroup.qml' |
3405 | --- modules/Ubuntu/Components/Pickers/DialerHandGroup.qml 2013-09-12 09:19:28 +0000 |
3406 | +++ modules/Ubuntu/Components/Pickers/DialerHandGroup.qml 2014-04-29 23:04:44 +0000 |
3407 | @@ -14,7 +14,7 @@ |
3408 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
3409 | */ |
3410 | import QtQuick 2.0 |
3411 | -import "../" 0.1 |
3412 | +import Ubuntu.Components 1.1 |
3413 | |
3414 | /*! |
3415 | \internal |
3416 | |
3417 | === modified file 'modules/Ubuntu/Components/Pickers/HoursModel.qml' |
3418 | --- modules/Ubuntu/Components/Pickers/HoursModel.qml 2013-12-16 13:01:41 +0000 |
3419 | +++ modules/Ubuntu/Components/Pickers/HoursModel.qml 2014-04-29 23:04:44 +0000 |
3420 | @@ -15,7 +15,7 @@ |
3421 | */ |
3422 | |
3423 | import QtQuick 2.0 |
3424 | -import Ubuntu.Components 0.1 |
3425 | +import Ubuntu.Components 1.1 |
3426 | |
3427 | PickerModelBase { |
3428 | property int from |
3429 | |
3430 | === modified file 'modules/Ubuntu/Components/Pickers/MinutesModel.qml' |
3431 | --- modules/Ubuntu/Components/Pickers/MinutesModel.qml 2013-12-13 11:22:51 +0000 |
3432 | +++ modules/Ubuntu/Components/Pickers/MinutesModel.qml 2014-04-29 23:04:44 +0000 |
3433 | @@ -15,7 +15,7 @@ |
3434 | */ |
3435 | |
3436 | import QtQuick 2.0 |
3437 | -import Ubuntu.Components 0.1 |
3438 | +import Ubuntu.Components 1.1 |
3439 | |
3440 | PickerModelBase { |
3441 | property int from |
3442 | |
3443 | === modified file 'modules/Ubuntu/Components/Pickers/MonthModel.qml' |
3444 | --- modules/Ubuntu/Components/Pickers/MonthModel.qml 2013-12-13 11:22:51 +0000 |
3445 | +++ modules/Ubuntu/Components/Pickers/MonthModel.qml 2014-04-29 23:04:44 +0000 |
3446 | @@ -15,7 +15,7 @@ |
3447 | */ |
3448 | |
3449 | import QtQuick 2.0 |
3450 | -import Ubuntu.Components 0.1 |
3451 | +import Ubuntu.Components 1.1 |
3452 | |
3453 | PickerModelBase { |
3454 | circular: (count >= 11) |
3455 | |
3456 | === modified file 'modules/Ubuntu/Components/Pickers/Picker.qml' |
3457 | --- modules/Ubuntu/Components/Pickers/Picker.qml 2014-03-06 10:46:17 +0000 |
3458 | +++ modules/Ubuntu/Components/Pickers/Picker.qml 2014-04-29 23:04:44 +0000 |
3459 | @@ -15,11 +15,11 @@ |
3460 | */ |
3461 | |
3462 | import QtQuick 2.0 |
3463 | -import Ubuntu.Components 0.1 |
3464 | +import Ubuntu.Components 1.1 |
3465 | |
3466 | /*! |
3467 | \qmltype Picker |
3468 | - \inqmlmodule Ubuntu.Components.Pickers 0.1 |
3469 | + \inqmlmodule Ubuntu.Components.Pickers 1.0 |
3470 | \ingroup ubuntu-pickers |
3471 | \brief Picker is a slot-machine style value selection component. |
3472 | |
3473 | @@ -35,8 +35,8 @@ |
3474 | Example: |
3475 | \qml |
3476 | import QtQuick 2.0 |
3477 | - import Ubuntu.Components 0.1 |
3478 | - import Ubuntu.Components.Pickers 0.1 |
3479 | + import Ubuntu.Components 1.1 |
3480 | + import Ubuntu.Components.Pickers 1.0 |
3481 | |
3482 | Picker { |
3483 | model: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"] |
3484 | |
3485 | === modified file 'modules/Ubuntu/Components/Pickers/PickerDelegate.qml' |
3486 | --- modules/Ubuntu/Components/Pickers/PickerDelegate.qml 2014-03-06 10:46:17 +0000 |
3487 | +++ modules/Ubuntu/Components/Pickers/PickerDelegate.qml 2014-04-29 23:04:44 +0000 |
3488 | @@ -15,11 +15,11 @@ |
3489 | */ |
3490 | |
3491 | import QtQuick 2.0 |
3492 | -import "../" 0.1 |
3493 | +import Ubuntu.Components 1.1 |
3494 | |
3495 | /*! |
3496 | \qmltype PickerDelegate |
3497 | - \inqmlmodule Ubuntu.Components.Pickers 0.1 |
3498 | + \inqmlmodule Ubuntu.Components.Pickers 1.0 |
3499 | \ingroup ubuntu-pickers |
3500 | \brief PickerDelegate component serves as base for Picker delegates. |
3501 | |
3502 | |
3503 | === modified file 'modules/Ubuntu/Components/Pickers/PickerPanel.qml' |
3504 | --- modules/Ubuntu/Components/Pickers/PickerPanel.qml 2014-02-19 10:36:14 +0000 |
3505 | +++ modules/Ubuntu/Components/Pickers/PickerPanel.qml 2014-04-29 23:04:44 +0000 |
3506 | @@ -16,13 +16,13 @@ |
3507 | |
3508 | import QtQuick 2.0 |
3509 | import QtQuick.Window 2.0 |
3510 | -import Ubuntu.Components 0.1 |
3511 | -import Ubuntu.Components.ListItems 0.1 |
3512 | -import Ubuntu.Components.Popups 0.1 |
3513 | +import Ubuntu.Components 1.1 |
3514 | +import Ubuntu.Components.ListItems 1.0 |
3515 | +import Ubuntu.Components.Popups 1.0 |
3516 | |
3517 | /*! |
3518 | \qmltype PickerPanel |
3519 | - \inqmlmodule Ubuntu.Components 0.1 |
3520 | + \inqmlmodule Ubuntu.Components 1.1 |
3521 | \ingroup ubuntu-pickers |
3522 | \brief Provides a panel for opening a DatePicker in place of the input panel or |
3523 | as Popover, depending on the form factor. |
3524 | @@ -32,7 +32,7 @@ |
3525 | on date pickers. |
3526 | \qml |
3527 | import QtQuick 2.0 |
3528 | - import Ubuntu.Components 0.1 |
3529 | + import Ubuntu.Components 1.1 |
3530 | |
3531 | MainWindow { |
3532 | width: units.gu(40) |
3533 | |
3534 | === modified file 'modules/Ubuntu/Components/Pickers/PickerRow.qml' |
3535 | --- modules/Ubuntu/Components/Pickers/PickerRow.qml 2014-03-06 10:46:17 +0000 |
3536 | +++ modules/Ubuntu/Components/Pickers/PickerRow.qml 2014-04-29 23:04:44 +0000 |
3537 | @@ -15,7 +15,7 @@ |
3538 | */ |
3539 | |
3540 | import QtQuick 2.0 |
3541 | -import Ubuntu.Components 0.1 |
3542 | +import Ubuntu.Components 1.1 |
3543 | |
3544 | Row { |
3545 | id: row |
3546 | |
3547 | === modified file 'modules/Ubuntu/Components/Pickers/SecondsModel.qml' |
3548 | --- modules/Ubuntu/Components/Pickers/SecondsModel.qml 2013-12-13 11:22:51 +0000 |
3549 | +++ modules/Ubuntu/Components/Pickers/SecondsModel.qml 2014-04-29 23:04:44 +0000 |
3550 | @@ -15,7 +15,7 @@ |
3551 | */ |
3552 | |
3553 | import QtQuick 2.0 |
3554 | -import Ubuntu.Components 0.1 |
3555 | +import Ubuntu.Components 1.1 |
3556 | |
3557 | PickerModelBase { |
3558 | property int from |
3559 | |
3560 | === modified file 'modules/Ubuntu/Components/Pickers/YearModel.qml' |
3561 | --- modules/Ubuntu/Components/Pickers/YearModel.qml 2013-12-13 11:22:51 +0000 |
3562 | +++ modules/Ubuntu/Components/Pickers/YearModel.qml 2014-04-29 23:04:44 +0000 |
3563 | @@ -15,7 +15,7 @@ |
3564 | */ |
3565 | |
3566 | import QtQuick 2.0 |
3567 | -import Ubuntu.Components 0.1 |
3568 | +import Ubuntu.Components 1.1 |
3569 | |
3570 | PickerModelBase { |
3571 | // local properties |
3572 | |
3573 | === modified file 'modules/Ubuntu/Components/Pickers/qmldir' |
3574 | --- modules/Ubuntu/Components/Pickers/qmldir 2013-12-10 16:37:04 +0000 |
3575 | +++ modules/Ubuntu/Components/Pickers/qmldir 2014-04-29 23:04:44 +0000 |
3576 | @@ -8,3 +8,10 @@ |
3577 | internal MonthModel MonthModel.qml |
3578 | internal DayModel DayModel.qml |
3579 | internal PickerModelBase PickerModelBase.qml |
3580 | + |
3581 | +#version 1.0 |
3582 | +Picker 1.0 Picker.qml |
3583 | +PickerDelegate 1.0 PickerDelegate.qml |
3584 | +Dialer 1.0 Dialer.qml |
3585 | +DialerHand 1.0 DialerHand.qml |
3586 | +DatePicker 1.0 DatePicker.qml |
3587 | |
3588 | === modified file 'modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml' |
3589 | --- modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml 2013-08-07 12:50:35 +0000 |
3590 | +++ modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml 2014-04-29 23:04:44 +0000 |
3591 | @@ -15,13 +15,13 @@ |
3592 | */ |
3593 | |
3594 | import QtQuick 2.0 |
3595 | -import "../" 0.1 |
3596 | -import "../ListItems" 0.1 |
3597 | +import Ubuntu.Components 1.1 |
3598 | +import Ubuntu.Components.ListItems 1.0 |
3599 | |
3600 | /*! |
3601 | \qmltype ActionSelectionPopover |
3602 | \inherits Popover |
3603 | - \inqmlmodule Ubuntu.Components.Popups 0.1 |
3604 | + \inqmlmodule Ubuntu.Components.Popups 1.0 |
3605 | \ingroup ubuntu-popups |
3606 | \brief A special popover presenting actions to the user. The popover is closed |
3607 | automatically when the action is chosen. |
3608 | |
3609 | === modified file 'modules/Ubuntu/Components/Popups/ComposerSheet.qml' |
3610 | --- modules/Ubuntu/Components/Popups/ComposerSheet.qml 2013-11-05 00:34:46 +0000 |
3611 | +++ modules/Ubuntu/Components/Popups/ComposerSheet.qml 2014-04-29 23:04:44 +0000 |
3612 | @@ -15,11 +15,11 @@ |
3613 | */ |
3614 | |
3615 | import QtQuick 2.0 |
3616 | -import Ubuntu.Components 0.1 |
3617 | +import Ubuntu.Components 1.1 |
3618 | /*! |
3619 | \qmltype ComposerSheet |
3620 | \inherits SheetBase |
3621 | - \inqmlmodule Ubuntu.Components.Popups 0.1 |
3622 | + \inqmlmodule Ubuntu.Components.Popups 1.0 |
3623 | \ingroup ubuntu-popups |
3624 | \brief Much like the \l DefaultSheet the Composer Sheet allows an application to insert a content |
3625 | view over the focused view without disrupting the navigation pattern. However the Composer Sheet |
3626 | @@ -31,8 +31,8 @@ |
3627 | |
3628 | Example: |
3629 | \qml |
3630 | - import Ubuntu.Components 0.1 |
3631 | - import Ubuntu.Components.Popups 0.1 |
3632 | + import Ubuntu.Components 1.1 |
3633 | + import Ubuntu.Components.Popups 1.0 |
3634 | |
3635 | Item { |
3636 | Component { |
3637 | |
3638 | === modified file 'modules/Ubuntu/Components/Popups/DefaultSheet.qml' |
3639 | --- modules/Ubuntu/Components/Popups/DefaultSheet.qml 2013-07-01 05:54:33 +0000 |
3640 | +++ modules/Ubuntu/Components/Popups/DefaultSheet.qml 2014-04-29 23:04:44 +0000 |
3641 | @@ -15,12 +15,12 @@ |
3642 | */ |
3643 | |
3644 | import QtQuick 2.0 |
3645 | -import Ubuntu.Components 0.1 |
3646 | +import Ubuntu.Components 1.1 |
3647 | |
3648 | /*! |
3649 | \qmltype DefaultSheet |
3650 | \inherits SheetBase |
3651 | - \inqmlmodule Ubuntu.Components.Popups 0.1 |
3652 | + \inqmlmodule Ubuntu.Components.Popups 1.0 |
3653 | \ingroup ubuntu-popups |
3654 | \brief The Default Sheet allows an application to insert a content view over the focused view |
3655 | without disrupting the navigation pattern (tabs state or drill-down path are maintained. When |
3656 | @@ -32,8 +32,8 @@ |
3657 | |
3658 | Example: |
3659 | \qml |
3660 | - import Ubuntu.Components 0.1 |
3661 | - import Ubuntu.Components.Popups 0.1 |
3662 | + import Ubuntu.Components 1.1 |
3663 | + import Ubuntu.Components.Popups 1.0 |
3664 | |
3665 | Item { |
3666 | Component { |
3667 | |
3668 | === modified file 'modules/Ubuntu/Components/Popups/Dialog.qml' |
3669 | --- modules/Ubuntu/Components/Popups/Dialog.qml 2013-07-15 10:28:04 +0000 |
3670 | +++ modules/Ubuntu/Components/Popups/Dialog.qml 2014-04-29 23:04:44 +0000 |
3671 | @@ -15,13 +15,13 @@ |
3672 | */ |
3673 | |
3674 | import QtQuick 2.0 |
3675 | -import Ubuntu.Components 0.1 |
3676 | +import Ubuntu.Components 1.1 |
3677 | import "internalPopupUtils.js" as InternalPopupUtils |
3678 | |
3679 | /*! |
3680 | \qmltype Dialog |
3681 | \inherits PopupBase |
3682 | - \inqmlmodule Ubuntu.Components.Popups 0.1 |
3683 | + \inqmlmodule Ubuntu.Components.Popups 1.0 |
3684 | \ingroup ubuntu-popups |
3685 | \brief The Dialog caters for cases in which the application requires the user to determine |
3686 | between optional actions. The Dialog will interrupt the user flow and lock the view |
3687 | @@ -33,8 +33,8 @@ |
3688 | Example: |
3689 | \qml |
3690 | import QtQuick 2.0 |
3691 | - import Ubuntu.Components 0.1 |
3692 | - import Ubuntu.Components.Popups 0.1 |
3693 | + import Ubuntu.Components 1.1 |
3694 | + import Ubuntu.Components.Popups 1.0 |
3695 | |
3696 | Item { |
3697 | width: units.gu(80) |
3698 | |
3699 | === modified file 'modules/Ubuntu/Components/Popups/Popover.qml' |
3700 | --- modules/Ubuntu/Components/Popups/Popover.qml 2014-01-10 15:34:32 +0000 |
3701 | +++ modules/Ubuntu/Components/Popups/Popover.qml 2014-04-29 23:04:44 +0000 |
3702 | @@ -16,12 +16,12 @@ |
3703 | |
3704 | import QtQuick 2.0 |
3705 | import "internalPopupUtils.js" as InternalPopupUtils |
3706 | -import Ubuntu.Components 0.1 |
3707 | +import Ubuntu.Components 1.1 |
3708 | |
3709 | /*! |
3710 | \qmltype Popover |
3711 | \inherits PopupBase |
3712 | - \inqmlmodule Ubuntu.Components.Popups 0.1 |
3713 | + \inqmlmodule Ubuntu.Components.Popups 1.0 |
3714 | \ingroup ubuntu-popups |
3715 | \brief A popover allows an application to present additional content without changing the view. |
3716 | A popover has a fixed width and automatic height, depending on is contents. |
3717 | @@ -32,9 +32,9 @@ |
3718 | Example: |
3719 | \qml |
3720 | import QtQuick 2.0 |
3721 | - import Ubuntu.Components 0.1 |
3722 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
3723 | - import Ubuntu.Components.Popups 0.1 |
3724 | + import Ubuntu.Components 1.1 |
3725 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
3726 | + import Ubuntu.Components.Popups 1.0 |
3727 | |
3728 | Rectangle { |
3729 | color: Theme.palette.normal.background |
3730 | @@ -204,6 +204,7 @@ |
3731 | |
3732 | StyledItem { |
3733 | id: foreground |
3734 | + objectName: "popover_foreground" |
3735 | |
3736 | //styling properties |
3737 | property real minimumWidth: units.gu(40) |
3738 | |
3739 | === modified file 'modules/Ubuntu/Components/Popups/PopupBase.qml' |
3740 | --- modules/Ubuntu/Components/Popups/PopupBase.qml 2014-01-08 16:32:38 +0000 |
3741 | +++ modules/Ubuntu/Components/Popups/PopupBase.qml 2014-04-29 23:04:44 +0000 |
3742 | @@ -15,11 +15,11 @@ |
3743 | */ |
3744 | |
3745 | import QtQuick 2.0 |
3746 | -import Ubuntu.Components 0.1 |
3747 | +import Ubuntu.Components 1.1 |
3748 | |
3749 | /*! |
3750 | \qmltype PopupBase |
3751 | - \inqmlmodule Ubuntu.Components.Popups 0.1 |
3752 | + \inqmlmodule Ubuntu.Components.Popups 1.0 |
3753 | \ingroup ubuntu-popups |
3754 | \brief The base class for all dialogs, sheets and popovers. Do not use directly. |
3755 | |
3756 | @@ -142,6 +142,7 @@ |
3757 | InverseMouseArea { |
3758 | id: eventGrabber |
3759 | enabled: true |
3760 | + acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton |
3761 | anchors.fill: __foreground |
3762 | sensingArea: dismissArea |
3763 | propagateComposedEvents: !grabDismissAreaEvents |
3764 | |
3765 | === modified file 'modules/Ubuntu/Components/Popups/SheetBase.qml' |
3766 | --- modules/Ubuntu/Components/Popups/SheetBase.qml 2013-06-27 15:20:12 +0000 |
3767 | +++ modules/Ubuntu/Components/Popups/SheetBase.qml 2014-04-29 23:04:44 +0000 |
3768 | @@ -15,11 +15,11 @@ |
3769 | */ |
3770 | |
3771 | import QtQuick 2.0 |
3772 | -import Ubuntu.Components 0.1 |
3773 | +import Ubuntu.Components 1.1 |
3774 | |
3775 | /*! |
3776 | \qmltype SheetBase |
3777 | - \inqmlmodule Ubuntu.Components.Popups 0.1 |
3778 | + \inqmlmodule Ubuntu.Components.Popups 1.0 |
3779 | \ingroup ubuntu-popups |
3780 | \brief Parent class of different types of sheets. Not to be used directly. |
3781 | |
3782 | |
3783 | === modified file 'modules/Ubuntu/Components/Popups/qmldir' |
3784 | --- modules/Ubuntu/Components/Popups/qmldir 2013-07-13 14:35:21 +0000 |
3785 | +++ modules/Ubuntu/Components/Popups/qmldir 2014-04-29 23:04:44 +0000 |
3786 | @@ -9,3 +9,14 @@ |
3787 | ActionSelectionPopover 0.1 ActionSelectionPopover.qml |
3788 | |
3789 | PopupUtils 0.1 popupUtils.js |
3790 | + |
3791 | +#version 1.0 |
3792 | +Dialog 1.0 Dialog.qml |
3793 | +PopupBase 1.0 PopupBase.qml |
3794 | +Popover 1.0 Popover.qml |
3795 | +SheetBase 1.0 SheetBase.qml |
3796 | +DefaultSheet 1.0 DefaultSheet.qml |
3797 | +ComposerSheet 1.0 ComposerSheet.qml |
3798 | +ActionSelectionPopover 1.0 ActionSelectionPopover.qml |
3799 | + |
3800 | +PopupUtils 1.0 popupUtils.js |
3801 | |
3802 | === modified file 'modules/Ubuntu/Components/ProgressBar.qml' |
3803 | --- modules/Ubuntu/Components/ProgressBar.qml 2013-08-01 14:06:36 +0000 |
3804 | +++ modules/Ubuntu/Components/ProgressBar.qml 2014-04-29 23:04:44 +0000 |
3805 | @@ -18,7 +18,7 @@ |
3806 | |
3807 | /*! |
3808 | \qmltype ProgressBar |
3809 | - \inqmlmodule Ubuntu.Components 0.1 |
3810 | + \inqmlmodule Ubuntu.Components 1.1 |
3811 | \ingroup ubuntu |
3812 | \brief The ProgressBar component visually indicates the progress of a process of |
3813 | determinate or indeterminate duration. |
3814 | |
3815 | === modified file 'modules/Ubuntu/Components/Scrollbar.qml' |
3816 | --- modules/Ubuntu/Components/Scrollbar.qml 2013-06-27 15:20:12 +0000 |
3817 | +++ modules/Ubuntu/Components/Scrollbar.qml 2014-04-29 23:04:44 +0000 |
3818 | @@ -18,7 +18,7 @@ |
3819 | |
3820 | /*! |
3821 | \qmltype ScrollBar |
3822 | - \inqmlmodule Ubuntu.Components 0.1 |
3823 | + \inqmlmodule Ubuntu.Components 1.1 |
3824 | \ingroup ubuntu |
3825 | \brief The ScrollBar component provides scrolling functionality for |
3826 | scrollable views (i.e. Flickable, ListView). |
3827 | |
3828 | === modified file 'modules/Ubuntu/Components/Slider.qml' |
3829 | --- modules/Ubuntu/Components/Slider.qml 2014-01-08 16:32:38 +0000 |
3830 | +++ modules/Ubuntu/Components/Slider.qml 2014-04-29 23:04:44 +0000 |
3831 | @@ -21,7 +21,7 @@ |
3832 | |
3833 | /*! |
3834 | \qmltype Slider |
3835 | - \inqmlmodule Ubuntu.Components 0.1 |
3836 | + \inqmlmodule Ubuntu.Components 1.1 |
3837 | \ingroup ubuntu |
3838 | \brief Slider is a component to select a value from a continuous range of |
3839 | values. |
3840 | |
3841 | === modified file 'modules/Ubuntu/Components/StyledItem.qml' |
3842 | --- modules/Ubuntu/Components/StyledItem.qml 2013-06-27 15:36:28 +0000 |
3843 | +++ modules/Ubuntu/Components/StyledItem.qml 2014-04-29 23:04:44 +0000 |
3844 | @@ -18,7 +18,7 @@ |
3845 | |
3846 | /*! |
3847 | \qmlabstract StyledItem |
3848 | - \inqmlmodule Ubuntu.Components 0.1 |
3849 | + \inqmlmodule Ubuntu.Components 1.1 |
3850 | \ingroup theming |
3851 | \brief The StyledItem class allows items to be styled by the theme. |
3852 | |
3853 | |
3854 | === modified file 'modules/Ubuntu/Components/Switch.qml' |
3855 | --- modules/Ubuntu/Components/Switch.qml 2013-06-27 15:20:12 +0000 |
3856 | +++ modules/Ubuntu/Components/Switch.qml 2014-04-29 23:04:44 +0000 |
3857 | @@ -21,7 +21,7 @@ |
3858 | |
3859 | /*! |
3860 | \qmltype Switch |
3861 | - \inqmlmodule Ubuntu.Components 0.1 |
3862 | + \inqmlmodule Ubuntu.Components 1.1 |
3863 | \ingroup ubuntu |
3864 | \brief Switch is a component with two states, checked or unchecked. It can |
3865 | be used to set boolean options. The behavior is the same as \l CheckBox, the |
3866 | |
3867 | === modified file 'modules/Ubuntu/Components/Tab.qml' |
3868 | --- modules/Ubuntu/Components/Tab.qml 2013-11-07 07:26:01 +0000 |
3869 | +++ modules/Ubuntu/Components/Tab.qml 2014-04-29 23:04:44 +0000 |
3870 | @@ -18,7 +18,7 @@ |
3871 | |
3872 | /*! |
3873 | \qmltype Tab |
3874 | - \inqmlmodule Ubuntu.Components 0.1 |
3875 | + \inqmlmodule Ubuntu.Components 1.1 |
3876 | \ingroup ubuntu |
3877 | \brief Component to represent a single tab in a \l Tabs environment. |
3878 | |
3879 | |
3880 | === modified file 'modules/Ubuntu/Components/TabBar.qml' |
3881 | --- modules/Ubuntu/Components/TabBar.qml 2014-04-08 12:38:35 +0000 |
3882 | +++ modules/Ubuntu/Components/TabBar.qml 2014-04-29 23:04:44 +0000 |
3883 | @@ -18,7 +18,7 @@ |
3884 | |
3885 | /*! |
3886 | \qmltype TabBar |
3887 | - \inqmlmodule Ubuntu.Components 0.1 |
3888 | + \inqmlmodule Ubuntu.Components 1.1 |
3889 | \ingroup ubuntu |
3890 | \brief Tab bar that will be shown in the header when \l Tabs is active. |
3891 | This component does not need to be instantiated by the developer, it is |
3892 | @@ -63,8 +63,18 @@ |
3893 | |
3894 | /*! |
3895 | The property holds the index of the selected Tab item. |
3896 | + Note: Setting this property is DEPRECATED. Set the selectedIndex of the model instead. |
3897 | */ |
3898 | - property int selectedIndex: (model && internal.modelChecked && model.count > 0) ? 0 : -1 |
3899 | + property int selectedIndex: (model && internal.modelChecked) ? model.selectedIndex : -1 |
3900 | + |
3901 | + /*! \internal */ |
3902 | + onSelectedIndexChanged: { |
3903 | + if (!model) return; |
3904 | + if (tabBar.selectedIndex !== model.selectedIndex) { |
3905 | + console.warn("Setting TabBar.selectedIndex is DEPRECATED. Set selectedIndex of the model instead"); |
3906 | + tabBar.selectedIndex = Qt.binding(function() { return (model && internal.modelChecked) ? model.selectedIndex : -1 }); |
3907 | + } |
3908 | + } |
3909 | |
3910 | /*! |
3911 | Do not deactivate the tab bar after a specified idle time or when the user selects a new tab. |
3912 | @@ -93,20 +103,24 @@ |
3913 | |
3914 | property bool modelChecked: true; |
3915 | |
3916 | + // returns true if the roles are good, false otherwise. |
3917 | function checkRoles() { |
3918 | if (tabBar.model.count <= 0) |
3919 | - return; |
3920 | + return false; |
3921 | |
3922 | modelChecked = true; |
3923 | var f = tabBar.model.get(0); |
3924 | if (f.tab === undefined && f.title === undefined) { |
3925 | console.error("TabBar model must provide either tab or title role."); |
3926 | tabBar.model = null; |
3927 | + return false; |
3928 | } |
3929 | if (f.tab !== undefined && f.tab.title === undefined) { |
3930 | console.error("TabBar model's tab role must have title property."); |
3931 | tabBar.model = null; |
3932 | + return false; |
3933 | } |
3934 | + return true; |
3935 | } |
3936 | } |
3937 | |
3938 | @@ -117,6 +131,12 @@ |
3939 | if (!model) |
3940 | return; |
3941 | |
3942 | + if (!model.hasOwnProperty("selectedIndex")) { |
3943 | + console.error("TabBar model must have selectedIndex property defined."); |
3944 | + tabBar.model = null; |
3945 | + return; |
3946 | + } |
3947 | + |
3948 | if (!model.hasOwnProperty("count")) { |
3949 | console.error("TabBar model must have count property defined."); |
3950 | tabBar.model = null; |
3951 | @@ -130,11 +150,11 @@ |
3952 | } |
3953 | |
3954 | if (model.count > 0) { |
3955 | - internal.checkRoles(); |
3956 | - tabBar.selectedIndex = Math.max(Math.min(tabBar.selectedIndex, model.count - 1), 0); |
3957 | + if (internal.checkRoles()) { |
3958 | + model.selectedIndex = Math.max(Math.min(tabBar.selectedIndex, model.count - 1), 0); |
3959 | + } |
3960 | } else { |
3961 | internal.modelChecked = false; |
3962 | - tabBar.selectedIndex = Qt.binding(function() { return (model && internal.modelChecked && model.count > 0) ? 0 : -1 }) |
3963 | } |
3964 | } |
3965 | |
3966 | |
3967 | === modified file 'modules/Ubuntu/Components/Tabs.qml' |
3968 | --- modules/Ubuntu/Components/Tabs.qml 2014-04-08 12:38:35 +0000 |
3969 | +++ modules/Ubuntu/Components/Tabs.qml 2014-04-29 23:04:44 +0000 |
3970 | @@ -18,7 +18,7 @@ |
3971 | |
3972 | /*! |
3973 | \qmltype Tabs |
3974 | - \inqmlmodule Ubuntu.Components 0.1 |
3975 | + \inqmlmodule Ubuntu.Components 1.1 |
3976 | \ingroup ubuntu |
3977 | \brief The Tabs class provides an environment where multible \l Tab |
3978 | children can be added, and the user is presented with a tab |
3979 | @@ -33,8 +33,8 @@ |
3980 | Example: |
3981 | \qml |
3982 | import QtQuick 2.0 |
3983 | - import Ubuntu.Components 0.1 |
3984 | - import Ubuntu.Components.ListItems 0.1 as ListItem |
3985 | + import Ubuntu.Components 1.1 |
3986 | + import Ubuntu.Components.ListItems 1.0 as ListItem |
3987 | |
3988 | MainView { |
3989 | width: units.gu(48) |
3990 | @@ -104,7 +104,7 @@ |
3991 | |
3992 | \qml |
3993 | import QtQuick 2.0 |
3994 | - import Ubuntu.Components 0.1 |
3995 | + import Ubuntu.Components 1.1 |
3996 | |
3997 | MainView { |
3998 | id: mainView |
3999 | @@ -161,7 +161,7 @@ |
4000 | The first tab is 0, and -1 means that no tab is selected. |
4001 | The initial value is 0 if Tabs has contents, or -1 otherwise. |
4002 | */ |
4003 | - property alias selectedTabIndex: bar.selectedIndex |
4004 | + property alias selectedTabIndex: tabsModel.selectedIndex |
4005 | |
4006 | /*! |
4007 | \preliminary |
4008 | @@ -176,14 +176,14 @@ |
4009 | readonly property Item currentPage: selectedTab ? selectedTab.page : null |
4010 | |
4011 | /*! |
4012 | + \deprecated |
4013 | The \l TabBar that will be shown in the header |
4014 | and provides scrollable tab buttons. |
4015 | + This property is DEPRECATED. TabBar is now part of the header style. |
4016 | */ |
4017 | - property TabBar tabBar: TabBar { |
4018 | - id: bar |
4019 | - model: tabsModel |
4020 | - visible: tabs.active |
4021 | - } |
4022 | + property TabBar tabBar: internal.header && internal.header.__styleInstance && |
4023 | + internal.header.__styleInstance.hasOwnProperty("__tabBar") ? |
4024 | + internal.header.__styleInstance.__tabBar : null |
4025 | |
4026 | /*! |
4027 | Children are placed in a separate item that has functionality to extract the Tab items. |
4028 | @@ -207,11 +207,24 @@ |
4029 | |
4030 | /*! |
4031 | \internal |
4032 | + tst_tabs.qml needs access to the model to verify that Repeaters inside Tabs works. |
4033 | + */ |
4034 | + property var __model: tabsModel |
4035 | + |
4036 | + /*! |
4037 | + \internal |
4038 | required by TabsStyle |
4039 | */ |
4040 | ListModel { |
4041 | id: tabsModel |
4042 | |
4043 | + property bool updateDisabled: false |
4044 | + |
4045 | + /*! |
4046 | + The index of the selected tab. |
4047 | + */ |
4048 | + property int selectedIndex: tabsModel.count > 0 ? 0 : -1 |
4049 | + |
4050 | function listModel(tab) { |
4051 | return {"title": tab.title, "tab": tab}; |
4052 | } |
4053 | @@ -292,13 +305,6 @@ |
4054 | id: internal |
4055 | property Header header: tabs.__propagated ? tabs.__propagated.header : null |
4056 | |
4057 | - Binding { |
4058 | - target: tabBar |
4059 | - property: "animate" |
4060 | - when: internal.header && internal.header.hasOwnProperty("animate") |
4061 | - value: internal.header.animate |
4062 | - } |
4063 | - |
4064 | /* |
4065 | List of connected Repeaters to avoid repeater "hammering" of itemAdded() signal. |
4066 | */ |
4067 | @@ -439,8 +445,8 @@ |
4068 | |
4069 | Binding { |
4070 | target: internal.header |
4071 | - property: "contents" |
4072 | - value: tabs.active ? tabs.tabBar: null |
4073 | + property: "tabsModel" |
4074 | + value: tabsModel |
4075 | when: internal.header && tabs.active |
4076 | } |
4077 | } |
4078 | |
4079 | === modified file 'modules/Ubuntu/Components/TextArea.qml' |
4080 | --- modules/Ubuntu/Components/TextArea.qml 2014-01-08 16:32:38 +0000 |
4081 | +++ modules/Ubuntu/Components/TextArea.qml 2014-04-29 23:04:44 +0000 |
4082 | @@ -15,11 +15,12 @@ |
4083 | */ |
4084 | |
4085 | import QtQuick 2.0 |
4086 | +import Ubuntu.Components 1.1 as Ubuntu |
4087 | import "mathUtils.js" as MathUtils |
4088 | |
4089 | /*! |
4090 | \qmltype TextArea |
4091 | - \inqmlmodule Ubuntu.Components 0.1 |
4092 | + \inqmlmodule Ubuntu.Components 1.1 |
4093 | \ingroup ubuntu |
4094 | \brief The TextArea item displays a block of editable, scrollable, formatted |
4095 | text. |
4096 | @@ -60,19 +61,34 @@ |
4097 | mode and 4 lines on fixed-mode. The line size is calculated from the font size and the |
4098 | ovarlay and frame spacing specified in the style. |
4099 | |
4100 | + \section2 Scrolling and text selection |
4101 | + The input is activated when the tap or mouse is released after being pressed |
4102 | + over the component. |
4103 | + |
4104 | Scrolling the editing area can happen when the size is fixed or in auto-sizing mode when |
4105 | the content size is bigger than the visible area. The scrolling is realized by swipe |
4106 | gestures, or by navigating the cursor. |
4107 | |
4108 | - The item enters in selection mode when the user performs a long tap (or long mouse press) |
4109 | - or a double tap/press on the text area. The mode is visualized by two selection cursors |
4110 | - (pins) which can be used to select the desired text. The text can also be selected by |
4111 | - moving the finger/mouse towards the desired area right after entering in selection mode. |
4112 | - The way the text is selected is driven by the mouseSelectionMode value, which is either |
4113 | - character or word. The editor leaves the selection mode by pressing/tapping again on it |
4114 | - or by losing focus. |
4115 | - |
4116 | - \b{This component is under heavy development.} |
4117 | + The content can be selected in the following ways: |
4118 | + \list |
4119 | + \li - double tapping/left mouse clicking over the content, when the word that |
4120 | + had been tapped over will be selected |
4121 | + \li - by pressing and dragging the selection cursor over the text input. Note |
4122 | + that there has to be a delay of approx. 200 ms between the press and drag |
4123 | + gesture, time when the input switches from scroll mode to selection mode |
4124 | + \endlist |
4125 | + |
4126 | + The input is focused (activated) upon tap/left mouse button release. The cursor |
4127 | + will be placed at the position the mouse/tap point at release time. If the click |
4128 | + is happening on a selected area, the selection will be cleared. Long press above |
4129 | + a selected area brings up the clipboard context menu. When the long press happens |
4130 | + over a non-selected area, the cursor will be moved to the position and the component |
4131 | + enters in selection mode. The selection mode can also be activated by tapping and |
4132 | + keeping the tap/mouse over for approx 300 ms. If there is a move during this time, |
4133 | + the component enters into scrolling mode. The mode is exited once the scrolling |
4134 | + finishes. During the scrolling mode the selected text is preserved. |
4135 | + |
4136 | + \note During text selection all interactive parent Flickables are turned off. |
4137 | */ |
4138 | |
4139 | StyledItem { |
4140 | @@ -708,7 +724,7 @@ |
4141 | */ |
4142 | function forceActiveFocus() |
4143 | { |
4144 | - internal.activateEditor(); |
4145 | + inputHandler.activateInput(); |
4146 | } |
4147 | |
4148 | // logic |
4149 | @@ -721,6 +737,14 @@ |
4150 | // activation area on mouse click |
4151 | // the editor activates automatically when pressed in the editor control, |
4152 | // however that one can be slightly spaced to the main control area |
4153 | + MouseArea { |
4154 | + anchors.fill: parent |
4155 | + enabled: internal.frameSpacing > 0 |
4156 | + acceptedButtons: Qt.LeftButton | Qt.RightButton |
4157 | + // activate input when pressed on the frame |
4158 | + preventStealing: false |
4159 | + Ubuntu.Mouse.forwardTo: [inputHandler] |
4160 | + } |
4161 | |
4162 | //internals |
4163 | |
4164 | @@ -744,8 +768,6 @@ |
4165 | LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft |
4166 | LayoutMirroring.childrenInherit: true |
4167 | |
4168 | - /*!\internal */ |
4169 | - property alias __internal: internal |
4170 | QtObject { |
4171 | id: internal |
4172 | // public property locals enabling aliasing |
4173 | @@ -757,23 +779,8 @@ |
4174 | property real inputAreaWidth: control.width - 2 * frameSpacing |
4175 | property real inputAreaHeight: control.height - 2 * frameSpacing |
4176 | //selection properties |
4177 | - property bool draggingMode: false |
4178 | - property bool selectionMode: false |
4179 | property bool prevShowCursor |
4180 | |
4181 | - signal popupTriggered(int pos) |
4182 | - |
4183 | - onDraggingModeChanged: { |
4184 | - if (draggingMode) selectionMode = false; |
4185 | - } |
4186 | - onSelectionModeChanged: { |
4187 | - if (selectionMode) |
4188 | - draggingMode = false; |
4189 | - else { |
4190 | - toggleSelectionCursors(false); |
4191 | - } |
4192 | - } |
4193 | - |
4194 | function toggleSelectionCursors(show) |
4195 | { |
4196 | if (!show) { |
4197 | @@ -788,25 +795,6 @@ |
4198 | } |
4199 | } |
4200 | |
4201 | - function activateEditor() |
4202 | - { |
4203 | - if (!editor.activeFocus) |
4204 | - editor.forceActiveFocus(); |
4205 | - else |
4206 | - showInputPanel(); |
4207 | - |
4208 | - } |
4209 | - |
4210 | - function showInputPanel() |
4211 | - { |
4212 | - if (!Qt.inputMethod.visible) |
4213 | - Qt.inputMethod.show(); |
4214 | - } |
4215 | - function hideInputPanel() |
4216 | - { |
4217 | - Qt.inputMethod.hide(); |
4218 | - } |
4219 | - |
4220 | function linesHeight(lines) |
4221 | { |
4222 | var lineHeight = editor.font.pixelSize * lines + lineSpacing * lines |
4223 | @@ -822,24 +810,6 @@ |
4224 | control.height = linesHeight(MathUtils.clamp(control.lineCount, 1, max)); |
4225 | } |
4226 | } |
4227 | - |
4228 | - function enterSelectionMode(x, y) |
4229 | - { |
4230 | - if (undefined !== x && undefined !== y) { |
4231 | - control.cursorPosition = control.positionAt(x, y); |
4232 | - control.moveCursorSelection(control.cursorPosition + 1); |
4233 | - } |
4234 | - toggleSelectionCursors(true); |
4235 | - } |
4236 | - |
4237 | - function positionCursor(x, y) { |
4238 | - var cursorPos = control.positionAt(x, y); |
4239 | - if (control.selectedText === "") |
4240 | - control.cursorPosition = cursorPos; |
4241 | - else if (control.selectionStart > cursorPos || control.selectionEnd < cursorPos) { |
4242 | - control.cursorPosition = cursorPos; |
4243 | - } |
4244 | - } |
4245 | } |
4246 | |
4247 | // grab Enter/Return keys which may be stolen from parent components of TextArea |
4248 | @@ -869,7 +839,7 @@ |
4249 | popover: control.popover |
4250 | visible: editor.cursorVisible |
4251 | |
4252 | - Component.onCompleted: internal.popupTriggered.connect(cursorItem.openPopover) |
4253 | + Component.onCompleted: inputHandler.pressAndHold.connect(cursorItem.openPopover) |
4254 | } |
4255 | } |
4256 | // selection cursor loader |
4257 | @@ -922,6 +892,7 @@ |
4258 | } |
4259 | Flickable { |
4260 | id: flicker |
4261 | + objectName: "textarea_scroller" |
4262 | anchors { |
4263 | fill: parent |
4264 | margins: internal.frameSpacing |
4265 | @@ -929,38 +900,23 @@ |
4266 | clip: true |
4267 | contentWidth: editor.paintedWidth |
4268 | contentHeight: editor.paintedHeight |
4269 | - interactive: !autoSize || (autoSize && maximumLineCount > 0) |
4270 | // do not allow rebounding |
4271 | boundsBehavior: Flickable.StopAtBounds |
4272 | - pressDelay: 500 |
4273 | - |
4274 | - function ensureVisible(r) |
4275 | - { |
4276 | - if (moving || flicking) |
4277 | - return; |
4278 | - if (contentX >= r.x) |
4279 | - contentX = r.x; |
4280 | - else if (contentX+width <= r.x+r.width) |
4281 | - contentX = r.x+r.width-width; |
4282 | - if (contentY >= r.y) |
4283 | - contentY = r.y; |
4284 | - else if (contentY+height <= r.y+r.height) |
4285 | - contentY = r.y+r.height-height; |
4286 | - } |
4287 | |
4288 | // editor |
4289 | // Images are not shown when text contains <img> tags |
4290 | // bug to watch: https://bugreports.qt-project.org/browse/QTBUG-27071 |
4291 | TextEdit { |
4292 | + objectName: "textarea_input" |
4293 | readOnly: false |
4294 | id: editor |
4295 | focus: true |
4296 | - onCursorRectangleChanged: flicker.ensureVisible(cursorRectangle) |
4297 | width: internal.inputAreaWidth |
4298 | height: Math.max(internal.inputAreaHeight, editor.contentHeight) |
4299 | wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere |
4300 | mouseSelectionMode: TextEdit.SelectWords |
4301 | selectByMouse: false |
4302 | + activeFocusOnPress: false |
4303 | cursorDelegate: cursor |
4304 | color: control.__styleInstance.color |
4305 | selectedTextColor: Theme.palette.selected.foregroundText |
4306 | @@ -972,55 +928,15 @@ |
4307 | // autosize handling |
4308 | onLineCountChanged: internal.frameSize() |
4309 | |
4310 | - // remove selection when typing starts or input method start entering text |
4311 | - onInputMethodComposingChanged: { |
4312 | - if (inputMethodComposing) |
4313 | - internal.selectionMode = false; |
4314 | - } |
4315 | - Keys.onPressed: { |
4316 | - if ((event.text !== "")) |
4317 | - internal.selectionMode = false; |
4318 | - } |
4319 | - Keys.onReleased: { |
4320 | - // selection positioners are updated after the keypress |
4321 | - if (selectionStart == selectionEnd) |
4322 | - internal.selectionMode = false; |
4323 | - } |
4324 | - |
4325 | - // handling text selection |
4326 | - MouseArea { |
4327 | - id: handler |
4328 | - enabled: control.enabled && control.activeFocusOnPress |
4329 | + // input selection and navigation handling |
4330 | + Ubuntu.Mouse.forwardTo: [inputHandler] |
4331 | + InputHandler { |
4332 | + id: inputHandler |
4333 | anchors.fill: parent |
4334 | - propagateComposedEvents: true |
4335 | - |
4336 | - onPressed: { |
4337 | - internal.activateEditor(); |
4338 | - internal.draggingMode = true; |
4339 | - } |
4340 | - onPressAndHold: { |
4341 | - // move mode gets false if there was a mouse move after the press; |
4342 | - // this is needed as Flickable will send a pressAndHold in case of |
4343 | - // press -> move-pressed ->stop-and-hold-pressed gesture is performed |
4344 | - if (!internal.draggingMode) |
4345 | - return; |
4346 | - internal.draggingMode = false; |
4347 | - // open popup |
4348 | - internal.positionCursor(mouse.x, mouse.y); |
4349 | - internal.popupTriggered(editor.cursorPosition); |
4350 | - } |
4351 | - onReleased: { |
4352 | - internal.draggingMode = false; |
4353 | - } |
4354 | - onDoubleClicked: { |
4355 | - internal.activateEditor(); |
4356 | - if (control.selectByMouse) |
4357 | - control.selectWord(); |
4358 | - } |
4359 | - onClicked: { |
4360 | - internal.activateEditor(); |
4361 | - internal.positionCursor(mouse.x, mouse.y); |
4362 | - } |
4363 | + main: control |
4364 | + input: editor |
4365 | + flickable: flicker |
4366 | + selectionModeTimeout: control.__styleInstance.selectionModeTimeout |
4367 | } |
4368 | } |
4369 | } |
4370 | |
4371 | === modified file 'modules/Ubuntu/Components/TextCursor.qml' |
4372 | --- modules/Ubuntu/Components/TextCursor.qml 2013-06-27 15:20:12 +0000 |
4373 | +++ modules/Ubuntu/Components/TextCursor.qml 2014-04-29 23:04:44 +0000 |
4374 | @@ -15,7 +15,7 @@ |
4375 | */ |
4376 | |
4377 | import QtQuick 2.0 |
4378 | -import "Popups" 0.1 |
4379 | +import Ubuntu.Components.Popups 1.0 |
4380 | |
4381 | StyledItem { |
4382 | id: cursorItem |
4383 | |
4384 | === modified file 'modules/Ubuntu/Components/TextField.qml' |
4385 | --- modules/Ubuntu/Components/TextField.qml 2014-03-17 17:58:47 +0000 |
4386 | +++ modules/Ubuntu/Components/TextField.qml 2014-04-29 23:04:44 +0000 |
4387 | @@ -16,10 +16,11 @@ |
4388 | |
4389 | import QtQuick 2.0 |
4390 | import Ubuntu.Unity.Action 1.1 as UnityActions |
4391 | +import Ubuntu.Components 1.1 as Ubuntu |
4392 | |
4393 | /*! |
4394 | \qmltype TextField |
4395 | - \inqmlmodule Ubuntu.Components 0.1 |
4396 | + \inqmlmodule Ubuntu.Components 1.1 |
4397 | \ingroup ubuntu |
4398 | \brief The TextField element displays a single line of editable plain text. |
4399 | Input constraints can be set through validator or inputMask. Setting echoMode |
4400 | @@ -70,6 +71,34 @@ |
4401 | } |
4402 | } |
4403 | \endqml |
4404 | + |
4405 | + \section2 Scrolling and text selection |
4406 | + The input is activated when the tap or mouse is released after being pressed |
4407 | + over the component. |
4408 | + |
4409 | + The text can be scrolled horizontally by swiping over the content both when |
4410 | + the component is active or inactive. |
4411 | + |
4412 | + The content can be selected in the following ways: |
4413 | + \list |
4414 | + \li - double tapping/left mouse clicking over the content, when the word that |
4415 | + had been tapped over will be selected |
4416 | + \li - by pressing and dragging the selection cursor over the text input. Note |
4417 | + that there has to be a delay of approx. 200 ms between the press and drag |
4418 | + gesture, time when the input switches from scroll mode to selection mode |
4419 | + \endlist |
4420 | + |
4421 | + The input is focused (activated) upon tap/left mouse button release. The cursor |
4422 | + will be placed at the position the mouse/tap point at release time. If the click |
4423 | + is happening on a selected area, the selection will be cleared. Long press above |
4424 | + a selected area brings up the clipboard context menu. When the long press happens |
4425 | + over a non-selected area, the cursor will be moved to the position and the component |
4426 | + enters in selection mode. The selection mode can also be activated by tapping and |
4427 | + keeping the tap/mouse over for approx 300 ms. If there is a move during this time, |
4428 | + the component enters into scrolling mode. The mode is exited once the scrolling |
4429 | + finishes. During the scrolling mode the selected text is preserved. |
4430 | + |
4431 | + \note During text selection all interactive parent Flickables are turned off. |
4432 | */ |
4433 | |
4434 | ActionItem { |
4435 | @@ -98,10 +127,11 @@ |
4436 | property bool hasClearButton: true |
4437 | |
4438 | /*! |
4439 | - \preliminary |
4440 | + \deprecated |
4441 | Component to be shown and used instead of the default On Screen Keyboard. |
4442 | */ |
4443 | property Component customSoftwareInputPanel |
4444 | + onCustomSoftwareInputPanelChanged: console.error("customSoftwareInputPanel property deprecated.") |
4445 | |
4446 | /*! |
4447 | The property overrides the default popover of the TextField. When set, the TextField |
4448 | @@ -146,10 +176,8 @@ |
4449 | /*! |
4450 | Whether the TextField should gain active focus on a mouse press. By default |
4451 | this is set to true. |
4452 | - |
4453 | - \qmlproperty bool activeFocusOnPress |
4454 | */ |
4455 | - property alias activeFocusOnPress: editor.activeFocusOnPress |
4456 | + property bool activeFocusOnPress: true |
4457 | |
4458 | /*! |
4459 | Whether the TextField should scroll when the text is longer than the width. |
4460 | @@ -446,11 +474,8 @@ |
4461 | |
4462 | If false, the user cannot use the mouse to select text, only can use it to |
4463 | focus the input. |
4464 | - |
4465 | - \qmlproperty bool selectByMouse |
4466 | - \preliminary |
4467 | */ |
4468 | - property alias selectByMouse: virtualKbdHandler.enabled |
4469 | + property bool selectByMouse: true |
4470 | |
4471 | /*! |
4472 | This read-only property provides the text currently selected in the text input. |
4473 | @@ -504,7 +529,7 @@ |
4474 | |
4475 | \qml |
4476 | import QtQuick 2.0 |
4477 | - import Ubuntu.Components 0.1 |
4478 | + import Ubuntu.Components 1.1 |
4479 | TextField{ |
4480 | validator: IntValidator{bottom: 11; top: 31;} |
4481 | focus: true |
4482 | @@ -719,7 +744,7 @@ |
4483 | */ |
4484 | function forceActiveFocus() |
4485 | { |
4486 | - internal.activateEditor(); |
4487 | + inputHandler.activateInput(); |
4488 | } |
4489 | |
4490 | /*! |
4491 | @@ -815,27 +840,23 @@ |
4492 | // grab clicks from the area between the frame and the input |
4493 | MouseArea { |
4494 | anchors.fill: parent |
4495 | - // us it only when there is space between the frame and input |
4496 | + acceptedButtons: Qt.LeftButton | Qt.RightButton |
4497 | + // use it only when there is space between the frame and input |
4498 | enabled: internal.spacing > 0 |
4499 | - onClicked: internal.activateEditor() |
4500 | + preventStealing: false |
4501 | + // forward mouse events to input so we can handle those uniformly |
4502 | + Ubuntu.Mouse.forwardTo: [inputHandler] |
4503 | } |
4504 | |
4505 | Text { id: fontHolder } |
4506 | |
4507 | //internals |
4508 | - /*! \internal */ |
4509 | - property alias __internal: internal |
4510 | QtObject { |
4511 | id: internal |
4512 | // array of borders in left, top, right, bottom order |
4513 | - property bool textChanged: false |
4514 | property real spacing: control.__styleInstance.overlaySpacing |
4515 | property real lineSpacing: units.dp(3) |
4516 | property real lineSize: editor.font.pixelSize + lineSpacing |
4517 | - //selection properties |
4518 | - property bool selectionMode: false |
4519 | - |
4520 | - signal popupTriggered() |
4521 | |
4522 | property int type: action ? action.parameterType : 0 |
4523 | onTypeChanged: { |
4524 | @@ -847,54 +868,6 @@ |
4525 | || type == UnityActions.Action.Real) |
4526 | inputMethodHints = Qt.ImhDigitsOnly |
4527 | } |
4528 | - |
4529 | - function activateEditor() |
4530 | - { |
4531 | - if (!editor.activeFocus) |
4532 | - editor.forceActiveFocus(); |
4533 | - else |
4534 | - showInputPanel(); |
4535 | - } |
4536 | - |
4537 | - function showInputPanel() |
4538 | - { |
4539 | - if (control.customSoftwareInputPanel != undefined) { |
4540 | - // TODO implement once we have the SIP ready |
4541 | - } else { |
4542 | - if (!Qt.inputMethod.visible) |
4543 | - Qt.inputMethod.show(); |
4544 | - } |
4545 | - textChanged = false; |
4546 | - } |
4547 | - function hideInputPanel() |
4548 | - { |
4549 | - if (control.customSoftwareInputPanel != undefined) { |
4550 | - // TODO implement once we have the SIP ready |
4551 | - } else { |
4552 | - Qt.inputMethod.hide(); |
4553 | - } |
4554 | - // emit accepted signal if changed |
4555 | - if (textChanged) |
4556 | - control.accepted(); |
4557 | - } |
4558 | - // reset selection |
4559 | - function resetEditorSelection(mouseX) |
4560 | - { |
4561 | - editor.cursorPosition = editor.positionAt(mouseX); |
4562 | - } |
4563 | - |
4564 | - // positions the cursor depending on whether there is a selection active or not |
4565 | - function positionCursor(x) { |
4566 | - |
4567 | - var cursorPos = control.positionAt(x); |
4568 | - if (control.selectedText === "") { |
4569 | - control.cursorPosition = cursorPos; |
4570 | - } |
4571 | - // If target cursor position is outside selection then cancel selection and move cursor |
4572 | - else if (control.selectionStart > cursorPos || control.selectionEnd < cursorPos) { |
4573 | - control.cursorPosition = cursorPos; |
4574 | - } |
4575 | - } |
4576 | } |
4577 | |
4578 | //left pane |
4579 | @@ -947,7 +920,7 @@ |
4580 | popover: control.popover |
4581 | visible: editor.cursorVisible |
4582 | |
4583 | - Component.onCompleted: internal.popupTriggered.connect(openPopover) |
4584 | + Component.onCompleted: inputHandler.pressAndHold.connect(openPopover) |
4585 | } |
4586 | } |
4587 | |
4588 | @@ -999,79 +972,55 @@ |
4589 | |
4590 | |
4591 | // text input |
4592 | - TextInput { |
4593 | - id: editor |
4594 | - // FocusScope will forward focus to this component |
4595 | - focus: true |
4596 | + Flickable { |
4597 | + id: flicker |
4598 | + objectName: "textfield_scroller" |
4599 | anchors { |
4600 | left: leftPane.right |
4601 | right: clearButton.left |
4602 | + top: parent.top |
4603 | + bottom: parent.bottom |
4604 | margins: internal.spacing |
4605 | - verticalCenter: parent.verticalCenter |
4606 | } |
4607 | - // get the control's style |
4608 | + topMargin: internal.spacing |
4609 | + // do not allow rebounding |
4610 | + boundsBehavior: Flickable.StopAtBounds |
4611 | + // need to forward events as events occurred on topMargin area are not grabbed by the MouseArea. |
4612 | + Ubuntu.Mouse.forwardTo: [inputHandler] |
4613 | + |
4614 | clip: true |
4615 | - onTextChanged: internal.textChanged = true |
4616 | - cursorDelegate: cursor |
4617 | - color: control.__styleInstance.color |
4618 | - selectedTextColor: Theme.palette.selected.foregroundText |
4619 | - selectionColor: Theme.palette.selected.foreground |
4620 | - font.pixelSize: FontUtils.sizeToPixels("medium") |
4621 | - passwordCharacter: "\u2022" |
4622 | - // forward keys to the root element so it can be captured outside of it |
4623 | - Keys.forwardTo: [control] |
4624 | - |
4625 | - // handle virtual keyboard and cursor positioning, as the MouseArea overrides |
4626 | - // those functionalities of the TextInput |
4627 | - MouseArea { |
4628 | - id: virtualKbdHandler |
4629 | - anchors.fill: parent |
4630 | - hoverEnabled: true |
4631 | - preventStealing: true |
4632 | - |
4633 | - onClicked: { |
4634 | - // activate control |
4635 | - if (!control.activeFocus) { |
4636 | - internal.activateEditor(); |
4637 | - // set cursor position if no selection was previously set |
4638 | - internal.positionCursor(mouse.x) |
4639 | - } else if (!internal.selectionMode){ |
4640 | - // reset selection and move cursor unde mouse click |
4641 | - internal.resetEditorSelection(mouse.x); |
4642 | - } else if (internal.selectionMode) { |
4643 | - // reset selection mode (onReleased is triggered prior to onClicked |
4644 | - // and resetting selection mode there would cause to enter in the\ |
4645 | - // previous if-clause |
4646 | - internal.selectionMode = false; |
4647 | - } |
4648 | - } |
4649 | - |
4650 | - onPressAndHold: { |
4651 | - internal.activateEditor(); |
4652 | - internal.positionCursor(mouse.x); |
4653 | - internal.popupTriggered(); |
4654 | - } |
4655 | - |
4656 | - onDoubleClicked: { |
4657 | - // select word under doubletap |
4658 | - if (!control.activeFocus) |
4659 | - return; |
4660 | - editor.selectWord(); |
4661 | - internal.selectionMode = false; |
4662 | - } |
4663 | - onPressed: { |
4664 | - // don't do anything while the control is inactive |
4665 | - if (!control.activeFocus || (pressedButtons != Qt.LeftButton)) |
4666 | - return; |
4667 | - internal.activateEditor(); |
4668 | - if (control.selectedText === "") { |
4669 | - internal.resetEditorSelection(mouse.x); |
4670 | - internal.selectionMode = true; |
4671 | - } |
4672 | - } |
4673 | - onReleased: { |
4674 | - if (!containsMouse) |
4675 | - internal.selectionMode = false; |
4676 | + contentWidth: editor.contentWidth |
4677 | + contentHeight: editor.contentHeight |
4678 | + |
4679 | + TextInput { |
4680 | + id: editor |
4681 | + // FocusScope will forward focus to this component |
4682 | + focus: true |
4683 | + anchors.verticalCenter: parent.verticalCenter |
4684 | + // get the control's style |
4685 | + clip: true |
4686 | + cursorDelegate: cursor |
4687 | + color: control.__styleInstance.color |
4688 | + selectedTextColor: Theme.palette.selected.foregroundText |
4689 | + selectionColor: Theme.palette.selected.foreground |
4690 | + font.pixelSize: FontUtils.sizeToPixels("medium") |
4691 | + passwordCharacter: "\u2022" |
4692 | + // forward keys to the root element so it can be captured outside of it |
4693 | + Keys.forwardTo: [control] |
4694 | + |
4695 | + // overrides |
4696 | + selectByMouse: false |
4697 | + activeFocusOnPress: false |
4698 | + |
4699 | + // input selection and navigation handling |
4700 | + Ubuntu.Mouse.forwardTo: [inputHandler] |
4701 | + InputHandler { |
4702 | + id: inputHandler |
4703 | + anchors.fill: parent |
4704 | + main: control |
4705 | + input: editor |
4706 | + flickable: flicker |
4707 | + selectionModeTimeout: control.__styleInstance.selectionModeTimeout |
4708 | } |
4709 | } |
4710 | } |
4711 | |
4712 | === modified file 'modules/Ubuntu/Components/TextInputPopover.qml' |
4713 | --- modules/Ubuntu/Components/TextInputPopover.qml 2014-03-17 18:17:23 +0000 |
4714 | +++ modules/Ubuntu/Components/TextInputPopover.qml 2014-04-29 23:04:44 +0000 |
4715 | @@ -15,8 +15,8 @@ |
4716 | */ |
4717 | |
4718 | import QtQuick 2.0 |
4719 | -import Ubuntu.Components 0.1 as Toolkit |
4720 | -import "Popups" 0.1 |
4721 | +import Ubuntu.Components 1.1 as Toolkit |
4722 | +import Ubuntu.Components.Popups 1.0 |
4723 | |
4724 | ActionSelectionPopover { |
4725 | objectName: "text_input_popover" |
4726 | |
4727 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/ActivityIndicatorStyle.qml' |
4728 | --- modules/Ubuntu/Components/Themes/Ambiance/ActivityIndicatorStyle.qml 2013-06-27 15:20:12 +0000 |
4729 | +++ modules/Ubuntu/Components/Themes/Ambiance/ActivityIndicatorStyle.qml 2014-04-29 23:04:44 +0000 |
4730 | @@ -15,7 +15,7 @@ |
4731 | */ |
4732 | |
4733 | import QtQuick 2.0 |
4734 | -import Ubuntu.Components 0.1 |
4735 | +import Ubuntu.Components 1.1 |
4736 | |
4737 | Image { |
4738 | id: container |
4739 | |
4740 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml' |
4741 | --- modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml 2013-08-21 15:35:56 +0000 |
4742 | +++ modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml 2014-04-29 23:04:44 +0000 |
4743 | @@ -15,7 +15,7 @@ |
4744 | */ |
4745 | |
4746 | import QtQuick 2.0 |
4747 | -import Ubuntu.Components 0.1 |
4748 | +import Ubuntu.Components 1.1 |
4749 | |
4750 | Item { |
4751 | id: bubbleShape |
4752 | |
4753 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/ButtonForeground.qml' |
4754 | --- modules/Ubuntu/Components/Themes/Ambiance/ButtonForeground.qml 2013-07-01 22:26:49 +0000 |
4755 | +++ modules/Ubuntu/Components/Themes/Ambiance/ButtonForeground.qml 2014-04-29 23:04:44 +0000 |
4756 | @@ -17,7 +17,7 @@ |
4757 | */ |
4758 | |
4759 | import QtQuick 2.0 |
4760 | -import Ubuntu.Components 0.1 |
4761 | +import Ubuntu.Components 1.1 |
4762 | |
4763 | Item { |
4764 | id: buttonForeground |
4765 | @@ -30,6 +30,7 @@ |
4766 | property real spacing |
4767 | property bool hasIcon: iconSource != "" |
4768 | property bool hasText: text != "" |
4769 | + property alias font: label.font |
4770 | |
4771 | opacity: enabled ? 1.0 : 0.5 |
4772 | implicitHeight: Math.max(icon.height, label.height) |
4773 | |
4774 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/ButtonStyle.qml' |
4775 | --- modules/Ubuntu/Components/Themes/Ambiance/ButtonStyle.qml 2014-02-04 22:07:10 +0000 |
4776 | +++ modules/Ubuntu/Components/Themes/Ambiance/ButtonStyle.qml 2014-04-29 23:04:44 +0000 |
4777 | @@ -17,7 +17,7 @@ |
4778 | */ |
4779 | |
4780 | import QtQuick 2.0 |
4781 | -import Ubuntu.Components 0.1 |
4782 | +import Ubuntu.Components 1.1 |
4783 | |
4784 | Item { |
4785 | id: buttonStyle |
4786 | @@ -26,7 +26,16 @@ |
4787 | property real minimumWidth: units.gu(10) |
4788 | property real horizontalPadding: units.gu(1) |
4789 | property color defaultColor: UbuntuColors.orange |
4790 | + property font defaultFont: Qt.font({family: "Ubuntu", pixelSize: FontUtils.sizeToPixels("medium")}) |
4791 | property Gradient defaultGradient |
4792 | + property real buttonFaceOffset: 0 |
4793 | + /*! |
4794 | + The property overrides the button's default background with an item. This |
4795 | + item can be used by derived styles to reuse the ButtonStyle and override |
4796 | + the default coloured background with an image or any other drawing. |
4797 | + The default value is null. |
4798 | + */ |
4799 | + property Item backgroundSource: null |
4800 | |
4801 | width: button.width |
4802 | height: button.height |
4803 | @@ -36,12 +45,22 @@ |
4804 | LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft |
4805 | LayoutMirroring.childrenInherit: true |
4806 | |
4807 | + /*! \internal */ |
4808 | + // Color properties in a JS ternary operator don't work as expected in |
4809 | + // QML because it overwrites alpha values with 1. A workaround is to use |
4810 | + // Qt.rgba(). For more information, see |
4811 | + // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1197802 and |
4812 | + // https://bugreports.qt-project.org/browse/QTBUG-32238. |
4813 | + function __colorHack(color) { return Qt.rgba(color.r, color.g, color.b, color.a); } |
4814 | + |
4815 | + |
4816 | /* The proxy is necessary because Gradient.stops and GradientStop.color are |
4817 | non-NOTIFYable properties. They cannot be written to so it is fine but |
4818 | the proxy avoids the warnings. |
4819 | */ |
4820 | + property QtObject gradientProxy: gradientProxyObject |
4821 | QtObject { |
4822 | - id: gradientProxy |
4823 | + id: gradientProxyObject |
4824 | property color topColor |
4825 | property color bottomColor |
4826 | |
4827 | @@ -67,16 +86,11 @@ |
4828 | id: background |
4829 | anchors.fill: parent |
4830 | borderSource: "radius_idle.sci" |
4831 | - visible: color.a != 0.0 |
4832 | + visible: (color.a != 0.0) || backgroundSource |
4833 | + image: backgroundSource |
4834 | |
4835 | - // Color properties in a JS ternary operator don't work as expected in |
4836 | - // QML because it overwrites alpha values with 1. A workaround is to use |
4837 | - // Qt.rgba(). For more information, see |
4838 | - // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1197802 and |
4839 | - // https://bugreports.qt-project.org/browse/QTBUG-32238. |
4840 | - function colorHack(color) { return Qt.rgba(color.r, color.g, color.b, color.a); } |
4841 | - color: isGradient ? colorHack(gradientProxy.topColor) : colorHack(button.color) |
4842 | - gradientColor: isGradient ? colorHack(gradientProxy.bottomColor) : colorHack(button.color) |
4843 | + color: backgroundSource ? "#00000000" : (isGradient ? __colorHack(gradientProxy.topColor) : __colorHack(button.color)) |
4844 | + gradientColor: backgroundSource ? "#00000000" : (isGradient ? __colorHack(gradientProxy.bottomColor) : __colorHack(button.color)) |
4845 | } |
4846 | |
4847 | UbuntuShape { |
4848 | @@ -98,7 +112,10 @@ |
4849 | ButtonForeground { |
4850 | id: foreground |
4851 | width: parent.width - 2*horizontalPadding |
4852 | - anchors.centerIn: parent |
4853 | + anchors { |
4854 | + centerIn: parent |
4855 | + horizontalCenterOffset: buttonFaceOffset |
4856 | + } |
4857 | text: button.text |
4858 | /* Pick either a clear or dark text color depending on the luminance of the |
4859 | background color to maintain good contrast (works in most cases) |
4860 | @@ -107,6 +124,7 @@ |
4861 | iconSource: button.iconSource |
4862 | iconPosition: button.iconPosition |
4863 | iconSize: units.gu(3) |
4864 | + font: button.font |
4865 | spacing: horizontalPadding |
4866 | transformOrigin: Item.Top |
4867 | scale: button.pressed ? 0.98 : 1.0 |
4868 | |
4869 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml' |
4870 | --- modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml 2014-02-05 19:59:43 +0000 |
4871 | +++ modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml 2014-04-29 23:04:44 +0000 |
4872 | @@ -15,7 +15,7 @@ |
4873 | */ |
4874 | |
4875 | import QtQuick 2.0 |
4876 | -import Ubuntu.Components 0.1 |
4877 | +import Ubuntu.Components 1.1 |
4878 | |
4879 | Item { |
4880 | id: checkBoxStyle |
4881 | |
4882 | === added file 'modules/Ubuntu/Components/Themes/Ambiance/ComboButtonStyle.qml' |
4883 | --- modules/Ubuntu/Components/Themes/Ambiance/ComboButtonStyle.qml 1970-01-01 00:00:00 +0000 |
4884 | +++ modules/Ubuntu/Components/Themes/Ambiance/ComboButtonStyle.qml 2014-04-29 23:04:44 +0000 |
4885 | @@ -0,0 +1,243 @@ |
4886 | +/* |
4887 | + * Copyright 2014 Canonical Ltd. |
4888 | + * |
4889 | + * This program is free software; you can redistribute it and/or modify |
4890 | + * it under the terms of the GNU Lesser General Public License as published by |
4891 | + * the Free Software Foundation; version 3. |
4892 | + * |
4893 | + * This program is distributed in the hope that it will be useful, |
4894 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4895 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4896 | + * GNU Lesser General Public License for more details. |
4897 | + * |
4898 | + * You should have received a copy of the GNU Lesser General Public License |
4899 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
4900 | + */ |
4901 | + |
4902 | +import QtQuick 2.0 |
4903 | +import Ubuntu.Components 1.1 |
4904 | + |
4905 | +/*! |
4906 | + \qmltype ComboButton |
4907 | + \ingroup style-api |
4908 | + \brief ComboButton style API. |
4909 | + |
4910 | + The component defines the style of the ComboButton component. |
4911 | + */ |
4912 | +Item { |
4913 | + id: comboStyle |
4914 | + |
4915 | + /*! |
4916 | + Width of the drop down button. |
4917 | + */ |
4918 | + property real dropDownWidth: units.gu(5) |
4919 | + |
4920 | + /*! |
4921 | + Width of the dropdown button separator. |
4922 | + */ |
4923 | + property real dropDownSeparatorWidth: units.dp(2) |
4924 | + |
4925 | + /*! |
4926 | + Distance between the combo list and the main button. |
4927 | + */ |
4928 | + property real comboListMargin: units.gu(0.8) |
4929 | + |
4930 | + /*! |
4931 | + The item which will holds the combo list data. Implementations can point both |
4932 | + this \l comboListPanel to the same component, however separate items should be |
4933 | + used if a gap between the panel and the content is required. |
4934 | + See Ambiance theme. |
4935 | + */ |
4936 | + property Item comboListHolder: comboListContent |
4937 | + |
4938 | + /*! |
4939 | + The item pointing to the panel holding the combo list and additional design |
4940 | + artifacts. It is used by the component to drive the expansion size. |
4941 | + */ |
4942 | + property Item comboListPanel: panelItem |
4943 | + |
4944 | + /*! |
4945 | + \qmlproperty color defaultColor |
4946 | + Default color for the main button. |
4947 | + */ |
4948 | + property alias defaultColor: mainButton.defaultColor |
4949 | + |
4950 | + /*! |
4951 | + \qmlproperty Gradient defaultGradient |
4952 | + Default gradient for the main button. |
4953 | + */ |
4954 | + property alias defaultGradient: mainButton.defaultGradient |
4955 | + |
4956 | + /*! |
4957 | + Default color for the dropdown button when released. |
4958 | + */ |
4959 | + property color defaultDropdownColor: __combo.expanded ? Qt.rgba(0, 0, 0, 0.05) : defaultColor |
4960 | + /*! |
4961 | + Default button face font. |
4962 | + */ |
4963 | + property alias defaultFont: mainButton.defaultFont |
4964 | + |
4965 | + |
4966 | + width: __combo.width |
4967 | + height: __combo.collapsedHeight |
4968 | + |
4969 | + /*! \internal */ |
4970 | + property ComboButton __combo: styledItem |
4971 | + |
4972 | + implicitWidth: mainButton.implicitWidth |
4973 | + implicitHeight: mainButton.implicitHeight |
4974 | + |
4975 | + LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft |
4976 | + LayoutMirroring.childrenInherit: true |
4977 | + |
4978 | + ButtonStyle { |
4979 | + id: mainButton |
4980 | + anchors { |
4981 | + left: parent.left |
4982 | + top: parent.top |
4983 | + right: parent.right |
4984 | + } |
4985 | + height: __combo.collapsedHeight |
4986 | + // overrides |
4987 | + backgroundSource: comboFace |
4988 | + buttonFaceOffset: -dropDownWidth/2 - dropDownSeparatorWidth |
4989 | + horizontalPadding: units.gu(4) - dropDownSeparatorWidth |
4990 | + minimumWidth: units.gu(36) |
4991 | + |
4992 | + // FIXME: use hardcoded color while we get the theme palette updated |
4993 | + defaultColor: "#b2b2b2" |
4994 | + defaultGradient: null |
4995 | + |
4996 | + // button face |
4997 | + ShaderEffectSource { |
4998 | + id: comboFace |
4999 | + sourceItem: content |
5000 | + hideSource: true |
The diff has been truncated for viewing.
missing tests for swipe_into_view.