@@ -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 )
0 commit comments