diff --git a/plasmoid/contents/ui/Disclaimer.qml b/plasmoid/contents/ui/Disclaimer.qml old mode 100755 new mode 100644 --- a/plasmoid/contents/ui/Disclaimer.qml +++ b/plasmoid/contents/ui/Disclaimer.qml @@ -25,24 +25,30 @@ Item { anchors.fill: parent +Rectangle{ +id: disclaimerHeadingBg +color: theme.linkColor +anchors.left: parent.left +anchors.top: parent.top +anchors.right: parent.right +height: units.gridUnit * 3 + Text { id: disclaimerHeading1 - width: 0 height: 28 text: "Let's Continue ?" font.pointSize: 24 elide: Text.ElideLeft font.family: "Verdana" wrapMode: Text.WrapAnywhere font.bold: true renderType: Text.QtRendering - horizontalAlignment: Text.AlignHCenter - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 0 - color: "steelblue" + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.top + anchors.topMargin: units.gridUnit * 0.5 + color: theme.backgroundColor } +} Text { @@ -54,22 +60,21 @@ wrapMode: Text.Wrap renderType: Text.QtRendering horizontalAlignment: Text.AlignHCenter - anchors.top: disclaimerHeading1.bottom + anchors.top: disclaimerHeadingBg.bottom anchors.topMargin: 18 anchors.right: parent.right anchors.rightMargin: 5 anchors.left: parent.left anchors.leftMargin: 5 color: theme.textColor } - Rectangle { + Item { id: noticemsg anchors.top: disclaimerBody1.bottom anchors.topMargin: 20 anchors.right: parent.right anchors.left: parent.left - color: theme.backgroundColor height: disclaimerBody2.contentHeight Text { diff --git a/plasmoid/contents/ui/MsmView.qml b/plasmoid/contents/ui/MsmView.qml old mode 100755 new mode 100644 --- a/plasmoid/contents/ui/MsmView.qml +++ b/plasmoid/contents/ui/MsmView.qml @@ -34,8 +34,7 @@ left: parent.left; leftMargin: 0.5; right: parent.right - - } + } height: units.gridUnit * 4 border.width: 1 border.color: Qt.darker(theme.linkColor, 1.2) @@ -46,12 +45,24 @@ return launchinstaller.msmapp("bash " + bscrpt + " install " + model.url) } + function getSkillInfoLocal() { + var customFold = '/opt/mycroft/skills/' + var skillPath = customFold + model.name + if(PlasmaLa.FileReader.file_exists_local(skillPath)){ + installLabl.text = "Installed" + getskillviamsmRect.color = Qt.lighter(theme.textColor, 1.2) + installLabl.color = Qt.darker(theme.backgroundColor, 1.2) + skillcontent.border.color = Qt.lighter(theme.textColor, 1.2) + } + } + PlasmaLa.MsmApp{ id: launchinstaller } Component.onCompleted: { msmSkillInstallProgBar.visible = false; + getSkillInfoLocal(); } PlasmaComponents.Label { @@ -72,8 +83,8 @@ anchors.bottom: parent.bottom anchors.bottomMargin: 2 color: Qt.darker(theme.linkColor, 1.2) + } } - } PlasmaComponents.Label { id: urlskllable @@ -97,10 +108,9 @@ } onExited: { urlskllable.color = theme.textColor + } } } - - } Rectangle { id: getskillviamsmRect @@ -129,21 +139,41 @@ anchors.fill: parent hoverEnabled: true onEntered: { - getskillviamsmRect.color = Qt.lighter(theme.backgroundColor, 1.2) - installLabl.color = Qt.darker(theme.linkColor, 1.2) - getskillviamsmRect.border.width = 1 - getskillviamsmRect.border.color = Qt.darker(theme.linkColor, 1.2) + switch(installLabl.text){ + case "Install": + getskillviamsmRect.color = Qt.lighter(theme.backgroundColor, 1.2) + installLabl.color = Qt.darker(theme.linkColor, 1.2) + getskillviamsmRect.border.width = 1 + getskillviamsmRect.border.color = Qt.darker(theme.linkColor, 1.2) + break + case "Installed": + getskillviamsmRect.color = Qt.lighter(theme.textColor, 1.2) + installLabl.color = Qt.darker(theme.backgroundColor, 1.2) + getskillviamsmRect.border.width = 0 + getskillviamsmRect.border.color = Qt.darker(theme.backgroundColor, 1.2) + skillcontent.border.color = Qt.darker(theme.textColor, 1.2) + break + } } onExited: { - getskillviamsmRect.color = Qt.darker(theme.linkColor, 1.2) - installLabl.color = Qt.darker(theme.backgroundColor, 1.2) - getskillviamsmRect.border.width = 0 + switch(installLabl.text){ + case "Install": + getskillviamsmRect.color = Qt.darker(theme.linkColor, 1.2) + installLabl.color = Qt.darker(theme.backgroundColor, 1.2) + getskillviamsmRect.border.width = 0 + break + case "Installed": + getskillviamsmRect.color = Qt.lighter(theme.textColor, 1.2) + installLabl.color = Qt.darker(theme.backgroundColor, 1.2) + getskillviamsmRect.border.width = 0 + getskillviamsmRect.color = Qt.lighter(theme.textColor, 1.2) + skillcontent.border.color = Qt.lighter(theme.textColor, 1.2) + break + } } onClicked: { - console.log(model.url) var msmprogress = exec() var getcurrentprogress = msmprogress.split("\n") - console.log(getcurrentprogress); if(getcurrentprogress.indexOf("Cloning repository") != -1) { installLabl.visible = false @@ -155,9 +185,10 @@ msmSkillInstallProgBar.visible = false installLabl.visible = true installLabl.text = "Installed" - } + getSkillInfoLocal() } } } + } }