Commit 0d732531 authored by Nate Graham's avatar Nate Graham 🔩

[applet] Put the toolbar in the header area

Summary:
This patch implements part of the mockup at T10470 by putting the toolbar  in a heading
area visually connected to the titlebar.

Test Plan: {F8254838}

Reviewers: #vdg, #plasma, jgrulich, niccolove, manueljlin

Reviewed By: #vdg, jgrulich, niccolove, manueljlin

Subscribers: plasma-devel

Tags: #plasma

Maniphest Tasks: T10470

Differential Revision: https://phabricator.kde.org/D29117
parent 64ac2dd2
......@@ -21,11 +21,12 @@
import QtQuick 2.2
import QtQuick.Layouts 1.2
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
FocusScope {
PlasmaComponents3.Page {
id: full
property alias toolbarValues: toolbar
......@@ -47,18 +48,21 @@ FocusScope {
sourceModel: full.connectionModel
}
ColumnLayout {
anchors.fill: parent
header: PlasmaExtras.PlasmoidHeading {
Toolbar {
id: toolbar
Layout.fillWidth: true
width: parent.width
}
}
FocusScope {
anchors.fill: parent
anchors.topMargin: units.smallSpacing * 2
PlasmaExtras.ScrollArea {
id: scrollView
Layout.fillWidth: true
Layout.fillHeight: true
anchors.fill: parent
frameVisible: false
PlasmaExtras.Heading {
......@@ -118,19 +122,19 @@ FocusScope {
delegate: ConnectionItem { }
}
}
}
Connections {
target: plasmoid
onExpandedChanged: {
connectionView.currentVisibleButtonIndex = -1;
if (expanded) {
handler.requestScan();
full.connectionModel = networkModelComponent.createObject(full)
} else {
full.connectionModel.destroy()
toolbar.closeSearch();
Connections {
target: plasmoid
onExpandedChanged: {
connectionView.currentVisibleButtonIndex = -1;
if (expanded) {
handler.requestScan();
full.connectionModel = networkModelComponent.createObject(full)
} else {
full.connectionModel.destroy()
toolbar.closeSearch();
}
}
}
}
......
......@@ -209,14 +209,6 @@ ColumnLayout {
}
}
PlasmaCore.SvgItem {
Layout.fillWidth: true
elementId: "horizontal-line"
Layout.leftMargin: - units.smallSpacing * 1.5
Layout.rightMargin: - units.smallSpacing * 1.5
svg: lineSvg
}
PlasmaComponents.TextField {
id: searchTextField
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment