on xenial help sign in
merge trunk
commitd7ec0319225e09a80b4b3c4512e5f6bc286c5292 authorMichael Zanetti <michael.zanetti@canonical.com> dateFri 6 Nov 2015, 11:06 (11 years ago) parent6c2a43dd527f6b
370 files changed+2792−1276
CMakeLists.txt+7−7 debian/changelog+58 debian/control+7−6 plugins/Dash/CardAttributes.qml+3−3 plugins/Dash/CardCreator.js+26−52 plugins/Dash/CardCreatorCache.qml+1−1 plugins/Dash/CroppedImageMinimumSourceSize.qml+16−5 plugins/Dash/ScopeStyle.qml+2−2 plugins/Dash/abstractdashview.h−4 plugins/Dash/horizontaljournal.cpp−4 plugins/Dash/horizontaljournal.h−4 plugins/Dash/organicgrid.cpp−4 plugins/Dash/organicgrid.h−4 plugins/Dash/verticaljournal.cpp−4 plugins/Dash/verticaljournal.h−4 plugins/Utils/windowkeysfilter.cpp+15−1 plugins/Utils/windowkeysfilter.h+7 po/ug.po+2−2 po/unity8.pot+53−49 po/wo.po+800 qml/Components/Background.qml+2−2 qml/Components/BaseCarouselDelegate.qml+2−2 qml/Components/Carousel.qml+2−2 qml/Components/Circle.qml+1−1 qml/Components/DelayedLockscreen.qml+2−2 qml/Components/Dialogs.qml+2−2 qml/Components/DragHandle.qml+2−2 qml/Components/DraggingArea.qml+2−2 qml/Components/EdgeDragEvaluator.qml+2−2 qml/Components/Header.qml+2−2 qml/Components/InputMethod.qml+2−2 qml/Components/LazyImage.qml+24−13 qml/Components/ListItems/Header.qml+2−2 qml/Components/ListItems/ThinDivider.qml+1−1 qml/Components/ListViewOSKScroller.qml+53 qml/Components/Lockscreen.qml+3−3 qml/Components/NotificationAudio.qml+42 qml/Components/Orientations.qml+28 qml/Components/PanelState/PanelState.qml+1−1 qml/Components/PassphraseLockscreen.qml+2−2 qml/Components/PhysicalKeysMapper.qml+14−21 qml/Components/PinLockscreen.qml+3−3 qml/Components/PinPadButton.qml+2−2 qml/Components/Rating.qml+2−2 qml/Components/RatingStyle.qml+2−2 qml/Components/ResponsiveGridView.qml+2−2 qml/Components/ResponsiveVerticalJournal.qml+2−2 qml/Components/ScreenGrabber.qml+2−4 qml/Components/ScrollCalculator.qml+2−2 qml/Components/SearchHistoryModel/SearchHistoryModel.qml+1−1 qml/Components/ShellDialog.qml+3−3 qml/Components/Showable.qml+1−1 qml/Components/StandardAnimation.qml+1−1 qml/Components/UbuntuShapeForItem.qml+2−2 qml/Components/Unity8Settings.qml+1−1 qml/Components/UnityInputInfo/UnityInputInfo.qml+2−2 qml/Components/WindowControlButtons.qml+2−2 qml/Components/WindowScreenshot.qml+1−1 qml/Components/WrongPasswordAnimation.qml+1−1 qml/Components/ZoomableImage.qml+2−2 qml/Dash/CardCarousel.qml+3−3 qml/Dash/CardGrid.qml+1−1 qml/Dash/CardHorizontalList.qml+2−2 qml/Dash/CardTool.qml+1−1 qml/Dash/CardVerticalJournal.qml+2−2 qml/Dash/Dash.qml+2−2 qml/Dash/DashApplication.qml+4−3 qml/Dash/DashBackground.qml+1−1 qml/Dash/DashCategoryBase.qml+2−2 qml/Dash/DashContent.qml+2−2 qml/Dash/DashContentTabBarStyle.qml+1−1 qml/Dash/DashNavigation.qml+4−4 qml/Dash/DashNavigationButton.qml+4−4 qml/Dash/DashNavigationList.qml+5−5 qml/Dash/PageHeader.qml → qml/Dash/DashPageHeader.qml+12−16 qml/Dash/DashRenderer.qml+1−1 qml/Dash/GenericScopeView.qml+6−6 qml/Dash/PreviewListView.qml+3−3 qml/Dash/Previews/Preview.qml+13−20 qml/Dash/Previews/PreviewActionButton.qml+2−2 qml/Dash/Previews/PreviewActionCombo.qml+4−4 qml/Dash/Previews/PreviewActions.qml+4−4 qml/Dash/Previews/PreviewAudioPlayback.qml+7−7 qml/Dash/Previews/PreviewComment.qml+2−2 qml/Dash/Previews/PreviewCommentInput.qml+2−2 qml/Dash/Previews/PreviewExpandable.qml+5−5 qml/Dash/Previews/PreviewHeader.qml+10−10 qml/Dash/Previews/PreviewIconActions.qml+2−2 qml/Dash/Previews/PreviewImageGallery.qml+3−3 qml/Dash/Previews/PreviewMediaToolbar.qml+36 qml/Dash/Previews/PreviewOverlay.qml+4−4 qml/Dash/Previews/PreviewPayments.qml+2−2 qml/Dash/Previews/PreviewProgress.qml+2−2 qml/Dash/Previews/PreviewRatingDisplay.qml+4−4 qml/Dash/Previews/PreviewRatingEdit.qml+2−2 qml/Dash/Previews/PreviewRatingInput.qml+6−6 qml/Dash/Previews/PreviewRatingSingleDisplay.qml+1−1 qml/Dash/Previews/PreviewSharing.qml+105 qml/Dash/Previews/PreviewTable.qml+5−5 qml/Dash/Previews/PreviewTextSummary.qml+5−5 qml/Dash/Previews/PreviewVideoPlayback.qml+15−2 qml/Dash/Previews/PreviewWidget.qml+4−1 qml/Dash/Previews/PreviewWidgetFactory.qml+4−1 qml/Dash/Previews/PreviewZoomableImage.qml+21−9 qml/Dash/PullToRefreshScopeStyle.qml+3−3 qml/Dash/ScopeListView.qml+1−1 qml/Dash/ScopeSettings/ScopeSetting.qml+11−2 qml/Dash/ScopeSettings/ScopeSettingBoolean.qml+5−5 qml/Dash/ScopeSettings/ScopeSettingList.qml+3−3 qml/Dash/ScopeSettings/ScopeSettingNumber.qml+1−1 qml/Dash/ScopeSettings/ScopeSettingString.qml+12−6 qml/Dash/ScopeSettings/ScopeSettingsWidgetFactory.qml+5−1 qml/Dash/ScopeSettingsPage.qml+12−3 qml/Dash/ScopesList.qml+2−2 qml/Dash/ScopesListCategory.qml+4−4 qml/Dash/ScopesListCategoryItem.qml+4−4 qml/DeviceConfiguration.qml+3−1 qml/Greeter/Clock.qml+2−2 qml/Greeter/CoverPage.qml+2−2 qml/Greeter/Dot.qml+1−1 qml/Greeter/Greeter.qml+2−2 qml/Greeter/Infographics.qml+2−2 qml/Greeter/IntegratedLightDMImpl.qml+1−1 qml/Greeter/LightDM.qml+1−1 qml/Greeter/LoginList.qml+2−2 qml/Greeter/NarrowView.qml+2−2 qml/Greeter/ObjectPositioner.qml+2−2 qml/Greeter/ShimGreeter.qml+1−1 qml/Greeter/WideView.qml+2−2 qml/Launcher/FoldingLauncherDelegate.qml+2−2 qml/Launcher/Launcher.qml+2−2 qml/Launcher/LauncherDelegate.qml+7−8 qml/Launcher/LauncherPanel.qml+6−6 qml/Notifications/Notification.qml+14−15 qml/Notifications/NotificationMenuItemFactory.qml+2−2 qml/Notifications/Notifications.qml+2−2 qml/Notifications/OptionToggle.qml+7−7 qml/Notifications/ShapedIcon.qml+3−3 qml/Notifications/SwipeToAct.qml+10−10 qml/OrientedShell.qml+6−6 qml/Panel/ActiveCallHint.qml+2−2 qml/Panel/Handle.qml+2−2 qml/Panel/IndicatorItem.qml+2−2 qml/Panel/IndicatorItemRow.qml+2−2 qml/Panel/IndicatorPage.qml+2−2 qml/Panel/Indicators/IndicatorBase.qml+1−1 qml/Panel/Indicators/IndicatorDelegate.qml+1−1 qml/Panel/Indicators/IndicatorsLight.qml+1−1 qml/Panel/Indicators/MenuItemFactory.qml+5−5 qml/Panel/Indicators/MessageMenuItemFactory.qml+1−1 qml/Panel/Indicators/ModemInfoItem.qml+6−6 qml/Panel/Indicators/RoamingIndication.qml+4−4 qml/Panel/Indicators/client/IndicatorRepresentation.qml+3−3 qml/Panel/Indicators/client/IndicatorsClient.qml+4−4 qml/Panel/Indicators/client/IndicatorsList.qml+3−3 qml/Panel/Indicators/client/IndicatorsTree.qml+2−2 qml/Panel/IndicatorsBar.qml+2−2 qml/Panel/IndicatorsMenu.qml+2−2 qml/Panel/MenuContent.qml+2−2 qml/Panel/Panel.qml+2−2 qml/Panel/PanelBackground.qml+1−1 qml/Panel/PanelSeparatorLine.qml+1−1 qml/Panel/PanelVelocityCalculator.qml+1−1 qml/Rotation/HalfLoopRotationAnimation.qml+1−1 qml/Rotation/ImmediateRotationAction.qml+1−1 qml/Rotation/NinetyRotationAnimation.qml+1−1 qml/Rotation/RotationStates.qml+2−2 qml/ScopeTool.qml+3−3 qml/Shell.qml+8−8 qml/Stages/Animations/BaseSessionAnimation.qml+1−1 qml/Stages/Animations/SwipeFromBottomAnimation.qml+2−2 qml/Stages/ApplicationWindow.qml+2−2 qml/Stages/DecoratedWindow.qml+2−2 qml/Stages/DesktopSpread.qml+1−1 qml/Stages/DesktopSpreadDelegate.qml+2−2 qml/Stages/DesktopStage.qml+79−8 qml/Stages/MainViewStyle.qml+35−27 qml/Stages/OrientationChangeAnimation.qml+1−1 qml/Stages/PageHeadStyle.qml−76 qml/Stages/PhoneStage.qml+18−7 qml/Stages/SessionContainer.qml+1−1 qml/Stages/ShimStage.qml+2−2 qml/Stages/Splash.qml+25−30 qml/Stages/SpreadDelegate.qml+3−3 qml/Stages/SpreadMaths.qml+2−2 qml/Stages/SurfaceContainer.qml+2−2 qml/Stages/TabletStage.qml+19−3 qml/Stages/TransformedSpreadDelegate.qml+2−2 qml/Stages/TransformedTabletSpreadDelegate.qml+4−2 qml/Stages/WindowDecoration.qml+2−2 qml/Stages/WindowResizeArea.qml+4−2 qml/Stages/graphics/background_paper@27.png qml/Tutorial/Arrow.qml+2−2 qml/Tutorial/Slider.qml+2−2 qml/Tutorial/Tick.qml+2−2 qml/Tutorial/Tutorial.qml+2−2 qml/Tutorial/TutorialBottom.qml+2−2 qml/Tutorial/TutorialBottomFinish.qml+2−2 qml/Tutorial/TutorialContent.qml+2−2 qml/Tutorial/TutorialLeft.qml+2−2 qml/Tutorial/TutorialLeftFinish.qml+2−2 qml/Tutorial/TutorialPage.qml+2−2 qml/Tutorial/TutorialRight.qml+2−2 qml/Wizard/CheckableSetting.qml+5−5 qml/Wizard/Page.qml+4−4 qml/Wizard/Pages.qml+2−2 qml/Wizard/Pages/10-welcome.qml+3−3 qml/Wizard/Pages/20-sim.qml+2−2 qml/Wizard/Pages/30-passwd-type.qml+7−7 qml/Wizard/Pages/40-wifi.qml+3−3 qml/Wizard/Pages/50-location.qml+4−4 qml/Wizard/Pages/60-reporting.qml+2−2 qml/Wizard/Pages/80-finished.qml+2−2 qml/Wizard/Pages/here-terms.qml+4−4 qml/Wizard/Pages/passwd-confirm.qml+2−2 qml/Wizard/Pages/passwd-set.qml+2−2 qml/Wizard/StackButton.qml+4−4 qml/Wizard/Wizard.qml+2−2 tests/CMakeLists.txt+1 tests/autopilot/unity8/dash.py+3−3 tests/autopilot/unity8/process_helpers.py+1−1 tests/imports/CMakeLists.txt+5 tests/imports/check_imports.py+125 tests/mocks/MeeGo/QOfono/MockOfonoSimManager.qml+1−1 tests/mocks/QMenuModel/QDBusActionGroup.qml+2−2 tests/mocks/QMenuModel/UnityMenuAction.qml+1−1 tests/mocks/Ubuntu/SystemSettings/LanguagePlugin/MockLanguagePlugin.qml+1−1 tests/mocks/Ubuntu/Web/WebView.qml+1−1 tests/mocks/Unity/Application/MirSurface.cpp+41−14 tests/mocks/Unity/Application/MirSurface.h+14−4 tests/mocks/Unity/Application/MirSurfaceItem.cpp+12−2 tests/mocks/Unity/Application/MirSurfaceItem.h+1 tests/mocks/Unity/Application/resources/MirSurfaceItem.qml+1−1 tests/mocks/Unity/Application/resources/VirtualKeyboard.qml+1−1 tests/mocks/Unity/Indicators/ActionRootState.qml+1−1 tests/mocks/Unity/Indicators/IndicatorsModel.qml+1−1 tests/mocks/Unity/Indicators/ModelActionRootState.qml+1−1 tests/mocks/Utils/HomeKeyWatcher.qml+1−1 tests/plugins/Dash/cardcreator/1.res+7−8 tests/plugins/Dash/cardcreator/2.res+9−8 tests/plugins/Dash/cardcreator/3.res+8−9 tests/plugins/Dash/cardcreator/4.res+3−3 tests/plugins/Dash/cardcreator/5.res+18−45 tests/plugins/Dash/cardcreator/6.res+10−9 tests/plugins/Dash/cardcreator/7.res+10−9 tests/plugins/Dash/cardcreator/8.res+7−6 tests/plugins/Dash/cardcreatortest.qml+1−1 tests/plugins/Dash/horizontaljournaltest.qml+1−1 tests/plugins/Dash/horizontaljournaltry.qml+1−1 tests/plugins/Dash/listviewwithpageheadertest.qml+1−1 tests/plugins/Dash/listviewwithpageheadertestsection.qml+1−1 tests/plugins/Dash/listviewwithpageheadertestsectionexternalmodel.qml+1−1 tests/plugins/Dash/organicgridtest.qml+1−1 tests/plugins/Dash/organicgridtry.qml+1−1 tests/plugins/Dash/tst_CardAttributes.qml+1−1 tests/plugins/Dash/tst_CroppedImageMinimumSourceSize.qml+2−2 tests/plugins/Dash/tst_ListViewWithPageHeaderQML.qml+1−1 tests/plugins/Dash/tst_ScopeStyle.qml+2−2 tests/plugins/Dash/verticaljournaltest.qml+1−1 tests/plugins/Dash/verticaljournaltry.qml+1−1 tests/plugins/IntegratedLightDM/greeter.qml+1−1 tests/plugins/Ubuntu/Gestures/DownwardsLauncher.qml+2−2 tests/plugins/Ubuntu/Gestures/LeftwardsLauncher.qml+2−2 tests/plugins/Ubuntu/Gestures/RightwardsLauncher.qml+2−2 tests/plugins/Ubuntu/Gestures/UpwardsLauncher.qml+2−2 tests/plugins/Ubuntu/Gestures/empty.qml+1−1 tests/plugins/Ubuntu/Gestures/touchGateExample.qml+1−1 tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.qml+2−2 tests/plugins/Ubuntu/Gestures/tst_FloatingFlickable.qml+2−2 tests/plugins/Ubuntu/Gestures/tst_PressedOutsideNotifier.qml+2−2 tests/plugins/Ubuntu/Gestures/tst_TouchGate.cpp+1−5 tests/plugins/Utils/tst_UtilsStyle.qml+1−1 tests/qmltests/CMakeLists.txt+2−1 tests/qmltests/Components/tst_Background.qml+1−1 tests/qmltests/Components/tst_Carousel.qml+1−1 tests/qmltests/Components/tst_Dialogs.qml+3−3 tests/qmltests/Components/tst_DragHandle.qml+2−2 tests/qmltests/Components/tst_DragHandle/BidirectionalShowable.qml+2−2 tests/qmltests/Components/tst_DragHandle/HorizontalShowable.qml+2−2 tests/qmltests/Components/tst_DragHandle/VerticalShowable.qml+2−2 tests/qmltests/Components/tst_DraggingArea.qml+1−1 tests/qmltests/Components/tst_EdgeDragEvaluator.qml+1−1 tests/qmltests/Components/tst_LazyImage.qml+4−4 tests/qmltests/Components/tst_LazyImage/ImageControls.qml+2−2 tests/qmltests/Components/tst_Lockscreen.qml+2−2 tests/qmltests/Components/tst_PhysicalKeysMapper.qml+11−10 tests/qmltests/Components/tst_Rating.qml+4−4 tests/qmltests/Components/tst_ResponsiveGridView.qml+3−3 tests/qmltests/Components/tst_ResponsiveVerticalJournal.qml+3−3 tests/qmltests/Components/tst_Showable.qml+2−2 tests/qmltests/Components/tst_ZoomableImage.qml+1−1 tests/qmltests/Dash/Previews/MockPreviewWidget.qml+1−1 tests/qmltests/Dash/Previews/tst_Preview.qml+3−3 tests/qmltests/Dash/Previews/tst_PreviewActions.qml+2−2 tests/qmltests/Dash/Previews/tst_PreviewAudioPlayback.qml+4−4 tests/qmltests/Dash/Previews/tst_PreviewComment.qml+2−2 tests/qmltests/Dash/Previews/tst_PreviewCommentInput.qml+2−2 tests/qmltests/Dash/Previews/tst_PreviewExpandable.qml+6−6 tests/qmltests/Dash/Previews/tst_PreviewHeader.qml+2−2 tests/qmltests/Dash/Previews/tst_PreviewIconActions.qml+3−3 tests/qmltests/Dash/Previews/tst_PreviewImageGallery.qml+1−1 tests/qmltests/Dash/Previews/tst_PreviewPayments.qml+2−2 tests/qmltests/Dash/Previews/tst_PreviewProgress.qml+2−2 tests/qmltests/Dash/Previews/tst_PreviewRatingDisplay.qml+4−4 tests/qmltests/Dash/Previews/tst_PreviewRatingEdit.qml+4−4 tests/qmltests/Dash/Previews/tst_PreviewRatingInput.qml+4−4 tests/qmltests/Dash/Previews/tst_PreviewSharing.qml+71 tests/qmltests/Dash/Previews/tst_PreviewTable.qml+4−4 tests/qmltests/Dash/Previews/tst_PreviewTextSummary.qml+4−4 tests/qmltests/Dash/Previews/tst_PreviewVideoPlayback.qml+1−1 tests/qmltests/Dash/Previews/tst_PreviewWidgetFactory.qml+3−3 tests/qmltests/Dash/Previews/tst_PreviewZoomableImage.qml+2−2 tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingBoolean.qml+2−2 tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingList.qml+2−2 tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingNumber.qml+2−2 tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingString.qml+2−2 tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingsWidgetFactory.qml+2−2 tests/qmltests/Dash/tst_Card.qml+7−7 tests/qmltests/Dash/tst_CardBenchmark.qml+2−2 tests/qmltests/Dash/tst_CardTool.qml+2−2 tests/qmltests/Dash/tst_Dash.qml+3−3 tests/qmltests/Dash/tst_DashContent.qml+6−6 tests/qmltests/Dash/tst_PageHeader.qml → tests/qmltests/Dash/tst_DashPageHeader.qml+5−5 tests/qmltests/Dash/tst_GenericScopeView.qml+5−5 tests/qmltests/Dash/tst_PreviewListView.qml+5−5 tests/qmltests/Greeter/TestView.qml+2−2 tests/qmltests/Greeter/tst_Clock.qml+2−2 tests/qmltests/Greeter/tst_Greeter.qml+2−2 tests/qmltests/Greeter/tst_Infographics.qml+2−2 tests/qmltests/Greeter/tst_NarrowView.qml+2−2 tests/qmltests/Greeter/tst_WideView.qml+2−2 tests/qmltests/Launcher/tst_Launcher.qml+2−2 tests/qmltests/Notifications/tst_Notifications.qml+1−1 tests/qmltests/Notifications/tst_OptionToggle.qml+2−3 tests/qmltests/Notifications/tst_SwipeToAct.qml+1−1 tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml+2−2 tests/qmltests/Panel/IndicatorTest.qml+2−2 tests/qmltests/Panel/Indicators/tst_IndicatorsLight.qml+2−2 tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml+1−1 tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qml+1−1 tests/qmltests/Panel/tst_ActiveCallHint.qml+1−1 tests/qmltests/Panel/tst_IndicatorItem.qml+2−2 tests/qmltests/Panel/tst_IndicatorItemRow.qml+2−2 tests/qmltests/Panel/tst_IndicatorPage.qml+1−1 tests/qmltests/Panel/tst_IndicatorsBar.qml+2−2 tests/qmltests/Panel/tst_IndicatorsMenu.qml+2−2 tests/qmltests/Panel/tst_MenuContent.qml+1−1 tests/qmltests/Panel/tst_Panel.qml+2−2 tests/qmltests/Stages/ApplicationCheckBox.qml+2−2 tests/qmltests/Stages/RecursingChildSessionControl.qml+2−2 tests/qmltests/Stages/tst_ApplicationWindow.qml+3−3 tests/qmltests/Stages/tst_DesktopStage.qml+84−8 tests/qmltests/Stages/tst_PhoneStage.qml+6−2 tests/qmltests/Stages/tst_SessionContainer.qml+2−2 tests/qmltests/Stages/tst_Splash.qml+2−2 tests/qmltests/Stages/tst_SpreadDelegate.qml+3−3 tests/qmltests/Stages/tst_SurfaceContainer.qml+2−2 tests/qmltests/Stages/tst_TabletStage.qml+9−4 tests/qmltests/Stages/tst_WindowResizeArea.qml+3−3 tests/qmltests/Tutorial/tst_Tutorial.qml+2−2 tests/qmltests/Wizard/tst_Wizard.qml+3−3 tests/qmltests/tst_OrientedShell.qml+3−3 tests/qmltests/tst_Shell.qml+33−7 tests/qmltests/tst_ShellWithPin.qml+2−2 tests/qmltests/utils/Unity/Test/MockObjectForInstanceOfTest.qml+1−1 tests/qmltests/utils/Unity/Test/MockObjectForInstanceOfTestChild.qml+1−1 tests/qmltests/utils/Unity/Test/tst_UnityTest.qml+1−1 tests/utils/modules/Unity/Test/MouseTouchEmulationCheckbox.qml+2−2 tests/utils/modules/Unity/Test/TouchEventSequenceWrapper.cpp−2 tests/utils/modules/Unity/Test/UnityTestCase.qml+2−2
CMakeLists.txt+7−7
@@ -49,13 +49,13 @@ add_custom_target(cppcheck COMMAND cppcheck --enable=all -q --error-exitcode=2
4949 ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests)
5050
5151include(FindPkgConfig)
52−find_package(Qt5Core 5.2 REQUIRED)
53−find_package(Qt5Qml 5.2 REQUIRED)
54−find_package(Qt5Quick 5.2 REQUIRED)
55−find_package(Qt5Gui 5.2 REQUIRED)
56−find_package(Qt5DBus 5.2 REQUIRED)
57−find_package(Qt5Concurrent 5.2 REQUIRED)
58−find_package(Qt5Sql 5.2 REQUIRED)
52+find_package(Qt5Core 5.4 REQUIRED)
53+find_package(Qt5Qml 5.4 REQUIRED)
54+find_package(Qt5Quick 5.4 REQUIRED)
55+find_package(Qt5Gui 5.4 REQUIRED)
56+find_package(Qt5DBus 5.4 REQUIRED)
57+find_package(Qt5Concurrent 5.4 REQUIRED)
58+find_package(Qt5Sql 5.4 REQUIRED)
5959
6060pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=10)
6161
debian/changelog+58
@@ -1,3 +1,61 @@
1+unity8 (8.11+16.04.20151104-0ubuntu1) xenial; urgency=medium
2+
3+ [ Albert Astals Cid ]
4+ * Add an Item that proxies for old and new audio roles (LP: #1493851)
5+ * CroppedImageMinimumSourceSize: Fix 'Binding loop detected for
6+ property "imageAspectRatio"'
7+ * Make the scope settings list scroll to text visible area (LP:
8+ #1499084)
9+ * Move to importing QtQuick 2.4 & friends
10+ * Use SDK 1.3 across all files (LP: #1503498, #1508363, #1449628)
11+
12+ [ Andrea Cimitan ]
13+ * Add sharing widget to zoomable image and video playback
14+ * Make zoomable and video playback widgets edge to edge
15+ * Updated all 1.3 UbuntuShape to use new APIs where possible
16+ * Use SDK 1.3 across all files (LP: #1503498, #1508363, #1449628)
17+
18+ [ CI Train Bot ]
19+ * Resync trunk.
20+
21+ [ Christopher Lee ]
22+ * Quick spelling fix in process control output.
23+
24+ [ Daniel d'Andrada ]
25+ * Enable support for overriding application orientations based on
26+ device type (LP: #1478637)
27+ * Use SDK 1.3 across all files (LP: #1503498, #1508363, #1449628)
28+ * Use SDK 1.3 across all files (LP: #1503498, #1508363, #1449628)
29+
30+ [ Josh Arenson ]
31+ * Enable support for overriding application orientations based on
32+ device type (LP: #1478637)
33+
34+ [ Michael Terry ]
35+ * Avoid showing the shutdown dialog when turning on the screen if your
36+ device is under heavy load. (LP: #1508563)
37+ * Handle lifecycle policy exceptions ourselves, instead of letting
38+ qtmir do it for us and allow non-Touch apps to opt-out of the Touch
39+ lifecycle.
40+
41+ [ Michael Zanetti ]
42+ * Fixes for the panel buttons (LP: #1510360, #1504269, #1431566,
43+ #1443319)
44+ * Use SDK 1.3 across all files (LP: #1503498, #1508363, #1449628)
45+
46+ [ Michał Sawicz ]
47+ * Add missing copyright to Cursor.qml
48+ * Enable support for overriding application orientations based on
49+ device type (LP: #1478637)
50+ * Support server->client visibility change to stop rendering
51+ (lp:#1475678) (LP: #1475678)
52+
53+ [ Nick Dedekind ]
54+ * Support server->client visibility change to stop rendering
55+ (lp:#1475678) (LP: #1475678)
56+
57+ -- Michał Sawicz <michal.sawicz@canonical.com> Wed, 04 Nov 2015 14:58:41 +0000
58+
159unity8 (8.11+15.10.20151021-0ubuntu1) wily; urgency=medium
260
361 [ Albert Astals Cid ]
debian/control+7−6
@@ -29,7 +29,7 @@ Build-Depends: cmake,
2929 libqt5xmlpatterns5-dev,
3030 libsystemsettings-dev,
3131 libudev-dev,
32− libunity-api-dev (>= 7.101),
32+ libunity-api-dev (>= 7.102),
3333 libusermetricsoutput1-dev,
3434 libxcb1-dev,
3535 pkg-config,
@@ -42,15 +42,16 @@ Build-Depends: cmake,
4242 qml-module-qtsysteminfo,
4343 qml-module-qttest,
4444 qt5-default,
45− qtbase5-dev (>= 5.2.1),
45+ qtbase5-dev (>= 5.4),
4646 qtbase5-dev-tools,
47− qtbase5-private-dev (>= 5.2.1),
48− qtdeclarative5-dev (>= 5.2.1),
47+ qtbase5-private-dev (>= 5.4),
48+ qtdeclarative5-dev (>= 5.4),
4949 qtdeclarative5-dev-tools,
50− qtdeclarative5-private-dev (>= 5.2.1),
50+ qtdeclarative5-private-dev (>= 5.4),
5151 qtdeclarative5-qtmultimedia-plugin,
52+ qtdeclarative5-ubuntu-content1,
5253 qtdeclarative5-ubuntu-settings-components (>= 0.6),
53− qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3.1627) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3.1627),
54+ qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3.1676) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3.1676),
5455 qtdeclarative5-ubuntu-web-plugin,
5556 ttf-ubuntu-font-family,
5657Standards-Version: 3.9.4
plugins/Dash/CardAttributes.qml+3−3
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
2020
2121GridLayout {
2222 id: grid
@@ -27,7 +27,7 @@ GridLayout {
2727 columns: 2 + repeater.count % 2
2828 rowSpacing: units.gu(.5)
2929 property alias model: repeater.model
30− property color color: Theme.palette.normal.baseText
30+ property color color: theme.palette.normal.baseText
3131 property real fontScale: 1.0
3232
3333 Repeater {
plugins/Dash/CardCreator.js+26−52
@@ -28,11 +28,12 @@ var kBackgroundLoaderCode = 'Loader {\n\
2828 sourceComponent: UbuntuShape { \n\
2929 objectName: "background"; \n\
3030 radius: "medium"; \n\
31− color: getColor(0) || "white"; \n\
32− gradientColor: getColor(1) || color; \n\
31+ backgroundColor: getColor(0) || "white"; \n\
32+ secondaryBackgroundColor: getColor(1) || backgroundColor; \n\
33+ backgroundMode: UbuntuShape.VerticalGradient; \n\
3334 anchors.fill: parent; \n\
34− image: backgroundImage.source ? backgroundImage : null; \n\
35− property real luminance: Style.luminance(color); \n\
35+ source: backgroundImage.source ? backgroundImage : null; \n\
36+ property real luminance: Style.luminance(backgroundColor); \n\
3637 property Image backgroundImage: Image { \n\
3738 objectName: "backgroundImage"; \n\
3839 source: { \n\
@@ -52,7 +53,7 @@ var kBackgroundLoaderCode = 'Loader {\n\
5253// %1 is used as anchors of artShapeHolder
5354// %2 is used as image width
5455// %3 is used as image height
55−var kArtShapeHolderCode = 'Item { \n\
56+var kArtShapeHolderCode = 'Item { \n\
5657 id: artShapeHolder; \n\
5758 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; \n\
5859 width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; \n\
@@ -66,10 +67,9 @@ var kArtShapeHolderCode = 'Item { \n\
6667 sourceComponent: Item { \n\
6768 id: artShape; \n\
6869 objectName: "artShape"; \n\
69− property bool doShapeItem: components["art"]["conciergeMode"] !== true; \n\
70+ readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true; \n\
7071 visible: image.status == Image.Ready; \n\
7172 readonly property alias image: artImage; \n\
72− property alias borderSource: artShapeShape.borderSource; \n\
7373 ShaderEffectSource { \n\
7474 id: artShapeSource; \n\
7575 sourceItem: artImage; \n\
@@ -78,16 +78,17 @@ var kArtShapeHolderCode = 'Item { \n\
7878 height: 1; \n\
7979 hideSource: doShapeItem; \n\
8080 } \n\
81− Shape { \n\
81+ UbuntuShape { \n\
8282 id: artShapeShape; \n\
83− image: artShapeSource; \n\
83+ source: artShapeSource; \n\
8484 anchors.fill: parent; \n\
8585 visible: doShapeItem; \n\
8686 radius: "medium"; \n\
87+ aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat; \n\
8788 } \n\
8889 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; \n\
8990 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1; \n\
90− Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; } \n\
91+ Component.onCompleted: { updateWidthHeightBindings(); } \n\
9192 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } \n\
9293 function updateWidthHeightBindings() { \n\
9394 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { \n\
@@ -112,44 +113,18 @@ var kArtShapeHolderCode = 'Item { \n\
112113
113114var kOverlayLoaderCode = 'Loader { \n\
114115 id: overlayLoader; \n\
115− anchors { \n\
116− left: artShapeHolder.left; \n\
117− right: artShapeHolder.right; \n\
118− bottom: artShapeHolder.bottom; \n\
119− } \n\
116+ readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2); \n\
117+ anchors.fill: artShapeHolder; \n\
120118 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false; \n\
121119 asynchronous: root.asynchronous; \n\
122120 visible: showHeader && status == Loader.Ready; \n\
123− sourceComponent: ShaderEffect { \n\
121+ sourceComponent: UbuntuShapeOverlay { \n\
124122 id: overlay; \n\
125− height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2); \n\
126123 property real luminance: Style.luminance(overlayColor); \n\
127− property color overlayColor: cardData && cardData["overlayColor"] || "#99000000"; \n\
128− property var source: ShaderEffectSource { \n\
129− id: shaderSource; \n\
130− sourceItem: artShapeLoader.item; \n\
131− onVisibleChanged: if (visible) scheduleUpdate(); \n\
132− live: false; \n\
133− sourceRect: Qt.rect(0, artShapeLoader.height - overlay.height, artShapeLoader.width, overlay.height); \n\
134− } \n\
135− vertexShader: " \n\
136− uniform highp mat4 qt_Matrix; \n\
137− attribute highp vec4 qt_Vertex; \n\
138− attribute highp vec2 qt_MultiTexCoord0; \n\
139− varying highp vec2 coord; \n\
140− void main() { \n\
141− coord = qt_MultiTexCoord0; \n\
142− gl_Position = qt_Matrix * qt_Vertex; \n\
143− }"; \n\
144− fragmentShader: " \n\
145− varying highp vec2 coord; \n\
146− uniform sampler2D source; \n\
147− uniform lowp float qt_Opacity; \n\
148− uniform highp vec4 overlayColor; \n\
149− void main() { \n\
150− lowp vec4 tex = texture2D(source, coord); \n\
151− gl_FragColor = vec4(overlayColor.r, overlayColor.g, overlayColor.b, 1) * qt_Opacity * overlayColor.a * tex.a; \n\
152− }"; \n\
124+ aspect: UbuntuShape.Flat; \n\
125+ radius: "medium"; \n\
126+ overlayColor: cardData && cardData["overlayColor"] || "#99000000"; \n\
127+ overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1); \n\
153128 } \n\
154129 }\n';
155130
@@ -325,7 +300,7 @@ function cardString(template, components) {
325300 id: root; \n\
326301 property var components; \n\
327302 property var cardData; \n\
328− property var artShapeBorderSource: undefined; \n\
303+ property string artShapeStyle: "inset"; \n\
329304 property real fontScale: 1.0; \n\
330305 property var scopeStyle: null; \n\
331306 property int titleAlignment: Text.AlignLeft; \n\
@@ -368,7 +343,6 @@ function cardString(template, components) {
368343 }
369344
370345 if (hasArt) {
371− code += 'onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; } \n';
372346 code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
373347
374348 var widthCode, heightCode;
@@ -480,20 +454,20 @@ function cardString(template, components) {
480454 }
481455 }
482456
483− var summaryColorWithBackground = 'backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white")';
457+ var summaryColorWithBackground = 'backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white")';
484458
485459 var hasTitleContainer = hasTitle && (hasEmblem || (hasMascot && (hasSubtitle || hasAttributes)));
486460 var titleSubtitleCode = '';
487461 if (hasTitle) {
488462 var titleColor;
489463 if (headerAsOverlay) {
490− titleColor = 'root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white")';
464+ titleColor = 'root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white")';
491465 } else if (hasSummary) {
492466 titleColor = 'summary.color';
493467 } else if (hasBackground) {
494468 titleColor = summaryColorWithBackground;
495469 } else {
496− titleColor = 'root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText';
470+ titleColor = 'root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText';
497471 }
498472
499473 var titleAnchors;
@@ -555,7 +529,7 @@ function cardString(template, components) {
555529 titleAnchors += 'left: parent.left; \n\
556530 leftMargin: units.gu(1); \n\
557531 top: overlayLoader.top; \n\
558− topMargin: units.gu(1);\n';
532+ topMargin: units.gu(1) + overlayLoader.height - overlayLoader.overlayHeight; \n';
559533 } else {
560534 // Using anchors to the mascot/parent
561535 titleAnchors = titleRightAnchor;
@@ -649,7 +623,7 @@ function cardString(template, components) {
649623 if (hasBackground) {
650624 summaryColor = summaryColorWithBackground;
651625 } else {
652− summaryColor = 'root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText';
626+ summaryColor = 'root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText';
653627 }
654628
655629 var summaryTopMargin = (hasMascot || hasSubtitle || hasAttributes ? 'anchors.margins' : '0');
@@ -697,8 +671,8 @@ function cardString(template, components) {
697671}
698672
699673function createCardComponent(parent, template, components) {
700− var imports = 'import QtQuick 2.2; \n\
701− import Ubuntu.Components 1.1; \n\
674+ var imports = 'import QtQuick 2.4; \n\
675+ import Ubuntu.Components 1.3; \n\
702676 import Ubuntu.Settings.Components 0.1; \n\
703677 import Dash 0.1;\n\
704678 import Utils 0.1;\n';
plugins/Dash/CardCreatorCache.qml+1−1
@@ -15,7 +15,7 @@
1515 */
1616
1717pragma Singleton
18−import QtQuick 2.2
18+import QtQuick 2.4
1919import "CardCreator.js" as CardCreator
2020
2121QtObject {
plugins/Dash/CroppedImageMinimumSourceSize.qml+16−5
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014, 2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,14 +14,25 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818
1919Image {
2020 id: root
2121
2222 fillMode: Image.PreserveAspectCrop
2323
24− readonly property real itemAspectRatio: width / height
25− readonly property real imageAspectRatio: implicitWidth / implicitHeight
26− sourceSize: (imageAspectRatio > itemAspectRatio) ? Qt.size(0, height) : Qt.size(width, 0)
24+ property bool useHeight: false
25+ function updateUseHeight()
26+ {
27+ // Do not turn into a binding since otherwise the qml
28+ // engine complains about binding loops
29+ useHeight = (implicitWidth / implicitHeight) > (width / height);
30+ }
31+
32+ onHeightChanged: updateUseHeight();
33+ onWidthChanged: updateUseHeight();
34+ onImplicitHeightChanged: updateUseHeight();
35+ onImplicitWidthChanged: updateUseHeight();
36+
37+ sourceSize: useHeight ? Qt.size(0, height) : Qt.size(width, 0)
2738}
plugins/Dash/ScopeStyle.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
17+import QtQuick 2.4
1818import Utils 0.1
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
2020
2121/*! \brief Helper for processing scope customization options.
2222
plugins/Dash/abstractdashview.h−4
@@ -109,11 +109,7 @@ private:
109109 virtual void doRelayout() = 0;
110110 virtual void updateItemCulling(qreal visibleFromY, qreal visibleToY) = 0;
111111 virtual void calculateImplicitHeight() = 0;
112−#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
113− virtual void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) = 0;
114−#else
115112 virtual void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) = 0;
116−#endif
117113
118114 QQmlDelegateModel *m_delegateModel;
119115
plugins/Dash/horizontaljournal.cpp−4
@@ -182,11 +182,7 @@ void HorizontalJournal::calculateImplicitHeight()
182182 }
183183}
184184
185−#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
186−void HorizontalJournal::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
187−#else
188185void HorizontalJournal::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
189−#endif
190186{
191187 Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
192188 for (int i = remove.count - 1; i >= 0; --i) {
plugins/Dash/horizontaljournal.h−4
@@ -52,11 +52,7 @@ private:
5252 void calculateImplicitHeight() override;
5353 void doRelayout() override;
5454 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
55−#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
56− void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
57−#else
5855 void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) override;
59−#endif
6056
6157 int m_firstVisibleIndex;
6258 QList<QQuickItem*> m_visibleItems;
plugins/Dash/organicgrid.cpp−4
@@ -235,11 +235,7 @@ void OrganicGrid::calculateImplicitHeight()
235235 }
236236}
237237
238−#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
239−void OrganicGrid::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
240−#else
241238void OrganicGrid::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
242−#endif
243239{
244240 Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
245241 for (int i = remove.count - 1; i >= 0; --i) {
plugins/Dash/organicgrid.h−4
@@ -79,11 +79,7 @@ private:
7979 void doRelayout() override;
8080 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
8181 void calculateImplicitHeight() override;
82−#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
83− void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
84−#else
8582 void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) override;
86−#endif
8783
8884 QSizeF m_smallDelegateSize;
8985 QSizeF m_bigDelegateSize;
plugins/Dash/verticaljournal.cpp−4
@@ -237,11 +237,7 @@ void VerticalJournal::updateItemCulling(qreal visibleFromY, qreal visibleToY)
237237 }
238238}
239239
240−#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
241−void VerticalJournal::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
242−#else
243240void VerticalJournal::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
244−#endif
245241{
246242 Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
247243 for (int i = remove.count - 1; i >= 0; --i) {
plugins/Dash/verticaljournal.h−4
@@ -90,11 +90,7 @@ private:
9090 void calculateImplicitHeight() override;
9191 void doRelayout() override;
9292 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
93−#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
94− void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
95−#else
9693 void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) override;
97−#endif
9894
9995 QVector<QList<ViewItem>> m_columnVisibleItems;
10096 QHash<int, int> m_indexColumnMap;
plugins/Utils/windowkeysfilter.cpp+15−1
@@ -21,7 +21,8 @@
2121#include <QQuickWindow>
2222
2323WindowKeysFilter::WindowKeysFilter(QQuickItem *parent)
24− : QQuickItem(parent)
24+ : QQuickItem(parent),
25+ m_currentEventTimestamp(0)
2526{
2627 connect(this, &QQuickItem::windowChanged,
2728 this, &WindowKeysFilter::setupFilterOnWindow);
@@ -36,7 +37,15 @@ bool WindowKeysFilter::eventFilter(QObject *watched, QEvent *event)
3637 if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) {
3738 // Let QML see this event and decide if it does not want it
3839 event->accept();
40+
41+ m_currentEventTimestamp = static_cast<QInputEvent*>(event)->timestamp();
42+ Q_EMIT currentEventTimestampChanged();
43+
3944 QCoreApplication::sendEvent(this, event);
45+
46+ m_currentEventTimestamp = 0;
47+ Q_EMIT currentEventTimestampChanged();
48+
4049 return event->isAccepted();
4150 } else {
4251 // Not interested
@@ -56,3 +65,8 @@ void WindowKeysFilter::setupFilterOnWindow(QQuickWindow *window)
5665 m_filteredWindow = window;
5766 }
5867}
68+
69+ulong WindowKeysFilter::currentEventTimestamp() const
70+{
71+ return m_currentEventTimestamp;
72+}
plugins/Utils/windowkeysfilter.h+7
@@ -36,16 +36,23 @@
3636class WindowKeysFilter : public QQuickItem
3737{
3838 Q_OBJECT
39+ Q_PROPERTY(ulong currentEventTimestamp READ currentEventTimestamp NOTIFY currentEventTimestampChanged)
3940public:
4041 WindowKeysFilter(QQuickItem *parent = 0);
4142
4243 bool eventFilter(QObject *watched, QEvent *event) override;
4344
45+ ulong currentEventTimestamp() const;
46+
47+Q_SIGNALS:
48+ void currentEventTimestampChanged();
49+
4450private Q_SLOTS:
4551 void setupFilterOnWindow(QQuickWindow *window);
4652
4753private:
4854 QPointer<QQuickWindow> m_filteredWindow;
55+ ulong m_currentEventTimestamp;
4956};
5057
5158#endif // UNITY_WINDOWKEYSFILTER_H
po/ug.po+2−2
@@ -15,8 +15,8 @@ msgstr ""
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2015-10-26 05:24+0000\n"
19−"X-Generator: Launchpad (build 17812)\n"
18+"X-Launchpad-Export-Date: 2015-10-28 05:39+0000\n"
19+"X-Generator: Launchpad (build 17833)\n"
2020
2121#: plugins/IntegratedLightDM/Greeter.cpp:112
2222msgid "Password: "
po/unity8.pot+53−49
@@ -8,7 +8,7 @@ msgid ""
88msgstr ""
99"Project-Id-Version: unity8\n"
1010"Report-Msgid-Bugs-To: \n"
11−"POT-Creation-Date: 2015-09-16 00:49+0200\n"
11+"POT-Creation-Date: 2015-10-19 14:34+0100\n"
1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -69,8 +69,8 @@ msgstr ""
6969#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
7070#. This format string is used for showing, on a 12-hour clock, times that happened before a week from now.
7171#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
72−#. en_US example: "%a %d %b\u2003%l:%M %p" --> "Fri Oct 31 1:00 PM"
73−#. en_GB example: "%a %b %d\u2003%l:%M %p" --> "Fri 31 Oct 1:00 PM"
72+#. en_US example: "%a %b %d\u2003%l:%M %p" --> "Fri Oct 31 1:00 PM"
73+#. en_GB example: "%a %d %b\u2003%l:%M %p" --> "Fri 31 Oct 1:00 PM"
7474#: plugins/Utils/relativetimeformatter.cpp:190
7575msgid "%a %d %b %l:%M %p"
7676msgstr ""
@@ -109,8 +109,8 @@ msgstr ""
109109#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
110110#. This format string is used for showing, on a 24-hour clock, times that happened before a week from now.
111111#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
112−#. en_US example: "%a %d %b\u2003%H:%M" --> "Fri Oct 31 13:00"
113−#. en_GB example: "%a %b %d\u2003%H:%M" --> "Fri 31 Oct 13:00"
112+#. en_US example: "%a %b %d\u2003%H:%M" --> "Fri Oct 31 13:00"
113+#. en_GB example: "%a %d %b\u2003%H:%M" --> "Fri 31 Oct 13:00"
114114#: plugins/Utils/relativetimeformatter.cpp:234
115115msgid "%a %d %b %H:%M"
116116msgstr ""
@@ -286,6 +286,10 @@ msgstr ""
286286msgid "Add a review"
287287msgstr ""
288288
289+#: qml/Dash/Previews/PreviewSharing.qml:51
290+msgid "Preview Share Item"
291+msgstr ""
292+
289293#: qml/Dash/PullToRefreshScopeStyle.qml:55
290294msgid "Pull to refresh…"
291295msgstr ""
@@ -389,62 +393,62 @@ msgstr ""
389393msgid "Conference"
390394msgstr ""
391395
392−#: qml/Panel/Indicators/MenuItemFactory.qml:718
396+#: qml/Panel/Indicators/MenuItemFactory.qml:727
393397msgid "Nothing is playing"
394398msgstr ""
395399
396−#: qml/Panel/Indicators/MenuItemFactory.qml:847
400+#: qml/Panel/Indicators/MenuItemFactory.qml:856
397401#, qt-format
398402msgid "%1 hour"
399403msgid_plural "%1 hours"
400404msgstr[0] ""
401405msgstr[1] ""
402406
403−#: qml/Panel/Indicators/MenuItemFactory.qml:851
407+#: qml/Panel/Indicators/MenuItemFactory.qml:860
404408#, qt-format
405409msgid "%1 minute"
406410msgid_plural "%1 minutes"
407411msgstr[0] ""
408412msgstr[1] ""
409413
410−#: qml/Panel/Indicators/MenuItemFactory.qml:856
414+#: qml/Panel/Indicators/MenuItemFactory.qml:865
411415#, qt-format
412416msgid "%1 second"
413417msgid_plural "%1 seconds"
414418msgstr[0] ""
415419msgstr[1] ""
416420
417−#: qml/Panel/Indicators/MenuItemFactory.qml:859
421+#: qml/Panel/Indicators/MenuItemFactory.qml:868
418422msgid "0 seconds"
419423msgstr ""
420424
421425#. Translators: String like "1 hour, 2 minutes, 3 seconds remaining"
422−#: qml/Panel/Indicators/MenuItemFactory.qml:861
426+#: qml/Panel/Indicators/MenuItemFactory.qml:870
423427#, qt-format
424428msgid "%1 remaining"
425429msgstr ""
426430
427−#: qml/Panel/Indicators/MenuItemFactory.qml:867
431+#: qml/Panel/Indicators/MenuItemFactory.qml:876
428432msgid "In queue…"
429433msgstr ""
430434
431−#: qml/Panel/Indicators/MenuItemFactory.qml:871
435+#: qml/Panel/Indicators/MenuItemFactory.qml:880
432436msgid "Downloading"
433437msgstr ""
434438
435−#: qml/Panel/Indicators/MenuItemFactory.qml:873
439+#: qml/Panel/Indicators/MenuItemFactory.qml:882
436440msgid "Paused, tap to resume"
437441msgstr ""
438442
439−#: qml/Panel/Indicators/MenuItemFactory.qml:875
443+#: qml/Panel/Indicators/MenuItemFactory.qml:884
440444msgid "Canceled"
441445msgstr ""
442446
443−#: qml/Panel/Indicators/MenuItemFactory.qml:877
447+#: qml/Panel/Indicators/MenuItemFactory.qml:886
444448msgid "Finished"
445449msgstr ""
446450
447−#: qml/Panel/Indicators/MenuItemFactory.qml:879
451+#: qml/Panel/Indicators/MenuItemFactory.qml:888
448452msgid "Failed, tap to retry"
449453msgstr ""
450454
@@ -523,38 +527,6 @@ msgctxt "Button: Go back one page in the Wizard"
523527msgid "Back"
524528msgstr ""
525529
526−#: qml/Wizard/Pages/here-terms.qml:27
527−msgid "Terms & Conditions"
528−msgstr ""
529−
530−#: qml/Wizard/Pages/passwd-confirm.qml:49
531−msgid "Confirm passphrase"
532−msgstr ""
533−
534−#: qml/Wizard/Pages/passwd-confirm.qml:50
535−msgid "Confirm passcode"
536−msgstr ""
537−
538−#: qml/Wizard/Pages/passwd-confirm.qml:53
539−#: qml/Wizard/Pages/passwd-confirm.qml:54
540−msgid "Please try again."
541−msgstr ""
542−
543−#: qml/Wizard/Pages/passwd-confirm.qml:82 qml/Wizard/Pages/passwd-set.qml:90
544−#: qml/Wizard/Pages/10-welcome.qml:88 qml/Wizard/Pages/30-passwd-type.qml:128
545−#: qml/Wizard/Pages/40-wifi.qml:215 qml/Wizard/Pages/50-location.qml:131
546−#: qml/Wizard/Pages/60-reporting.qml:50
547−msgid "Continue"
548−msgstr ""
549−
550−#: qml/Wizard/Pages/passwd-set.qml:61
551−msgid "Choose your passcode"
552−msgstr ""
553−
554−#: qml/Wizard/Pages/passwd-set.qml:68
555−msgid "Passphrase must be 4 characters long"
556−msgstr ""
557−
558530#: qml/Wizard/Pages/10-welcome.qml:27
559531msgid "Hi!"
560532msgstr ""
@@ -567,6 +539,13 @@ msgstr ""
567539msgid "Let’s get started."
568540msgstr ""
569541
542+#: qml/Wizard/Pages/10-welcome.qml:88 qml/Wizard/Pages/30-passwd-type.qml:128
543+#: qml/Wizard/Pages/40-wifi.qml:215 qml/Wizard/Pages/50-location.qml:131
544+#: qml/Wizard/Pages/60-reporting.qml:50 qml/Wizard/Pages/passwd-confirm.qml:82
545+#: qml/Wizard/Pages/passwd-set.qml:90
546+msgid "Continue"
547+msgstr ""
548+
570549#: qml/Wizard/Pages/20-sim.qml:25
571550msgid "Add a SIM card and restart your device"
572551msgstr ""
@@ -692,6 +671,31 @@ msgstr ""
692671msgid "Finish"
693672msgstr ""
694673
674+#: qml/Wizard/Pages/here-terms.qml:27
675+msgid "Terms & Conditions"
676+msgstr ""
677+
678+#: qml/Wizard/Pages/passwd-confirm.qml:49
679+msgid "Confirm passphrase"
680+msgstr ""
681+
682+#: qml/Wizard/Pages/passwd-confirm.qml:50
683+msgid "Confirm passcode"
684+msgstr ""
685+
686+#: qml/Wizard/Pages/passwd-confirm.qml:53
687+#: qml/Wizard/Pages/passwd-confirm.qml:54
688+msgid "Please try again."
689+msgstr ""
690+
691+#: qml/Wizard/Pages/passwd-set.qml:61
692+msgid "Choose your passcode"
693+msgstr ""
694+
695+#: qml/Wizard/Pages/passwd-set.qml:68
696+msgid "Passphrase must be 4 characters long"
697+msgstr ""
698+
695699#. Translators: This is the arrow for "Back" buttons
696700#: qml/Wizard/StackButton.qml:39
697701#, qt-format
po/wo.ponew file+800
@@ -0,0 +1,800 @@
1+# Wolof translation for unity8
2+# Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015
3+# This file is distributed under the same license as the unity8 package.
4+# FIRST AUTHOR <EMAIL@ADDRESS>, 2015.
5+#
6+msgid ""
7+msgstr ""
8+"Project-Id-Version: unity8\n"
9+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10+"POT-Creation-Date: 2015-09-16 00:49+0200\n"
11+"PO-Revision-Date: 2015-10-29 11:16+0000\n"
12+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13+"Language-Team: Wolof <wo@li.org>\n"
14+"MIME-Version: 1.0\n"
15+"Content-Type: text/plain; charset=UTF-8\n"
16+"Content-Transfer-Encoding: 8bit\n"
17+"Plural-Forms: nplurals=2; plural=n > 1;\n"
18+"X-Launchpad-Export-Date: 2015-10-30 05:32+0000\n"
19+"X-Generator: Launchpad (build 17838)\n"
20+
21+#: plugins/IntegratedLightDM/Greeter.cpp:112
22+msgid "Password: "
23+msgstr "Baatu-jàll "
24+
25+#: plugins/Unity/Launcher/launcheritem.cpp:47
26+#: plugins/Unity/Launcher/launcheritem.cpp:106
27+msgid "Pin shortcut"
28+msgstr "Kepp"
29+
30+#: plugins/Unity/Launcher/launcheritem.cpp:52
31+msgid "Quit"
32+msgstr "Génn"
33+
34+#: plugins/Unity/Launcher/launcheritem.cpp:106
35+msgid "Unpin shortcut"
36+msgstr "Dindi"
37+
38+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
39+#. This format string is used for showing, on a 12-hour clock, times that happen yesterday.
40+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
41+#. en_US example: "Yesterday\u2003%l:%M %p" --> "Yesterday 1:00 PM"
42+#: plugins/Utils/relativetimeformatter.cpp:157
43+msgid "Yesterday %l:%M %p"
44+msgstr "Démb %l:%M %p"
45+
46+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
47+#. This format string is used for showing, on a 12-hour clock, times that happened today.
48+#. en_US example: "%l:%M %p" --> "1:00 PM"
49+#: plugins/Utils/relativetimeformatter.cpp:164
50+msgid "%l:%M %p"
51+msgstr "%l:%M %p"
52+
53+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
54+#. This format string is used for showing, on a 12-hour clock, events/appointments that happen tomorrow.
55+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
56+#. en_US example: "Tomorrow\u2003%l:%M %p" --> "Tomorrow 1:00 PM"
57+#: plugins/Utils/relativetimeformatter.cpp:172
58+msgid "Tomorrow %l:%M %p"
59+msgstr "Suba ci %l:%M %p"
60+
61+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
62+#. This format string is used for showing, on a 12-hour clock, times that happened in the last week.
63+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
64+#. en_US example: "%a\u2003%l:%M %p" --> "Fri 1:00 PM"
65+#: plugins/Utils/relativetimeformatter.cpp:181
66+msgid "%a %l:%M %p"
67+msgstr "%a ci %l:%M %p"
68+
69+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
70+#. This format string is used for showing, on a 12-hour clock, times that happened before a week from now.
71+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
72+#. en_US example: "%a %d %b\u2003%l:%M %p" --> "Fri Oct 31 1:00 PM"
73+#. en_GB example: "%a %b %d\u2003%l:%M %p" --> "Fri 31 Oct 1:00 PM"
74+#: plugins/Utils/relativetimeformatter.cpp:190
75+msgid "%a %d %b %l:%M %p"
76+msgstr "%a %b %d ci %l:%M %p"
77+
78+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
79+#. This format string is used for showing, on a 24-hour clock, times that happen yesterday.
80+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
81+#. en_US example: "Yesterday\u2003%l:%M %p" --> "Yesterday 13:00"
82+#: plugins/Utils/relativetimeformatter.cpp:201
83+msgid "Yesterday %H:%M"
84+msgstr "Démb %H:%M"
85+
86+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
87+#. This format string is used for showing, on a 24-hour clock, times that happened today.
88+#. en_US example: "%H:%M" --> "13:00"
89+#: plugins/Utils/relativetimeformatter.cpp:208
90+msgid "%H:%M"
91+msgstr "%H:%M"
92+
93+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
94+#. This format string is used for showing, on a 24-hour clock, events/appointments that happen tomorrow.
95+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
96+#. en_US example: "Tomorrow\u2003%l:%M %p" --> "Tomorrow 13:00"
97+#: plugins/Utils/relativetimeformatter.cpp:216
98+msgid "Tomorrow %H:%M"
99+msgstr "Suba ci %H:%M"
100+
101+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
102+#. This format string is used for showing, on a 24-hour clock, times that happened in the last week.
103+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
104+#. en_US example: "%a\u2003%H:%M" --> "Fri 13:00"
105+#: plugins/Utils/relativetimeformatter.cpp:225
106+msgid "%a %H:%M"
107+msgstr "%a ci %H:%M"
108+
109+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
110+#. This format string is used for showing, on a 24-hour clock, times that happened before a week from now.
111+#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
112+#. en_US example: "%a %d %b\u2003%H:%M" --> "Fri Oct 31 13:00"
113+#. en_GB example: "%a %b %d\u2003%H:%M" --> "Fri 31 Oct 13:00"
114+#: plugins/Utils/relativetimeformatter.cpp:234
115+msgid "%a %d %b %H:%M"
116+msgstr "%a %b %d ci %H:%M"
117+
118+#: qml/Components/DelayedLockscreen.qml:49
119+msgid "Device Locked"
120+msgstr "Téye nañ jumtukaay"
121+
122+#: qml/Components/DelayedLockscreen.qml:64
123+msgid "You have been locked out due to too many failed passphrase attempts."
124+msgstr "Téye nañ la ndax danga duggal ay yoon kàddu-jàll bu baaxul."
125+
126+#: qml/Components/DelayedLockscreen.qml:65
127+msgid "You have been locked out due to too many failed passcode attempts."
128+msgstr "Téye nañ la ndax danga duggal ay yoon kàddu-jàll bu baaxul."
129+
130+#: qml/Components/DelayedLockscreen.qml:74
131+#, qt-format
132+msgid "Please wait %1 minute and then try again…"
133+msgid_plural "Please wait %1 minutes and then try again…"
134+msgstr[0] "Dila ñaan nga xaar %1 simili te jéemaat..."
135+msgstr[1] "Dila ñaan nga xaar %1 simili te jéemaat..."
136+
137+#: qml/Components/Dialogs.qml:115
138+msgctxt "Title: Lock/Log out dialog"
139+msgid "Log out"
140+msgstr "Génn"
141+
142+#: qml/Components/Dialogs.qml:116
143+msgid "Are you sure you want to log out?"
144+msgstr "Wóor na ne danga bëgg a génn?"
145+
146+#: qml/Components/Dialogs.qml:118
147+msgctxt "Button: Lock the system"
148+msgid "Lock"
149+msgstr "Tëj"
150+
151+#: qml/Components/Dialogs.qml:125
152+msgctxt "Button: Log out from the system"
153+msgid "Log Out"
154+msgstr "Génn"
155+
156+#: qml/Components/Dialogs.qml:132 qml/Components/Dialogs.qml:165
157+#: qml/Components/Dialogs.qml:224
158+msgid "Cancel"
159+msgstr "Neenal"
160+
161+#: qml/Components/Dialogs.qml:144
162+msgctxt "Title: Reboot/Shut down dialog"
163+msgid "Shut down"
164+msgstr "Fay"
165+
166+#: qml/Components/Dialogs.qml:145
167+msgid "Are you sure you want to shut down?"
168+msgstr "Wóor na ne danga bëgg a fay?"
169+
170+#: qml/Components/Dialogs.qml:147
171+msgctxt "Button: Reboot the system"
172+msgid "Reboot"
173+msgstr "Fay-taalaat"
174+
175+#: qml/Components/Dialogs.qml:156
176+msgctxt "Button: Shut down the system"
177+msgid "Shut down"
178+msgstr "Fay"
179+
180+#: qml/Components/Dialogs.qml:178
181+msgctxt "Title: Reboot dialog"
182+msgid "Reboot"
183+msgstr "Fay-taalaat"
184+
185+#: qml/Components/Dialogs.qml:179
186+msgid "Are you sure you want to reboot?"
187+msgstr "Wóor na ne danga bëgg a fay-taalaat?"
188+
189+#: qml/Components/Dialogs.qml:181
190+msgid "No"
191+msgstr "Déet"
192+
193+#: qml/Components/Dialogs.qml:188
194+msgid "Yes"
195+msgstr "Waaw"
196+
197+#: qml/Components/Dialogs.qml:203
198+msgctxt "Title: Power off/Restart dialog"
199+msgid "Power"
200+msgstr "Fay"
201+
202+#: qml/Components/Dialogs.qml:204
203+msgid ""
204+"Are you sure you would like\n"
205+"to power off?"
206+msgstr "Wóor na ne danga bëgg a fay?"
207+
208+#: qml/Components/Dialogs.qml:206
209+msgctxt "Button: Power off the system"
210+msgid "Power off"
211+msgstr "Fay"
212+
213+#: qml/Components/Dialogs.qml:215
214+msgctxt "Button: Restart the system"
215+msgid "Restart"
216+msgstr "Fay-taalaat"
217+
218+#: qml/Components/Lockscreen.qml:245
219+msgid "Return to Call"
220+msgstr "Dellu ci woote bi"
221+
222+#: qml/Components/Lockscreen.qml:245
223+msgid "Emergency Call"
224+msgstr "Wooteb wallu"
225+
226+#: qml/Components/Lockscreen.qml:277
227+msgid "OK"
228+msgstr "OK"
229+
230+#: qml/Dash/GenericScopeView.qml:569 qml/Dash/GenericScopeView.qml:727
231+msgid "See less"
232+msgstr "Gis lu néew"
233+
234+#: qml/Dash/GenericScopeView.qml:569
235+msgid "See all"
236+msgstr "Gis lépp"
237+
238+#: qml/Dash/GenericScopeView.qml:631
239+msgctxt "Label: Hint for dash search line edit"
240+msgid "Search"
241+msgstr "Seet"
242+
243+#: qml/Dash/PageHeader.qml:269
244+msgctxt "Button: Open the Ubuntu Store"
245+msgid "Store"
246+msgstr "Ja"
247+
248+#: qml/Dash/PageHeader.qml:276
249+msgctxt "Button: Start a search in the current dash scope"
250+msgid "Search"
251+msgstr "Seet"
252+
253+#: qml/Dash/PageHeader.qml:286
254+msgctxt "Button: Show the current dash scope settings"
255+msgid "Settings"
256+msgstr "Jekkal"
257+
258+#: qml/Dash/PageHeader.qml:293
259+msgid "Remove from Favorites"
260+msgstr "Dindee ci Tànneef yi"
261+
262+#: qml/Dash/PageHeader.qml:293
263+msgid "Add to Favorites"
264+msgstr "Yokk ci Tànneef yi"
265+
266+#: qml/Dash/Previews/PreviewActionCombo.qml:35
267+msgid "More..."
268+msgstr "Leneen..."
269+
270+#: qml/Dash/Previews/PreviewActionCombo.qml:35
271+msgid "Less..."
272+msgstr "Wàññi..."
273+
274+#: qml/Dash/Previews/PreviewCommentInput.qml:68
275+#: qml/Dash/Previews/PreviewRatingInput.qml:174
276+#: qml/Panel/Indicators/MessageMenuItemFactory.qml:148
277+#: qml/Panel/Indicators/MessageMenuItemFactory.qml:205
278+msgid "Send"
279+msgstr "Yónnee"
280+
281+#: qml/Dash/Previews/PreviewRatingInput.qml:84
282+msgid "Rate this"
283+msgstr "Xayma ko"
284+
285+#: qml/Dash/Previews/PreviewRatingInput.qml:129
286+msgid "Add a review"
287+msgstr "Yokk sa xalaat"
288+
289+#: qml/Dash/PullToRefreshScopeStyle.qml:55
290+msgid "Pull to refresh…"
291+msgstr "Xëcc ngir yeesal..."
292+
293+#: qml/Dash/PullToRefreshScopeStyle.qml:60
294+msgid "Release to refresh…"
295+msgstr "Bàyyi ngir yeesal..."
296+
297+#: qml/Dash/ScopeSettings/ScopeSettingBoolean.qml:43
298+msgid "Enable location data"
299+msgstr "Doxal njoxey barab"
300+
301+#: qml/Dash/ScopesList.qml:67
302+msgid "Manage"
303+msgstr "Yor"
304+
305+#: qml/Dash/ScopesList.qml:113
306+msgid "Home"
307+msgstr "Njëlbeen"
308+
309+#: qml/Dash/ScopesList.qml:114
310+msgid "Also installed"
311+msgstr "Yiñ samp tamit"
312+
313+#: qml/Greeter/CoverPage.qml:107
314+msgid "Unlock"
315+msgstr "Ubbi"
316+
317+#: qml/Greeter/LoginList.qml:236
318+msgid "Retry"
319+msgstr "Jéemaat"
320+
321+#: qml/Greeter/LoginList.qml:237
322+msgid "Tap to unlock"
323+msgstr "Bësal ngir ubbi"
324+
325+#: qml/Greeter/NarrowView.qml:54 qml/Wizard/Pages/passwd-confirm.qml:53
326+msgid "Sorry, incorrect passphrase."
327+msgstr "Jéggalu, kàddu-jàll gi baaxul."
328+
329+#: qml/Greeter/NarrowView.qml:55 qml/Wizard/Pages/passwd-confirm.qml:54
330+msgid "Sorry, incorrect passcode."
331+msgstr "Jéggalu, baatu-jàll bi baaxul"
332+
333+#: qml/Greeter/NarrowView.qml:56
334+msgid "This will be your last attempt."
335+msgstr "Bii mooy sa jéem bu mujj."
336+
337+#: qml/Greeter/NarrowView.qml:58
338+msgid ""
339+"If passphrase is entered incorrectly, your phone will conduct a factory "
340+"reset and all personal data will be deleted."
341+msgstr ""
342+"Su kàddu-jàll gi dugg baaxul, sa wootekaay di nañ ko delloo nimu meloon ci "
343+"defaram te sa bépp njoxe di nañ ko far."
344+
345+#: qml/Greeter/NarrowView.qml:59
346+msgid ""
347+"If passcode is entered incorrectly, your phone will conduct a factory reset "
348+"and all personal data will be deleted."
349+msgstr ""
350+"Su baatu-jàll bi dugg baaxul, sa wootekaay di nañ ko delloo nimu meloon ci "
351+"defaram te sa bépp njoxe di nañ ko far."
352+
353+#: qml/Greeter/NarrowView.qml:116
354+#, qt-format
355+msgid "Enter %1"
356+msgstr "Bindal %1"
357+
358+#: qml/Greeter/NarrowView.qml:117 qml/Wizard/Pages/passwd-set.qml:60
359+msgid "Enter passphrase"
360+msgstr "Duggal kàddu-jàll"
361+
362+#: qml/Greeter/NarrowView.qml:118
363+msgid "Enter passcode"
364+msgstr "Duggal baatu-jàll"
365+
366+#: qml/Greeter/NarrowView.qml:119
367+#, qt-format
368+msgid "Sorry, incorrect %1"
369+msgstr "Jéggalu, %1 baaxul"
370+
371+#: qml/Greeter/NarrowView.qml:120
372+msgid "Sorry, incorrect passphrase"
373+msgstr "Jéggalu, kàddu-jàll gi baaxul"
374+
375+#: qml/Greeter/NarrowView.qml:121
376+msgctxt "passphrase"
377+msgid "Please re-enter"
378+msgstr "Di la ñaan nga duggalaat"
379+
380+#: qml/Greeter/NarrowView.qml:122
381+msgid "Sorry, incorrect passcode"
382+msgstr "Jéggalu, baatu-jàll bi baaxul"
383+
384+#: qml/Notifications/NotificationMenuItemFactory.qml:128
385+msgid "Show password"
386+msgstr "Wone baatu-jàll"
387+
388+#: qml/Panel/ActiveCallHint.qml:79
389+msgid "Tap to return to call..."
390+msgstr "Bësal ngir dello ci woote bi..."
391+
392+#: qml/Panel/ActiveCallHint.qml:92
393+msgid "Conference"
394+msgstr "Wax ci kaw"
395+
396+#: qml/Panel/Indicators/MenuItemFactory.qml:718
397+msgid "Nothing is playing"
398+msgstr "Dara dawul"
399+
400+#: qml/Panel/Indicators/MenuItemFactory.qml:847
401+#, qt-format
402+msgid "%1 hour"
403+msgid_plural "%1 hours"
404+msgstr[0] "%1 waxtu"
405+msgstr[1] "%1 waxtu"
406+
407+#: qml/Panel/Indicators/MenuItemFactory.qml:851
408+#, qt-format
409+msgid "%1 minute"
410+msgid_plural "%1 minutes"
411+msgstr[0] "%1 simili"
412+msgstr[1] "%1 simili"
413+
414+#: qml/Panel/Indicators/MenuItemFactory.qml:856
415+#, qt-format
416+msgid "%1 second"
417+msgid_plural "%1 seconds"
418+msgstr[0] "%1 saa"
419+msgstr[1] "%1 saa"
420+
421+#: qml/Panel/Indicators/MenuItemFactory.qml:859
422+msgid "0 seconds"
423+msgstr "0 saa"
424+
425+#. Translators: String like "1 hour, 2 minutes, 3 seconds remaining"
426+#: qml/Panel/Indicators/MenuItemFactory.qml:861
427+#, qt-format
428+msgid "%1 remaining"
429+msgstr "%1 moo des"
430+
431+#: qml/Panel/Indicators/MenuItemFactory.qml:867
432+msgid "In queue…"
433+msgstr "ci xaaruwaay bi..."
434+
435+#: qml/Panel/Indicators/MenuItemFactory.qml:871
436+msgid "Downloading"
437+msgstr "Yebbi"
438+
439+#: qml/Panel/Indicators/MenuItemFactory.qml:873
440+msgid "Paused, tap to resume"
441+msgstr "Dafa taxaw, bësal ngir tàmbaliwaat"
442+
443+#: qml/Panel/Indicators/MenuItemFactory.qml:875
444+msgid "Canceled"
445+msgstr "Neenalees"
446+
447+#: qml/Panel/Indicators/MenuItemFactory.qml:877
448+msgid "Finished"
449+msgstr "Jeexalees"
450+
451+#: qml/Panel/Indicators/MenuItemFactory.qml:879
452+msgid "Failed, tap to retry"
453+msgstr "Antoodi, bësal ngir jéemaat"
454+
455+#: qml/Panel/Indicators/MessageMenuItemFactory.qml:149
456+msgctxt "Label: Hint in message indicator line edit"
457+msgid "Reply"
458+msgstr "Wuyu"
459+
460+#: qml/Panel/Indicators/MessageMenuItemFactory.qml:204
461+msgid "Call back"
462+msgstr "wootewaat"
463+
464+#: qml/Panel/Indicators/ModemInfoItem.qml:105
465+msgid "Unlock SIM"
466+msgstr "Tijji SIM"
467+
468+#: qml/Panel/Indicators/RoamingIndication.qml:27
469+msgid "Roaming"
470+msgstr "Roaming"
471+
472+#: qml/Tutorial/TutorialBottomFinish.qml:24
473+msgid "This action does different things for different apps"
474+msgstr "Jii jëf dafay defal mbir yu wuute jëfekaay yu wuute"
475+
476+#: qml/Tutorial/TutorialBottomFinish.qml:25
477+msgid "Tap here to finish."
478+msgstr "Bësal fii ngir Feexal."
479+
480+#: qml/Tutorial/TutorialBottom.qml:28
481+msgid "Open special menus"
482+msgstr "Open njëli jagleel"
483+
484+#: qml/Tutorial/TutorialBottom.qml:29
485+msgid "Swipe up from the bottom edge."
486+msgstr "Diri tambalee ci cat bu suuf bi."
487+
488+#: qml/Tutorial/TutorialContent.qml:80 qml/Tutorial/TutorialLeftFinish.qml:25
489+#: qml/Tutorial/TutorialRight.qml:144
490+msgid "Tap here to continue."
491+msgstr "Bësal fii ngir wéy."
492+
493+#: qml/Tutorial/TutorialLeftFinish.qml:24
494+msgid "These are the shortcuts to favorite apps"
495+msgstr "Yii ñall ñooy yóbbe ci jëfekaay yi nga taamu"
496+
497+#: qml/Tutorial/TutorialLeft.qml:26
498+msgid "Open the launcher"
499+msgstr "Ubbi Ubbikaay bi"
500+
501+#: qml/Tutorial/TutorialLeft.qml:27
502+msgid "Short swipe from the left edge."
503+msgstr "Diri bu gàtt tambalee ci cat bu cammoñ bi"
504+
505+#: qml/Tutorial/TutorialPage.qml:178
506+msgid "You almost got it!"
507+msgstr "Léegi mu jeex"
508+
509+#: qml/Tutorial/TutorialPage.qml:195
510+msgid "Try again."
511+msgstr "Jéemaatal"
512+
513+#: qml/Tutorial/TutorialRight.qml:31
514+msgid "To view open apps"
515+msgstr "Ngir gis jëfekaay yi ubeeku"
516+
517+#: qml/Tutorial/TutorialRight.qml:32
518+msgid "Long swipe from the right edge."
519+msgstr "Diri bu gudd tambalee ci cat bu ndijoor bi."
520+
521+#: qml/Tutorial/TutorialRight.qml:122
522+msgid "View all your running tasks."
523+msgstr "Gis lépp luy dox ci biir."
524+
525+#: qml/Wizard/Page.qml:89
526+msgctxt "Button: Go back one page in the Wizard"
527+msgid "Back"
528+msgstr "Dellu"
529+
530+#: qml/Wizard/Pages/here-terms.qml:27
531+msgid "Terms & Conditions"
532+msgstr "Anami jëfandiku gi"
533+
534+#: qml/Wizard/Pages/passwd-confirm.qml:49
535+msgid "Confirm passphrase"
536+msgstr "Dëggal kàddu-jàll"
537+
538+#: qml/Wizard/Pages/passwd-confirm.qml:50
539+msgid "Confirm passcode"
540+msgstr "Dëggal baatu-jàll"
541+
542+#: qml/Wizard/Pages/passwd-confirm.qml:53
543+#: qml/Wizard/Pages/passwd-confirm.qml:54
544+msgid "Please try again."
545+msgstr "Dila ñaan nga jéemaat."
546+
547+#: qml/Wizard/Pages/passwd-confirm.qml:82 qml/Wizard/Pages/passwd-set.qml:90
548+#: qml/Wizard/Pages/10-welcome.qml:88 qml/Wizard/Pages/30-passwd-type.qml:128
549+#: qml/Wizard/Pages/40-wifi.qml:215 qml/Wizard/Pages/50-location.qml:131
550+#: qml/Wizard/Pages/60-reporting.qml:50
551+msgid "Continue"
552+msgstr "Wéy"
553+
554+#: qml/Wizard/Pages/passwd-set.qml:61
555+msgid "Choose your passcode"
556+msgstr "Tànnal sa baatu-jàll"
557+
558+#: qml/Wizard/Pages/passwd-set.qml:68
559+msgid "Passphrase must be 4 characters long"
560+msgstr "Kàddu-jàll gi faww mu mat 4 màndarga"
561+
562+#: qml/Wizard/Pages/10-welcome.qml:27
563+msgid "Hi!"
564+msgstr "Dila nuyu!"
565+
566+#: qml/Wizard/Pages/10-welcome.qml:44
567+msgid "Welcome to your Ubuntu phone."
568+msgstr "Dala-jàmm ci sa wootekaay bu Ubuntu."
569+
570+#: qml/Wizard/Pages/10-welcome.qml:52
571+msgid "Let’s get started."
572+msgstr "Nu tambali."
573+
574+#: qml/Wizard/Pages/20-sim.qml:25
575+msgid "Add a SIM card and restart your device"
576+msgstr "Duggalal ab SIM te fay-taalaat sa wootekaay"
577+
578+#: qml/Wizard/Pages/20-sim.qml:59
579+msgid "Without it, you won’t be able to make calls or use text messaging."
580+msgstr "Lu ko moy doo man a woote walla yónney bataaxal."
581+
582+#: qml/Wizard/Pages/20-sim.qml:73 qml/Wizard/Pages/40-wifi.qml:215
583+msgid "Skip"
584+msgstr "Tëb"
585+
586+#: qml/Wizard/Pages/30-passwd-type.qml:39
587+msgid "Lock security"
588+msgstr "Kaaraangeg tëj"
589+
590+#: qml/Wizard/Pages/30-passwd-type.qml:74
591+msgid "Please select how you’d like to unlock your phone."
592+msgstr "Tànnal nan nga bëgg a tëjee sa wootekaay"
593+
594+#: qml/Wizard/Pages/30-passwd-type.qml:97
595+msgctxt "Label: Type of security method"
596+msgid "Swipe"
597+msgstr "Diri"
598+
599+#: qml/Wizard/Pages/30-passwd-type.qml:98
600+msgctxt "Label: Description of security method"
601+msgid "No security"
602+msgstr "Amul kaaraange"
603+
604+#: qml/Wizard/Pages/30-passwd-type.qml:100
605+msgctxt "Label: Type of security method"
606+msgid "Passcode"
607+msgstr "Baatu-jàll"
608+
609+#: qml/Wizard/Pages/30-passwd-type.qml:101
610+msgctxt "Label: Description of security method"
611+msgid "4 digits only"
612+msgstr "4 baaraam rek"
613+
614+#: qml/Wizard/Pages/30-passwd-type.qml:103
615+msgctxt "Label: Type of security method"
616+msgid "Passphrase"
617+msgstr "kàddu-jàll"
618+
619+#: qml/Wizard/Pages/30-passwd-type.qml:104
620+msgctxt "Label: Description of security method"
621+msgid "Numbers and letters"
622+msgstr "Nimero aki araf"
623+
624+#: qml/Wizard/Pages/40-wifi.qml:29
625+msgid "Connect to Wi‑Fi"
626+msgstr "Lonku ci Wi-fi"
627+
628+#: qml/Wizard/Pages/40-wifi.qml:168
629+msgid "Available networks…"
630+msgstr "Mbaal yi jàppandi..."
631+
632+#: qml/Wizard/Pages/40-wifi.qml:169
633+msgid "No available networks."
634+msgstr "Benn mbaal jàppandiwul"
635+
636+#: qml/Wizard/Pages/50-location.qml:27
637+msgid "Location"
638+msgstr "Nekkuwaay"
639+
640+#: qml/Wizard/Pages/50-location.qml:62
641+msgid "Let the phone detect your location:"
642+msgstr "Bàyyi wootekaay bi gisal boppam sa nekkuwaay"
643+
644+#: qml/Wizard/Pages/50-location.qml:69
645+msgid "Using GPS only (less accurate)"
646+msgstr "Ci jëfandikoo GPS kepp (gën a ñawadi)"
647+
648+#: qml/Wizard/Pages/50-location.qml:86
649+msgid "Using GPS, anonymized Wi-Fi and cellular network info (recommended)"
650+msgstr ""
651+"Jëfandikoo GPS, wi-fi buñ xamul ak xibaaru mbaalu wootekaay (digalees)"
652+
653+#. Translators: HERE is a trademark for Nokia's location service, you probably shouldn't translate it
654+#: qml/Wizard/Pages/50-location.qml:103
655+msgid ""
656+"By selecting this option you agree to the Nokia HERE <a href='#'>terms and "
657+"conditions</a>."
658+msgstr ""
659+"Soo falee bii tànneef mooy ne nangu nga <a href='#'>anami jëfandiku</a gu "
660+"Nokia HERE"
661+
662+#: qml/Wizard/Pages/50-location.qml:112
663+msgid "Not at all"
664+msgstr "Déet"
665+
666+#: qml/Wizard/Pages/50-location.qml:124
667+msgid "You can change your mind later in <b>System Settings</b>."
668+msgstr "Man ngaa seetaat sa tànneef ginnaaw bi ci <b>Jekkali Noste</b>."
669+
670+#: qml/Wizard/Pages/60-reporting.qml:24
671+msgid "Improving your experience"
672+msgstr "Gënal jëfandiku gi"
673+
674+#: qml/Wizard/Pages/60-reporting.qml:36
675+msgid ""
676+"Your phone is set up to automatically report errors to Canonical and its "
677+"partners, the makers of the operating system."
678+msgstr ""
679+"Sa wootekaay dañ koo def bamuy yónneel boppam njuumte yi Canonical aki "
680+"farandoom, ñi defar nosteg doxiin gi."
681+
682+#: qml/Wizard/Pages/60-reporting.qml:43
683+msgid ""
684+"This can be disabled in <b>System Settings</b> under <b>Security &amp; "
685+"Privacy</b>"
686+msgstr ""
687+"Man nañ koo dindee ci <b>Jagali Noste</b> ci ronu <b>Karaange &amp; "
688+"Sutura</b>"
689+
690+#: qml/Wizard/Pages/80-finished.qml:24
691+msgid "All done"
692+msgstr "Sotti na"
693+
694+#: qml/Wizard/Pages/80-finished.qml:39
695+msgid "Nice work!"
696+msgstr "Liggéey bu rafet!"
697+
698+#: qml/Wizard/Pages/80-finished.qml:46
699+msgid "Your phone is now ready to use."
700+msgstr "Leegi sa wootekaay noppi na ngir ñu man koo jëfandikoo."
701+
702+#: qml/Wizard/Pages/80-finished.qml:53
703+msgid "Finish"
704+msgstr "Jeexal"
705+
706+#. Translators: This is the arrow for "Back" buttons
707+#: qml/Wizard/StackButton.qml:39
708+#, qt-format
709+msgid "〈 %1"
710+msgstr "〈 %1"
711+
712+#. Translators: This is the arrow for "Forward" buttons
713+#: qml/Wizard/StackButton.qml:42
714+#, qt-format
715+msgid "%1 〉"
716+msgstr "%1 〉"
717+
718+#~ msgid "Log out"
719+#~ msgstr "Génn"
720+
721+#~ msgid "Power"
722+#~ msgstr "Fay"
723+
724+#~ msgid "Reboot"
725+#~ msgstr "Fay-taalaat"
726+
727+#~ msgid "Shut down"
728+#~ msgstr "Fay"
729+
730+#~ msgid "Restart"
731+#~ msgstr "Fay-taalaat"
732+
733+#~ msgid "Power off"
734+#~ msgstr "Fay"
735+
736+#~ msgid "Try swiping from the top edge to access the indicators"
737+#~ msgstr "Jéemal diri tambale ci kaw ngir gis wonekaay yi"
738+
739+#~ msgid "Top edge"
740+#~ msgstr "Cat wu kaw"
741+
742+#~ msgid "Close"
743+#~ msgstr "Tëj"
744+
745+#~ msgid "Swipe up again to close the settings screen"
746+#~ msgstr "Diriwaatal ci kaw ngir tëj xoolu jekkal yi"
747+
748+#~ msgid "Left edge"
749+#~ msgstr "Catu cammoñ"
750+
751+#~ msgid "Well done"
752+#~ msgstr "Jaa-jëf"
753+
754+#~ msgid "Swipe from the left to reveal the launcher for quick access to apps"
755+#~ msgstr ""
756+#~ "Jéemal diri tambalee ci cammoñ ngir gis ubbikaay bi ngir àgg gu gaaw ci "
757+#~ "jëfekaay yi"
758+
759+#~ msgid "Skip intro"
760+#~ msgstr "Tëb ndoorteel"
761+
762+#~ msgid "Try swiping from the right edge to unlock the phone"
763+#~ msgstr "Jéemal diri tambalee ci catu ndijoor bi ngir ubbi wootekaay bi"
764+
765+#~ msgid "Right edge"
766+#~ msgstr "Cat wu ndijoor"
767+
768+#~ msgid "Settings"
769+#~ msgstr "Jekkal"
770+
771+#~ msgid ""
772+#~ "You have now mastered the edge gestures and can start using the "
773+#~ "phone<br><br>Tap on the screen to start"
774+#~ msgstr ""
775+#~ "Léegi nàng nga bu baax kon man nga tàmbali jëfandikoo wootekaay bi <br><br> "
776+#~ "Bësal ci xoolu bi ngir tàmbali"
777+
778+#~ msgid "Store"
779+#~ msgstr "Ja"
780+
781+#~ msgid "Search"
782+#~ msgstr "Seet"
783+
784+#~ msgid "Type or say a command"
785+#~ msgstr "Bind walla wax ag cantaane"
786+
787+#~ msgid "Loading. Please Wait..."
788+#~ msgstr "Yeb. Di ñaan nga xaar..."
789+
790+#~ msgid "Speaking..."
791+#~ msgstr "Maa ngi wax..."
792+
793+#~ msgid "Speak Now..."
794+#~ msgstr "Léegi waxal..."
795+
796+#~ msgid "Confirm"
797+#~ msgstr "Dëggal"
798+
799+#~ msgid "Please re-enter"
800+#~ msgstr "Di la ñaan nga duggalaat"
qml/Components/Background.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Utils 0.1 as Utils
2020
2121Loader {
qml/Components/BaseCarouselDelegate.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020/*!
2121 \brief Base delegate for use with the Carousel component
qml/Components/Carousel.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "carousel.js" as CarouselJS
2020
2121/*! The Carousel component presents the items of a model in a carousel view. It's similar to a
qml/Components/Circle.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919Rectangle {
2020 antialiasing: true
qml/Components/DelayedLockscreen.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../Components"
2020
2121Item {
qml/Components/Dialogs.qml+2−2
@@ -14,12 +14,12 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919import Unity.Application 0.1
2020import Unity.Session 0.1
21−import Ubuntu.Components 1.1
2221import GlobalShortcut 1.0
22+import Ubuntu.Components 1.3
2323import Unity.Platform 1.0
2424import Utils 0.1
2525import "../Greeter"
qml/Components/DragHandle.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Gestures 0.1
2020
2121/*
qml/Components/DraggingArea.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020MouseArea {
2121 id: draggingArea
qml/Components/EdgeDragEvaluator.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Gestures 0.1
2020
2121/*
qml/Components/Header.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import Ubuntu.Components 1.1
18−import Ubuntu.Components.Themes.Ambiance 1.1
17+import Ubuntu.Components 1.3
18+import Ubuntu.Components.Themes.Ambiance 1.3
1919
2020PageHeadStyle {
2121 id: root
qml/Components/InputMethod.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Unity.Application 0.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import Ubuntu.Gestures 0.1
2121
2222Item {
qml/Components/LazyImage.qml+24−13
@@ -17,8 +17,8 @@
1717 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1818 */
1919
20−import QtQuick 2.0
21−import Ubuntu.Components 0.1
20+import QtQuick 2.4
21+import Ubuntu.Components 1.3
2222
2323Item {
2424 id: root
@@ -31,13 +31,12 @@ Item {
3131 property real initialHeight: scaleTo == "height" || scaleTo == "fit" ? height : units.gu(10)
3232
3333 property alias sourceSize: image.sourceSize
34− property alias fillMode: image.fillMode
3534 property alias asynchronous: image.asynchronous
3635 property alias cache: image.cache
37− property alias horizontalAlignment: image.horizontalAlignment
38− property alias verticalAlignment: image.verticalAlignment
3936 property alias sourceImage: image
40− property alias borderSource: shape.borderSource
37+
38+ property bool useUbuntuShape: true
39+ property bool pressed: false
4140
4241 state: "default"
4342
@@ -50,12 +49,15 @@ Item {
5049 }
5150 }
5251
53− UbuntuShape {
52+ Loader {
5453 id: placeholder
5554 objectName: "placeholder"
56− color: "#22FFFFFF"
5755 anchors.fill: shape
56+ active: useUbuntuShape
5857 visible: opacity != 0
58+ sourceComponent: UbuntuShape {
59+ backgroundColor: "#22FFFFFF"
60+ }
5961
6062 ActivityIndicator {
6163 id: activity
@@ -78,28 +80,37 @@ Item {
7880 }
7981 }
8082
81− UbuntuShape {
83+ Loader {
8284 id: shape
8385 objectName: "shape"
8486 height: root.initialHeight
8587 width: root.initialWidth
8688 anchors.centerIn: root.scaleTo == "fit" ? parent : undefined
87−
89+ active: useUbuntuShape
8890 opacity: 0
8991 visible: opacity != 0
92+ sourceComponent: UbuntuShapeOverlay {
93+ property bool pressed: false
94+ overlayColor: Qt.rgba(0, 0, 0, pressed ? 0.1 : 0)
95+ overlayRect: Qt.rect(0.0, 0.0, 1.0, 1.0)
96+ }
97+ onLoaded: {
98+ item.source = image;
99+ item.pressed = Qt.binding(function() { return root.pressed; });
100+ }
90101
91− image: Image {
102+ Image {
92103 id: image
93104 objectName: "image"
94105
95106 property url nextSource
96107 property string format: image.implicitWidth > image.implicitHeight ? "landscape" : "portrait"
97108
109+ anchors.fill: parent
110+ visible: !useUbuntuShape
98111 fillMode: Image.PreserveAspectFit
99112 asynchronous: true
100113 cache: false
101− horizontalAlignment: Image.AlignHCenter
102− verticalAlignment: Image.AlignVCenter
103114 sourceSize.width: root.scaleTo == "width" ? root.width
104115 : root.scaleTo == "fit" && root.width <= root.height ? root.width
105116 : 0
qml/Components/ListItems/Header.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020
2121Item {
2222 property alias text: label.text
qml/Components/ListItems/ThinDivider.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919Image {
2020 anchors {
qml/Components/ListViewOSKScroller.qmlnew file+53
@@ -0,0 +1,53 @@
1+/*
2+ * Copyright (C) 2015 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.4
18+import "../Components"
19+
20+Item {
21+ id: root
22+
23+ property ListView list
24+
25+ Binding {
26+ target: list
27+ property: "bottomMargin"
28+ value: d.bottomMargin
29+ }
30+
31+ function setMakeSureVisibleItem(item) {
32+ d.previousVisibleHeight = d.visibleHeight;
33+ d.makeSureVisibleItem = item;
34+ }
35+
36+ QtObject {
37+ id: d
38+ property var makeSureVisibleItem
39+ property real previousVisibleHeight: 0
40+ readonly property real visibleHeight: list.height - list.bottomMargin
41+ readonly property real bottomMargin: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
42+
43+ onVisibleHeightChanged: {
44+ if (makeSureVisibleItem && makeSureVisibleItem.activeFocus && previousVisibleHeight > visibleHeight) {
45+ var textAreaPos = makeSureVisibleItem.mapToItem(list, 0, 0);
46+ if (textAreaPos.y + makeSureVisibleItem.height > visibleHeight) {
47+ list.contentY += textAreaPos.y + makeSureVisibleItem.height - visibleHeight
48+ }
49+ }
50+ previousVisibleHeight = visibleHeight;
51+ }
52+ }
53+}
qml/Components/Lockscreen.qml+3−3
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.0
19−import Ubuntu.Components.Popups 1.0
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Components.Popups 1.3
2020import Ubuntu.Telephony 0.1 as Telephony
2121
2222Showable {
qml/Components/NotificationAudio.qmlnew file+42
@@ -0,0 +1,42 @@
1+/*
2+ * Copyright (C) 2015 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.4
18+
19+Item {
20+ id: root
21+ property string source: ""
22+ readonly property var playbackState: priv.audio ? priv.audio.playbackState : 0
23+
24+ function play() {
25+ priv.audio.play();
26+ }
27+ function stop() {
28+ priv.audio.stop();
29+ }
30+
31+ QtObject {
32+ id: priv
33+ property var audio: {
34+ try {
35+ return Qt.createQmlObject("import QtMultimedia 5.6; Audio { source: root.source; audioRole: MediaPlayer.NotificationRole }", priv)
36+ } catch(err) {
37+ console.log("Upstream audioRole enum not available, falling back to old role name.");
38+ return Qt.createQmlObject("import QtMultimedia 5.0; Audio { source: root.source; audioRole: MediaPlayer.alert }", priv)
39+ }
40+ }
41+ }
42+}
qml/Components/Orientations.qml+28
@@ -17,6 +17,8 @@
1717import QtQuick 2.4
1818
1919QtObject {
20+ id: root
21+
2022 // Just because "native" is a reserved keyword :(
2123 property int native_: Qt.PortraitOrientation
2224
@@ -26,4 +28,30 @@ QtObject {
2628 property int invertedLandscape: Qt.InvertedLandscapeOrientation
2729 property int portrait: Qt.PortraitOrientation
2830 property int invertedPortrait: Qt.InvertedPortraitOrientation
31+
32+ function map(orientations) {
33+ var result = 0;
34+
35+ if (orientations & Qt.PortraitOrientation) {
36+ result |= root.portrait;
37+ }
38+
39+ if (orientations & Qt.InvertedPortraitOrientation) {
40+ result |= root.invertedPortrait;
41+ }
42+
43+ if (orientations & Qt.LandscapeOrientation) {
44+ result |= root.landscape;
45+ }
46+
47+ if (orientations & Qt.InvertedLandscapeOrientation) {
48+ result |= root.invertedLandscape;
49+ }
50+
51+ if (result == 0) {
52+ result = root.primary;
53+ }
54+
55+ return result;
56+ }
2957}
qml/Components/PanelState/PanelState.qml+1−1
@@ -15,7 +15,7 @@
1515 */
1616
1717pragma Singleton
18−import QtQuick 2.0
18+import QtQuick 2.4
1919
2020QtObject {
2121 id: root
qml/Components/PassphraseLockscreen.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../Components"
2020
2121Item {
qml/Components/PhysicalKeysMapper.qml+14−21
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Powerd 0.1
1919
2020/*!
@@ -57,27 +57,20 @@ Item {
5757
5858 property bool altPressed: false
5959 property bool altTabPressed: false
60− }
6160
62− Timer {
63− id: powerKeyLongPressTimer
64− interval: root.powerKeyLongPressTime
65− onTriggered: root.powerKeyLongPressed();
61+ property var powerButtonPressStart: 0
6662 }
6763
68− function onKeyPressed(event) {
69− if ((event.key == Qt.Key_PowerDown || event.key == Qt.Key_PowerOff)
70− && (!event.isAutoRepeat || !powerKeyLongPressTimer.running)) {
71−
72− // FIXME: We only consider power key presses if the screen is
73− // on because of bugs 1410830/1409003. The theory is that when
74− // those bugs are encountered, there is a >2s delay between the
75− // power press event and the power release event, which causes
76− // the shutdown dialog to appear on resume. So to avoid that
77− // symptom while we investigate the root cause, we simply won't
78− // initiate any dialogs when the screen is off.
79− if (Powerd.status === Powerd.On) {
80− powerKeyLongPressTimer.restart();
64+ function onKeyPressed(event, currentEventTimestamp) {
65+ if (event.key == Qt.Key_PowerDown || event.key == Qt.Key_PowerOff) {
66+ if (event.isAutoRepeat) {
67+ if (d.powerButtonPressStart > 0
68+ && currentEventTimestamp - d.powerButtonPressStart >= powerKeyLongPressTime) {
69+ d.powerButtonPressStart = 0;
70+ root.powerKeyLongPressed();
71+ }
72+ } else {
73+ d.powerButtonPressStart = currentEventTimestamp;
8174 }
8275 } else if ((event.key == Qt.Key_MediaTogglePlayPause || event.key == Qt.Key_MediaPlay) && !event.isAutoRepeat) {
8376 event.accepted = callManager.handleMediaKey(false);
@@ -113,9 +106,9 @@ Item {
113106 }
114107 }
115108
116− function onKeyReleased(event) {
109+ function onKeyReleased(event, currentEventTimestamp) {
117110 if (event.key == Qt.Key_PowerDown || event.key == Qt.Key_PowerOff) {
118− powerKeyLongPressTimer.stop();
111+ d.powerButtonPressStart = 0;
119112 event.accepted = true;
120113 } else if (event.key == Qt.Key_VolumeDown) {
121114 if (!d.ignoreVolumeEvents) root.volumeDownTriggered();
qml/Components/PinLockscreen.qml+3−3
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Ubuntu.Components.ListItems 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Components.ListItems 1.3
2020import "../Components"
2121
2222Item {
qml/Components/PinPadButton.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020AbstractButton {
2121 id: root
qml/Components/Rating.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020/*! Rating widget bar. */
2121
qml/Components/RatingStyle.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Row {
2121 anchors.fill: parent
qml/Components/ResponsiveGridView.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020/*
2121 Essentially a GridView where you can specify the maximum number of columns it can have.
qml/Components/ResponsiveVerticalJournal.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../Components"
2020import Dash 0.1
2121
qml/Components/ScreenGrabber.qml+2−4
@@ -14,8 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import QtMultimedia 5.0
17+import QtQuick 2.4
1918import ScreenGrabber 0.1
2019import GlobalShortcut 1.0
2120
@@ -40,9 +39,8 @@ Rectangle {
4039 onTriggered: capture()
4140 }
4241
43− Audio {
42+ NotificationAudio {
4443 id: shutterSound
45− audioRole: MediaPlayer.alert
4644 source: "/system/media/audio/ui/camera_click.ogg"
4745 }
4846
qml/Components/ScrollCalculator.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Item {
2121 id: scrollArea
qml/Components/SearchHistoryModel/SearchHistoryModel.qml+1−1
@@ -15,7 +15,7 @@
1515 */
1616
1717pragma Singleton
18−import QtQuick 2.0
18+import QtQuick 2.4
1919
2020// TODO sanitize input, move to persistent storage
2121
qml/Components/ShellDialog.qml+3−3
@@ -14,10 +14,10 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
19−import Ubuntu.Components 1.1
20−import Ubuntu.Components.Popups 0.1
19+import Ubuntu.Components 1.3
20+import Ubuntu.Components.Popups 1.3
2121
2222/*
2323 A Dialog configured for use as a proper in-scene Dialog
qml/Components/Showable.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919Item {
2020 id: showable
qml/Components/StandardAnimation.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919NumberAnimation {
2020 duration: 200
qml/Components/UbuntuShapeForItem.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020/* FIXME: This component is duplicating the UbuntuShape from the SDK, but shapes more
2121 * general (Item-based) components. This ability should be incorporated into the SDK's
qml/Components/Unity8Settings.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import GSettings 1.0
1919
2020QtObject {
qml/Components/UnityInputInfo/UnityInputInfo.qml+2−2
@@ -16,10 +16,10 @@
1616
1717pragma Singleton
1818
19−import QtQuick 2.3
19+import QtQuick 2.4
2020import Unity.InputInfo 0.1
2121// Workaround https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1473471
22−import Ubuntu.Components 1.2
22+import Ubuntu.Components 1.3
2323
2424Item {
2525 id: root
qml/Components/WindowControlButtons.qml+2−2
@@ -16,8 +16,8 @@
1616 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
1717 */
1818
19−import QtQuick 2.3
20−import Ubuntu.Components 1.1
19+import QtQuick 2.4
20+import Ubuntu.Components 1.3
2121
2222Row {
2323 id: root
qml/Components/WindowScreenshot.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
17+import QtQuick 2.4
1818
1919Item {
2020 id: root
qml/Components/WrongPasswordAnimation.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919SequentialAnimation {
2020 id: root
qml/Components/ZoomableImage.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../Components"
2020
2121/*! \brief Zoomable for image.
qml/Dash/CardCarousel.qml+3−3
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../Components"
2020
2121DashRenderer {
@@ -68,7 +68,7 @@ DashRenderer {
6868 item.fontScale = Qt.binding(function() { return carousel.fontScale; });
6969 item.showHeader = Qt.binding(function() { return loader.explicitlyScaled; });
7070 item.titleAlignment = Qt.binding(function() { return cardTool.titleAlignment; });
71− item.artShapeBorderSource = "none";
71+ item.artShapeStyle = "flat";
7272 item.scopeStyle = cardCarousel.scopeStyle;
7373 }
7474
qml/Dash/CardGrid.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import "../Components"
1919
2020DashRenderer {
qml/Dash/CardHorizontalList.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../Components"
2020
2121DashRenderer {
qml/Dash/CardTool.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Dash 0.1
1919
2020/*!
qml/Dash/CardVerticalJournal.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../Components"
2020
2121DashRenderer {
qml/Dash/Dash.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Gestures 0.1
2020import Unity 0.2
2121import Utils 0.1
qml/Dash/DashApplication.qml+4−3
@@ -14,15 +14,16 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.0
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Thumbnailer 0.1 // Register support for image://thumbnailer/ and image://albumart/
2020
2121MainView {
2222 implicitWidth: units.gu(40)
2323 implicitHeight: units.gu(68)
2424
25− useDeprecatedToolbar: false
25+ // Workaround bug #1475643
26+ headerColor: Qt.rgba(0, 0, 0, 0)
2627
2728 Dash {
2829 anchors.fill: parent
qml/Dash/DashBackground.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919Image {
2020 source: anchors.fill.width > anchors.fill.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
qml/Dash/DashCategoryBase.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Item {
2121 width: parent.width
qml/Dash/DashContent.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Unity 0.2
2020import Utils 0.1
2121import "../Components"
qml/Dash/DashContentTabBarStyle.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import Ubuntu.Components.Themes.Ambiance 0.1
17+import Ubuntu.Components.Themes.Ambiance 1.3
1818
1919TabBarStyle {
2020 indicatorImageSource: "graphics/tabbarchevron.png"
qml/Dash/DashNavigation.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Dash 0.1
2020import "../Components"
2121
@@ -48,7 +48,7 @@ Item {
4848 id: d
4949 readonly property color foregroundColor: root.scopeStyle
5050 ? root.scopeStyle.getTextColor(backgroundItem.luminance)
51− : Theme.palette.normal.baseText
51+ : theme.palette.normal.baseText
5252 readonly property bool bothVisible: altNavigationButton.visible && navigationButton.visible
5353 readonly property real navigationWidth: root.width >= units.gu(60) ? units.gu(40) : root.width
5454 readonly property real buttonWidth: navigationWidth / (bothVisible ? 2 : 1)
qml/Dash/DashNavigationButton.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020AbstractButton {
2121 id: root
@@ -24,7 +24,7 @@ AbstractButton {
2424 // Set by parent
2525 property var scope: null
2626 property var scopeStyle: null
27− property color foregroundColor: Theme.palette.normal.baseText
27+ property color foregroundColor: theme.palette.normal.baseText
2828 property bool isAltNavigation: false
2929 property bool showDivider: false
3030
qml/Dash/DashNavigationList.qml+5−5
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
19−import Ubuntu.Components.ListItems 0.1 as ListItem
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Components.ListItems 1.3 as ListItem
2020import "../Components"
2121
2222Item {
@@ -24,7 +24,7 @@ Item {
2424 property var navigation: null
2525 property var currentNavigation: null
2626 property var scopeStyle: null
27− property color foregroundColor: Theme.palette.normal.baseText
27+ property color foregroundColor: theme.palette.normal.baseText
2828 signal enterNavigation(var newNavigationId, bool hasChildren)
2929 signal goBackToParentClicked()
3030 signal allNavigationClicked()
qml/Dash/PageHeader.qml → qml/Dash/DashPageHeader.qmlrenamed+12−16
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2013 Canonical, Ltd.
2+ * Copyright (C) 2013,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
19−import Ubuntu.Components.Themes.Ambiance 1.1
20−import Ubuntu.Components.Popups 1.0
21−import Ubuntu.Components.ListItems 1.0
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Components.Themes.Ambiance 1.3
20+import Ubuntu.Components.Popups 1.3
21+import Ubuntu.Components.ListItems 1.3
2222import "../Components"
2323import "../Components/SearchHistoryModel"
2424
@@ -136,7 +136,7 @@ Item {
136136 objectName: "headerContainer"
137137 clip: contentY < height
138138 anchors { left: parent.left; top: parent.top; right: parent.right }
139− height: units.gu(7)
139+ height: header.contentHeight
140140 contentHeight: headersColumn.height
141141 interactive: false
142142 contentY: showSearch ? 0 : height
@@ -171,18 +171,15 @@ Item {
171171 PageHeadStyle {
172172 id: searchHeader
173173 anchors { left: parent.left; right: parent.right }
174− height: headerContainer.height
175− contentHeight: height
176174 opacity: headerContainer.clip || headerContainer.showSearch ? 1 : 0 // setting visible false cause column to relayout
177175 __separator_visible: false
178176 // Required to keep PageHeadStyle noise down as it expects the Page's properties around.
179177 property var styledItem: searchHeader
180− property string title
181178 property color dividerColor: "transparent" // Doesn't matter as we don't have PageHeadSections
182179 property color panelColor: background.topColor
183180 panelForegroundColor: config.foregroundColor
184− property var config: PageHeadConfiguration {
185− foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : Theme.palette.normal.baseText
181+ config: PageHeadConfiguration {
182+ foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
186183 backAction: Action {
187184 iconName: "back"
188185 onTriggered: {
@@ -247,16 +244,15 @@ Item {
247244 objectName: "innerPageHeader"
248245 anchors { left: parent.left; right: parent.right }
249246 height: headerContainer.height
250− contentHeight: height
251247 opacity: headerContainer.clip || !headerContainer.showSearch ? 1 : 0 // setting visible false cause column to relayout
252248 __separator_visible: false
253249 property var styledItem: header
254− property string title: root.title
255250 property color dividerColor: "transparent" // Doesn't matter as we don't have PageHeadSections
256251 property color panelColor: background.topColor
257252 panelForegroundColor: config.foregroundColor
258− property var config: PageHeadConfiguration {
259− foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : Theme.palette.normal.baseText
253+ config: PageHeadConfiguration {
254+ title: root.title
255+ foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
260256 backAction: Action {
261257 iconName: backIsClose ? "close" : "back"
262258 visible: root.showBackButton
qml/Dash/DashRenderer.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919Item {
2020 property real collapsedHeight
qml/Dash/GenericScopeView.qml+6−6
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Utils 0.1
2020import Unity 0.2
2121import Dash 0.1
@@ -573,7 +573,7 @@ FocusScope {
573573 }
574574 fontSize: "small"
575575 font.weight: Font.Bold
576− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
576+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
577577 }
578578 }
579579
@@ -610,7 +610,7 @@ FocusScope {
610610 width: categoryView.width
611611 height: section != "" ? units.gu(5) : 0
612612 text: section
613− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
613+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
614614 iconName: delegate && delegate.headerLink ? "go-next" : ""
615615 onClicked: {
616616 if (delegate.headerLink) scopeView.scope.performQuery(delegate.headerLink);
@@ -624,7 +624,7 @@ FocusScope {
624624 sourceComponent: scopeView.showPageHeader ? pageHeaderComponent : undefined
625625 Component {
626626 id: pageHeaderComponent
627− PageHeader {
627+ DashPageHeader {
628628 objectName: "scopePageHeader"
629629 width: parent.width
630630 title: scopeView.scope ? scopeView.scope.name : ""
@@ -731,7 +731,7 @@ FocusScope {
731731 }
732732 fontSize: "small"
733733 font.weight: Font.Bold
734− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
734+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
735735 }
736736
737737 Connections {
qml/Dash/PreviewListView.qml+3−3
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Unity 0.2
2020import "../Components"
2121import "Previews" as Previews
@@ -43,7 +43,7 @@ Item {
4343
4444 signal backClicked()
4545
46− PageHeader {
46+ DashPageHeader {
4747 id: header
4848 objectName: "pageHeader"
4949 width: parent.width
qml/Dash/Previews/Preview.qml+13−20
@@ -14,8 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import "../../Components"
1920
2021/*! \brief This component constructs the Preview UI.
2122 *
@@ -72,18 +73,10 @@ Item {
7273 }
7374 width: row.columnWidth
7475 spacing: row.spacing
75− bottomMargin: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
76− property var makeSureVisibleItem
77− property real previousVisibleHeight: 0
78− property real visibleHeight: height - bottomMargin
79− onVisibleHeightChanged: {
80− if (makeSureVisibleItem && makeSureVisibleItem.activeFocus && previousVisibleHeight > visibleHeight) {
81− var textAreaPos = makeSureVisibleItem.mapToItem(column, 0, 0);
82− if (textAreaPos.y + makeSureVisibleItem.height > column.visibleHeight) {
83− column.contentY += textAreaPos.y + makeSureVisibleItem.height - column.visibleHeight
84− }
85− }
86− previousVisibleHeight = visibleHeight;
76+
77+ ListViewOSKScroller {
78+ id: oskScroller
79+ list: column
8780 }
8881
8982 model: columnModel
@@ -100,17 +93,17 @@ Item {
10093 anchors {
10194 left: parent.left
10295 right: parent.right
103− leftMargin: units.gu(1)
104− rightMargin: units.gu(1)
96+ leftMargin: widgetMargins
97+ rightMargin: widgetMargins
10598 }
10699
107100 onTriggered: {
108101 previewModel.triggered(widgetId, actionId, data);
109102 }
110− onMakeSureVisible: {
111− column.previousVisibleHeight=column.visibleHeight
112− column.makeSureVisibleItem=item
113− }
103+
104+ onMakeSureVisible: {
105+ oskScroller.setMakeSureVisibleItem(item);
106+ }
114107
115108 onFocusChanged: if (focus) column.positionViewAtIndex(index, ListView.Contain)
116109
qml/Dash/Previews/PreviewActionButton.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Button {
2121 signal triggeredAction(var actionData)
qml/Dash/Previews/PreviewActionCombo.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Item {
2121 id: root
@@ -33,7 +33,7 @@ Item {
3333
3434 objectName: "moreLessButton"
3535 text: !expanded ? i18n.tr("More...") : i18n.tr("Less...")
36− strokeColor: Theme.palette.normal.baseText
36+ strokeColor: theme.palette.normal.baseText
3737 onClicked: expanded = !expanded
3838 width: parent.width
3939 }
qml/Dash/Previews/PreviewActions.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020/*! This preview widget shows either one button, two buttons or one button
2121 * and a combo button depending on the number of items in widgetData["actions"].
@@ -50,7 +50,7 @@ PreviewWidget {
5050 Binding {
5151 target: loader.item
5252 property: "strokeColor"
53− value: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
53+ value: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
5454 }
5555 Connections {
5656 target: loader.item
qml/Dash/Previews/PreviewAudioPlayback.qml+7−7
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtMultimedia 5.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020
2121/*! \brief Preview widget for audio tracks.
2222
@@ -139,7 +139,7 @@ PreviewWidget {
139139 objectName: "trackTitleLabel"
140140 anchors { top: parent.top; left: parent.left; right: parent.right }
141141 opacity: 0.9
142− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
142+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
143143 fontSize: "small"
144144 horizontalAlignment: Text.AlignLeft
145145 text: modelData["title"]
@@ -152,7 +152,7 @@ PreviewWidget {
152152 anchors { top: trackTitleLabel.bottom; left: parent.left; right: parent.right }
153153 visible: text !== ""
154154 opacity: 0.9
155− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
155+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
156156 font.weight: Font.Light
157157 fontSize: "small"
158158 horizontalAlignment: Text.AlignLeft
@@ -175,7 +175,7 @@ PreviewWidget {
175175 }
176176 height: units.dp(2)
177177 visible: progressBarImage.visible
178− color: UbuntuColors.orange
178+ backgroundColor: UbuntuColors.orange
179179 }
180180
181181 Image {
@@ -193,7 +193,7 @@ PreviewWidget {
193193 anchors.verticalCenter: parent.verticalCenter
194194 width: parent.column3Width
195195 opacity: 0.9
196− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
196+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
197197 fontSize: "small"
198198 horizontalAlignment: Text.AlignRight
199199 text: audio.lengthToString(modelData["length"])
qml/Dash/Previews/PreviewComment.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.2
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020/*! \brief Preview widget for comments.
2121
qml/Dash/Previews/PreviewCommentInput.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../../Components"
2020
2121/*! \brief Preview widget for commenting.
qml/Dash/Previews/PreviewExpandable.qml+5−5
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../../Components"
2020
2121/*! \brief Preview widget for expandable widgets.
@@ -41,7 +41,7 @@ PreviewWidget {
4141 right: expandButton.left
4242 }
4343 fontSize: "large"
44− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
44+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
4545 visible: text !== ""
4646 opacity: .8
4747 text: widgetData["title"] || ""
@@ -62,7 +62,7 @@ PreviewWidget {
6262 width: units.gu(3)
6363 height: units.gu(3)
6464 name: root.expanded ? "view-collapse" : "view-expand"
65− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
65+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
6666 }
6767 }
6868
qml/Dash/Previews/PreviewHeader.qml+10−10
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Dash 0.1
2020import "../"
2121
@@ -40,10 +40,10 @@ PreviewWidget {
4040 readonly property string title: root.widgetData["title"] || ""
4141 readonly property string subtitle: root.widgetData["subtitle"] || ""
4242 readonly property var attributes: root.widgetData["attributes"] || null
43− readonly property color fontColor: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
43+ readonly property color fontColor: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
4444
4545 // Rewire the source since we may have unwired it on onStatusChanged
46− onMascotChanged: if (mascotShapeLoader.item) mascotShapeLoader.item.image.source = mascot;
46+ onMascotChanged: if (mascotShapeLoader.item) mascotShapeLoader.item.source.source = mascot;
4747
4848 implicitHeight: row.height + row.margins * 2
4949 width: parent.width
@@ -77,16 +77,16 @@ PreviewWidget {
7777
7878 sourceComponent: UbuntuShape {
7979 objectName: "mascotShape"
80− visible: image.status === Image.Ready
81− image: Image {
80+ visible: source.status === Image.Ready
81+ sourceFillMode: UbuntuShape.PreserveAspectCrop
82+ sourceHorizontalAlignment: UbuntuShape.AlignHCenter
83+ sourceVerticalAlignment: UbuntuShape.AlignVCenter
84+ source: Image {
8285 source: headerRoot.mascot
8386 width: source ? mascotShapeLoader.width : 0
8487 height: mascotShapeLoader.height
8588
8689 sourceSize { width: mascotShapeLoader.maxSize; height: mascotShapeLoader.maxSize }
87− fillMode: Image.PreserveAspectCrop
88− horizontalAlignment: Image.AlignHCenter
89− verticalAlignment: Image.AlignVCenter
9090 onStatusChanged: if (status === Image.Error) source = headerRoot.fallback;
9191 }
9292 }
qml/Dash/Previews/PreviewIconActions.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020/*! This preview widget icons+label for number of items in widgetData["actions"].
2121 * For each of the items we recognize the fields "label", "icon", "temporaryIcon" and "id".
qml/Dash/Previews/PreviewImageGallery.qml+3−3
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../../Components"
2020
2121/*! This preview widget shows a horizontal list of images.
@@ -62,7 +62,7 @@ PreviewWidget {
6262 source: modelData ? modelData : ""
6363 scaleTo: "height"
6464 initialWidth: units.gu(13)
65− borderSource: mouseArea.pressed ? "radius_pressed.sci" : "radius_idle.sci"
65+ pressed: mouseArea.pressed
6666
6767 MouseArea {
6868 id: mouseArea
qml/Dash/Previews/PreviewMediaToolbar.qmlnew file+36
@@ -0,0 +1,36 @@
1+/*
2+ * Copyright (C) 2015 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import "../../Components"
20+
21+Rectangle {
22+ property alias shareData: sharingWidget.shareData
23+
24+ implicitHeight: units.gu(6)
25+ color: Qt.rgba(0, 0, 0, 0.8)
26+ visible: sharingWidget.visible
27+
28+ PreviewSharing {
29+ id: sharingWidget
30+ anchors {
31+ left: parent.left
32+ verticalCenter: parent.verticalCenter
33+ leftMargin: units.gu(1)
34+ }
35+ }
36+}
qml/Dash/Previews/PreviewOverlay.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../../Components"
2020
2121Rectangle {
@@ -158,7 +158,7 @@ Rectangle {
158158 anchors.centerIn: parent
159159 width: units.gu(2.5)
160160 height: width
161− color: Theme.palette.normal.foregroundText
161+ color: theme.palette.normal.foregroundText
162162 name: "close"
163163 }
164164 }
qml/Dash/Previews/PreviewPayments.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Payments 0.1
2020
2121/*! \brief Preview widget for a purchase button.
qml/Dash/Previews/PreviewProgress.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.DownloadDaemonListener 0.1
2020
2121/*! \brief Preview widget for a progress bar.
qml/Dash/Previews/PreviewRatingDisplay.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../../Components"
2020
2121/*! \brief Preview widget for rating display.
@@ -60,7 +60,7 @@ PreviewWidget {
6060 urlIconEmpty: widgetData["rating-icon-empty"]
6161 urlIconFull: widgetData["rating-icon-full"]
6262 urlIconHalf: widgetData["rating-icon-half"]
63− labelColor: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
63+ labelColor: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
6464 }
6565 }
6666 }
qml/Dash/Previews/PreviewRatingEdit.qml+2−2
@@ -15,7 +15,7 @@
1515 */
1616
1717import QtQuick 2.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
1919import "../../Components"
2020
2121/*! \brief Preview widget for editable rating.
@@ -56,7 +56,7 @@ PreviewWidget {
5656 urlIconEmpty: widgetData["rating-icon-empty"]
5757 urlIconFull: widgetData["rating-icon-full"]
5858 urlIconHalf: widgetData["rating-icon-half"]
59− labelColor: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
59+ labelColor: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
6060 }
6161
6262 PreviewRatingInput {
qml/Dash/Previews/PreviewRatingInput.qml+6−6
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../../Components"
2020
2121/*! \brief Preview widget for rating.
@@ -79,7 +79,7 @@ PreviewWidget {
7979 verticalCenter: parent.verticalCenter
8080 left: parent.left
8181 }
82− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
82+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
8383 opacity: .8
8484 text: widgetData["rating-label"] || i18n.tr("Rate this")
8585 }
@@ -124,7 +124,7 @@ PreviewWidget {
124124 left: parent.left
125125 right: parent.right
126126 }
127− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
127+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
128128 opacity: .8
129129 text: widgetData["review-label"] || i18n.tr("Add a review")
130130 }
@@ -170,7 +170,7 @@ PreviewWidget {
170170 top: parent.top
171171 right: parent.right
172172 }
173− color: readyToSubmit ? Theme.palette.selected.base : Theme.palette.normal.base
173+ color: readyToSubmit ? theme.palette.selected.base : theme.palette.normal.base
174174 text: widgetData["submit-label"] || i18n.tr("Send")
175175 onClicked: {
176176 if (readyToSubmit) root.submit()
qml/Dash/Previews/PreviewRatingSingleDisplay.qml+1−1
@@ -15,7 +15,7 @@
1515 */
1616
1717import QtQuick 2.4
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
1919import "../../Components"
2020
2121Column {
qml/Dash/Previews/PreviewSharing.qmlnew file+105
@@ -0,0 +1,105 @@
1+/*
2+ * Copyright (C) 2015 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Content 1.1
20+
21+Item {
22+ id: root
23+ implicitHeight: button.height
24+ implicitWidth: button.width
25+
26+ property var shareData
27+ readonly property bool isUrlExternal: url && url.indexOf("file:///") != 0 && url.indexOf("/") != 0
28+ readonly property string contentType: shareData ? shareData["contentType"] : ""
29+ readonly property var url: shareData ? shareData["uri"] : ""
30+ readonly property Item rootItem: QuickUtils.rootItem(root)
31+
32+ visible: url != ""
33+
34+ AbstractButton {
35+ id: button
36+ height: units.gu(4)
37+ width: units.gu(4)
38+ onClicked: peerPicker.visible = true
39+
40+ Icon {
41+ anchors.centerIn: parent
42+ height: units.gu(3)
43+ width: units.gu(3)
44+ source: "image://theme/share"
45+ }
46+ }
47+
48+ Component {
49+ id: exportItemComponent
50+ ContentItem {
51+ name: i18n.tr("Preview Share Item")
52+ }
53+ }
54+
55+ Component {
56+ id: contentPeerComponent
57+ ContentPeerPicker {
58+ handler: ContentHandler.Share
59+ contentType: {
60+ // for now, treat all external urls as Links, or it will break contenthub
61+ if (root.isUrlExternal) return ContentType.Links;
62+
63+ switch(root.contentType) {
64+ case "all": return ContentType.All;
65+ case "contacts": return ContentType.Contacts;
66+ case "documents": return ContentType.Documents;
67+ case "links": return ContentType.Links;
68+ case "music": return ContentType.Music;
69+ case "pictures": return ContentType.Pictures;
70+ case "text": return ContentType.Text;
71+ default:
72+ case "unknown": return ContentType.Unknown;
73+ case "videos": return ContentType.Videos;
74+ }
75+ }
76+
77+ onPeerSelected: {
78+ var transfer = peer.request();
79+ if (transfer.state === ContentTransfer.InProgress) {
80+ var items = new Array();
81+ for (var i = 0; i < url.length; i++) {
82+ var exportItem = exportItemComponent.createObject();
83+ exportItem.url = url[i];
84+ items.push(exportItem);
85+ }
86+ transfer.items = items;
87+ transfer.state = ContentTransfer.Charged;
88+ }
89+ peerPicker.visible = false;
90+ }
91+ onCancelPressed: peerPicker.visible = false;
92+ }
93+ }
94+
95+ Loader {
96+ id: peerPicker
97+ objectName: "peerPicker"
98+ parent: rootItem
99+ anchors.fill: parent
100+ visible: false
101+ active: root.visible
102+
103+ sourceComponent: contentPeerComponent
104+ }
105+}
qml/Dash/Previews/PreviewTable.qml+5−5
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import "../../Components"
2121
2222/*! \brief Preview widget for table.
@@ -48,7 +48,7 @@ PreviewWidget {
4848 }
4949 height: visible ? implicitHeight : 0
5050 fontSize: "large"
51− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
51+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
5252 visible: text !== ""
5353 opacity: .8
5454 text: widgetData["title"] || ""
@@ -72,7 +72,7 @@ PreviewWidget {
7272 fontSize: "small"
7373 text: perRowRepeater.model[index]
7474 visible: root.expanded || rowIndex < maximumCollapsedRowCount
75− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
75+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
7676 font.bold: index == 0
7777 wrapMode: Text.Wrap
7878 Layout.alignment: Qt.AlignTop
qml/Dash/Previews/PreviewTextSummary.qml+5−5
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../../Components"
2020
2121/*! \brief Preview widget for text.
@@ -39,7 +39,7 @@ PreviewWidget {
3939 }
4040 height: visible ? implicitHeight : 0
4141 fontSize: "large"
42− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
42+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
4343 visible: text !== ""
4444 opacity: .8
4545 text: widgetData["title"] || ""
@@ -61,7 +61,7 @@ PreviewWidget {
6161 clip: true
6262 fontSize: "small"
6363 lineHeight: 1.2
64− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
64+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText
6565 opacity: .8
6666 text: widgetData["text"] || ""
6767 wrapMode: Text.Wrap
qml/Dash/Previews/PreviewVideoPlayback.qml+15−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Thumbnailer 0.1
2020import "../../Components"
2121
@@ -30,6 +30,8 @@ PreviewWidget {
3030 implicitWidth: units.gu(35)
3131 implicitHeight: childrenRect.height
3232
33+ widgetMargins: -units.gu(1)
34+
3335 LazyImage {
3436 objectName: "screenshot"
3537 anchors {
@@ -51,6 +53,7 @@ PreviewWidget {
5153 return "";
5254 }
5355 initialHeight: width * 10 / 16
56+ useUbuntuShape: false
5457
5558 Image {
5659 objectName: "playButton"
@@ -70,5 +73,15 @@ PreviewWidget {
7073 anchors.fill: parent
7174 onClicked: Qt.openUrlExternally(widgetData["source"])
7275 }
76+
77+ PreviewMediaToolbar {
78+ id: toolbar
79+ anchors {
80+ left: parent.left
81+ right: parent.right
82+ bottom: parent.bottom
83+ }
84+ shareData: widgetData["shareData"]
85+ }
7386 }
7487}
qml/Dash/Previews/PreviewWidget.qml+4−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919/*! Interface for preview widgets. */
2020
@@ -34,6 +34,9 @@ Item {
3434 //! Should the widget show in expanded mode (For those that support it)
3535 property bool expanded: true
3636
37+ //! Set margins width.
38+ property real widgetMargins: units.gu(1)
39+
3740 /*! \brief This signal should be emitted when a preview action was triggered.
3841 *
3942 * \param widgetId, actionId Respective identifiers from widgetData.
qml/Dash/Previews/PreviewWidgetFactory.qml+4−1
@@ -15,7 +15,7 @@
1515 *
1616 */
1717
18−import QtQuick 2.0
18+import QtQuick 2.4
1919
2020//! \brief This component loads the widgets based on widgetData["type"].
2121
@@ -40,6 +40,9 @@ Loader {
4040 //! Set to true if the parent preview is displayed.
4141 property bool isCurrentPreview: false
4242
43+ //! Set margins width.
44+ property real widgetMargins: status === Loader.Ready ? item.widgetMargins : units.gu(1)
45+
4346 //! Triggered signal forwarded from the widgets.
4447 signal triggered(string widgetId, string actionId, var data)
4548
qml/Dash/Previews/PreviewZoomableImage.qml+21−9
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../../Components"
2020
2121/*! \brief Preview widget for image.
@@ -27,7 +27,10 @@ import "../../Components"
2727
2828PreviewWidget {
2929 id: root
30− implicitHeight: units.gu(22)
30+ implicitWidth: units.gu(35)
31+ implicitHeight: lazyImage.height
32+
33+ widgetMargins: -units.gu(1)
3134
3235 property Item rootItem: QuickUtils.rootItem(root)
3336
@@ -35,15 +38,14 @@ PreviewWidget {
3538 id: lazyImage
3639 objectName: "lazyImage"
3740 anchors {
38− top: parent.top
39− bottom: parent.bottom
40− horizontalCenter: parent.horizontalCenter
41+ left: parent.left
42+ right: parent.right
4143 }
42− scaleTo: "height"
44+ scaleTo: "width"
4345 source: widgetData["source"]
4446 asynchronous: true
45−
46− borderSource: mouseArea.pressed ? "radius_pressed.sci" : "radius_idle.sci"
47+ useUbuntuShape: false
48+ pressed: mouseArea.pressed
4749
4850 MouseArea {
4951 id: mouseArea
@@ -62,6 +64,16 @@ PreviewWidget {
6264 // But at the moment the model never changes
6365 onStatusChanged: if (lazyImage.sourceImage.status === Image.Error) lazyImage.sourceImage.source = widgetData["fallback"];
6466 }
67+
68+ PreviewMediaToolbar {
69+ id: toolbar
70+ anchors {
71+ left: parent.left
72+ right: parent.right
73+ bottom: parent.bottom
74+ }
75+ shareData: widgetData["shareData"]
76+ }
6577 }
6678
6779 PreviewOverlay {
qml/Dash/PullToRefreshScopeStyle.qml+3−3
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
19−import Ubuntu.Components.Styles 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Components.Styles 1.3
2020
2121/**
2222 * TODO: Once the SDK version of PullToRefreshStyle doesn't have bug 1375799
qml/Dash/ScopeListView.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Dash 0.1
1919
2020ListViewWithPageHeader {
qml/Dash/ScopeSettings/ScopeSetting.qml+11−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020/*! Interface for settings widgets. */
2121
@@ -32,6 +32,15 @@ Item {
3232 */
3333 signal updated(var value)
3434
35+ /*! \brief This signal should be emitted when widget gains the focus
36+ * and input method popups.
37+ * And preview widget should reposition in visible area to avoid
38+ * keyboard appears over the widget.
39+ *
40+ * \param item, id of specified item which is needed to reposition.
41+ */
42+ signal makeSureVisible(var item)
43+
3544 //! \internal
3645 readonly property real settingMargins: units.gu(2)
3746}
qml/Dash/ScopeSettings/ScopeSettingBoolean.qml+5−5
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
19−import Ubuntu.Components.ListItems 1.0 as ListItem
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Components.ListItems 1.3 as ListItem
2020
2121ScopeSetting {
2222 id: root
@@ -44,7 +44,7 @@ ScopeSetting {
4444 elide: Text.ElideMiddle
4545 maximumLineCount: 2
4646 wrapMode: Text.Wrap
47− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
47+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
4848 }
4949
5050 CheckBox {
qml/Dash/ScopeSettings/ScopeSettingList.qml+3−3
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
19−import Ubuntu.Components.ListItems 1.0 as ListItem
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Components.ListItems 1.3 as ListItem
2020
2121ScopeSetting {
2222 id: root
qml/Dash/ScopeSettings/ScopeSettingNumber.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
17+import QtQuick 2.4
1818
1919ScopeSettingString {
2020 mode: "number"
qml/Dash/ScopeSettings/ScopeSettingString.qml+12−6
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
19−import Ubuntu.Components.ListItems 1.0 as ListItem
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Components.ListItems 1.3 as ListItem
2020
2121ScopeSetting {
2222 id: root
@@ -44,7 +44,7 @@ ScopeSetting {
4444 elide: Text.ElideMiddle
4545 maximumLineCount: 2
4646 wrapMode: Text.Wrap
47− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
47+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
4848 }
4949
5050 TextField {
@@ -57,7 +57,7 @@ ScopeSetting {
5757 }
5858 width: root.mode == "number" ? units.gu(8) : units.gu(12)
5959 text: widgetData.value
60− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.fieldText
60+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.fieldText
6161 validator: root.mode == "number" ? doubleValidator : null
6262 hasClearButton: root.mode == "number" ? false : true
6363
@@ -78,6 +78,12 @@ ScopeSetting {
7878 updateText();
7979 }
8080 }
81+
82+ readonly property bool inputMethodVisible: Qt.inputMethod.visible
83+ onInputMethodVisibleChanged: {
84+ if(inputMethodVisible && activeFocus)
85+ root.makeSureVisible(control);
86+ }
8187 }
8288 }
8389}
qml/Dash/ScopeSettings/ScopeSettingsWidgetFactory.qml+5−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
17+import QtQuick 2.4
1818
1919//! \brief This component loads the widgets based on type.
2020
@@ -30,6 +30,9 @@ Loader {
3030 //! Triggered signal forwarded from the widgets.
3131 signal updated(var value)
3232
33+ //! makeSureVisible signal forwarded from the widgets.
34+ signal makeSureVisible(var item)
35+
3336 source: widgetSource
3437
3538 //! \cond private
@@ -53,5 +56,6 @@ Loader {
5356 Connections {
5457 target: root.item
5558 onUpdated: if (value !== widgetData.value) root.updated(value)
59+ onMakeSureVisible: root.makeSureVisible(item)
5660 }
5761}
qml/Dash/ScopeSettingsPage.qml+12−3
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Unity 0.2
2020import "../Components"
2121import "ScopeSettings"
@@ -28,7 +28,7 @@ Item {
2828
2929 signal backClicked()
3030
31− PageHeader {
31+ DashPageHeader {
3232 id: header
3333 objectName: "pageHeader"
3434 width: parent.width
@@ -51,6 +51,11 @@ Item {
5151 model: root.scope ? root.scope.settings : null
5252 clip: true
5353
54+ ListViewOSKScroller {
55+ id: oskScroller
56+ list: scopeSettings
57+ }
58+
5459 delegate: ScopeSettingsWidgetFactory {
5560 objectName: "scopeSettingItem" + index
5661 width: root.width
@@ -58,6 +63,10 @@ Item {
5863 scopeStyle: root.scopeStyle
5964
6065 onUpdated: model.value = value;
66+
67+ onMakeSureVisible: { // var item
68+ oskScroller.setMakeSureVisibleItem(item);
69+ }
6170 }
6271 }
6372}
qml/Dash/ScopesList.qml+2−2
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818import Dash 0.1
1919
2020Item {
@@ -61,7 +61,7 @@ Item {
6161 value: root.scope ? root.scope.searchQuery : ""
6262 }
6363
64− PageHeader {
64+ DashPageHeader {
6565 id: header
6666 objectName: "pageHeader"
6767 title: i18n.tr("Manage")
qml/Dash/ScopesListCategory.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Dash 0.1
2020import "../Components/ListItems" as ListItems
2121
@@ -43,7 +43,7 @@ Item {
4343 id: header
4444 width: root.width
4545 height: units.gu(5)
46− color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
46+ color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
4747 }
4848
4949 readonly property double listItemHeight: units.gu(6)
qml/Dash/ScopesListCategoryItem.qml+4−4
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
2020
2121MouseArea {
2222 id: root
@@ -49,10 +49,10 @@ MouseArea {
4949 width: units.gu(5)
5050 height: units.gu(5)
5151 visible: !hideChildren
52− image: Image {
52+ sourceFillMode: UbuntuShape.PreserveAspectCrop
53+ source: Image {
5354 id: shapeImage
5455 cache: true
55− fillMode: Image.PreserveAspectCrop
5656 sourceSize { width: shape.width; height: shape.height }
5757 }
5858 }
qml/DeviceConfiguration.qml+3−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919QtObject {
2020 id: root
@@ -98,6 +98,7 @@ QtObject {
9898 PropertyChanges {
9999 target: priv
100100 landscapeOrientation: Qt.InvertedLandscapeOrientation
101+ invertedLandscapeOrientation: Qt.LandscapeOrientation
101102 primaryOrientation: Qt.InvertedLandscapeOrientation
102103 category: "tablet"
103104 }
@@ -107,6 +108,7 @@ QtObject {
107108 PropertyChanges {
108109 target: priv
109110 category: "desktop"
111+ supportedOrientations: root.useNativeOrientation
110112 }
111113 }
112114 ]
qml/Greeter/Clock.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../Panel/Indicators"
2020import Unity.Indicators 0.1 as Indicators
2121
qml/Greeter/CoverPage.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Gestures 0.1
2020import "../Components"
2121
qml/Greeter/Dot.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919Image {
2020 states: [
qml/Greeter/Greeter.qml+2−2
@@ -14,10 +14,10 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818import AccountsService 0.1
1919import GSettings 1.0
20−import Ubuntu.Components 1.1
20+import Ubuntu.Components 1.3
2121import Ubuntu.SystemImage 0.1
2222import Unity.Launcher 0.1
2323import "../Components"
qml/Greeter/Infographics.qml+2−2
@@ -16,8 +16,8 @@
1616
1717import "../Components"
1818import "Gradient.js" as Gradient
19−import QtQuick 2.0
20−import Ubuntu.Components 0.1
19+import QtQuick 2.4
20+import Ubuntu.Components 1.3
2121
2222Item {
2323 id: infographic
qml/Greeter/IntegratedLightDMImpl.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818import IntegratedLightDM 0.1 as LightDM
1919
2020Item{
qml/Greeter/LightDM.qml+1−1
@@ -19,7 +19,7 @@
1919 * plugin
2020 */
2121
22−import QtQuick 2.3
22+import QtQuick 2.4
2323
2424Loader {
2525 id: loader
qml/Greeter/LoginList.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../Components"
2020
2121Item {
qml/Greeter/NarrowView.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../Components"
2020
2121FocusScope {
qml/Greeter/ObjectPositioner.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Item {
2121 property int count
qml/Greeter/ShimGreeter.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818
1919/*
2020 * This is a shim greeter that is only used to provide a shell,
qml/Greeter/WideView.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020FocusScope {
2121 id: root
qml/Launcher/FoldingLauncherDelegate.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020LauncherDelegate {
2121 id: root
qml/Launcher/Launcher.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import "../Components"
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import Ubuntu.Gestures 0.1
2121import Unity.Launcher 0.1
2222
qml/Launcher/LauncherDelegate.qml+7−8
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Item {
2121 id: root
@@ -130,13 +130,12 @@ Item {
130130 anchors.fill: parent
131131 anchors.margins: units.gu(1)
132132 radius: "medium"
133− borderSource: "none"
134−
135− image: Image {
133+ aspect: UbuntuShape.Flat
134+ sourceFillMode: UbuntuShape.PreserveAspectCrop
135+ source: Image {
136136 id: iconImage
137137 sourceSize.width: iconShape.width
138138 sourceSize.height: iconShape.height
139− fillMode: Image.PreserveAspectCrop
140139 source: root.iconName
141140 }
142141 }
@@ -159,9 +158,9 @@ Item {
159158 }
160159 width: Math.min(root.itemWidth, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))
161160 height: units.gu(2)
162− color: UbuntuColors.orange
161+ backgroundColor: UbuntuColors.orange
163162 visible: root.countVisible
164− borderSource: "none"
163+ aspect: UbuntuShape.Flat
165164
166165 Label {
167166 id: countLabel
qml/Launcher/LauncherPanel.qml+6−6
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.2
19−import Ubuntu.Components.ListItems 1.0 as ListItems
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Components.ListItems 1.3 as ListItems
2020import Unity.Launcher 0.1
21−import Ubuntu.Components.Popups 0.1
21+import Ubuntu.Components.Popups 1.3
2222import "../Components/ListItems"
2323import "../Components/"
2424
@@ -61,8 +61,8 @@ Rectangle {
6161 fill: parent
6262 topMargin: -units.gu(2)
6363 }
64− borderSource: "none"
65− color: UbuntuColors.orange
64+ aspect: UbuntuShape.Flat
65+ backgroundColor: UbuntuColors.orange
6666 }
6767
6868 Image {
qml/Notifications/Notification.qml+14−15
@@ -14,14 +14,14 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import QtMultimedia 5.0
17+import QtQuick 2.4
1918import Powerd 0.1
20−import Ubuntu.Components 1.2
19+import Ubuntu.Components 1.3
20+import Ubuntu.Components.ListItems 1.3 as ListItem
2121import Unity.Notifications 1.0
2222import QMenuModel 0.1
2323import Utils 0.1
24−import Ubuntu.Components.ListItems 0.1 as ListItem
24+import "../Components"
2525
2626Item {
2727 id: notification
@@ -80,10 +80,9 @@ Item {
8080 return result;
8181 }
8282
83− Audio {
83+ NotificationAudio {
8484 id: sound
8585 objectName: "sound"
86− audioRole: MediaPlayer.alert
8786 source: hints["suppress-sound"] !== "true" && hints["sound-file"] !== undefined ? hints["sound-file"] : ""
8887 }
8988
@@ -153,10 +152,10 @@ Item {
153152 rightMargin: notification.margins
154153 topMargin: type === Notification.Confirmation ? units.gu(.5) : 0
155154 }
156− color: parent.color
155+ backgroundColor: parent.color
157156 opacity: parent.opacity
158157 radius: "medium"
159− borderSource: "none"
158+ aspect: UbuntuShape.Flat
160159 }
161160
162161 Rectangle {
@@ -282,7 +281,7 @@ Item {
282281 }
283282 visible: type !== Notification.Confirmation
284283 fontSize: "medium"
285− color: darkOnBright ? sdFontColor : Theme.palette.selected.backgroundText
284+ color: darkOnBright ? sdFontColor : theme.palette.selected.backgroundText
286285 elide: Text.ElideRight
287286 textFormat: Text.PlainText
288287 }
@@ -297,7 +296,7 @@ Item {
297296 }
298297 visible: body != "" && type !== Notification.Confirmation
299298 fontSize: "small"
300− color: darkOnBright ? sdFontColor : Theme.palette.selected.backgroundText
299+ color: darkOnBright ? sdFontColor : theme.palette.selected.backgroundText
301300 wrapMode: Text.WordWrap
302301 maximumLineCount: type == Notification.SnapDecision ? 12 : 2
303302 elide: Text.ElideRight
@@ -338,7 +337,7 @@ Item {
338337 anchors.horizontalCenter: parent.horizontalCenter
339338 visible: type === Notification.Confirmation && body !== ""
340339 fontSize: "medium"
341− color: darkOnBright ? sdFontColor : Theme.palette.selected.backgroundText
340+ color: darkOnBright ? sdFontColor : theme.palette.selected.backgroundText
342341 wrapMode: Text.WordWrap
343342 maximumLineCount: 1
344343 elide: Text.ElideRight
@@ -358,8 +357,8 @@ Item {
358357 }
359358
360359 height: units.gu(1)
361− color: darkOnBright ? UbuntuColors.darkGrey : UbuntuColors.lightGrey
362− borderSource: "none"
360+ backgroundColor: darkOnBright ? UbuntuColors.darkGrey : UbuntuColors.lightGrey
361+ aspect: UbuntuShape.Flat
363362 radius: "small"
364363
365364 UbuntuShape {
@@ -367,8 +366,8 @@ Item {
367366 objectName: "innerBar"
368367 width: valueIndicator.width * valueIndicator.value / 100
369368 height: units.gu(1)
370− color: notification.hints["x-canonical-value-bar-tint"] === "true" ? UbuntuColors.orange : darkOnBright ? UbuntuColors.lightGrey : "white"
371− borderSource: "none"
369+ backgroundColor: notification.hints["x-canonical-value-bar-tint"] === "true" ? UbuntuColors.orange : darkOnBright ? UbuntuColors.lightGrey : "white"
370+ aspect: UbuntuShape.Flat
372371 radius: "small"
373372 }
374373 }
qml/Notifications/NotificationMenuItemFactory.qml+2−2
@@ -17,8 +17,8 @@
1717 * Nick Dedekind <nick.dedekind@canonical.com>
1818 */
1919
20−import QtQuick 2.0
21−import Ubuntu.Components 0.1
20+import QtQuick 2.4
21+import Ubuntu.Components 1.3
2222import QMenuModel 0.1
2323import "../Components"
2424
qml/Notifications/Notifications.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Unity.Notifications 1.0 as UnityNotifications
2020import Utils 0.1
2121import "../Components"
qml/Notifications/OptionToggle.qml+7−7
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,10 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Ubuntu.Components.ListItems 0.1 as ListItem
20−import Ubuntu.Components.Popups 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Components.ListItems 1.3 as ListItem
20+import Ubuntu.Components.Popups 1.3
2121
2222UbuntuShape {
2323 id: optionToggle
@@ -29,8 +29,8 @@ UbuntuShape {
2929
3030 signal triggered(string id)
3131
32− color: Theme.palette.normal.base
33− borderSource: "none"
32+ backgroundColor: theme.palette.normal.base
33+ aspect: UbuntuShape.Flat
3434 height: expanded ? (optionToggleRepeater.count - startIndex) * itemHeight : itemHeight
3535 width: parent.width
3636 radius: "medium"
qml/Notifications/ShapedIcon.qml+3−3
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2013 Canonical, Ltd.
2+ * Copyright (C) 2013,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.2
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Item {
2121 property string fileSource
qml/Notifications/SwipeToAct.qml+10−10
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.2
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Item {
2121 id: swipeToAct
@@ -98,8 +98,8 @@ Item {
9898 id: row
9999 width: parent.width
100100 height: priv.sliderHeight
101− color: priv.sliderBGColor
102− borderSource: "none"
101+ backgroundColor: priv.sliderBGColor
102+ aspect: UbuntuShape.Flat
103103 visible: !clickToAct
104104
105105 UbuntuShape {
@@ -108,8 +108,8 @@ Item {
108108 anchors.top: parent.top
109109 anchors.left: parent.left
110110 anchors.margins: priv.gap
111− color: UbuntuColors.red
112− borderSource: "none"
111+ backgroundColor: UbuntuColors.red
112+ aspect: UbuntuShape.Flat
113113
114114 state: "normal"
115115 height: units.gu(6)
@@ -187,10 +187,10 @@ Item {
187187 }
188188
189189 z: 1
190− color: priv.sliderMainColor
190+ backgroundColor: priv.sliderMainColor
191191 height: units.gu(6)
192192 width: units.gu(6)
193− borderSource: "none"
193+ aspect: UbuntuShape.Flat
194194 radius: "medium"
195195 Icon {
196196 anchors.fill: parent
@@ -226,8 +226,8 @@ Item {
226226 anchors.top: parent.top
227227 anchors.right: parent.right
228228 anchors.margins: priv.gap
229− color: UbuntuColors.green
230− borderSource: "none"
229+ backgroundColor: UbuntuColors.green
230+ aspect: UbuntuShape.Flat
231231
232232 state: "normal"
233233 height: units.gu(6)
qml/OrientedShell.qml+6−6
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import QtQuick.Window 2.0
17+import QtQuick 2.4
18+import QtQuick.Window 2.2
1919import Unity.Session 0.1
2020import GSettings 1.0
2121import "Components"
@@ -23,7 +23,7 @@ import "Components/UnityInputInfo"
2323import "Rotation"
2424// Backup Workaround https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1473471
2525// in case we remove the UnityInputInfo import
26−import Ubuntu.Components 1.2
26+import Ubuntu.Components 1.3
2727
2828Rectangle {
2929 id: root
@@ -89,8 +89,8 @@ Rectangle {
8989
9090 // we must rotate to a supported orientation regardless of shell's preference
9191 property bool orientationChangesEnabled:
92− (orientation & supportedOrientations) === 0 ? true
93− : shell.orientationChangesEnabled
92+ (shell.orientation & supportedOrientations) === 0 ? true
93+ : shell.orientationChangesEnabled
9494
9595
9696 Binding {
@@ -107,7 +107,7 @@ Rectangle {
107107
108108 readonly property int supportedOrientations: shell.supportedOrientations
109109 & (deviceConfiguration.supportedOrientations == deviceConfiguration.useNativeOrientation
110− ? nativeOrientation
110+ ? orientations.native_
111111 : deviceConfiguration.supportedOrientations)
112112
113113 property int acceptedOrientationAngle: {
qml/Panel/ActiveCallHint.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Ubuntu.Telephony 0.1 as Telephony
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import Unity.Application 0.1
2121import "../Components"
2222
qml/Panel/Handle.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Rectangle {
2121 id: handle
qml/Panel/IndicatorItem.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Settings.Components 0.1
2020import "Indicators"
2121
qml/Panel/IndicatorItemRow.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Item {
2121 id: root
qml/Panel/IndicatorPage.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1 as Components
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3 as Components
1919import Unity.Indicators 0.1 as Indicators
2020import "Indicators"
2121
qml/Panel/Indicators/IndicatorBase.qml+1−1
@@ -17,7 +17,7 @@
1717 * Nick Dedekind <nick.dedekind@canonical.com>
1818 */
1919
20−import QtQuick 2.0
20+import QtQuick 2.4
2121import Unity.Indicators 0.1
2222
2323Item {
qml/Panel/Indicators/IndicatorDelegate.qml+1−1
@@ -17,7 +17,7 @@
1717 * Nick Dedekind <nick.dedekind@canonical.com>
1818 */
1919
20−import QtQuick 2.0
20+import QtQuick 2.4
2121
2222IndicatorBase {
2323 readonly property bool indicatorVisible: rootActionState.indicatorVisible
qml/Panel/Indicators/IndicatorsLight.qml+1−1
@@ -17,7 +17,7 @@
1717 * Renato Araujo Oliveira Filho <renato@canonical.com>
1818 */
1919
20−import QtQuick 2.0
20+import QtQuick 2.4
2121import Powerd 0.1
2222import Lights 0.1
2323import QMenuModel 0.1 as QMenuModel
qml/Panel/Indicators/MenuItemFactory.qml+5−5
@@ -14,12 +14,12 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Ubuntu.Settings.Menus 0.1 as Menus
1919import Ubuntu.Settings.Components 0.1
2020import QMenuModel 0.1
2121import Utils 0.1 as Utils
22−import Ubuntu.Components.ListItems 0.1 as ListItems
22+import Ubuntu.Components.ListItems 1.3 as ListItems
2323import Ubuntu.Components 1.3
2424import Unity.Session 0.1
2525
@@ -249,7 +249,7 @@ Item {
249249 name: "settings"
250250 height: units.gu(3)
251251 width: height
252− color: Theme.palette.selected.backgroundText
252+ color: theme.palette.selected.backgroundText
253253 }
254254 }
255255 }
@@ -281,7 +281,7 @@ Item {
281281 source: menuData.icon
282282 height: units.gu(3)
283283 width: height
284− color: Theme.palette.selected.backgroundText
284+ color: theme.palette.selected.backgroundText
285285 }
286286 }
287287 }
@@ -928,7 +928,7 @@ Item {
928928 enabled: menuData && menuData.sensitive || false
929929 highlightWhenPressed: false
930930 text: menuData && menuData.label || ""
931− foregroundColor: Theme.palette.normal.backgroundText
931+ foregroundColor: theme.palette.normal.backgroundText
932932
933933 onMenuModelChanged: {
934934 loadAttributes();
qml/Panel/Indicators/MessageMenuItemFactory.qml+1−1
@@ -18,7 +18,7 @@
1818 * Olivier Tilloy <olivier.tilloy@canonical.com>
1919 */
2020
21−import QtQuick 2.0
21+import QtQuick 2.4
2222import Ubuntu.Components 1.3
2323import Ubuntu.Settings.Menus 0.1 as Menus
2424import QMenuModel 0.1 as QMenuModel
qml/Panel/Indicators/ModemInfoItem.qml+6−6
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU Lesser General Public License as published by
@@ -14,10 +14,10 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
19−import Ubuntu.Components 0.1
20−import Ubuntu.Components.ListItems 0.1 as ListItem
19+import Ubuntu.Components 1.3
20+import Ubuntu.Components.ListItems 1.3 as ListItem
2121
2222ListItem.Empty {
2323 id: menu
@@ -65,7 +65,7 @@ ListItem.Empty {
6565 height: parent.height
6666 Icon {
6767 id: statusIcon
68− color: Theme.palette.selected.backgroundText
68+ color: theme.palette.selected.backgroundText
6969
7070 Layout.preferredHeight: parent.height
7171 Layout.preferredWidth: Layout.preferredHeight
@@ -75,7 +75,7 @@ ListItem.Empty {
7575
7676 Icon {
7777 id: iconConnectivity
78− color: Theme.palette.selected.backgroundText
78+ color: theme.palette.selected.backgroundText
7979
8080 Layout.preferredHeight: parent.height
8181 Layout.preferredWidth: Layout.preferredHeight
qml/Panel/Indicators/RoamingIndication.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU Lesser General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020
2121RowLayout {
2222 spacing: units.gu(0.5)
@@ -30,7 +30,7 @@ RowLayout {
3030
3131 Icon {
3232 id: iconRoaming
33− color: Theme.palette.selected.backgroundText
33+ color: theme.palette.selected.backgroundText
3434
3535 Layout.preferredHeight: parent.height
3636 Layout.preferredWidth: Layout.preferredHeight
qml/Panel/Indicators/client/IndicatorRepresentation.qml+3−3
@@ -18,9 +18,9 @@
1818 * Nick Dedekind <nick.dedekind@canonical.com>
1919 */
2020
21−import QtQuick 2.0
22−import Ubuntu.Components 0.1
23−import Ubuntu.Components.ListItems 0.1 as ListItem
21+import QtQuick 2.4
22+import Ubuntu.Components 1.3
23+import Ubuntu.Components.ListItems 1.3 as ListItem
2424import "../.."
2525
2626Page {
qml/Panel/Indicators/client/IndicatorsClient.qml+4−4
@@ -17,16 +17,16 @@
1717 * Renato Araujo Oliveira Filho <renato@canonical.com>
1818 */
1919
20−import QtQuick 2.0
21−import Ubuntu.Components 0.1
22−import Ubuntu.Components.ListItems 0.1 as ListItem
20+import QtQuick 2.4
21+import Ubuntu.Components 1.3
22+import Ubuntu.Components.ListItems 1.3 as ListItem
2323
2424Rectangle {
2525 color: "black"
2626 id: root
2727
2828 Component.onCompleted: {
29− Theme.name = "Ubuntu.Components.Themes.SuruGradient"
29+ theme.name = "Ubuntu.Components.Themes.SuruGradient"
3030 }
3131
3232 PageStack {
qml/Panel/Indicators/client/IndicatorsList.qml+3−3
@@ -17,9 +17,9 @@
1717 * Renato Araujo Oliveira Filho <renato@canonical.com>
1818 */
1919
20−import QtQuick 2.0
21−import Ubuntu.Components 0.1
22−import Ubuntu.Components.ListItems 0.1 as ListItem
20+import QtQuick 2.4
21+import Ubuntu.Components 1.3
22+import Ubuntu.Components.ListItems 1.3 as ListItem
2323import Unity.Indicators 0.1 as Indicators
2424import "../.."
2525
qml/Panel/Indicators/client/IndicatorsTree.qml+2−2
@@ -17,8 +17,8 @@
1717 * Nick Dedekind <nick.dededkind@canonical.com>
1818 */
1919
20−import QtQuick 2.0
21−import Ubuntu.Components 0.1
20+import QtQuick 2.4
21+import Ubuntu.Components 1.3
2222import Unity.Indicators 0.1 as Indicators
2323import ".."
2424
qml/Panel/IndicatorsBar.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../Components"
2020
2121Item {
qml/Panel/IndicatorsMenu.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Gestures 0.1
2020import "../Components"
2121import "Indicators"
qml/Panel/MenuContent.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
2020import Unity.Indicators 0.1 as Indicators
2121import Utils 0.1
2222import "../Components"
qml/Panel/Panel.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Unity.Application 0.1
2020import "../Components"
2121import "../Components/PanelState"
qml/Panel/PanelBackground.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919Rectangle {
2020 color: "black"
qml/Panel/PanelSeparatorLine.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919Rectangle {
2020 property real saturation: 1.0
qml/Panel/PanelVelocityCalculator.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
17+import QtQuick 2.4
1818import Ubuntu.Gestures 0.1
1919
2020Item {
qml/Rotation/HalfLoopRotationAnimation.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818
1919SequentialAnimation {
2020 id: root
qml/Rotation/ImmediateRotationAction.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818
1919ScriptAction {
2020 property var info
qml/Rotation/NinetyRotationAnimation.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818
1919SequentialAnimation {
2020 id: root
qml/Rotation/RotationStates.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Powerd 0.1
2020
2121// Why the state machine is done that way:
qml/ScopeTool.qml+3−3
@@ -14,9 +14,9 @@
1414* along with this program. If not, see <http://www.gnu.org/licenses/>.
1515*/
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Ubuntu.Components.Popups 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Components.Popups 1.3
2020import Ubuntu.Thumbnailer 0.1 // Register support for image://thumbnailer/ and image://albumart/
2121import Utils 0.1
2222import Unity 0.2
qml/Shell.qml+8−8
@@ -14,12 +14,12 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import QtQuick.Window 2.0
17+import QtQuick 2.4
18+import QtQuick.Window 2.2
1919import AccountsService 0.1
2020import Unity.Application 0.1
21−import Ubuntu.Components 0.1
22−import Ubuntu.Components.Popups 1.0
21+import Ubuntu.Components 1.3
22+import Ubuntu.Components.Popups 1.3
2323import Ubuntu.Gestures 0.1
2424import Ubuntu.Telephony 0.1 as Telephony
2525import Unity.Connectivity 0.1
@@ -85,7 +85,7 @@ Item {
8585 } else if (greeter && greeter.shown) {
8686 return Qt.PrimaryOrientation;
8787 } else if (mainApp) {
88− return mainApp.supportedOrientations;
88+ return shell.orientations.map(mainApp.supportedOrientations);
8989 } else {
9090 // we just don't care
9191 return Qt.PortraitOrientation
@@ -139,7 +139,7 @@ Item {
139139 }
140140
141141 Component.onCompleted: {
142− Theme.name = "Ubuntu.Components.Themes.SuruGradient"
142+ theme.name = "Ubuntu.Components.Themes.SuruGradient"
143143 if (ApplicationManager.count > 0) {
144144 ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
145145 }
@@ -172,8 +172,8 @@ Item {
172172 }
173173
174174 WindowKeysFilter {
175− Keys.onPressed: physicalKeysMapper.onKeyPressed(event);
176− Keys.onReleased: physicalKeysMapper.onKeyReleased(event);
175+ Keys.onPressed: physicalKeysMapper.onKeyPressed(event, currentEventTimestamp);
176+ Keys.onReleased: physicalKeysMapper.onKeyReleased(event, currentEventTimestamp);
177177 }
178178
179179 HomeKeyWatcher {
qml/Stages/Animations/BaseSessionAnimation.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919/* This is the base case for surface animations, used when adding/removing * child surfaces.
2020 * The class is meant to be overridden and changes/animations provided for state changes.
qml/Stages/Animations/SwipeFromBottomAnimation.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020BaseSessionAnimation {
2121 id: animation
qml/Stages/ApplicationWindow.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Unity.Application 0.1
2020
2121FocusScope {
qml/Stages/DecoratedWindow.qml+2−2
@@ -16,8 +16,8 @@
1616 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
1717 */
1818
19−import QtQuick 2.3
20−import Ubuntu.Components 1.1
19+import QtQuick 2.4
20+import Ubuntu.Components 1.3
2121import Unity.Application 0.1
2222
2323FocusScope {
qml/Stages/DesktopSpread.qml+1−1
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.4
1818import QtQuick.Layouts 1.1
19−import Ubuntu.Components 1.2
19+import Ubuntu.Components 1.3
2020import Ubuntu.Gestures 0.1
2121import Unity.Application 0.1
2222
qml/Stages/DesktopSpreadDelegate.qml+2−2
@@ -16,8 +16,8 @@
1616 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
1717 */
1818
19−import QtQuick 2.3
20−import Ubuntu.Components 1.1
19+import QtQuick 2.4
20+import Ubuntu.Components 1.3
2121import Unity.Application 0.1
2222
2323Item {
qml/Stages/DesktopStage.qml+79−8
@@ -18,7 +18,7 @@
1818
1919import QtQuick 2.4
2020import QtQuick.Layouts 1.1
21−import Ubuntu.Components 1.1
21+import Ubuntu.Components 1.3
2222import Unity.Application 0.1
2323import "../Components"
2424import "../Components/PanelState"
@@ -68,6 +68,22 @@ AbstractStage {
6868 var index = indexOf(focusedAppId);
6969 return index >= 0 && index < appRepeater.count ? appRepeater.itemAt(index) : null
7070 }
71+ property int foregroundMaximizedAppIdIndex: -1
72+
73+ function updateForegroundMaximizedApp() {
74+ for (var i = 0; i < appRepeater.count; i++) {
75+ var item = appRepeater.itemAt(i);
76+
77+ if (item && item.visuallyMaximized) {
78+ var app = ApplicationManager.get(i);
79+ if (app) {
80+ foregroundMaximizedAppIdIndex = i;
81+ return;
82+ }
83+ }
84+ }
85+ foregroundMaximizedAppIdIndex = -1;
86+ }
7187
7288 function indexOf(appId) {
7389 for (var i = 0; i < ApplicationManager.count; i++) {
@@ -114,8 +130,12 @@ AbstractStage {
114130 model: ApplicationManager
115131 objectName: "appRepeater"
116132
133+ onItemAdded: priv.updateForegroundMaximizedApp()
134+ onItemRemoved: priv.updateForegroundMaximizedApp()
135+
117136 delegate: FocusScope {
118137 id: appDelegate
138+ objectName: "stageDelegate_" + model.appId
119139 z: ApplicationManager.count - index
120140 y: units.gu(3)
121141 width: units.gu(60)
@@ -126,12 +146,25 @@ AbstractStage {
126146 property bool minimized: false
127147 property bool animationsEnabled: true
128148
149+ property bool visuallyMaximized: false
150+ property bool visuallyMinimized: false
151+
129152 onFocusChanged: {
130153 if (focus && ApplicationManager.focusedApplicationId !== model.appId) {
131154 ApplicationManager.focusApplication(model.appId);
132155 }
133156 }
134157
158+ onZChanged: priv.updateForegroundMaximizedApp()
159+ onVisuallyMaximizedChanged: priv.updateForegroundMaximizedApp()
160+
161+ visible: !visuallyMinimized &&
162+ !greeter.fullyShown &&
163+ (priv.foregroundMaximizedAppIdIndex === -1 || priv.foregroundMaximizedAppIdIndex >= index) ||
164+ (spread.state == "altTab" && index === spread.highlightedIndex)
165+
166+ onVisibleChanged: console.log("VISIBLE", model.appId, visible)
167+
135168 Binding {
136169 target: ApplicationManager.get(index)
137170 property: "requestedState"
@@ -161,23 +194,60 @@ AbstractStage {
161194
162195 states: [
163196 State {
164− name: "normal"; when: !appDelegate.maximized && !appDelegate.minimized
197+ name: "normal";
198+ when: !appDelegate.maximized && !appDelegate.minimized
199+ PropertyChanges {
200+ target: appDelegate;
201+ visuallyMinimized: false;
202+ visuallyMaximized: false
203+ }
165204 },
166205 State {
167206 name: "maximized"; when: appDelegate.maximized
168− PropertyChanges { target: appDelegate; x: 0; y: 0; width: root.width; height: root.height }
207+ PropertyChanges {
208+ target: appDelegate;
209+ x: 0; y: 0;
210+ width: root.width; height: root.height;
211+ visuallyMinimized: false;
212+ visuallyMaximized: true
213+ }
169214 },
170215 State {
171216 name: "minimized"; when: appDelegate.minimized
172− PropertyChanges { target: appDelegate; x: -appDelegate.width / 2; scale: units.gu(5) / appDelegate.width; opacity: 0 }
217+ PropertyChanges {
218+ target: appDelegate;
219+ x: -appDelegate.width / 2;
220+ scale: units.gu(5) / appDelegate.width;
221+ opacity: 0
222+ visuallyMinimized: true;
223+ visuallyMaximized: false
224+ }
173225 }
174226 ]
175227 transitions: [
176228 Transition {
177− from: "maximized,minimized,normal,"
178− to: "maximized,minimized,normal,"
229+ to: "normal"
230+ enabled: appDelegate.animationsEnabled
231+ PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
232+ PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale,opacity" }
233+ },
234+ Transition {
235+ to: "maximized"
179236 enabled: appDelegate.animationsEnabled
180− PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale" }
237+ PropertyAction { target: appDelegate; property: "visuallyMinimized" }
238+ SequentialAnimation {
239+ PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale,opacity" }
240+ PropertyAction { target: appDelegate; property: "visuallyMaximized" }
241+ }
242+ },
243+ Transition {
244+ to: "minimized"
245+ enabled: appDelegate.animationsEnabled
246+ PropertyAction { target: appDelegate; property: "visuallyMaximized" }
247+ SequentialAnimation {
248+ PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale,opacity" }
249+ PropertyAction { target: appDelegate; property: "visuallyMinimized" }
250+ }
181251 },
182252 Transition {
183253 from: ""
@@ -202,6 +272,7 @@ AbstractStage {
202272 }
203273
204274 WindowResizeArea {
275+ objectName: "windowResizeArea"
205276 target: appDelegate
206277 minWidth: units.gu(10)
207278 minHeight: units.gu(10)
@@ -223,7 +294,7 @@ AbstractStage {
223294 focus: true
224295
225296 onClose: ApplicationManager.stopApplication(model.appId)
226− onMaximize: appDelegate.maximize()
297+ onMaximize: appDelegate.maximized ? appDelegate.unmaximize() : appDelegate.maximize()
227298 onMinimize: appDelegate.minimize()
228299 onDecorationPressed: { ApplicationManager.focusApplication(model.appId) }
229300 }
qml/Stages/MainViewStyle.qml+35−27
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2012 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU Lesser General Public License as published by
@@ -13,51 +13,60 @@
1313 * You should have received a copy of the GNU Lesser General Public License
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
16−import QtQuick 2.0
17−import Ubuntu.Components 1.1
16+import QtQuick 2.4
17+import Ubuntu.Components 1.3
1818
1919// FIXME: copied with slight modifications from Ubuntu UI Toolkit's Ambiance's theme
2020Item {
21− // styling properties
2221 anchors.fill: parent
2322 z: -1
2423 id: mainViewStyle
2524
25+ property var theme
26+
27+ /*!
28+ Color of the header's background.
29+
30+ \sa backgroundColor, footerColor
31+ */
32+ property color headerColor: styledItem.headerColor
33+
2634 /*!
27− The background texture of the main view. The image will be drawn over the background color,
28− so if it has (semi-)transparent pixels, in those pixels the background color will be visible.
29− */
30− property url backgroundSource: "graphics/background_paper.png"
31− property var theme
35+ Color of the background.
36+
37+ The background is usually a single color. However if \l headerColor
38+ or \l footerColor are set then a gradient of colors will be drawn.
39+
40+ \sa footerColor, headerColor
41+ */
42+ property color backgroundColor: styledItem.backgroundColor
43+
44+ /*!
45+ Color of the footer's background.
46+
47+ \sa backgroundColor, headerColor
48+ */
49+ property color footerColor: styledItem.footerColor
3250
3351 Gradient {
3452 id: backgroundGradient
35− GradientStop { position: 0.0; color: styledItem.headerColor }
36− GradientStop { position: 0.83; color: styledItem.backgroundColor }
37− GradientStop { position: 1.0; color: styledItem.footerColor }
53+ GradientStop { position: 0.0; color: mainViewStyle.headerColor }
54+ GradientStop { position: 0.83; color: mainViewStyle.backgroundColor }
55+ GradientStop { position: 1.0; color: mainViewStyle.footerColor }
3856 }
3957
4058 Rectangle {
4159 id: backgroundColor
4260 anchors.fill: parent
43− color: styledItem.backgroundColor
61+ color: mainViewStyle.backgroundColor
4462 gradient: internals.isGradient ? backgroundGradient : null
4563 }
4664
47− Image {
48− id: backgroundTexture
49− anchors.fill: parent
50− source: mainViewStyle.theme.name === "Ambiance" ? mainViewStyle.backgroundSource : ""
51− fillMode: Image.Tile
52− asynchronous: true
53− cache: false
54− visible: status === Image.Ready
55− }
56−
5765 QtObject {
5866 id: internals
59− property bool isGradient: styledItem.backgroundColor != styledItem.headerColor ||
60− styledItem.backgroundColor != styledItem.footerColor
67+ property bool isGradient: mainViewStyle.backgroundColor != mainViewStyle.headerColor ||
68+ mainViewStyle.backgroundColor != mainViewStyle.footerColor
69+
6170 /*
6271 As we don't know the order the property bindings and onXXXChanged signals are evaluated
6372 we should rely only on one property when changing the theme to avoid intermediate
@@ -65,8 +74,7 @@ Item {
6574
6675 Qt bug: https://bugreports.qt-project.org/browse/QTBUG-11712
6776 */
68− property string theme: (ColorUtils.luminance(styledItem.backgroundColor) >= 0.85) ? "Ambiance" :
69− (isGradient ? "SuruGradient" : "SuruDark")
77+ property string theme: (ColorUtils.luminance(styledItem.backgroundColor) >= 0.85) ? "Ambiance" : "SuruDark"
7078 }
7179
7280 // automatically select the appropriate theme depending on the background colors
qml/Stages/OrientationChangeAnimation.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818
1919QtObject {
2020 id: root
qml/Stages/PageHeadStyle.qmldeleted−76
@@ -1,76 +0,0 @@
1−/*
2− * Copyright 2014 Canonical Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU Lesser General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU Lesser General Public License for more details.
12− *
13− * You should have received a copy of the GNU Lesser General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−import QtQuick 2.2
17−import Ubuntu.Components 1.1
18−import Ubuntu.Components.Styles 1.1 as Style
19−
20−// FIXME: copied with large modifications from Ubuntu UI Toolkit's Ambiance's theme
21−Style.PageHeadStyle {
22− id: headerStyle
23−
24− contentHeight: units.gu(7)
25− separatorSource: "graphics/PageHeaderBaseDividerLight.sci"
26− separatorBottomSource: "graphics/PageHeaderBaseDividerBottom.png"
27− fontWeight: Font.Light
28− fontSize: "x-large"
29− textColor: styledItem.config.foregroundColor
30− textLeftMargin: units.gu(2)
31−
32− implicitHeight: headerStyle.contentHeight
33−
34− property var theme
35−
36− Label {
37− anchors {
38− left: parent.left
39− leftMargin: headerStyle.textLeftMargin
40− right: parent.right
41− verticalCenter: parent.verticalCenter
42− }
43− LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
44− text: styledItem.title
45− font.weight: headerStyle.fontWeight
46− fontSize: headerStyle.fontSize
47− color: headerStyle.textColor
48− elide: Text.ElideRight
49− }
50−
51− BorderImage {
52− id: separator
53− anchors {
54− top: parent.bottom
55− topMargin: separatorBottom.height
56− left: parent.left
57− right: parent.right
58− }
59− source: headerStyle.separatorSource
60− height: styledItem.config.sections.model !== undefined ? units.gu(3) : units.gu(2)
61− asynchronous: true
62− cache: true
63− }
64−
65− Image {
66− id: separatorBottom
67− anchors {
68− top: separator.bottom
69− left: parent.left
70− right: parent.right
71− }
72− source: headerStyle.separatorBottomSource
73− asynchronous: true
74− cache: true
75− }
76−}
qml/Stages/PhoneStage.qml+18−7
@@ -14,12 +14,13 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Gestures 0.1
2020import Unity.Application 0.1
2121import Unity.Session 0.1
2222import Utils 0.1
23+import Powerd 0.1
2324import "../Components"
2425
2526AbstractStage {
@@ -182,7 +183,8 @@ AbstractStage {
182183 }
183184 }
184185
185− property bool focusedAppDelegateIsDislocated: focusedAppDelegate && focusedAppDelegate.x !== 0
186+ property bool focusedAppDelegateIsDislocated: focusedAppDelegate &&
187+ (focusedAppDelegate.x !== 0 || focusedAppDelegate.xBehavior.running)
186188
187189 function indexOf(appId) {
188190 for (var i = 0; i < root.applicationManager.count; i++) {
@@ -473,7 +475,6 @@ AbstractStage {
473475
474476 property var xBehavior: xBehavior
475477 Behavior on x {
476− id: xBehavior
477478 enabled: root.spreadEnabled &&
478479 !spreadView.active &&
479480 !snapAnimation.running &&
@@ -481,6 +482,7 @@ AbstractStage {
481482 priv.animateX &&
482483 !root.beingResized
483484 UbuntuNumberAnimation {
485+ id: xBehavior
484486 duration: UbuntuAnimation.BriskDuration
485487 }
486488 }
@@ -520,9 +522,18 @@ AbstractStage {
520522 return progress;
521523 }
522524
523− // Hiding tiles when their progress is negative or reached the maximum
524− visible: (progress >= 0 && progress < 1.7)
525− || (isDash && priv.focusedAppDelegateIsDislocated)
525+ // Hide tile when progress is such that it will be off screen.
526+ property bool occluded: {
527+ if (spreadView.active && (progress >= 0 && progress < 1.7)) return false;
528+ else if (!spreadView.active && isFocused) return false;
529+ else if (xBehavior.running) return false;
530+ else if (z <= 1 && priv.focusedAppDelegateIsDislocated) return false;
531+ return true;
532+ }
533+
534+ visible: Powerd.status == Powerd.On &&
535+ !greeter.fullyShown &&
536+ !occluded
526537
527538 shellOrientationAngle: root.shellOrientationAngle
528539 shellOrientation: root.shellOrientation
qml/Stages/SessionContainer.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515*/
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import "Animations"
1919
2020FocusScope {
qml/Stages/ShimStage.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020AbstractStage {
2121 id: shimStage
qml/Stages/Splash.qml+25−30
@@ -14,12 +14,12 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515*/
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
19−import Ubuntu.Components.Themes 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Components.Themes 1.3
2020import "../Components"
2121
22−import Ubuntu.Components.Themes.Ambiance 1.1 as Ambiance
22+import Ubuntu.Components.Themes.Ambiance 1.3 as Ambiance
2323
2424Item {
2525 id: root
@@ -29,7 +29,7 @@ Item {
2929 property color footerColor: d.undefinedColor
3030 property alias imageSource: overlaidImage.source
3131 property url icon
32− property alias title: header.title
32+ property alias title: headerConfig.title
3333 property alias showHeader: header.visible
3434
3535 Ambiance.Palette {
@@ -62,40 +62,36 @@ Item {
6262 : root.footerColor
6363
6464 // FIXME: fake a Theme object as to expose the Palette corresponding to the backgroundColor (see MainViewStyle.qml)
65− property var theme: QtObject {
65+ readonly property var fakeTheme: QtObject {
6666 property string name
67− property Palette palette: Qt.createQmlObject("import QtQuick 2.2;\
68− import Ubuntu.Components.Themes.%1 1.1;\
69− Palette {}".arg(styledItem.theme.name),
67+ property Palette palette: Qt.createQmlObject("import QtQuick 2.4;\
68+ import Ubuntu.Components.Themes.%1 1.3;\
69+ Palette {}".arg(styledItem.fakeTheme.name),
7070 styledItem, "dynamicPalette");
7171 }
7272
7373 // FIXME: should instead use future toolkit API:
7474 // style: theme.createStyleComponent("MainViewStyle.qml", styledItem)
75− style: Component { MainViewStyle {theme: styledItem.theme} }
75+ style: Component { MainViewStyle {theme: styledItem.fakeTheme} }
7676 }
7777
78− StyledItem {
78+ Ambiance.PageHeadStyle {
7979 id: header
8080 anchors {
81− left: parent.left
81+ left: parent.left;
8282 right: parent.right
8383 }
84− visible: false
85−
86− // mimic API of toolkit's AppHeader component required by PageHeadStyle
87− property Item pageStack
88− property Item contents
89− property string title
90− property var tabsModel
91− property var config: QtObject {
92− property color foregroundColor: styledItem.theme.palette.selected.backgroundText
93− property var sections: QtObject {}
84+ property var styledItem: header
85+ // FIXME Keep in sync with SDK's MainView.qml values of these two colors
86+ property color dividerColor: Qt.darker(styledItem.backgroundColor, 1.1)
87+ property color panelColor: Qt.lighter(styledItem.backgroundColor, 1.1)
88+ panelForegroundColor: config.foregroundColor
89+ config: PageHeadConfiguration {
90+ id: headerConfig
91+ foregroundColor: styledItem.fakeTheme.palette.selected.backgroundText
9492 }
9593
96− // FIXME: should instead use future toolkit API:
97− // style: theme.createStyleComponent("PageHeadStyle.qml", header)
98− style: Component { PageHeadStyle {theme: styledItem.theme} }
94+ property var contents: null
9995 }
10096
10197 Image {
@@ -121,14 +117,13 @@ Item {
121117 visible: d.showIcon
122118
123119 radius: "medium"
124− borderSource: "none"
125−
126− image: Image {
120+ aspect: UbuntuShape.Flat
121+ sourceFillMode: Image.PreserveAspectCrop
122+ source: Image {
127123 id: iconImage
128124 sourceSize.width: iconShape.width
129125 sourceSize.height: iconShape.height
130126 source: d.showIcon ? root.icon : ""
131− fillMode: Image.PreserveAspectCrop
132127 }
133128 }
134129
@@ -139,7 +134,7 @@ Item {
139134 anchors.topMargin: units.gu(2)
140135 fontSize: "large"
141136
142− color: styledItem.theme.palette.selected.backgroundText
137+ color: styledItem.fakeTheme.palette.selected.backgroundText
143138 visible: d.showIcon
144139 }
145140
qml/Stages/SpreadDelegate.qml+3−3
@@ -17,9 +17,9 @@
1717 * Daniel d'Andrada <daniel.dandrada@canonical.com>
1818 */
1919
20−import QtQuick 2.0
21−import QtQuick.Window 2.0
22−import Ubuntu.Components 1.1
20+import QtQuick 2.4
21+import QtQuick.Window 2.2
22+import Ubuntu.Components 1.3
2323import "../Components"
2424
2525FocusScope {
qml/Stages/SpreadMaths.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Utils 0.1
2020
2121Item {
qml/Stages/SurfaceContainer.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515*/
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Gestures 0.1 // For TouchGate
2020import Utils 0.1 // for InputWatcher
2121import Unity.Application 0.1 // for MirSurfaceItem
qml/Stages/TabletStage.qml+19−3
@@ -1,4 +1,4 @@
1−/*
1+/*
22 * Copyright (C) 2014-2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
@@ -14,11 +14,12 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Gestures 0.1
2020import Unity.Application 0.1
2121import Utils 0.1
22+import Powerd 0.1
2223import "../Components"
2324
2425AbstractStage {
@@ -146,6 +147,8 @@ AbstractStage {
146147 }
147148 }
148149
150+ property bool focusedAppDelegateIsDislocated: focusedAppDelegate &&
151+ (focusedAppDelegate.dragOffset !== 0 || focusedAppDelegate.xTranslateAnimating)
149152 function indexOf(appId) {
150153 for (var i = 0; i < ApplicationManager.count; i++) {
151154 if (ApplicationManager.get(i).appId == appId) {
@@ -659,6 +662,19 @@ AbstractStage {
659662 return tileProgress;
660663 }
661664
665+ // TODO: Hiding tile when progress is such that it will be off screen.
666+ property bool occluded: {
667+ if (spreadView.active) return false;
668+ else if (spreadTile.active) return false;
669+ else if (xTranslateAnimating) return false;
670+ else if (z <= 1 && priv.focusedAppDelegateIsDislocated) return false;
671+ return true;
672+ }
673+
674+ visible: Powerd.status == Powerd.On &&
675+ !greeter.fullyShown &&
676+ !occluded
677+
662678 animatedProgress: {
663679 if (spreadView.phase == 0 && (spreadTile.active || spreadView.nextInStack == index)) {
664680 if (progress < spreadView.positionMarker1) {
qml/Stages/TransformedSpreadDelegate.qml+2−2
@@ -16,9 +16,9 @@
1616 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
1717*/
1818
19−import QtQuick 2.0
19+import QtQuick 2.4
2020import Utils 0.1
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222
2323SpreadDelegate {
2424 id: root
qml/Stages/TransformedTabletSpreadDelegate.qml+4−2
@@ -16,9 +16,9 @@
1616 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
1717*/
1818
19−import QtQuick 2.0
19+import QtQuick 2.4
2020import Utils 0.1
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222import Unity.Application 0.1
2323
2424SpreadDelegate {
@@ -48,6 +48,7 @@ SpreadDelegate {
4848 property bool isInSideStage: false
4949
5050 property int dragOffset: 0
51+ readonly property alias xTranslateAnimating: xTranslateAnimation.running
5152
5253 dropShadow: spreadView.active ||
5354 (active
@@ -144,6 +145,7 @@ SpreadDelegate {
144145 spreadView.animateX &&
145146 !spreadView.beingResized
146147 UbuntuNumberAnimation {
148+ id: xTranslateAnimation
147149 duration: UbuntuAnimation.FastDuration
148150 }
149151 }
qml/Stages/WindowDecoration.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818import Unity.Application 0.1 // For Mir singleton
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
2020import "../Components"
2121
2222MouseArea {
qml/Stages/WindowResizeArea.qml+4−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Utils 0.1
2020import Unity.Application 0.1 // for Mir.cursorName
2121
@@ -38,6 +38,7 @@ MouseArea {
3838
3939 QtObject {
4040 id: priv
41+ objectName: "priv"
4142
4243 property int normalX: 0
4344 property int normalY: 0
@@ -74,6 +75,7 @@ MouseArea {
7475 if (windowState === WindowStateStorage.WindowStateMaximized) {
7576 target.maximize(false)
7677 }
78+ priv.updateNormalGeometry();
7779 }
7880
7981 Component.onDestruction: {
qml/Stages/graphics/background_paper@27.pngdeleted

Binary file not shown.

qml/Tutorial/Arrow.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Item {
2121 id: root
qml/Tutorial/Slider.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Item {
2121 id: root
qml/Tutorial/Tick.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020MouseArea {
2121 implicitHeight: tick.height
qml/Tutorial/Tutorial.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Item {
2121 id: root
qml/Tutorial/TutorialBottom.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Gestures 0.1
2020import "../Components"
2121import "." as LocalComponents
qml/Tutorial/TutorialBottomFinish.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "." as LocalComponents
2020
2121TutorialPage {
qml/Tutorial/TutorialContent.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Item {
2121 id: root
qml/Tutorial/TutorialLeft.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "." as LocalComponents
2020
2121TutorialPage {
qml/Tutorial/TutorialLeftFinish.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "." as LocalComponents
2020
2121TutorialPage {
qml/Tutorial/TutorialPage.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../Components"
2020
2121Showable {
qml/Tutorial/TutorialRight.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Gestures 0.1
2020import Unity.Application 0.1
2121import "../Components"
qml/Wizard/CheckableSetting.qml+5−5
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
19−import Ubuntu.Components.ListItems 1.0 as ListItem
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Components.ListItems 1.3 as ListItem
2020
2121ListItem.Empty {
2222 id: listItem
@@ -77,7 +77,7 @@ ListItem.Empty {
7777 rightMargin: listItem.rightMargin
7878 }
7979 wrapMode: Text.Wrap
80− linkColor: Theme.palette.normal.foregroundText
80+ linkColor: theme.palette.normal.foregroundText
8181 onLinkActivated: listItem.linkActivated(link)
8282 }
8383 }
qml/Wizard/Page.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2013 Canonical, Ltd.
2+ * Copyright (C) 2013,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020Item {
2121 readonly property real buttonMargin: units.gu(2)
@@ -57,7 +57,7 @@ Item {
5757 }
5858 wrapMode: Text.Wrap
5959 text: title
60− color: Theme.palette.normal.baseText
60+ color: theme.palette.normal.baseText
6161 font.pixelSize: units.gu(4)
6262 }
6363
qml/Wizard/Pages.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.SystemSettings.SecurityPrivacy 1.0
2020import Wizard 0.1
2121import "../Components"
qml/Wizard/Pages/10-welcome.qml+3−3
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
19−import Ubuntu.Components.ListItems 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Components.ListItems 1.3
2020import Ubuntu.SystemSettings.LanguagePlugin 1.0
2121import Wizard 0.1
2222import ".." as LocalComponents
qml/Wizard/Pages/20-sim.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import MeeGo.QOfono 0.2
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import ".." as LocalComponents
2121
2222LocalComponents.Page {
qml/Wizard/Pages/30-passwd-type.qml+7−7
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
19−import Ubuntu.Components.ListItems 1.0
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import Ubuntu.Components.ListItems 1.3
2020import Ubuntu.SystemSettings.SecurityPrivacy 1.0
2121import ".." as LocalComponents
2222
@@ -111,13 +111,13 @@ LocalComponents.Page {
111111
112112 Component.onCompleted: {
113113 // A visible selected background looks bad in ListItem widgets with our theme
114− originalBackground = Theme.palette.selected.background
115− Theme.palette.selected.background = "transparent"
114+ originalBackground = theme.palette.selected.background
115+ theme.palette.selected.background = "transparent"
116116 }
117117
118118 Component.onDestruction: {
119119 // Restore original theme background
120− Theme.palette.selected.background = originalBackground
120+ theme.palette.selected.background = originalBackground
121121 }
122122 }
123123 }
qml/Wizard/Pages/40-wifi.qml+3−3
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QMenuModel 0.1 as QMenuModel
1919import QtSystemInfo 5.0
20−import Ubuntu.Components 0.1
21−import Ubuntu.Components.ListItems 0.1 as ListItem
20+import Ubuntu.Components 1.3
21+import Ubuntu.Components.ListItems 1.3 as ListItem
2222import Ubuntu.Settings.Menus 0.1 as Menus
2323import ".." as LocalComponents
2424
qml/Wizard/Pages/50-location.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2013,2014 Canonical, Ltd.
2+ * Copyright (C) 2013-2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818import AccountsService 0.1
1919import QMenuModel 0.1 as QMenuModel
2020import Qt.labs.folderlistmodel 2.1
21−import Ubuntu.Components 1.1
21+import Ubuntu.Components 1.3
2222import ".." as LocalComponents
2323
2424LocalComponents.Page {
@@ -98,7 +98,7 @@ LocalComponents.Page {
9898 anchors.leftMargin: hereCheck.labelOffset
9999 anchors.right: parent.right
100100 wrapMode: Text.Wrap
101− linkColor: Theme.palette.normal.foregroundText
101+ linkColor: theme.palette.normal.foregroundText
102102 // Translators: HERE is a trademark for Nokia's location service, you probably shouldn't translate it
103103 text: i18n.tr("By selecting this option you agree to the Nokia HERE <a href='#'>terms and conditions</a>.")
104104 onLinkActivated: pageStack.load(Qt.resolvedUrl("here-terms.qml"))
qml/Wizard/Pages/60-reporting.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.SystemSettings.Diagnostics 1.0
2020import ".." as LocalComponents
2121
qml/Wizard/Pages/80-finished.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import ".." as LocalComponents
2020
2121LocalComponents.Page {
qml/Wizard/Pages/here-terms.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,10 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818import AccountsService 0.1
1919import Qt.labs.folderlistmodel 2.1
20−import Ubuntu.Components 1.1
20+import Ubuntu.Components 1.3
2121import Ubuntu.Web 0.2
2222import ".." as LocalComponents
2323
@@ -102,7 +102,7 @@ LocalComponents.Page {
102102 anchors.left: parent.left
103103 anchors.right: parent.right
104104 wrapMode: Text.Wrap
105− linkColor: Theme.palette.normal.foregroundText
105+ linkColor: theme.palette.normal.foregroundText
106106 onLinkActivated: {
107107 webview.url = link
108108 termsLabel.visible = false
qml/Wizard/Pages/passwd-confirm.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.SystemSettings.SecurityPrivacy 1.0
2020import ".." as LocalComponents
2121import "../../Components" as UnityComponents
qml/Wizard/Pages/passwd-set.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.SystemSettings.SecurityPrivacy 1.0
2020import ".." as LocalComponents
2121import "../../Components" as UnityComponents
qml/Wizard/StackButton.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919
2020AbstractButton {
2121 id: stackButton
@@ -32,7 +32,7 @@ AbstractButton {
3232 anchors.verticalCenter: parent.verticalCenter
3333 anchors.left: parent.left
3434 anchors.right: parent.right
35− color: enabled ? Theme.palette.selected.backgroundText : Qt.darker(Theme.palette.selected.backgroundText, 1.5)
35+ color: enabled ? theme.palette.selected.backgroundText : Qt.darker(theme.palette.selected.backgroundText, 1.5)
3636 text: {
3737 if (backArrow) {
3838 // Translators: This is the arrow for "Back" buttons
qml/Wizard/Wizard.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Wizard 0.1
2020import "../Components"
2121
tests/CMakeLists.txt+1
@@ -132,3 +132,4 @@ add_subdirectory(libs)
132132add_subdirectory(plugins)
133133add_subdirectory(qmltests)
134134add_subdirectory(whitespace)
135+add_subdirectory(imports)
tests/autopilot/unity8/dash.py+3−3
@@ -158,7 +158,7 @@ class Dash(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
158158 def enter_search_query(self, query, keyboard):
159159 current_header = self._get_current_page_header()
160160 search_button = \
161− current_header.select_single(objectName="search_header_button")
161+ current_header.select_single(objectName="search_action_button")
162162 self.pointing_device.move(
163163 search_button.globalRect.x + search_button.width / 2,
164164 search_button.globalRect.y + search_button.height / 2)
@@ -224,7 +224,7 @@ class GenericScopeView(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
224224 """
225225 category_element = self._get_category_element(category)
226226 icon = category_element.wait_select_single(
227− 'AbstractButton', title=title)
227+ 'UCAbstractButton', title=title)
228228 list_view = self.select_single(
229229 ListViewWithPageHeader, objectName='categoryListView')
230230 list_view.swipe_child_into_view(icon)
@@ -247,7 +247,7 @@ class GenericScopeView(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
247247 """
248248 category_element = self._get_category_element(category)
249249 see_all = category_element.select_single(objectName='seeAll')
250− application_cards = category_element.select_many('AbstractButton')
250+ application_cards = category_element.select_many('UCAbstractButton')
251251
252252 application_cards = sorted(
253253 (card for card in application_cards
tests/autopilot/unity8/process_helpers.py+1−1
@@ -146,7 +146,7 @@ def stop_job(name):
146146 :raises CalledProcessError: if the job failed to stop.
147147
148148 """
149− logger.info('Stoping job {}.'.format(name))
149+ logger.info('Stopping job {}.'.format(name))
150150 command = ['/sbin/initctl', 'stop', name]
151151 try:
152152 output = subprocess.check_output(
tests/imports/CMakeLists.txtnew file+5
@@ -0,0 +1,5 @@
1+
2+#
3+# Test that all imports for QtQuick and Ubuntu.Components use the wanted version
4+#
5+add_test(imports ${CMAKE_CURRENT_SOURCE_DIR}/check_imports.py ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
tests/imports/check_imports.pynew file+125
@@ -0,0 +1,125 @@
1+#! /usr/bin/env python3
2+
3+#
4+# Copyright (C) 2015 Canonical Ltd
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License version 3 as
8+# published by the Free Software Foundation.
9+#
10+# This program is distributed in the hope that it will be useful,
11+# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+# GNU General Public License for more details.
14+#
15+# You should have received a copy of the GNU General Public License
16+# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+#
18+
19+#
20+# Little helper program to test that all source files import
21+# versions we want
22+#
23+# Usage: check_imports.py directory [ignore_prefix]
24+#
25+# The directory specifies the (recursive) location of the source files. Any
26+# files with a path that starts with ignore_prefix are not checked. This is
27+# useful to exclude files that are generated into the build directory.
28+#
29+# See the file_pat definition below for a list of files that are checked.
30+#
31+
32+from __future__ import print_function
33+
34+import argparse
35+import os
36+import re
37+import sys
38+
39+
40+# Print msg on stderr, preceded by program name and followed by newline
41+def error(msg):
42+ print(os.path.basename(sys.argv[0]) + ": " + msg, file=sys.stderr)
43+
44+
45+# Function to raise errors encountered by os.walk
46+def raise_error(e):
47+ raise e
48+
49+# Qt Quick patterns
50+# If you increase this make sure you increase
51+# the Qt version in debian/control and in CMakeLists.txt
52+quick_pat = re.compile(r'.*import QtQuick.*$')
53+quick_good_pat = re.compile(r'.*import QtQuick 2\.4.*$')
54+quick_layouts_good_pat = re.compile(r'.*import QtQuick.Layouts 1\.1.*$')
55+quick_window_good_pat = re.compile(r'.*import QtQuick.Window 2\.2.*$')
56+
57+# Ubuntu Components patterns
58+ubuntu_components_pat = re.compile(r'.*import Ubuntu.Components.*')
59+ubuntu_good_components_pat = re.compile(r'.*import Ubuntu.Components.*1\.3.*')
60+
61+def scan_for_bad_import(file_path, all_pat, good_pats):
62+ errors = []
63+ with open(file_path, 'rt', encoding='utf-8') as ifile:
64+ for lino, line in enumerate(ifile, start=1):
65+ if all_pat.match(line):
66+ good_found = False
67+ for good_pat in good_pats:
68+ if good_pat.match(line):
69+ good_found = True
70+ if not good_found:
71+ errors.append(lino)
72+ if 0 < len(errors) <= 10:
73+ if len(errors) > 1:
74+ plural = 's'
75+ else:
76+ plural = ''
77+ print(
78+ "%s: bad import version in line%s %s" % (
79+ file_path, plural, ", ".join((str(i) for i in errors))))
80+ elif errors:
81+ print("%s: bad import version in multiple lines" % file_path)
82+ return bool(errors)
83+
84+# Parse args
85+
86+parser = argparse.ArgumentParser(
87+ description='Test that source files contain the wanted import version.')
88+parser.add_argument(
89+ 'dir', nargs=1,
90+ help='The directory to (recursively) search for source files')
91+parser.add_argument(
92+ 'ignore_prefix', nargs='?', default=None,
93+ help='Ignore source files with a path that starts with the given prefix.')
94+args = parser.parse_args()
95+
96+# Files we want to check for import version.
97+
98+file_pat = (
99+ r'(.*\.(js|qml)$)')
100+pat = re.compile(file_pat)
101+
102+# Find all the files with matching file extension in the specified
103+# directory and check them
104+
105+directory = os.path.abspath(args.dir[0])
106+ignore = args.ignore_prefix and os.path.abspath(args.ignore_prefix) or None
107+
108+found_bad_import = False
109+try:
110+ for root, dirs, files in os.walk(directory, onerror=raise_error):
111+ for file in files:
112+ path = os.path.join(root, file)
113+ if not (ignore and path.startswith(ignore)) and pat.match(file):
114+ quick_good_pats = [quick_good_pat, quick_layouts_good_pat, quick_window_good_pat]
115+ if scan_for_bad_import(path, quick_pat, quick_good_pats):
116+ found_bad_import = True
117+ if scan_for_bad_import(path, ubuntu_components_pat, [ubuntu_good_components_pat]):
118+ found_bad_import = True
119+
120+except OSError as e:
121+ error("cannot create file list for \"" + dir + "\": " + e.strerror)
122+ sys.exit(1)
123+
124+if found_bad_import:
125+ sys.exit(1)
tests/mocks/MeeGo/QOfono/MockOfonoSimManager.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818import MeeGo.QOfono 0.2
1919
2020Item {
tests/mocks/QMenuModel/QDBusActionGroup.qml+2−2
@@ -17,7 +17,7 @@
1717 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1818 */
1919
20−import QtQuick 2.0
20+import QtQuick 2.4
2121import Ubuntu.Settings.Menus 0.1 as Menus
2222import QMenuModel 0.1
2323
@@ -34,7 +34,7 @@ QtObject {
3434
3535 function action(actionName) {
3636 return Qt.createQmlObject("
37− import QtQuick 2.3
37+ import QtQuick 2.4
3838 import QMenuModel 0.1
3939
4040 QtObject {
tests/mocks/QMenuModel/UnityMenuAction.qml+1−1
@@ -17,7 +17,7 @@
1717 * Nick Dedekind <nick.dedekind@canonical.com>
1818 */
1919
20−import QtQuick 2.0
20+import QtQuick 2.4
2121import QMenuModel 0.1
2222
2323QtObject {
tests/mocks/Ubuntu/SystemSettings/LanguagePlugin/MockLanguagePlugin.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818
1919Item {
2020 property var languageNames: ["English", "French", "Spanish"]
tests/mocks/Ubuntu/Web/WebView.qml+1−1
@@ -15,7 +15,7 @@
1515 *
1616 */
1717
18−import QtQuick 2.0
18+import QtQuick 2.4
1919
2020Item {
2121 property url url
tests/mocks/Unity/Application/MirSurface.cpp+41−14
@@ -31,7 +31,7 @@ MirSurface::MirSurface(const QString& name,
3131 , m_screenshotUrl(screenshot)
3232 , m_qmlFilePath(qmlFilePath)
3333 , m_live(true)
34− , m_viewCount(0)
34+ , m_visible(true)
3535 , m_activeFocus(false)
3636 , m_width(-1)
3737 , m_height(-1)
@@ -73,6 +73,11 @@ bool MirSurface::live() const
7373 return m_live;
7474}
7575
76+bool MirSurface::visible() const
77+{
78+ return m_visible;
79+}
80+
7681void MirSurface::setLive(bool live)
7782{
7883// qDebug().nospace() << "MirSurface::setLive("<<live<<") " << name();
@@ -82,7 +87,7 @@ void MirSurface::setLive(bool live)
8287 m_live = live;
8388 Q_EMIT liveChanged(live);
8489
85− if (!m_live && m_viewCount == 0) {
90+ if (!m_live && m_views.count() == 0) {
8691 deleteLater();
8792 }
8893}
@@ -120,27 +125,49 @@ void MirSurface::setOrientationAngle(Mir::OrientationAngle angle)
120125 Q_EMIT orientationAngleChanged(angle);
121126}
122127
123−void MirSurface::incrementViewCount()
128+
129+
130+void MirSurface::registerView(qintptr viewId)
124131{
125− ++m_viewCount;
126−// qDebug().nospace() << "MirSurface::incrementViewCount() viewCount(after)=" << m_viewCount << " " << name();
132+ m_views.insert(viewId, MirSurface::View{false});
133+// qDebug().nospace() << "MirSurface[" << name() << "]::registerView(" << viewId << ")"
134+// << " after=" << m_views.count();
127135}
128136
129−void MirSurface::decrementViewCount()
137+void MirSurface::unregisterView(qintptr viewId)
130138{
131− --m_viewCount;
132−// qDebug().nospace() << "MirSurface::decrementViewCount() viewCount(after)=" << m_viewCount << " " << name();
133−
134− Q_ASSERT(m_viewCount >= 0);
135−
136− if (!m_live && m_viewCount == 0) {
139+// qDebug().nospace() << "MirSurface[" << name() << "]::unregisterView(" << viewId << ")"
140+// << " after=" << m_views.count() << " live=" << m_live;
141+ m_views.remove(viewId);
142+ if (!m_live && m_views.count() == 0) {
137143 deleteLater();
138144 }
145+ updateVisibility();
139146}
140147
141−int MirSurface::viewCount() const
148+void MirSurface::setViewVisibility(qintptr viewId, bool visible)
142149{
143− return m_viewCount;
150+ if (!m_views.contains(viewId)) return;
151+
152+ m_views[viewId].visible = visible;
153+ updateVisibility();
154+}
155+
156+void MirSurface::updateVisibility()
157+{
158+ bool newVisible = false;
159+ QHashIterator<qintptr, View> i(m_views);
160+ while (i.hasNext()) {
161+ i.next();
162+ newVisible |= i.value().visible;
163+ }
164+
165+ if (newVisible != visible()) {
166+// qDebug().nospace() << "MirSurface[" << name() << "]::updateVisibility(" << newVisible << ")";
167+
168+ m_visible = newVisible;
169+ Q_EMIT visibleChanged(m_visible);
170+ }
144171}
145172
146173bool MirSurface::activeFocus() const
tests/mocks/Unity/Application/MirSurface.h+14−4
@@ -19,6 +19,7 @@
1919
2020#include <QObject>
2121#include <QUrl>
22+#include <QHash>
2223
2324// unity-api
2425#include <unity/shell/application/MirSurfaceInterface.h>
@@ -58,6 +59,8 @@ public:
5859
5960 bool live() const override;
6061
62+ bool visible() const override;
63+
6164 Mir::OrientationAngle orientationAngle() const override;
6265 void setOrientationAngle(Mir::OrientationAngle) override;
6366
@@ -66,9 +69,10 @@ public:
6669
6770 Q_INVOKABLE void setLive(bool live);
6871
69− void incrementViewCount();
70− void decrementViewCount();
71− int viewCount() const;
72+ void registerView(qintptr viewId);
73+ void unregisterView(qintptr viewId);
74+ void setViewVisibility(qintptr viewId, bool visible);
75+ int viewCount() const { return m_views.count(); }
7276
7377 int width() const;
7478 int height() const;
@@ -97,6 +101,8 @@ Q_SIGNALS:
97101 void activeFocusChanged(bool);
98102
99103private:
104+ void updateVisibility();
105+
100106 const QString m_name;
101107 const Mir::Type m_type;
102108 Mir::State m_state;
@@ -104,10 +110,14 @@ private:
104110 QUrl m_screenshotUrl;
105111 QUrl m_qmlFilePath;
106112 bool m_live;
107− int m_viewCount;
113+ bool m_visible;
108114 bool m_activeFocus;
109115 int m_width;
110116 int m_height;
117+ struct View {
118+ bool visible;
119+ };
120+ QHash<qintptr, View> m_views;
111121};
112122
113123#endif // MOCK_MIR_SURFACE_H
tests/mocks/Unity/Application/MirSurfaceItem.cpp+12−2
@@ -44,6 +44,8 @@ MirSurfaceItem::MirSurfaceItem(QQuickItem *parent)
4444 Qt::ExtraButton5 | Qt::ExtraButton6 | Qt::ExtraButton7 | Qt::ExtraButton8 |
4545 Qt::ExtraButton9 | Qt::ExtraButton10 | Qt::ExtraButton11 |
4646 Qt::ExtraButton12 | Qt::ExtraButton13);
47+
48+ connect(this, &QQuickItem::visibleChanged, this, &MirSurfaceItem::updateMirSurfaceVisibility);
4749}
4850
4951MirSurfaceItem::~MirSurfaceItem()
@@ -194,17 +196,18 @@ void MirSurfaceItem::setSurface(MirSurfaceInterface* surface)
194196 m_qmlContentComponent = nullptr;
195197
196198 disconnect(m_qmlSurface, nullptr, this, nullptr);
197− m_qmlSurface->decrementViewCount();
199+ m_qmlSurface->unregisterView((qintptr)this);
198200 }
199201
200202 m_qmlSurface = static_cast<MirSurface*>(surface);
201203
202204 if (m_qmlSurface) {
203− m_qmlSurface->incrementViewCount();
205+ m_qmlSurface->registerView((qintptr)this);
204206
205207 m_qmlSurface->setActiveFocus(hasActiveFocus());
206208
207209 updateSurfaceSize();
210+ updateMirSurfaceVisibility();
208211
209212 connect(m_qmlSurface, &MirSurface::orientationAngleChanged, this, &MirSurfaceItem::orientationAngleChanged);
210213 connect(m_qmlSurface, &MirSurface::screenshotUrlChanged, this, &MirSurfaceItem::updateScreenshot);
@@ -253,6 +256,13 @@ void MirSurfaceItem::itemChange(ItemChange change, const ItemChangeData & value)
253256 }
254257}
255258
259+void MirSurfaceItem::updateMirSurfaceVisibility()
260+{
261+ if (!m_qmlSurface) return;
262+
263+ m_qmlSurface->setViewVisibility((qintptr)this, isVisible());
264+}
265+
256266void MirSurfaceItem::setConsumesInput(bool value)
257267{
258268 if (m_consumesInput != value) {
tests/mocks/Unity/Application/MirSurfaceItem.h+1
@@ -87,6 +87,7 @@ protected:
8787private Q_SLOTS:
8888 void onComponentStatusChanged(QQmlComponent::Status status);
8989 void updateScreenshot(QUrl screenshot);
90+ void updateMirSurfaceVisibility();
9091
9192private:
9293 void createQmlContentItem();
tests/mocks/Unity/Application/resources/MirSurfaceItem.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919Rectangle {
2020 id: root
tests/mocks/Unity/Application/resources/VirtualKeyboard.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Unity.Application 0.1
1919
2020Item {
tests/mocks/Unity/Indicators/ActionRootState.qml+1−1
@@ -17,7 +17,7 @@
1717 * Nick Dedekind <nick.dedekind@canonical.com>
1818 */
1919
20−import QtQuick 2.0
20+import QtQuick 2.4
2121
2222QtObject {
2323 property var actionGroup
tests/mocks/Unity/Indicators/IndicatorsModel.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Unity.Indicators 0.1 as Indicators
1919
2020Indicators.FakeIndicatorsModel {
tests/mocks/Unity/Indicators/ModelActionRootState.qml+1−1
@@ -17,7 +17,7 @@
1717 * Nick Dedekind <nick.dedekind@canonical.com>
1818 */
1919
20−import QtQuick 2.0
20+import QtQuick 2.4
2121
2222Item {
2323 property var menu: null
tests/mocks/Utils/HomeKeyWatcher.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919QtObject {
2020 signal activated()
tests/plugins/Dash/cardcreator/1.res+7−8
@@ -2,7 +2,7 @@ AbstractButton {
22 id: root;
33 property var components;
44 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
66 property real fontScale: 1.0;
77 property var scopeStyle: null;
88 property int titleAlignment: Text.AlignLeft;
@@ -14,7 +14,6 @@ AbstractButton {
1414 implicitWidth: childrenRect.width;
1515 enabled: true;
1616
17−onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
1817readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
1918Item {
2019 id: artShapeHolder;
@@ -30,10 +29,9 @@ Item {
3029 sourceComponent: Item {
3130 id: artShape;
3231 objectName: "artShape";
33− property bool doShapeItem: components["art"]["conciergeMode"] !== true;
32+ readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true;
3433 visible: image.status == Image.Ready;
3534 readonly property alias image: artImage;
36− property alias borderSource: artShapeShape.borderSource;
3735 ShaderEffectSource {
3836 id: artShapeSource;
3937 sourceItem: artImage;
@@ -42,16 +40,17 @@ Item {
4240 height: 1;
4341 hideSource: doShapeItem;
4442 }
45− Shape {
43+ UbuntuShape {
4644 id: artShapeShape;
47− image: artShapeSource;
45+ source: artShapeSource;
4846 anchors.fill: parent;
4947 visible: doShapeItem;
5048 radius: "medium";
49+ aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat;
5150 }
5251 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
5352 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
54− Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
53+ Component.onCompleted: { updateWidthHeightBindings(); }
5554 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
5655 function updateWidthHeightBindings() {
5756 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
@@ -87,7 +86,7 @@ Label {
8786 wrapMode: Text.Wrap;
8887 maximumLineCount: 2;
8988 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
90− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
89+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText;
9190 visible: showHeader ;
9291 width: undefined;
9392 text: root.title;
tests/plugins/Dash/cardcreator/2.res+9−8
@@ -2,7 +2,7 @@ AbstractButton {
22 id: root;
33 property var components;
44 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
66 property real fontScale: 1.0;
77 property var scopeStyle: null;
88 property int titleAlignment: Text.AlignLeft;
@@ -23,11 +23,12 @@ Loader {
2323 sourceComponent: UbuntuShape {
2424 objectName: "background";
2525 radius: "medium";
26− color: getColor(0) || "white";
27− gradientColor: getColor(1) || color;
28− anchors.fill: parent;
29− image: backgroundImage.source ? backgroundImage : null;
30− property real luminance: Style.luminance(color);
26+ backgroundColor: getColor(0) || "white";
27+ secondaryBackgroundColor: getColor(1) || backgroundColor;
28+ backgroundMode: UbuntuShape.VerticalGradient;
29+ anchors.fill: parent;
30+ source: backgroundImage.source ? backgroundImage : null;
31+ property real luminance: Style.luminance(backgroundColor);
3132 property Image backgroundImage: Image {
3233 objectName: "backgroundImage";
3334 source: {
@@ -88,7 +89,7 @@ CroppedImageMinimumSourceSize {
8889 wrapMode: Text.Wrap;
8990 maximumLineCount: 2;
9091 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
91− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
92+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
9293 visible: showHeader ;
9394 width: undefined;
9495 text: root.title;
@@ -108,7 +109,7 @@ CroppedImageMinimumSourceSize {
108109 maximumLineCount: 1;
109110 fontSize: "x-small";
110111 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
111− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
112+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
112113 visible: titleLabel.visible && titleLabel.text;
113114 text: cardData && cardData["subtitle"] || "";
114115 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/3.res+8−9
@@ -2,7 +2,7 @@ AbstractButton {
22 id: root;
33 property var components;
44 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
66 property real fontScale: 1.0;
77 property var scopeStyle: null;
88 property int titleAlignment: Text.AlignLeft;
@@ -14,7 +14,6 @@ AbstractButton {
1414 implicitWidth: childrenRect.width;
1515 enabled: true;
1616
17−onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
1817readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
1918Item {
2019 id: artShapeHolder;
@@ -30,10 +29,9 @@ Item {
3029 sourceComponent: Item {
3130 id: artShape;
3231 objectName: "artShape";
33− property bool doShapeItem: components["art"]["conciergeMode"] !== true;
32+ readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true;
3433 visible: image.status == Image.Ready;
3534 readonly property alias image: artImage;
36− property alias borderSource: artShapeShape.borderSource;
3735 ShaderEffectSource {
3836 id: artShapeSource;
3937 sourceItem: artImage;
@@ -42,16 +40,17 @@ Item {
4240 height: 1;
4341 hideSource: doShapeItem;
4442 }
45− Shape {
43+ UbuntuShape {
4644 id: artShapeShape;
47− image: artShapeSource;
45+ source: artShapeSource;
4846 anchors.fill: parent;
4947 visible: doShapeItem;
5048 radius: "medium";
49+ aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat;
5150 }
5251 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
5352 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
54− Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
53+ Component.onCompleted: { updateWidthHeightBindings(); }
5554 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
5655 function updateWidthHeightBindings() {
5756 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
@@ -87,7 +86,7 @@ Label {
8786 wrapMode: Text.Wrap;
8887 maximumLineCount: 2;
8988 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
90− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
89+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText;
9190 visible: showHeader ;
9291 width: undefined;
9392 text: root.title;
@@ -107,7 +106,7 @@ Label {
107106 maximumLineCount: 1;
108107 fontSize: "x-small";
109108 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
110− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
109+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText;
111110 visible: titleLabel.visible && titleLabel.text;
112111 text: cardData && cardData["subtitle"] || "";
113112 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/4.res+3−3
@@ -2,7 +2,7 @@ AbstractButton {
22 id: root;
33 property var components;
44 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
66 property real fontScale: 1.0;
77 property var scopeStyle: null;
88 property int titleAlignment: Text.AlignLeft;
@@ -72,7 +72,7 @@ Label {
7272 wrapMode: Text.Wrap;
7373 maximumLineCount: 2;
7474 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
75− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
75+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText;
7676 visible: showHeader ;
7777 width: undefined;
7878 text: root.title;
@@ -92,7 +92,7 @@ Label {
9292 maximumLineCount: 1;
9393 fontSize: "x-small";
9494 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
95− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
95+ color: root.scopeStyle ? root.scopeStyle.foreground : theme.palette.normal.baseText;
9696 visible: titleLabel.visible && titleLabel.text;
9797 text: cardData && cardData["subtitle"] || "";
9898 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/5.res+18−45
@@ -2,7 +2,7 @@ AbstractButton {
22 id: root;
33 property var components;
44 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
66 property real fontScale: 1.0;
77 property var scopeStyle: null;
88 property int titleAlignment: Text.AlignLeft;
@@ -14,7 +14,6 @@ AbstractButton {
1414 implicitWidth: childrenRect.width;
1515 enabled: false;
1616
17−onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
1817readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
1918Item {
2019 id: artShapeHolder;
@@ -30,10 +29,9 @@ Item {
3029 sourceComponent: Item {
3130 id: artShape;
3231 objectName: "artShape";
33− property bool doShapeItem: components["art"]["conciergeMode"] !== true;
32+ readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true;
3433 visible: image.status == Image.Ready;
3534 readonly property alias image: artImage;
36− property alias borderSource: artShapeShape.borderSource;
3735 ShaderEffectSource {
3836 id: artShapeSource;
3937 sourceItem: artImage;
@@ -42,16 +40,17 @@ Item {
4240 height: 1;
4341 hideSource: doShapeItem;
4442 }
45− Shape {
43+ UbuntuShape {
4644 id: artShapeShape;
47− image: artShapeSource;
45+ source: artShapeSource;
4846 anchors.fill: parent;
4947 visible: doShapeItem;
5048 radius: "medium";
49+ aspect: root.artShapeStyle === "inset" ? UbuntuShape.Inset : UbuntuShape.Flat;
5150 }
5251 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
5352 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
54− Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
53+ Component.onCompleted: { updateWidthHeightBindings(); }
5554 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
5655 function updateWidthHeightBindings() {
5756 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
@@ -75,44 +74,18 @@ Item {
7574 }
7675Loader {
7776 id: overlayLoader;
78− anchors {
79− left: artShapeHolder.left;
80− right: artShapeHolder.right;
81− bottom: artShapeHolder.bottom;
82− }
83− active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
77+ readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
78+ anchors.fill: artShapeHolder;
79+ active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
8480 asynchronous: root.asynchronous;
8581 visible: showHeader && status == Loader.Ready;
86− sourceComponent: ShaderEffect {
82+ sourceComponent: UbuntuShapeOverlay {
8783 id: overlay;
88− height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
89− property real luminance: Style.luminance(overlayColor);
90− property color overlayColor: cardData && cardData["overlayColor"] || "#99000000";
91− property var source: ShaderEffectSource {
92− id: shaderSource;
93− sourceItem: artShapeLoader.item;
94− onVisibleChanged: if (visible) scheduleUpdate();
95− live: false;
96− sourceRect: Qt.rect(0, artShapeLoader.height - overlay.height, artShapeLoader.width, overlay.height);
97− }
98− vertexShader: "
99− uniform highp mat4 qt_Matrix;
100− attribute highp vec4 qt_Vertex;
101− attribute highp vec2 qt_MultiTexCoord0;
102− varying highp vec2 coord;
103− void main() {
104− coord = qt_MultiTexCoord0;
105− gl_Position = qt_Matrix * qt_Vertex;
106− }";
107− fragmentShader: "
108− varying highp vec2 coord;
109− uniform sampler2D source;
110− uniform lowp float qt_Opacity;
111− uniform highp vec4 overlayColor;
112− void main() {
113− lowp vec4 tex = texture2D(source, coord);
114− gl_FragColor = vec4(overlayColor.r, overlayColor.g, overlayColor.b, 1) * qt_Opacity * overlayColor.a * tex.a;
115− }";
84+ property real luminance: Style.luminance(overlayColor);
85+ aspect: UbuntuShape.Flat;
86+ radius: "medium";
87+ overlayColor: cardData && cardData["overlayColor"] || "#99000000";
88+ overlayRect: Qt.rect(0, 1 - overlayLoader.overlayHeight / height, 1, 1);
11689 }
11790 }
11891readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
@@ -124,14 +97,14 @@ Label {
12497 left: parent.left;
12598 leftMargin: units.gu(1);
12699 top: overlayLoader.top;
127− topMargin: units.gu(1);
100+ topMargin: units.gu(1) + overlayLoader.height - overlayLoader.overlayHeight;
128101 }
129102 elide: Text.ElideRight;
130103 fontSize: "small";
131104 wrapMode: Text.Wrap;
132105 maximumLineCount: 2;
133106 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
134− color: root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
107+ color: root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
135108 visible: showHeader && overlayLoader.active;
136109 width: undefined;
137110 text: root.title;
@@ -152,7 +125,7 @@ Label {
152125 maximumLineCount: 1;
153126 fontSize: "x-small";
154127 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
155− color: root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
128+ color: root.scopeStyle && overlayLoader.item ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item && overlayLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
156129 visible: titleLabel.visible && titleLabel.text;
157130 text: cardData && cardData["subtitle"] || "";
158131 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/6.res+10−9
@@ -2,7 +2,7 @@ AbstractButton {
22 id: root;
33 property var components;
44 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
66 property real fontScale: 1.0;
77 property var scopeStyle: null;
88 property int titleAlignment: Text.AlignLeft;
@@ -23,11 +23,12 @@ Loader {
2323 sourceComponent: UbuntuShape {
2424 objectName: "background";
2525 radius: "medium";
26− color: getColor(0) || "white";
27− gradientColor: getColor(1) || color;
28− anchors.fill: parent;
29− image: backgroundImage.source ? backgroundImage : null;
30− property real luminance: Style.luminance(color);
26+ backgroundColor: getColor(0) || "white";
27+ secondaryBackgroundColor: getColor(1) || backgroundColor;
28+ backgroundMode: UbuntuShape.VerticalGradient;
29+ anchors.fill: parent;
30+ source: backgroundImage.source ? backgroundImage : null;
31+ property real luminance: Style.luminance(backgroundColor);
3132 property Image backgroundImage: Image {
3233 objectName: "backgroundImage";
3334 source: {
@@ -67,7 +68,7 @@ Item {
6768 wrapMode: Text.Wrap;
6869 maximumLineCount: 2;
6970 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
70− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
71+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
7172 visible: showHeader ;
7273 width: undefined;
7374 text: root.title;
@@ -87,7 +88,7 @@ Item {
8788 maximumLineCount: 1;
8889 fontSize: "x-small";
8990 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
90− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
91+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
9192 visible: titleLabel.visible && titleLabel.text;
9293 text: cardData && cardData["subtitle"] || "";
9394 font.weight: Font.Light;
@@ -101,7 +102,7 @@ Item {
101102 rightMargin: units.gu(1);
102103 }
103104 source: cardData && cardData["emblem"] || "";
104− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
105+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
105106 height: source != "" ? titleLabel.font.pixelSize : 0;
106107 width: implicitWidth > 0 && implicitHeight > 0 ? (implicitWidth / implicitHeight * height) : implicitWidth;
107108 }
tests/plugins/Dash/cardcreator/7.res+10−9
@@ -2,7 +2,7 @@ AbstractButton {
22 id: root;
33 property var components;
44 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
66 property real fontScale: 1.0;
77 property var scopeStyle: null;
88 property int titleAlignment: Text.AlignLeft;
@@ -23,11 +23,12 @@ Loader {
2323 sourceComponent: UbuntuShape {
2424 objectName: "background";
2525 radius: "medium";
26− color: getColor(0) || "white";
27− gradientColor: getColor(1) || color;
28− anchors.fill: parent;
29− image: backgroundImage.source ? backgroundImage : null;
30− property real luminance: Style.luminance(color);
26+ backgroundColor: getColor(0) || "white";
27+ secondaryBackgroundColor: getColor(1) || backgroundColor;
28+ backgroundMode: UbuntuShape.VerticalGradient;
29+ anchors.fill: parent;
30+ source: backgroundImage.source ? backgroundImage : null;
31+ property real luminance: Style.luminance(backgroundColor);
3132 property Image backgroundImage: Image {
3233 objectName: "backgroundImage";
3334 source: {
@@ -89,7 +90,7 @@ CroppedImageMinimumSourceSize {
8990 wrapMode: Text.Wrap;
9091 maximumLineCount: 2;
9192 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
92− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
93+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
9394 visible: showHeader ;
9495 width: undefined;
9596 text: root.title;
@@ -109,7 +110,7 @@ CroppedImageMinimumSourceSize {
109110 maximumLineCount: 1;
110111 fontSize: "x-small";
111112 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
112− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
113+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
113114 visible: titleLabel.visible && titleLabel.text;
114115 text: cardData && cardData["subtitle"] || "";
115116 font.weight: Font.Light;
@@ -122,7 +123,7 @@ CroppedImageMinimumSourceSize {
122123 rightMargin: units.gu(1);
123124 top: subtitleLabel.bottom;
124125 }
125− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
126+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
126127 fontScale: root.fontScale;
127128 model: cardData && cardData["attributes"];
128129 }
tests/plugins/Dash/cardcreator/8.res+7−6
@@ -2,7 +2,7 @@ AbstractButton {
22 id: root;
33 property var components;
44 property var cardData;
5− property var artShapeBorderSource: undefined;
5+ property string artShapeStyle: "inset";
66 property real fontScale: 1.0;
77 property var scopeStyle: null;
88 property int titleAlignment: Text.AlignLeft;
@@ -23,11 +23,12 @@ Loader {
2323 sourceComponent: UbuntuShape {
2424 objectName: "background";
2525 radius: "medium";
26− color: getColor(0) || "white";
27− gradientColor: getColor(1) || color;
26+ backgroundColor: getColor(0) || "white";
27+ secondaryBackgroundColor: getColor(1) || backgroundColor;
28+ backgroundMode: UbuntuShape.VerticalGradient;
2829 anchors.fill: parent;
29− image: backgroundImage.source ? backgroundImage : null;
30− property real luminance: Style.luminance(color);
30+ source: backgroundImage.source ? backgroundImage : null;
31+ property real luminance: Style.luminance(backgroundColor);
3132 property Image backgroundImage: Image {
3233 objectName: "backgroundImage";
3334 source: {
@@ -80,7 +81,7 @@ left: parent.left;
8081 wrapMode: Text.Wrap;
8182 maximumLineCount: 2;
8283 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
83− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
84+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? theme.palette.normal.baseText : "white");
8485 visible: showHeader ;
8586 width: parent.width - x;
8687 text: root.title;
tests/plugins/Dash/cardcreatortest.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
17+import QtQuick 2.4
1818import "../../../plugins/Dash/CardCreator.js" as CardCreator
1919
2020Item {
tests/plugins/Dash/horizontaljournaltest.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import Dash 0.1
1919
2020Item {
tests/plugins/Dash/horizontaljournaltry.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import Dash 0.1
1919
2020Item {
tests/plugins/Dash/listviewwithpageheadertest.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Dash 0.1
1919
2020Rectangle {
tests/plugins/Dash/listviewwithpageheadertestsection.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Dash 0.1
1919
2020Rectangle {
tests/plugins/Dash/listviewwithpageheadertestsectionexternalmodel.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Dash 0.1
1919
2020Rectangle {
tests/plugins/Dash/organicgridtest.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import Dash 0.1
1919
2020Item {
tests/plugins/Dash/organicgridtry.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import Dash 0.1
1919
2020Item {
tests/plugins/Dash/tst_CardAttributes.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import Dash 0.1
2020
tests/plugins/Dash/tst_CroppedImageMinimumSourceSize.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
2020import Dash 0.1
2121
2222Rectangle {
tests/plugins/Dash/tst_ListViewWithPageHeaderQML.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import Dash 0.1
2020
tests/plugins/Dash/tst_ScopeStyle.qml+2−2
@@ -14,10 +14,10 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
17+import QtQuick 2.4
1818import QtTest 1.0
1919import Dash 0.1
20−import Ubuntu.Components 1.1
20+import Ubuntu.Components 1.3
2121import Utils 0.1
2222
2323Rectangle {
tests/plugins/Dash/verticaljournaltest.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import Dash 0.1
1919
2020Item {
tests/plugins/Dash/verticaljournaltry.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import Dash 0.1
1919
2020Item {
tests/plugins/IntegratedLightDM/greeter.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import IntegratedLightDM 0.1 as LightDM
1919
2020Item {
tests/plugins/Ubuntu/Gestures/DownwardsLauncher.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Ubuntu.Gestures 0.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020
2121Item {
2222
tests/plugins/Ubuntu/Gestures/LeftwardsLauncher.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Ubuntu.Gestures 0.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020
2121Item {
2222 id: root
tests/plugins/Ubuntu/Gestures/RightwardsLauncher.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Ubuntu.Gestures 0.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020
2121Item {
2222 objectName: "rightwardsLauncher"
tests/plugins/Ubuntu/Gestures/UpwardsLauncher.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Ubuntu.Gestures 0.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020
2121Item {
2222 id: root
tests/plugins/Ubuntu/Gestures/empty.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Ubuntu.Gestures 0.1
1919
2020Item {
tests/plugins/Ubuntu/Gestures/touchGateExample.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import Ubuntu.Gestures 0.1
1919
2020Rectangle {
tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Unity.Test 0.1
2020
2121Rectangle {
tests/plugins/Ubuntu/Gestures/tst_FloatingFlickable.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Gestures 0.1
2020import Unity.Test 0.1
2121
tests/plugins/Ubuntu/Gestures/tst_PressedOutsideNotifier.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import Ubuntu.Gestures 0.1
2020
2121/*
tests/plugins/Ubuntu/Gestures/tst_TouchGate.cpp+1−5
@@ -19,9 +19,7 @@
1919#include <QQmlEngine>
2020#include <QQuickView>
2121#include <QSharedPointer>
22−#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
23− #include <private/qquickwindow_p.h>
24−#endif
22+#include <private/qquickwindow_p.h>
2523
2624// C++ std lib
2725#include <functional>
@@ -188,10 +186,8 @@ void tst_TouchGate::holdsEventsUntilGainsOwnership()
188186
189187 if (!ownershipAfterTouchEnd) {
190188 touchRegistry->removeCandidateOwnerForTouch(0, candidateItem);
191−#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
192189 QQuickWindowPrivate *wp = QQuickWindowPrivate::get(testItem->window());
193190 wp->flushDelayedTouchEvent();
194−#endif
195191 // TouchGate should now open its flood gates and let testItem get all
196192 // events from touch 0 produced so far
197193 QCOMPARE(testItem->touchEventsReceived.count(), 2);
tests/plugins/Utils/tst_UtilsStyle.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
17+import QtQuick 2.4
1818import QtTest 1.0
1919import Utils 0.1
2020
tests/qmltests/CMakeLists.txt+2−1
@@ -27,7 +27,7 @@ add_unity8_qmltest(Dash CardCarousel)
2727add_unity8_qmlbenchmark(Dash CardBenchmark 1000)
2828add_unity8_qmltest(Dash CardTool)
2929add_unity8_qmltest(Dash GenericScopeView)
30−add_unity8_qmltest(Dash PageHeader)
30+add_unity8_qmltest(Dash DashPageHeader)
3131add_unity8_qmltest(Dash PreviewListView)
3232add_unity8_qmltest(Dash/Previews Preview)
3333add_unity8_qmltest(Dash/Previews PreviewActions)
@@ -43,6 +43,7 @@ add_unity8_qmltest(Dash/Previews PreviewProgress)
4343add_unity8_qmltest(Dash/Previews PreviewRatingDisplay)
4444add_unity8_qmltest(Dash/Previews PreviewRatingEdit)
4545add_unity8_qmltest(Dash/Previews PreviewRatingInput)
46+add_unity8_qmltest(Dash/Previews PreviewSharing)
4647add_unity8_qmltest(Dash/Previews PreviewTable)
4748add_unity8_qmltest(Dash/Previews PreviewTextSummary)
4849add_unity8_qmltest(Dash/Previews PreviewVideoPlayback)
tests/qmltests/Components/tst_Background.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
17+import QtQuick 2.4
1818import QtTest 1.0
1919import Unity.Test 0.1
2020
tests/qmltests/Components/tst_Carousel.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../qml/Components/"
2020import "../../../qml/Components/carousel.js" as Carousel
tests/qmltests/Components/tst_Dialogs.qml+3−3
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.2
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
2020import Unity.Test 0.1
2121
2222import "../../../qml/Components"
@@ -105,7 +105,7 @@ Rectangle {
105105 var dialogsPrivate = findInvisibleChild(dialogs, "dialogsPrivate");
106106 dialogsPrivate.showPowerDialog();
107107 var dialogLoader = findInvisibleChild(dialogs, "dialogLoader");
108− tryCompare(dialogLoader.item, "focus", true);
108+ tryCompare(dialogLoader.item.__foreground, "focus", true);
109109 }
110110 }
111111}
tests/qmltests/Components/tst_DragHandle.qml+2−2
@@ -14,10 +14,10 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import "../../../qml/Components"
1919import "tst_DragHandle"
20−import Ubuntu.Components 0.1
20+import Ubuntu.Components 1.3
2121import Ubuntu.Gestures 0.1
2222import Unity.Test 0.1
2323
tests/qmltests/Components/tst_DragHandle/BidirectionalShowable.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import "../../../../qml/Components"
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import Ubuntu.Gestures 0.1
2121
2222Item {
tests/qmltests/Components/tst_DragHandle/HorizontalShowable.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import "../../../../qml/Components"
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import Ubuntu.Gestures 0.1
2121
2222Showable {
tests/qmltests/Components/tst_DragHandle/VerticalShowable.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import "../../../../qml/Components"
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import Ubuntu.Gestures 0.1
2121
2222Showable {
tests/qmltests/Components/tst_DraggingArea.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../qml/Components"
2020
tests/qmltests/Components/tst_EdgeDragEvaluator.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import "../../../qml/Components"
1919
2020Item {
tests/qmltests/Components/tst_LazyImage.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2013 Canonical Ltd.
2+ * Copyright 2013,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,10 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../qml/Components"
20−import Ubuntu.Components 0.1
20+import Ubuntu.Components 1.3
2121import Unity.Test 0.1 as UT
2222import "tst_LazyImage"
2323
@@ -32,7 +32,7 @@ Rectangle {
3232 rightMargin: 2 * parent.width / 3
3333 }
3434
35− color: Theme.palette.normal.baseText
35+ color: theme.palette.normal.baseText
3636
3737 Column {
3838 anchors { fill: parent; margins: units.gu(5) }
tests/qmltests/Components/tst_LazyImage/ImageControls.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../../../../qml/Components"
2020
2121Row {
tests/qmltests/Components/tst_Lockscreen.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import ".."
2020import "../../../qml/Components"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222import Unity.Test 0.1 as UT
2323
2424Rectangle {
tests/qmltests/Components/tst_PhysicalKeysMapper.qml+11−10
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../qml/Components"
2020import Powerd 0.1
@@ -67,26 +67,27 @@ TestCase {
6767 Powerd.setStatus(data.status, Powerd.Unknown);
6868 physicalKeysMapper.powerKeyLongPressTime = 500;
6969
70− physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: false });
70+ physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: false }, 100);
7171
7272 // After the first key press the screen is always on
7373 // and the rest of keypresses are auto repeat
7474 Powerd.setStatus(Powerd.On, Powerd.Unknown);
7575
76− for (var i = 0; i < 3; ++i) {
77− wait(10);
78− physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true});
79− }
76+ physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true}, 300);
77+ physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true}, 400);
78+ physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true}, 500);
79+ physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true}, 599);
8080
8181 // powerKeyLongPressed should not have been emitted yet.
8282 compare(powerSpy.count, 0);
8383
84− for (var i = 0; i < 10; ++i) {
85− wait(50);
86− physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true});
87− }
84+ physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true}, 600);
8885
8986 compare(powerSpy.count, 1);
87+
88+ // Confirm we only emit once
89+ physicalKeysMapper.onKeyPressed({ key: Qt.Key_PowerDown, isAutoRepeat: true}, 601);
90+ compare(powerSpy.count, 1);
9091 }
9192
9293 function test_screenshotButtons_data() {
tests/qmltests/Components/tst_Rating.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2013 Canonical Ltd.
2+ * Copyright 2013,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,17 +14,17 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../qml/Components"
20−import Ubuntu.Components 0.1
20+import Ubuntu.Components 1.3
2121import Unity.Test 0.1 as UT
2222
2323Rectangle {
2424 id: root
2525 width: units.gu(40)
2626 height: units.gu(10)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
2828
2929 Rating {
3030 id: rating
tests/qmltests/Components/tst_ResponsiveGridView.qml+3−3
@@ -14,12 +14,12 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import ".."
2020import "../../../qml/Components"
21−import Ubuntu.Components.ListItems 0.1 as ListItem
22−import Ubuntu.Components 0.1
21+import Ubuntu.Components.ListItems 1.3 as ListItem
22+import Ubuntu.Components 1.3
2323import Unity.Test 0.1 as UT
2424
2525Item {
tests/qmltests/Components/tst_ResponsiveVerticalJournal.qml+3−3
@@ -14,12 +14,12 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import ".."
2020import "../../../qml/Components"
21−import Ubuntu.Components.ListItems 0.1 as ListItem
22−import Ubuntu.Components 0.1
21+import Ubuntu.Components.ListItems 1.3 as ListItem
22+import Ubuntu.Components 1.3
2323import Utils 0.1
2424import Unity.Test 0.1 as UT
2525
tests/qmltests/Components/tst_Showable.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import Unity.Test 0.1 as UT
2121import ".."
2222import "../../../qml/Components"
tests/qmltests/Components/tst_ZoomableImage.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../qml/Components"
2020import Unity.Test 0.1 as UT
tests/qmltests/Dash/Previews/MockPreviewWidget.qml+1−1
@@ -15,7 +15,7 @@
1515 *
1616 */
1717
18−import QtQuick 2.0
18+import QtQuick 2.4
1919import "../../../../qml/Dash/Previews"
2020
2121PreviewWidget {
tests/qmltests/Dash/Previews/tst_Preview.qml+3−3
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../../qml/Dash/Previews"
2020import Unity.Test 0.1 as UT
@@ -24,7 +24,7 @@ Rectangle {
2424 id: root
2525 width: units.gu(60)
2626 height: units.gu(60)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
2828
2929 Item {
3030 id: shell
tests/qmltests/Dash/Previews/tst_PreviewActions.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../../qml/Dash/Previews"
2020import Unity.Test 0.1 as UT
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222
2323
2424Rectangle {
tests/qmltests/Dash/Previews/tst_PreviewAudioPlayback.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import "../../../../qml/Dash/Previews"
2121import Unity.Test 0.1 as UT
2222import QtMultimedia 5.0
@@ -25,7 +25,7 @@ Rectangle {
2525 id: root
2626 width: units.gu(60)
2727 height: units.gu(80)
28− color: Theme.palette.selected.background
28+ color: theme.palette.selected.background
2929
3030 property var tracksModel0: {
3131 "tracks": [ ]
tests/qmltests/Dash/Previews/tst_PreviewComment.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
2020import "../../../../qml/Dash/Previews"
2121import Unity.Test 0.1 as UT
2222
tests/qmltests/Dash/Previews/tst_PreviewCommentInput.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
2020import "../../../../qml/Dash/Previews"
2121import Unity.Test 0.1 as UT
2222
tests/qmltests/Dash/Previews/tst_PreviewExpandable.qml+6−6
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import "../../../../qml/Dash/Previews"
2121import Unity.Test 0.1 as UT
2222
@@ -24,7 +24,7 @@ Rectangle {
2424 id: root
2525 width: units.gu(40)
2626 height: units.gu(80)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
2828
2929 property string longText: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.\nPhasellus a mi vitae augue rhoncus lobortis ut rutrum metus.\nCurabitur tortor leo, tristique sed mollis quis, condimentum venenatis nibh.\nLorem ipsum dolor sit amet, consectetur adipiscing elit.\nPhasellus a mi vitae augue rhoncus lobortis ut rutrum metus.\nCurabitur tortor leo, tristique sed mollis quis, condimentum venenatis nibh."
3030 property string longText2: "This is a very very very long text. 1 This is a very very very long text. 2 This is a very very very long text. 3 This is a very very very long text. 4 This is a very very very long text. 5 This is a very very very long text. 6 This is a very very very long text. 7 This is a very very very long text. 8 This is a very very very long text. 9 This is a very very very long text. 10 This is a very very very long text. 11 This is a very very very long text."
@@ -319,9 +319,9 @@ Rectangle {
319319 previewWidgetFactory.widgetType = allWidgetsModel.get(i).type;
320320 previewWidgetFactory.active = true;
321321
322− // Wait for the height ot settle by waiting twice the time of the
322+ // Wait for the height ot settle by waiting four times the time of the
323323 // longest of the height behaviour animations
324− wait(UbuntuAnimation.SnapDuration * 2);
324+ wait(UbuntuAnimation.SnapDuration * 4);
325325
326326 // Check the item inside the expandable has the same height
327327 // as the one straight from the factory
tests/qmltests/Dash/Previews/tst_PreviewHeader.qml+2−2
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../../qml/Dash/Previews"
2020import Unity.Test 0.1 as UT
@@ -149,7 +149,7 @@ Rectangle {
149149 tryCompareFunction(function() { return findChild(previewHeader, "mascotShape") != null }, true);
150150 var mascot = findChild(previewHeader, "mascotShape");
151151 tryCompare(mascot, "visible", true);
152− tryCompare(mascot.image, "status", Image.Ready);
152+ tryCompare(mascot.source, "status", Image.Ready);
153153 }
154154 }
155155}
tests/qmltests/Dash/Previews/tst_PreviewIconActions.qml+3−3
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../../qml/Dash/Previews"
2020import Unity.Test 0.1 as UT
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222
2323
2424Rectangle {
@@ -104,7 +104,7 @@ Rectangle {
104104
105105 var button = findChild(root, "button" + buttonId);
106106 var image = findChildsByType(button, "QQuickImage")[0];
107− var label = findChildsByType(button, "Label")[0];
107+ var label = findChildsByType(button, "UCLabel")[0];
108108
109109 compare(image.source, buttonIcon);
110110 compare(label.text, buttonLabel);
tests/qmltests/Dash/Previews/tst_PreviewImageGallery.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../../qml/Dash/Previews"
2020import Unity.Test 0.1 as UT
tests/qmltests/Dash/Previews/tst_PreviewPayments.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../../qml/Dash/Previews"
2020import Unity.Test 0.1 as UT
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222
2323Rectangle {
2424 id: root
tests/qmltests/Dash/Previews/tst_PreviewProgress.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../../qml/Dash/Previews"
2020import Unity.Test 0.1 as UT
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222
2323Rectangle {
2424 id: root
tests/qmltests/Dash/Previews/tst_PreviewRatingDisplay.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import "../../../../qml/Dash/Previews"
2121import Unity.Test 0.1 as UT
2222
@@ -24,7 +24,7 @@ Rectangle {
2424 id: root
2525 width: units.gu(40)
2626 height: units.gu(80)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
2828
2929 property var reviewsModel0: {
3030 "reviews": [ ]
tests/qmltests/Dash/Previews/tst_PreviewRatingEdit.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import "../../../../qml/Dash/Previews"
2121import Unity.Test 0.1 as UT
2222
@@ -24,7 +24,7 @@ Rectangle {
2424 id: root
2525 width: units.gu(40)
2626 height: units.gu(80)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
2828
2929 property var widgetData0: { "visible": "both", "required": "both", author: "Some dude", rating: 4.5, review: "Very cool app" }
3030
tests/qmltests/Dash/Previews/tst_PreviewRatingInput.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import "../../../../qml/Dash/Previews"
2121import Unity.Test 0.1 as UT
2222
@@ -24,7 +24,7 @@ Rectangle {
2424 id: root
2525 width: units.gu(40)
2626 height: units.gu(80)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
2828
2929 property real validInputRating: 1
3030 property real invalidInputRating: -1
tests/qmltests/Dash/Previews/tst_PreviewSharing.qmlnew file+71
@@ -0,0 +1,71 @@
1+/*
2+ * Copyright 2014 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.4
18+import QtTest 1.0
19+import Ubuntu.Components 1.3
20+import "../../../../qml/Dash/Previews"
21+import Unity.Test 0.1 as UT
22+
23+Rectangle {
24+ id: root
25+ width: units.gu(40)
26+ height: units.gu(80)
27+ color: "black"
28+
29+ property var shareData: {
30+ "uri": [
31+ "Text here",
32+ "text here 2",
33+ "text here 3"
34+ ],
35+ "contentType": "text"
36+ }
37+
38+ property var shareDataNoUri: {
39+ "uri": "",
40+ "contentType": "text"
41+ }
42+
43+ PreviewSharing {
44+ id: previewSharing
45+ anchors { left: parent.left; bottom: parent.bottom; }
46+ shareData: root.shareData
47+ }
48+
49+ UT.UnityTestCase {
50+ name: "PreviewSharingTest"
51+ when: windowShown
52+
53+ property Item peerPicker: findChild(previewSharing.rootItem, "peerPicker")
54+
55+ function cleanup() {
56+ peerPicker.visible = false;
57+ previewSharing.shareData = root.shareData;
58+ }
59+
60+ function test_visible() {
61+ compare(previewSharing.visible, true);
62+ previewSharing.shareData = shareDataNoUri;
63+ compare(previewSharing.visible, false);
64+ }
65+
66+ function test_open_picker() {
67+ mouseClick(previewSharing);
68+ compare(peerPicker.visible, true);
69+ }
70+ }
71+}
tests/qmltests/Dash/Previews/tst_PreviewTable.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import "../../../../qml/Dash/Previews"
2121import Unity.Test 0.1 as UT
2222
@@ -24,7 +24,7 @@ Rectangle {
2424 id: root
2525 width: units.gu(40)
2626 height: units.gu(80)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
2828
2929 property var widgetDataComplete: {
3030 "title": "Title here longa long long long long long long long long long long",
tests/qmltests/Dash/Previews/tst_PreviewTextSummary.qml+4−4
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import "../../../../qml/Dash/Previews"
2121import Unity.Test 0.1 as UT
2222
@@ -24,7 +24,7 @@ Rectangle {
2424 id: root
2525 width: units.gu(40)
2626 height: units.gu(80)
27− color: Theme.palette.selected.background
27+ color: theme.palette.selected.background
2828
2929 property var widgetDataComplete: {
3030 "title": "Title here",
tests/qmltests/Dash/Previews/tst_PreviewVideoPlayback.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../../qml/Dash/Previews"
2020import Unity.Test 0.1 as UT
tests/qmltests/Dash/Previews/tst_PreviewWidgetFactory.qml+3−3
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../../qml/Dash/Previews"
2020import Unity.Test 0.1 as UT
@@ -23,7 +23,7 @@ Rectangle {
2323 id: root
2424 width: units.gu(60)
2525 height: units.gu(80)
26− color: Theme.palette.selected.background
26+ color: theme.palette.selected.background
2727
2828 PreviewWidgetFactory {
2929 id: factory
tests/qmltests/Dash/Previews/tst_PreviewZoomableImage.qml+2−2
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../../qml/Dash/Previews"
2020import Unity.Test 0.1 as UT
@@ -41,7 +41,7 @@ Rectangle {
4141
4242 Loader {
4343 id: loader
44− anchors.centerIn: parent
44+ width: parent.width
4545 sourceComponent: PreviewZoomableImage {
4646 widgetData: widgetData0
4747 }
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingBoolean.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import QtTest 1.0
2020import "../../../../qml/Dash/ScopeSettings"
2121import Unity.Test 0.1 as UT
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingList.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import QtTest 1.0
2020import "../../../../qml/Dash/ScopeSettings"
2121import Unity.Test 0.1 as UT
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingNumber.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import QtTest 1.0
2020import "../../../../qml/Dash/ScopeSettings"
2121import Unity.Test 0.1 as UT
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingString.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import QtTest 1.0
2020import "../../../../qml/Dash/ScopeSettings"
2121import Unity.Test 0.1 as UT
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingsWidgetFactory.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import QtTest 1.0
2020import "../../../../qml/Dash/ScopeSettings"
2121import Unity.Test 0.1 as UT
tests/qmltests/Dash/tst_Card.qml+7−7
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2013 Canonical, Ltd.
2+ * Copyright (C) 2013,2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import Unity.Test 0.1 as UT
2121import "../../../qml/Dash"
2222import "CardHelpers.js" as Helpers
@@ -443,11 +443,11 @@ Rectangle {
443443 }
444444
445445 if (data.hasOwnProperty("color")) {
446− tryCompare(background, "color", data.color);
446+ tryCompare(background, "backgroundColor", data.color);
447447 }
448448
449449 if (data.hasOwnProperty("gradientColor")) {
450− tryCompare(background, "gradientColor", data.gradientColor);
450+ tryCompare(background, "secondaryBackgroundColor", data.gradientColor);
451451 }
452452
453453 if (data.hasOwnProperty("image")) {
@@ -520,9 +520,9 @@ Rectangle {
520520 waitForRendering(selector);
521521 waitForRendering(card);
522522
523− background.color = data.tag;
523+ background.backgroundColor = data.tag;
524524
525− var fontColor = data.dark ? Theme.palette.normal.baseText : "white";
525+ var fontColor = data.dark ? theme.palette.normal.baseText : "white";
526526
527527 tryCompareFunction(function() { return Qt.colorEqual(summary.color, fontColor); }, true);
528528 tryCompareFunction(function() { return Qt.colorEqual(title.color, fontColor); }, true);
tests/qmltests/Dash/tst_CardBenchmark.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import Unity.Test 0.1 as UT
2121import "../../../qml/Dash"
2222import "CardHelpers.js" as Helpers
tests/qmltests/Dash/tst_CardTool.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import Unity.Test 0.1 as UT
2121import "../../../qml/Dash"
2222import "CardHelpers.js" as Helpers
tests/qmltests/Dash/tst_Dash.qml+3−3
@@ -14,10 +14,10 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../qml/Dash"
20−import Ubuntu.Components 0.1
20+import Ubuntu.Components 1.3
2121import Unity.Test 0.1 as UT
2222
2323Item {
@@ -319,7 +319,7 @@ Item {
319319
320320 // Click on the store
321321 var scopesListPageHeader = findChild(scopesList, "pageHeader");
322− var searchButton = findChild(scopesListPageHeader, "store_header_button");
322+ var searchButton = findChild(scopesListPageHeader, "store_action_button");
323323 mouseClick(searchButton);
324324
325325 spy.wait();
tests/qmltests/Dash/tst_DashContent.qml+6−6
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import "../../../qml/Dash"
2020import "../../../qml/Components"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222import Unity 0.2
2323import Unity.Test 0.1 as UT
2424import Utils 0.1
@@ -215,7 +215,7 @@ Item {
215215 verify(pageHeader, "Could not find the scope page header.");
216216 var innerHeader = findChild(pageHeader, "innerPageHeader");
217217 verify(innerHeader, "Could not find the scope page header.");
218− compare(innerHeader.title, scopesModel.getScope(data.index).name);
218+ compare(innerHeader.config.title, scopesModel.getScope(data.index).name);
219219 }
220220
221221 function test_is_active_data() {
@@ -552,13 +552,13 @@ Item {
552552 }
553553
554554 function getSettledButtons() {
555− var buttons = findChildsByType(dashContent, "AbstractButton");
555+ var buttons = findChildsByType(dashContent, "UCAbstractButton");
556556 wait(2500);
557− var aux = findChildsByType(dashContent, "AbstractButton");
557+ var aux = findChildsByType(dashContent, "UCAbstractButton");
558558 while (!compareArrays(aux, buttons)) {
559559 buttons = aux;
560560 wait(2500);
561− aux = findChildsByType(dashContent, "AbstractButton");
561+ aux = findChildsByType(dashContent, "UCAbstractButton");
562562 }
563563 return buttons;
564564 }
tests/qmltests/Dash/tst_PageHeader.qml → tests/qmltests/Dash/tst_DashPageHeader.qmlrenamed+5−5
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2013 Canonical Ltd.
2+ * Copyright 2013,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import ".."
2020import "../../../qml/Dash"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222import Unity 0.2
2323import Unity.Test 0.1 as UT
2424
@@ -244,7 +244,7 @@ Item {
244244 anchors.fill: parent
245245 spacing: units.gu(1)
246246
247− PageHeader {
247+ DashPageHeader {
248248 id: pageHeader
249249 anchors {
250250 left: parent.left
@@ -254,7 +254,7 @@ Item {
254254 searchEntryEnabled: true
255255 title: "%^$%^%^&%^&%^$%GHR%"
256256 scopeStyle: QtObject {
257− readonly property color foreground: Theme.palette.normal.baseText
257+ readonly property color foreground: theme.palette.normal.baseText
258258 readonly property url headerLogo: showImageCheckBox.checked ? pageHeader.titleImageSource : ""
259259 }
260260 showBackButton: showBackButtonCheckBox.checked
tests/qmltests/Dash/tst_GenericScopeView.qml+5−5
@@ -14,13 +14,13 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import Unity 0.2
2020import ".."
2121import "../../../qml/Dash"
2222import "../../../qml/Components"
23−import Ubuntu.Components 1.1
23+import Ubuntu.Components 1.3
2424import Unity.Test 0.1 as UT
2525
2626Item {
@@ -429,7 +429,7 @@ Item {
429429 // open
430430 tryCompare(testCase.subPageLoader, "open", false);
431431 tryCompare(testCase.subPageLoader, "visible", false);
432− var settings = findChild(innerHeader, "settings_header_button");
432+ var settings = findChild(innerHeader, "settings_action_button");
433433 mouseClick(settings);
434434 tryCompare(testCase.subPageLoader, "open", true);
435435 tryCompareFunction(function() { return (String(subPageLoader.source)).indexOf("ScopeSettingsPage.qml") != -1; }, true);
@@ -500,7 +500,7 @@ Item {
500500 mouseClick(seeAll0);
501501 verify(category0.expanded);
502502 tryCompare(category0, "height", category0.item.expandedHeight + seeAll0.height);
503− tryCompare(genericScopeView.categoryView, "contentY", units.gu(14));
503+ tryCompare(genericScopeView.categoryView, "contentY", units.gu(13));
504504
505505 scrollToEnd();
506506
@@ -577,7 +577,7 @@ Item {
577577 verify(innerHeader, "Could not find the inner header");
578578
579579 expectFail("Apps", "Click scope should not have a favorite button");
580− var favoriteAction = findChild(innerHeader, "favorite_header_button");
580+ var favoriteAction = findChild(innerHeader, "favorite_action_button");
581581 verify(favoriteAction, "Could not find the favorite action.");
582582 mouseClick(favoriteAction);
583583
tests/qmltests/Dash/tst_PreviewListView.qml+5−5
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2014,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
2020import "../../../qml/Dash"
2121import Unity.Test 0.1 as UT
2222import Unity 0.2 as Unity
@@ -26,7 +26,7 @@ Rectangle {
2626 id: root
2727 width: units.gu(60)
2828 height: units.gu(60)
29− color: Theme.palette.selected.background
29+ color: theme.palette.selected.background
3030
3131 Unity.MockScope {
3232 id: mockScope
@@ -91,7 +91,7 @@ Rectangle {
9191 var header = findChild(listView, "innerPageHeader");
9292 verify(header, "Could not find the preview header");
9393
94− compare(header.title, "Mock Scope");
94+ compare(header.config.title, "Mock Scope");
9595 }
9696
9797 function test_header_style() {
tests/qmltests/Greeter/TestView.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
18−import Ubuntu.Components 1.1
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import "../Components"
2020
2121Item {
tests/qmltests/Greeter/tst_Clock.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import ".."
2020import "../../../qml/Greeter"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222import Unity.Indicators 0.1 as Indicators
2323import Unity.Test 0.1 as UT
2424
tests/qmltests/Greeter/tst_Greeter.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import ".."
2020import "../../../qml/Greeter"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222import AccountsService 0.1
2323import GSettings 1.0
2424import IntegratedLightDM 0.1 as LightDM
tests/qmltests/Greeter/tst_Infographics.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import ".."
2020import "../../../qml/Greeter"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222import Unity.Test 0.1 as UT
2323import IntegratedLightDM 0.1 as LightDM
2424
tests/qmltests/Greeter/tst_NarrowView.qml+2−2
@@ -14,12 +14,12 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import ".."
2020import "../../../qml/Greeter"
2121import IntegratedLightDM 0.1 as LightDM
22−import Ubuntu.Components 0.1
22+import Ubuntu.Components 1.3
2323import Unity.Test 0.1 as UT
2424
2525Item {
tests/qmltests/Greeter/tst_WideView.qml+2−2
@@ -14,12 +14,12 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import ".."
2020import "../../../qml/Greeter"
2121import IntegratedLightDM 0.1 as LightDM
22−import Ubuntu.Components 0.1
22+import Ubuntu.Components 1.3
2323import Unity.Test 0.1 as UT
2424
2525Item {
tests/qmltests/Launcher/tst_Launcher.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
1919import QtTest 1.0
2020import Unity.Test 0.1
21−import Ubuntu.Components 1.1
21+import Ubuntu.Components 1.3
2222import ".."
2323import "../../../qml/Launcher"
2424import Unity.Launcher 0.1
tests/qmltests/Notifications/tst_Notifications.qml+1−1
@@ -20,7 +20,7 @@ import QtTest 1.0
2020import ".."
2121import "../../../qml/Notifications"
2222import "../../../qml/Components/UnityInputInfo"
23−import Ubuntu.Components 1.2
23+import Ubuntu.Components 1.3
2424import Unity.Test 0.1
2525import Unity.Notifications 1.0
2626import QtMultimedia 5.0
tests/qmltests/Notifications/tst_OptionToggle.qml+2−3
@@ -17,14 +17,13 @@
1717 * Mirco Mueller <mirco.mueller@canonical.com>
1818 */
1919
20−import QtQuick 2.0
20+import QtQuick 2.4
2121import QtTest 1.0
2222import ".."
2323import "../../../qml/Notifications"
24−import Ubuntu.Components 0.1
24+import Ubuntu.Components 1.3
2525import Unity.Test 0.1
2626import Unity.Notifications 1.0
27−import QtMultimedia 5.0
2827
2928Row {
3029 id: rootRow
tests/qmltests/Notifications/tst_SwipeToAct.qml+1−1
@@ -20,7 +20,7 @@ import QtTest 1.0
2020import ".."
2121import "../../../qml/Notifications"
2222import "../../../qml/Components/UnityInputInfo"
23−import Ubuntu.Components 0.1
23+import Ubuntu.Components 1.3
2424import Unity.Test 0.1
2525import Unity.Notifications 1.0
2626
tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import ".."
2020import "../../../qml/Notifications"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222import Unity.Test 0.1
2323import Unity.Notifications 1.0
2424
tests/qmltests/Panel/IndicatorTest.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
1919import QtTest 1.0
2020import "../../../qml/Panel"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222import Unity.Test 0.1 as UT
2323import Unity.Indicators 0.1 as Indicators
2424
tests/qmltests/Panel/Indicators/tst_IndicatorsLight.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
1919import Unity.Test 0.1 as UT
2020import Unity.Indicators 0.1 as Indicators
21−import Ubuntu.Components 1.1
21+import Ubuntu.Components 1.3
2222import Powerd 0.1
2323import Lights 0.1
2424import QMenuModel 0.1
tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import Ubuntu.Settings.Menus 0.1 as Menus
tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import QMenuModel 0.1
tests/qmltests/Panel/tst_ActiveCallHint.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import Ubuntu.Telephony 0.1 as Telephony
tests/qmltests/Panel/tst_IndicatorItem.qml+2−2
@@ -14,10 +14,10 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
1919import QtTest 1.0
20−import Ubuntu.Components 0.1
20+import Ubuntu.Components 1.3
2121import Unity.Test 0.1 as UT
2222import "../../../qml/Panel"
2323
tests/qmltests/Panel/tst_IndicatorItemRow.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
1919import QtTest 1.0
2020import "../../../qml/Panel"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222import Unity.Test 0.1 as UT
2323import Unity.Indicators 0.1 as Indicators
2424
tests/qmltests/Panel/tst_IndicatorPage.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import Unity.Indicators 0.1 as Indicators
tests/qmltests/Panel/tst_IndicatorsBar.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
1919import QtTest 1.0
2020import "../../../qml/Panel"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222import Unity.Test 0.1 as UT
2323import Unity.Indicators 0.1 as Indicators
2424
tests/qmltests/Panel/tst_IndicatorsMenu.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
1919import QtTest 1.0
2020import "../../../qml/Panel"
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222import Unity.Test 0.1 as UT
2323import Unity.Indicators 0.1 as Indicators
2424
tests/qmltests/Panel/tst_MenuContent.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import "../../../qml/Panel"
tests/qmltests/Panel/tst_Panel.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
1919import QtTest 1.0
2020import Unity.Test 0.1
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222import Unity.Application 0.1
2323import Unity.Indicators 0.1 as Indicators
2424import Ubuntu.Telephony 0.1 as Telephony
tests/qmltests/Stages/ApplicationCheckBox.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
2020import Unity.Application 0.1
2121
2222RowLayout {
tests/qmltests/Stages/RecursingChildSessionControl.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import Unity.Application 0.1
2121
2222ColumnLayout {
tests/qmltests/Stages/tst_ApplicationWindow.qml+3−3
@@ -14,14 +14,14 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
1919import QtTest 1.0
2020import Unity.Test 0.1 as UT
2121import ".."
2222import "../../../qml/Stages"
23−import Ubuntu.Components 0.1
24−import Ubuntu.Components.ListItems 1.0 as ListItem
23+import Ubuntu.Components 1.3
24+import Ubuntu.Components.ListItems 1.3 as ListItem
2525import Unity.Application 0.1
2626
2727Rectangle {
tests/qmltests/Stages/tst_DesktopStage.qml+84−8
@@ -14,33 +14,40 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 1.1
20−import Ubuntu.Components.ListItems 1.0 as ListItem
19+import Ubuntu.Components 1.3
20+import Ubuntu.Components.ListItems 1.3 as ListItem
2121import Unity.Application 0.1
2222import Unity.Test 0.1
2323import Utils 0.1
2424
2525import "../../../qml/Stages"
26+import "../../../qml/Components"
2627
2728Item {
2829 id: root
2930 width: desktopStageLoader.width + controls.width
3031 height: desktopStageLoader.height
3132
33+ property var greeter: { fullyShown: true }
34+
3235 Binding {
3336 target: MouseTouchAdaptor
3437 property: "enabled"
3538 value: false
3639 }
3740
38− Component.onCompleted: {
41+ Component.onCompleted: resetGeometry()
42+
43+ function resetGeometry() {
3944 // ensures apps which are tested decorations are in view.
45+ WindowStateStorage.clear();
4046 WindowStateStorage.geometry = {
4147 'unity8-dash': Qt.rect(0, units.gu(3), units.gu(50), units.gu(40)),
4248 'dialer-app': Qt.rect(units.gu(51), units.gu(3), units.gu(50), units.gu(40)),
4349 'camera-app': Qt.rect(0, units.gu(44), units.gu(50), units.gu(40)),
50+ 'gallery-app': Qt.rect(units.gu(51), units.gu(44), units.gu(50), units.gu(40))
4451 }
4552 }
4653
@@ -61,6 +68,7 @@ Item {
6168 Component.onDestruction: {
6269 desktopStageLoader.itemDestroyed = true;
6370 }
71+ orientations: Orientations {}
6472 }
6573 }
6674 }
@@ -110,14 +118,14 @@ Item {
110118
111119 desktopStageLoader.active = true;
112120 tryCompare(desktopStageLoader, "status", Loader.Ready);
121+ root.resetGeometry();
113122 }
114123
115124 function killAllRunningApps() {
116− while (ApplicationManager.count > 1) {
117− var appIndex = ApplicationManager.get(0).appId == "unity8-dash" ? 1 : 0
118− ApplicationManager.stopApplication(ApplicationManager.get(appIndex).appId);
125+ while (ApplicationManager.count > 0) {
126+ ApplicationManager.stopApplication(ApplicationManager.get(0).appId);
119127 }
120− compare(ApplicationManager.count, 1)
128+ compare(ApplicationManager.count, 0)
121129 }
122130
123131 function waitUntilAppSurfaceShowsUp(appId) {
@@ -210,5 +218,73 @@ Item {
210218 tap(toAppDecoration);
211219 tryCompare(ApplicationManager.findApplication(data.apps[data.focusTo]).session.surface, "activeFocus", true);
212220 }
221+
222+ function test_minimizeApplicationHidesSurface() {
223+ var dashApp = startApplication("unity8-dash");
224+
225+ var dashDelegate = findChild(desktopStage, "stageDelegate_unity8-dash");
226+ verify(dashDelegate);
227+
228+ findChild(dashDelegate, "decoratedWindow").minimize();
229+ tryCompare(dashApp.session.surface, "visible", false);
230+ }
231+
232+ function test_maximizeApplicationHidesSurfacesBehindIt() {
233+ var dashApp = startApplication("unity8-dash");
234+ var dialerApp = startApplication("dialer-app");
235+ var cameraApp = startApplication("camera-app");
236+
237+ var dashDelegate = findChild(desktopStage, "stageDelegate_unity8-dash");
238+ verify(dashDelegate);
239+ var dialerDelegate = findChild(desktopStage, "stageDelegate_dialer-app");
240+ verify(dialerDelegate);
241+ var cameraDelegate = findChild(desktopStage, "stageDelegate_camera-app");
242+ verify(cameraDelegate);
243+
244+ // maximize
245+ findChild(dialerDelegate, "decoratedWindow").maximize();
246+ tryCompare(dialerDelegate, "visuallyMaximized", true);
247+
248+ tryCompare(dashApp.session.surface, "visible", false);
249+ compare(cameraApp.session.surface.visible, true);
250+
251+ // restore
252+ findChild(dialerDelegate, "decoratedWindow").maximize();
253+ compare(dashApp.session.surface.visible, true);
254+ compare(cameraApp.session.surface.visible, true);
255+ }
256+
257+ function test_applicationsBecomeVisibleWhenOccludingAppRemoved() {
258+ var dashApp = startApplication("unity8-dash");
259+ var dashDelegate = findChild(desktopStage, "stageDelegate_unity8-dash");
260+ verify(dashDelegate);
261+
262+ var dialerApp = startApplication("dialer-app");
263+ var dialerDelegate = findChild(desktopStage, "stageDelegate_dialer-app");
264+ verify(dialerDelegate);
265+
266+ var cameraApp = startApplication("camera-app");
267+ var cameraDelegate = findChild(desktopStage, "stageDelegate_camera-app");
268+ verify(cameraDelegate);
269+ findChild(dialerDelegate, "decoratedWindow").maximize();
270+
271+ var galleryApp = startApplication("gallery-app");
272+ var galleryDelegate = findChild(desktopStage, "stageDelegate_gallery-app");
273+ verify(galleryDelegate);
274+ findChild(galleryDelegate, "decoratedWindow").maximize();
275+
276+ tryCompare(dialerDelegate, "visuallyMaximized", true);
277+ tryCompare(galleryDelegate, "visuallyMaximized", true);
278+
279+ tryCompare(dashApp.session.surface, "visible", false);
280+ tryCompare(dialerApp.session.surface, "visible", false);
281+ tryCompare(cameraApp.session.surface, "visible", false);
282+
283+ ApplicationManager.stopApplication("gallery-app");
284+
285+ compare(cameraApp.session.surface.visible, true);
286+ tryCompare(dialerApp.session.surface, "visible", true);
287+ tryCompare(dashApp.session.surface, "visible", false); // still occluded by maximised dialer
288+ }
213289 }
214290}
tests/qmltests/Stages/tst_PhoneStage.qml+6−2
@@ -14,18 +14,21 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import ".."
21+import "../../../qml/Components"
2122import "../../../qml/Stages"
22−import Ubuntu.Components 0.1
23+import Ubuntu.Components 1.3
2324import Unity.Application 0.1
2425
2526Item {
2627 width: units.gu(70)
2728 height: units.gu(70)
2829
30+ property var greeter: { fullyShown: true }
31+
2932 PhoneStage {
3033 id: phoneStage
3134 anchors { fill: parent; rightMargin: units.gu(30) }
@@ -34,6 +37,7 @@ Item {
3437 maximizedAppTopMargin: units.gu(3) + units.dp(2)
3538 interactive: true
3639 shellOrientation: Qt.PortraitOrientation
40+ orientations: Orientations {}
3741 }
3842
3943 Binding {
tests/qmltests/Stages/tst_SessionContainer.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
1919import QtTest 1.0
2020import Unity.Test 0.1 as UT
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.3
2222import Unity.Application 0.1
2323import "../../../qml/Stages"
2424
tests/qmltests/Stages/tst_Splash.qml+2−2
@@ -14,12 +14,12 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import ".."
2121import "../../../qml/Stages"
22−import Ubuntu.Components 0.1
22+import Ubuntu.Components 1.3
2323import Unity.Application 0.1
2424
2525Rectangle {
tests/qmltests/Stages/tst_SpreadDelegate.qml+3−3
@@ -14,14 +14,14 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import ".."
2121import "../../../qml/Components"
2222import "../../../qml/Stages"
23−import Ubuntu.Components 0.1
24−import Ubuntu.Components.ListItems 1.0 as ListItem
23+import Ubuntu.Components 1.3
24+import Ubuntu.Components.ListItems 1.3 as ListItem
2525import Unity.Application 0.1
2626
2727Rectangle {
tests/qmltests/Stages/tst_SurfaceContainer.qml+2−2
@@ -14,12 +14,12 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import Unity.Test 0.1
2020import ".."
2121import "../../../qml/Stages"
22−import Ubuntu.Components 0.1
22+import Ubuntu.Components 1.3
2323import Unity.Application 0.1
2424
2525Rectangle {
tests/qmltests/Stages/tst_TabletStage.qml+9−4
@@ -14,10 +14,10 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 1.1
20−import Ubuntu.Components.ListItems 1.0 as ListItem
19+import Ubuntu.Components 1.3
20+import Ubuntu.Components.ListItems 1.3 as ListItem
2121import Unity.Application 0.1
2222import Unity.Test 0.1
2323
@@ -30,6 +30,8 @@ Rectangle {
3030 width: tabletStageLoader.width + controls.width
3131 height: tabletStageLoader.height
3232
33+ property var greeter: { fullyShown: true }
34+
3335 Loader {
3436 id: tabletStageLoader
3537
@@ -53,7 +55,10 @@ Rectangle {
5355 shellOrientation: Qt.LandscapeOrientation
5456 nativeWidth: width
5557 nativeHeight: height
56− orientations: Orientations{} // Defaults are fine for testing
58+ orientations: Orientations {
59+ native_: Qt.LandscapeOrientation
60+ primary: Qt.LandscapeOrientation
61+ }
5762 focus: true
5863 }
5964 }
tests/qmltests/Stages/tst_WindowResizeArea.qml+3−3
@@ -14,14 +14,14 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.1
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
1919import QtTest 1.0
2020import Unity.Test 0.1
2121import ".."
2222import "../../../qml/Stages"
23−import Ubuntu.Components 0.1
24−import Ubuntu.Components.ListItems 1.0 as ListItem
23+import Ubuntu.Components 1.3
24+import Ubuntu.Components.ListItems 1.3 as ListItem
2525import Unity.Application 0.1
2626
2727Item {
tests/qmltests/Tutorial/tst_Tutorial.qml+2−2
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import AccountsService 0.1
2020import IntegratedLightDM 0.1 as LightDM
21−import Ubuntu.Components 1.1
21+import Ubuntu.Components 1.3
2222import Unity.Application 0.1
2323import Unity.Test 0.1 as UT
2424
tests/qmltests/Wizard/tst_Wizard.qml+3−3
@@ -14,12 +14,12 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.3
17+import QtQuick 2.4
1818import QtTest 1.0
1919import AccountsService 0.1
2020import MeeGo.QOfono 0.2
2121import QMenuModel 0.1
22−import Ubuntu.Components 1.1
22+import Ubuntu.Components 1.3
2323import Ubuntu.SystemSettings.SecurityPrivacy 1.0
2424import Unity.Test 0.1 as UT
2525import Wizard 0.1
@@ -96,7 +96,7 @@ Item {
9696 }
9797
9898 Component.onCompleted: {
99− Theme.name = "Ubuntu.Components.Themes.SuruGradient";
99+ theme.name = "Ubuntu.Components.Themes.SuruGradient";
100100 setup();
101101 }
102102
tests/qmltests/tst_OrientedShell.qml+3−3
@@ -14,11 +14,11 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
1919import QtTest 1.0
20−import Ubuntu.Components 1.1
21−import Ubuntu.Components.ListItems 1.0 as ListItem
20+import Ubuntu.Components 1.3
21+import Ubuntu.Components.ListItems 1.3 as ListItem
2222import Unity.Application 0.1
2323import Unity.Test 0.1
2424import IntegratedLightDM 0.1 as LightDM
tests/qmltests/tst_Shell.qml+33−7
@@ -14,13 +14,13 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
1919import AccountsService 0.1
2020import GSettings 1.0
2121import IntegratedLightDM 0.1 as LightDM
22−import Ubuntu.Components 1.1
23−import Ubuntu.Components.ListItems 1.0 as ListItem
22+import Ubuntu.Components 1.3
23+import Ubuntu.Components.ListItems 1.3 as ListItem
2424import Ubuntu.Telephony 0.1 as Telephony
2525import Unity.Application 0.1
2626import Unity.Connectivity 0.1
@@ -61,6 +61,10 @@ Rectangle {
6161
6262 anchors.centerIn: parent
6363
64+ property int shellOrientation: Qt.PortraitOrientation
65+ property int nativeOrientation: Qt.PortraitOrientation
66+ property int primaryOrientation: Qt.PortraitOrientation
67+
6468 state: "phone"
6569 states: [
6670 State {
@@ -77,6 +81,9 @@ Rectangle {
7781 target: shellLoader
7882 width: units.gu(100)
7983 height: units.gu(71)
84+ shellOrientation: Qt.LandscapeOrientation
85+ nativeOrientation: Qt.LandscapeOrientation
86+ primaryOrientation: Qt.LandscapeOrientation
8087 }
8188 },
8289 State {
@@ -99,8 +106,13 @@ Rectangle {
99106 Shell {
100107 id: __shell
101108 usageScenario: usageScenarioSelector.model[usageScenarioSelector.selectedIndex]
102− orientation: Qt.PortraitOrientation
103− orientations: Orientations{} // Defaults are fine for testing
109+ nativeWidth: width
110+ nativeHeight: height
111+ orientation: shellLoader.shellOrientation
112+ orientations: Orientations {
113+ native_: shellLoader.nativeOrientation
114+ primary: shellLoader.primaryOrientation
115+ }
104116 Component.onDestruction: {
105117 shellLoader.itemDestroyed = true;
106118 }
@@ -1722,11 +1734,9 @@ Rectangle {
17221734 var appDelegate = appRepeater.itemAt(0);
17231735 var maximizeButton = findChild(appDelegate, "maximizeWindowButton");
17241736
1725− wait(5000)
17261737 tryCompare(appDelegate, "state", "normal");
17271738 tryCompare(PanelState, "buttonsVisible", false)
17281739
1729− wait(5000)
17301740 mouseClick(maximizeButton, maximizeButton.width / 2, maximizeButton.height / 2);
17311741 tryCompare(appDelegate, "state", "maximized");
17321742 tryCompare(PanelState, "buttonsVisible", true)
@@ -1738,6 +1748,22 @@ Rectangle {
17381748 tryCompare(PanelState, "buttonsVisible", true)
17391749 }
17401750
1751+ function test_newAppHasValidGeometry() {
1752+ loadDesktopShellWithApps();
1753+ var appRepeater = findChild(shell, "appRepeater");
1754+ var appId = ApplicationManager.get(0).appId;
1755+ var appDelegate = appRepeater.itemAt(0);
1756+
1757+ var resizeArea = findChild(appDelegate, "windowResizeArea");
1758+ var priv = findInvisibleChild(resizeArea, "priv");
1759+
1760+ // Make sure windows are at 0,0 or greater and they have a size that's > 0
1761+ compare(priv.normalX >= 0, true)
1762+ compare(priv.normalY >= 0, true)
1763+ compare(priv.normalWidth > 0, true)
1764+ compare(priv.normalHeight > 0, true)
1765+ }
1766+
17411767 // bug http://pad.lv/1431566
17421768 function test_switchToStagedHidesPanelButtons() {
17431769 loadDesktopShellWithApps();
tests/qmltests/tst_ShellWithPin.qml+2−2
@@ -14,8 +14,8 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Components 1.0
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
1919import QtTest 1.0
2020import AccountsService 0.1
2121import GSettings 1.0
tests/qmltests/utils/Unity/Test/MockObjectForInstanceOfTest.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919Rectangle {
2020 property int dummy
tests/qmltests/utils/Unity/Test/MockObjectForInstanceOfTestChild.qml+1−1
@@ -14,7 +14,7 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818
1919MockObjectForInstanceOfTest {
2020 property int dummy2
tests/qmltests/utils/Unity/Test/tst_UnityTest.qml+1−1
@@ -15,7 +15,7 @@
1515 */
1616
1717
18−import QtQuick 2.0
18+import QtQuick 2.4
1919import QtTest 1.0
2020import Unity.Test 0.1
2121
tests/utils/modules/Unity/Test/MouseTouchEmulationCheckbox.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtQuick.Layouts 1.1
19−import Ubuntu.Components 1.1
19+import Ubuntu.Components 1.3
2020import Unity.Test 0.1
2121
2222RowLayout {
tests/utils/modules/Unity/Test/TouchEventSequenceWrapper.cpp−2
@@ -27,12 +27,10 @@ TouchEventSequenceWrapper::TouchEventSequenceWrapper(QTest::QTouchEventSequence
2727void TouchEventSequenceWrapper::commit(bool processEvents)
2828{
2929 m_eventSequence.commit(processEvents);
30−#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
3130 if (m_item->window()) {
3231 QQuickWindowPrivate *wp = QQuickWindowPrivate::get(m_item->window());
3332 wp->flushDelayedTouchEvent();
3433 }
35−#endif
3634}
3735
3836void TouchEventSequenceWrapper::move(int touchId, int x, int y)
tests/utils/modules/Unity/Test/UnityTestCase.qml+2−2
@@ -14,9 +14,9 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
17+import QtQuick 2.4
1818import QtTest 1.0
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.3
2020import Unity.Test 0.1 as UT
2121
2222TestCase {