Skip to content

Commit a598deb

Browse files
authored
Merge pull request #10 from alexankitty/bug-fixing
Bug fixing Merge
2 parents 7430219 + 50a1d49 commit a598deb

File tree

5 files changed

+96
-4
lines changed

5 files changed

+96
-4
lines changed

contents/ui/ConfigAppearance.qml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,14 @@ Kirigami.FormLayout {
103103
text: i18n("Override")
104104
}
105105

106+
Label {
107+
text: i18n("Be sure to use this when using as a floating widget")
108+
font: Kirigami.Theme.smallFont
109+
}
110+
106111
ComboBox {
107112
id: plasmaButtonDirection
108-
enabled: overridePlasmaButtonDirection.checked
113+
visible: overridePlasmaButtonDirection.checked
109114
//Kirigami.FormData.label: i18n("Indicator Location:")
110115
model: [
111116
i18n("North"),

contents/ui/ConfigIndicators.qml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ Kirigami.FormLayout {
5959
text: i18n("Override location")
6060
}
6161

62+
Label {
63+
text: i18n("Be sure to use this when using as a floating widget")
64+
font: Kirigami.Theme.smallFont
65+
}
66+
6267
ComboBox {
6368
enabled: indicatorsEnabled.currentIndex
6469
visible: indicatorOverride.checked

contents/ui/Task.qml

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,6 @@ MouseArea {
394394
Flow {
395395
id: indicator
396396
flow: Flow.LeftToRight
397-
anchors.top: parent.top
398-
anchors.horizontalCenter: parent.horizontalCenter
399397
spacing: PlasmaCore.Units.smallSpacing
400398
Repeater {
401399

@@ -427,6 +425,8 @@ MouseArea {
427425
readonly property bool isVertical: {
428426
if(plasmoid.formFactor === PlasmaCore.Types.Vertical && !plasmoid.configuration.indicatorOverride)
429427
return true;
428+
if(plasmoid.formFactor == PlasmaCore.Types.Floating && plasmoid.configuration.indicatorLocation === 1 || plasmoid.configuration.indicatorLocation === 2)
429+
return true;
430430
if(plasmoid.configuration.indicatorLocation === 1 || plasmoid.configuration.indicatorLocation === 2)
431431
return true;
432432
else{
@@ -548,6 +548,81 @@ MouseArea {
548548
}
549549

550550
states:[
551+
State {//safety case - use bottom when not override
552+
name: "floating-fallback"
553+
when: (plasmoid.location === PlasmaCore.Types.Floating && !plasmoid.configuration.indicatorOverride)
554+
555+
AnchorChanges {
556+
target: indicator
557+
anchors{ top:undefined; bottom:parent.bottom; left:undefined; right:undefined;
558+
horizontalCenter:parent.horizontalCenter; verticalCenter:undefined}
559+
}
560+
PropertyChanges {
561+
target: indicator
562+
width: undefined
563+
height: plasmoid.configuration.indicatorSize
564+
}
565+
},
566+
State {
567+
name: "floating-bottom"
568+
when: (plasmoid.location === PlasmaCore.Types.Floating && plasmoid.configuration.indicatorLocation === 0)
569+
570+
AnchorChanges {
571+
target: indicator
572+
anchors{ top:undefined; bottom:parent.bottom; left:undefined; right:undefined;
573+
horizontalCenter:parent.horizontalCenter; verticalCenter:undefined}
574+
}
575+
PropertyChanges {
576+
target: indicator
577+
width: undefined
578+
height: plasmoid.configuration.indicatorSize
579+
}
580+
},
581+
State {
582+
name: "floating-left"
583+
when: (plasmoid.location === PlasmaCore.Types.Floating && plasmoid.configuration.indicatorLocation === 0)
584+
585+
AnchorChanges {
586+
target: indicator
587+
anchors{ top:undefined; bottom:undefined; left:parent.left; right:undefined;
588+
horizontalCenter:undefined; verticalCenter:parent.verticalCenter}
589+
}
590+
PropertyChanges {
591+
target: indicator
592+
height: undefined
593+
width: plasmoid.configuration.indicatorSize
594+
}
595+
},
596+
State {
597+
name: "floating-right"
598+
when: (plasmoid.location === PlasmaCore.Types.Floating && plasmoid.configuration.indicatorLocation === 0)
599+
600+
AnchorChanges {
601+
target: indicator
602+
anchors{ top:undefined; bottom:undefined; left:undefined; right:parent.right;
603+
horizontalCenter:undefined; verticalCenter:parent.verticalCenter}
604+
}
605+
PropertyChanges {
606+
target: indicator
607+
height: undefined
608+
width: plasmoid.configuration.indicatorSize
609+
}
610+
},
611+
State {
612+
name: "floating-top"
613+
when: (plasmoid.location === PlasmaCore.Types.Floating && plasmoid.configuration.indicatorLocation === 0)
614+
615+
AnchorChanges {
616+
target: indicator
617+
anchors{ top:parent.top; bottom:undefined; left:undefined; right:undefined;
618+
horizontalCenter:parent.horizontalCenter; verticalCenter:undefined}
619+
}
620+
PropertyChanges {
621+
target: indicator
622+
width: undefined
623+
height: plasmoid.configuration.indicatorSize
624+
}
625+
},
551626
State {
552627
name: "bottom"
553628
when: (plasmoid.configuration.indicatorOverride && plasmoid.configuration.indicatorLocation === 0)

install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/bin/sh
2-
kpackagetool5 -i .
2+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
3+
kpackagetool5 -i $SCRIPT_DIR
34
cp ./FancyTasks.png ~/.local/share/icons/hicolor/256x256/apps/FancyTasks.png

update.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
3+
kpackagetool5 -u $SCRIPT_DIR
4+
kquitapp5 plasmashell
5+
kstart5 plasmashell
6+
cp ./FancyTasks.png ~/.local/share/icons/hicolor/256x256/apps/FancyTasks.png

0 commit comments

Comments
 (0)