diff --git a/miniplasmoid/contents/ui/FullRepresentation.qml b/miniplasmoid/contents/ui/FullRepresentation.qml index c793508..12eb915 100644 --- a/miniplasmoid/contents/ui/FullRepresentation.qml +++ b/miniplasmoid/contents/ui/FullRepresentation.qml @@ -1,68 +1,71 @@ /* Copyright 2019 Marco Martin This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 6 of version 3 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see . */ import QtQuick 2.9 import QtQml.Models 2.2 import QtQuick.Controls 2.2 as Controls import QtQuick.Layouts 1.3 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kirigami 2.5 as Kirigami import Mycroft 1.0 as Mycroft Item { id: root implicitWidth: Kirigami.Units.gridUnit * 20 implicitHeight: Kirigami.Units.gridUnit * 32 + Layout.minimumWidth: Kirigami.Units.gridUnit * 10 + Layout.minimumHeight: Kirigami.Units.gridUnit * 15 + Component.onCompleted: { Mycroft.MycroftController.start(); } Timer { interval: 10000 running: Mycroft.MycroftController.status != Mycroft.MycroftController.Open onTriggered: { print("Trying to connect to Mycroft"); Mycroft.MycroftController.start(); } } Mycroft.SkillView { id: skillView anchors.fill: parent backgroundVisible: false Kirigami.Theme.colorSet: Kirigami.Theme.View clip: true onCurrentItemChanged: { currentItem.background.visible = false inputField.forceActiveFocus(); } } Mycroft.StatusIndicator { anchors.horizontalCenter: parent.horizontalCenter y: skillView.currentItem == skillView.initialItem ? parent.height/2 - height/2 : parent.height - height - Kirigami.Units.largeSpacing } } diff --git a/miniplasmoid/contents/ui/main.qml b/miniplasmoid/contents/ui/main.qml index 3650ef2..85a343c 100644 --- a/miniplasmoid/contents/ui/main.qml +++ b/miniplasmoid/contents/ui/main.qml @@ -1,35 +1,34 @@ /* Copyright 2019 Marco Martin This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 6 of version 3 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see . */ import QtQuick 2.9 import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kirigami 2.5 as Kirigami Item { id: root - //Plasmoid.switchWidth: Kirigami.Units.gridUnit * 5 - //Plasmoid.switchHeight: Kirigami.Units.gridUnit * 5 - Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation + Plasmoid.switchWidth: Plasmoid.formFactor == PlasmaCore.Types.Planar ? 0 : Kirigami.Units.gridUnit * 5 + Plasmoid.switchHeight: Plasmoid.formFactor == PlasmaCore.Types.Planar ? 0 : Kirigami.Units.gridUnit * 5 Plasmoid.fullRepresentation: FullRepresentation {} }