mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
better layout for quicksettings and notifications
This commit is contained in:
parent
54d4d8dba9
commit
f35d9909af
3 changed files with 23 additions and 8 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue