port away from mobilecomponents

This commit is contained in:
Marco Martin 2017-11-10 16:21:20 +01:00
parent 9ae7d849a8
commit 5aa20872d5
4 changed files with 139 additions and 126 deletions

View file

@ -21,7 +21,6 @@ import QtQuick 2.0
import QtQuick.Layouts 1.1
import QtQuick.Window 2.2
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.mobilecomponents 0.2
import org.kde.plasma.private.mobileshell 2.0
FullScreenPanel {

View file

@ -23,7 +23,6 @@ import QtQuick.Window 2.2
import org.kde.taskmanager 0.1 as TaskManager
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.mobilecomponents 0.2
Item {
id: delegate

View file

@ -23,7 +23,6 @@ import QtQuick.Window 2.2
import org.kde.taskmanager 0.1 as TaskManager
import org.kde.plasma.core 2.1 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.mobilecomponents 0.2
import org.kde.plasma.private.mobileshell 2.0
FullScreenPanel {

View file

@ -26,6 +26,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.kquickcontrolsaddons 2.0
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
import org.kde.kirigami 2.2 as Kirigami
import QtQuick.Window 2.1
import QtQuick.Layouts 1.1
@ -38,6 +39,8 @@ Rectangle {
signal closed()
property alias containment: widgetExplorer.containment
Component.onCompleted: splitDrawer.contentX = typeSelector.width
MouseArea {
anchors.fill: parent
drag.filterChildren: true
@ -135,12 +138,23 @@ Rectangle {
//view: desktop
onShouldClose: removeAnim.running = true;
}
MobileComponents.SplitDrawer {
Flickable {
id: splitDrawer
visible: true
anchors.fill: parent
contentItem: PlasmaExtras.ScrollArea {
clip: true
contentWidth: mainRow.width
contentHeight: height
Row {
id: mainRow
height: splitDrawer.height
PlasmaExtras.ScrollArea {
id: typeSelector
anchors {
top: parent.top
bottom: parent.bottom
}
width: units.gridUnit * 10
ListView {
model: widgetExplorer.filterModel
delegate: PlasmaComponents.ListItem {
@ -163,9 +177,11 @@ Rectangle {
ColumnLayout {
anchors {
fill: parent
margins: units.smallSpacing
top: parent.top
bottom: parent.bottom
}
width: splitDrawer.width
spacing: units.smallSpacing
PlasmaExtras.Title {
@ -280,7 +296,7 @@ Rectangle {
}
}
}
}
Component.onCompleted: {
main.getWidgetsButton = getWidgetsButton