better layout for quicksettings and notifications

This commit is contained in:
Marco Martin 2017-08-31 11:52:47 +02:00
parent 54d4d8dba9
commit f35d9909af
3 changed files with 23 additions and 8 deletions

View file

@ -90,7 +90,8 @@ FullScreenPanel {
}
onPositionChanged: {
if (startMouseY < contentArea.height - units.iconSizes.large) {
return;
//TODO: test if we can do without this return
// return;
}
var factor = (mouse.y - oldMouseY > 0) ? (1 - Math.max(0, (slidingArea.y + overShoot) / overShoot)) : 1

View file

@ -205,21 +205,32 @@ PlasmaCore.ColorScope {
id: slidingPanel
width: plasmoid.availableScreenRect.width
height: plasmoid.availableScreenRect.height
contents: ColumnLayout {
contents: Item {
id: panelContents
anchors.fill: parent
Item {
Rectangle {
id: quickSettingsParent
color: PlasmaCore.ColorScope.backgroundColor
z: 2
anchors {
left: parent.left
top: parent.top
right: parent.right
}
property var applet
Layout.fillWidth: true
Layout.minimumHeight: applet ? applet.fullRepresentationItem.Layout.minimumHeight : 0
height: applet ? applet.fullRepresentationItem.Layout.minimumHeight : 0
}
Item {
id: notificationsParent
anchors {
left: parent.left
bottom: parent.bottom
right: parent.right
bottomMargin: root.height
}
property var applet
clip: true
Layout.minimumHeight: applet ? applet.Layout.minimumHeight : 0
Layout.fillWidth: true
height: panelContents.height - quickSettingsParent.height-root.height//applet ? applet.Layout.minimumHeight : 0
}
}
}

View file

@ -13,6 +13,7 @@ desktopsArray[0].addWidget("org.kde.plasma.analogclock");
var panel = new Panel("org.kde.phone.panel");
panel.addWidget("org.kde.plasma.notifications");
panel.addWidget("org.kde.phone.quicksettings");
panel.addWidget("org.kde.plasma.networkmanagement");
panel.addWidget("org.kde.plasma.battery");
panel.addWidget("org.kde.plasma.volume");
@ -27,4 +28,6 @@ if (screenGeometry(bottomPanel.screen).height > screenGeometry(bottomPanel.scree
else
bottomPanel.height = 60;
createActivity("Activity 2");
if (activities().length < 2) {
createActivity("Activity 2");
}