Skip to content

Commit 05c00f6

Browse files
authored
Add files via upload
1 parent 0210d0b commit 05c00f6

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

contents/ui/ConfigGeneral.qml

+1
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ Kirigami.FormLayout {
212212
onCurrentIndexChanged: {
213213
if (currentIndex == 2) {
214214
floating.enabled = false
215+
floating.checked = true
215216
} else {
216217
floating.enabled = true
217218
}

contents/ui/FloatingAvatar.qml

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ PlasmaCore.Dialog { //cosmic background noise is less random than the placement
2727

2828
property int avatarWidth
2929
property bool isTop: false
30+
3031
flags: Qt.WindowStaysOnTopHint
3132
type: "Notification"
3233

3334
x: root.x + root.width / 2 - width / 2
34-
y: isTop ? root.y + root.height - width / 2 : root.y - width / 2
35-
35+
y: root.y - width / 2 //you can't even add 1 without everything breaking wtf
36+
3637
mainItem:
3738
Item {
3839
onParentChanged: {

contents/ui/MainView.qml

+7-7
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,18 @@ Item {
6666
width: main.width
6767
height: isTop ? main.height - 200 * PlasmaCore.Units.devicePixelRatio : main.height - y
6868
color: plasmoid.configuration.theming == 0 ? "#131314" : plasmoid.configuration.theming == 1 ? "#ECEDEE" : PlasmaCore.Theme.backgroundColor
69-
radius: plasmoid.configuration.floating ? 10 : 0
69+
radius: 10
7070
Rectangle {
7171
id: topCorner
72-
visible: plasmoid.configuration.floating & !isTop
72+
visible: true
7373
anchors.top: backdrop.top
7474
color: backdrop.color
7575
width: backdrop.width
7676
height: 20
7777
}
7878
Rectangle {
7979
id: bottomCorner
80-
visible: plasmoid.configuration.floating & isTop
80+
visible: !plasmoid.configuration.floating
8181
anchors.bottom: backdrop.bottom
8282
color: backdrop.color
8383
width: backdrop.width
@@ -94,7 +94,7 @@ Item {
9494
visualParent: root
9595
isTop: main.isTop
9696
avatarWidth: 125 * PlasmaCore.Units.devicePixelRatio
97-
visible: root.visible
97+
visible: root.visible && !isTop ? true : root.visible && plasmoid.configuration.floating ? true : false
9898
}
9999
}
100100
//Power & Settings
@@ -111,7 +111,7 @@ Item {
111111
PlasmaComponents.Label {
112112
id: nameLabel
113113
x: main.width / 2 - width / 2 //This centeres the Text
114-
y: isTop ? main.height - height - 80 * PlasmaCore.Units.devicePixelRatio : 80 * PlasmaCore.Units.devicePixelRatio
114+
y: isTop ? main.height - height - 125 * PlasmaCore.Units.devicePixelRatio : 80 * PlasmaCore.Units.devicePixelRatio
115115
text: plasmoid.configuration.enableGreeting && plasmoid.configuration.customGreeting ? plasmoid.configuration.customGreeting : plasmoid.configuration.enableGreeting ? 'Hi, ' + kuser.fullName : i18n("%1@%2", kuser.loginName, kuser.host)
116116
color: textColor
117117
font.family: textFont
@@ -122,7 +122,7 @@ Item {
122122
Item {
123123
Rectangle {
124124
x: 25 * PlasmaCore.Units.devicePixelRatio
125-
y: isTop ? main.height - height - 125 * PlasmaCore.Units.devicePixelRatio : 125 * PlasmaCore.Units.devicePixelRatio
125+
y: isTop ? main.height - height - 55 : 125 * PlasmaCore.Units.devicePixelRatio
126126
width: main.width - 2 * x
127127
height: 45 * PlasmaCore.Units.devicePixelRatio
128128
radius: 6
@@ -311,7 +311,7 @@ Item {
311311
width: main.width
312312
height: 40 * PlasmaCore.Units.devicePixelRatio
313313
anchors.bottom: backdrop.bottom
314-
radius: !isTop ? backdrop.radius : 0
314+
radius: !bottomCorner.visible ? backdrop.radius : 0
315315
gradient: Gradient {
316316
GradientStop { position: 0.0; color: "transparent" }
317317
GradientStop { position: 1.0; color: Qt.darker(backdrop.color, 1.5)}

contents/ui/MenuRepresentation.qml

+4-4
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ PlasmaCore.Dialog {
7575
screenAvail.width,
7676
screenAvail.height);*/
7777

78-
var offset = plasmoid.configuration.floating ? parent.height : 0;
78+
var offset = plasmoid.configuration.floating ? parent.height * 0.75 : 0;
7979
// Fall back to bottom-left of screen area when the applet is on the desktop or floating.
8080
var x = offset;
8181
var y = screen.height - height - offset;
@@ -89,9 +89,9 @@ PlasmaCore.Dialog {
8989
} else {
9090
x = (appletTopLeft.x < horizMidPoint) ? screen.x : (screen.x + screen.width) - width;
9191
if (plasmoid.configuration.floating) {
92-
if (appletTopLeft.x < horizMidPoint & plasmoid.location != PlasmaCore.Types.TopEdge) {
92+
if (appletTopLeft.x < horizMidPoint) {
9393
x += offset
94-
} else if (appletTopLeft.x + width > horizMidPoint & plasmoid.location != PlasmaCore.Types.TopEdge){
94+
} else if (appletTopLeft.x + width > horizMidPoint){
9595
x -= offset
9696
}
9797
}
@@ -101,7 +101,7 @@ PlasmaCore.Dialog {
101101
if (plasmoid.location == PlasmaCore.Types.TopEdge) {
102102
if (plasmoid.configuration.floating) {
103103
/*this is floatingAvatar.width*/
104-
offset = (125 * PlasmaCore.Units.devicePixelRatio) / 2 - parent.height
104+
offset = (125 * PlasmaCore.Units.devicePixelRatio) / 2 + parent.height * 0.125
105105
}
106106
y = parent.height + panelSvg.margins.bottom + offset;
107107
} else {

0 commit comments

Comments
 (0)