diff --git a/CMakeLists.txt b/CMakeLists.txt index a532889b1..1ffd7cbe4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,12 +57,12 @@ find_package(kdeqt5staging REQUIRED NO_MODULE) # Load CMake, Compiler and InstallDirs settings from KF5 and the following are already somewhat "done" tier1/tier2 libs from kdelibs: find_package(KF5 MODULE REQUIRED COMPONENTS CMake Compiler InstallDirs KIdleTime ItemModels KWidgetsAddons KWindowSystem KCodecs KArchive KCoreAddons Solid ThreadWeaver - KConfig KAuth kjs KWallet KDBusAddons + KConfig KAuth KJS KWallet KDBusAddons KI18n KGuiAddons KService KWidgets ItemViews KNotifications KIconThemes KCompletion KJobWidgets KConfigWidgets Sonnet KTextWidgets XmlGui KCrash) #find_package(KF5Transitional REQUIRED) # those are not "done" yet: -find_package(Kio REQUIRED NO_MODULE) +find_package(KIO REQUIRED NO_MODULE) find_package(kdeclarative REQUIRED NO_MODULE) # Needed for some includes from KDE/ (KMimeType, etc.) diff --git a/src/declarativeimports/plasmacomponents/qml/private/PageStack.js b/src/declarativeimports/plasmacomponents/qml/private/PageStack.js index 0e0e62764..013e4e600 100644 --- a/src/declarativeimports/plasmacomponents/qml/private/PageStack.js +++ b/src/declarativeimports/plasmacomponents/qml/private/PageStack.js @@ -151,7 +151,7 @@ function initPage(page, properties) { } container.page = page; - if (page.parent == null) { + if (page.parent == null || page.parent == container.pageParent) { container.owner = container; } else { container.owner = page.parent; diff --git a/src/declarativeimports/plasmaextracomponents/qml/PageRow.qml b/src/declarativeimports/plasmaextracomponents/qml/PageRow.qml index c0d691656..0be636f90 100644 --- a/src/declarativeimports/plasmaextracomponents/qml/PageRow.qml +++ b/src/declarativeimports/plasmaextracomponents/qml/PageRow.qml @@ -125,7 +125,7 @@ Item { return } - scrollAnimation.to = Math.max(0, Math.min(Math.max(0, columnWidth * level - columnWidth), columnWidth*depth- mainFlickable.width)) + scrollAnimation.to = Math.max(0, Math.min(Math.max(0, columnWidth * level - columnWidth), mainFlickable.contentWidth - mainFlickable.width)) scrollAnimation.running = true } @@ -209,7 +209,8 @@ Item { Row { id: root spacing: -100 - width: childrenRect.width - 100 + width: Math.max((depth-1+children[children.length-1].takenColumns) * columnWidth, childrenRect.width - 100) + height: parent.height Behavior on width { NumberAnimation { @@ -291,6 +292,9 @@ Item { // State to be set after previous state change animation has finished property string pendingState: "none" + //how many columns take the page? + property alias takenColumns: actualContainer.takenColumns + // Ensures that transition finish actions are executed // in case the object is destroyed before reaching the // end state of an ongoing transition @@ -308,7 +312,10 @@ Item { right: parent.right rightMargin: 100 } - width: (container.pageDepth >= actualRoot.depth ? Math.min(actualRoot.width, Math.max(1, Math.round(page.implicitWidth/columnWidth))*columnWidth) : columnWidth) + + property int takenColumns: Math.max(1, Math.round(container.page ? container.page.implicitWidth/columnWidth : 1)); + + width: (container.pageDepth >= actualRoot.depth ? Math.min(actualRoot.width, takenColumns*columnWidth) : columnWidth) } Image { @@ -368,6 +375,10 @@ Item { // Performs a push exit transition. function pushExit(replace, immediate, orientationChanges) { + if (replace) { + setState(immediate ? "Hidden" : "Left"); + } + if (actualRoot.visible && immediate) internal.setPageStatus(page, PageStatus.Inactive); if (replace) { @@ -523,8 +534,9 @@ Item { page.parent = owner; } } - - container.destroy(); + container.parent = null; + container.visible = false; + destroy(); } } } diff --git a/src/shell/qmlpackages/desktop/contents/configuration/AppletConfiguration.qml b/src/shell/qmlpackages/desktop/contents/configuration/AppletConfiguration.qml index 0bab3fa70..f853bd4bd 100644 --- a/src/shell/qmlpackages/desktop/contents/configuration/AppletConfiguration.qml +++ b/src/shell/qmlpackages/desktop/contents/configuration/AppletConfiguration.qml @@ -17,9 +17,8 @@ */ import QtQuick 2.0 -import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.plasma.extras 2.0 as PlasmaExtras -import org.kde.plasma.core 2.0 as PlasmaCore +import QtQuick.Controls 1.0 as QtControls +import QtQuick.Layouts 1.0 import org.kde.plasma.configuration 2.0 @@ -30,7 +29,7 @@ Rectangle { property int _m: theme.defaultFont.pointSize //BEGIN properties - color: "lightgray" + color: syspal.window width: 640 height: 480 //END properties @@ -81,25 +80,26 @@ Rectangle { //END connections //BEGIN UI components - Column { + SystemPalette {id: syspal} + + ColumnLayout { id: mainColumn anchors.fill: parent property int implicitWidth: Math.max(contentRow.implicitWidth, buttonsRow.implicitWidth) + 8 property int implicitHeight: contentRow.implicitHeight + buttonsRow.implicitHeight + 8 - Row { + RowLayout { id: contentRow anchors { left: parent.left right: parent.right } - spacing: 4 - height: parent.height - buttonsRow.height - property int implicitWidth: categoriesScroll.implicitWidth + pageScroll.implicitWidth - property int implicitHeight: Math.max(categoriesScroll.implicitHeight, pageScroll.implicitHeight) + Layout.fillHeight: true + Layout.preferredHeight: parent.height - buttonsRow.height - PlasmaExtras.ScrollArea { + QtControls.ScrollView{ id: categoriesScroll + frameVisible: true anchors { top: parent.top bottom: parent.bottom @@ -107,7 +107,6 @@ Rectangle { visible: (configDialog.configModel ? configDialog.configModel.count : 0) + globalConfigModel.count > 1 width: visible ? 100 : 0 implicitWidth: width - implicitHeight: theme.mSize(theme.defaultFont).height * 12 Flickable { id: categoriesView contentWidth: width @@ -120,10 +119,10 @@ Rectangle { id: categories width: parent.width height: Math.max(categoriesView.height, categoriesColumn.height) - color: "white" + color: syspal.base Rectangle { - color: theme.highlightColor + color: syspal.highlight width: parent.width height: theme.iconSizes.IconSizeHuge y: index * height @@ -152,23 +151,20 @@ Rectangle { } } } - PlasmaExtras.ScrollArea { + QtControls.ScrollView{ id: pageScroll anchors { top: parent.top bottom: parent.bottom - margins: 4 } - width: parent.width - categoriesScroll.width - 8 - implicitWidth: main.currentPage ? main.currentPage.implicitWidth : 0 - implicitHeight: main.currentPage ? main.currentPage.implicitHeight : 0 + Layout.fillWidth: true Flickable { contentWidth: width contentHeight: main.height Item { width: parent.width height: childrenRect.height - PlasmaComponents.PageStack { + QtControls.StackView { id: main anchors.fill: parent anchors.margins: 12 @@ -201,14 +197,13 @@ Rectangle { } } } - Row { + RowLayout { id: buttonsRow - spacing: 4 anchors { right: parent.right rightMargin: spacing } - PlasmaComponents.Button { + QtControls.Button { iconSource: "dialog-ok" text: "Ok" onClicked: { @@ -220,7 +215,7 @@ Rectangle { configDialog.close() } } - PlasmaComponents.Button { + QtControls.Button { iconSource: "dialog-ok-apply" text: "Apply" onClicked: { @@ -231,7 +226,7 @@ Rectangle { } } } - PlasmaComponents.Button { + QtControls.Button { iconSource: "dialog-cancel" text: "Cancel" onClicked: configDialog.close() diff --git a/src/shell/qmlpackages/desktop/contents/configuration/ConfigCategoryDelegate.qml b/src/shell/qmlpackages/desktop/contents/configuration/ConfigCategoryDelegate.qml index ff0b7b943..1c4d96e62 100644 --- a/src/shell/qmlpackages/desktop/contents/configuration/ConfigCategoryDelegate.qml +++ b/src/shell/qmlpackages/desktop/contents/configuration/ConfigCategoryDelegate.qml @@ -17,8 +17,7 @@ */ import QtQuick 2.0 -import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.plasma.extras 2.0 as PlasmaExtras +import QtQuick.Controls 1.0 as QtControls import org.kde.plasma.core 2.0 as PlasmaCore MouseArea { @@ -68,7 +67,7 @@ MouseArea { height: width source: model.icon } - PlasmaComponents.Label { + QtControls.Label { anchors { left: parent.left right: parent.right diff --git a/src/shell/qmlpackages/desktop/contents/configuration/ConfigurationContainmentAppearance.qml b/src/shell/qmlpackages/desktop/contents/configuration/ConfigurationContainmentAppearance.qml index 0871c0ae3..b1d49c3eb 100644 --- a/src/shell/qmlpackages/desktop/contents/configuration/ConfigurationContainmentAppearance.qml +++ b/src/shell/qmlpackages/desktop/contents/configuration/ConfigurationContainmentAppearance.qml @@ -20,6 +20,7 @@ import QtQuick 2.0 import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.configuration 2.0 +import QtQuick.Controls 1.0 as QtControls Column { id: root