Compare commits
1 commit
master
...
work/bam/P
Author | SHA1 | Date | |
---|---|---|---|
|
80c06bd238 |
3 changed files with 14 additions and 11 deletions
|
@ -4,20 +4,21 @@
|
|||
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||
*/
|
||||
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Layouts 1.1
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.components 3.0 as PlasmaComponents3
|
||||
|
||||
DropArea {
|
||||
readonly property bool inPanel: (plasmoid.location == PlasmaCore.Types.TopEdge
|
||||
|| plasmoid.location == PlasmaCore.Types.RightEdge
|
||||
|| plasmoid.location == PlasmaCore.Types.BottomEdge
|
||||
|| plasmoid.location == PlasmaCore.Types.LeftEdge)
|
||||
readonly property bool inPanel: (Plasmoid.location == PlasmaCore.Types.TopEdge
|
||||
|| Plasmoid.location == PlasmaCore.Types.RightEdge
|
||||
|| Plasmoid.location == PlasmaCore.Types.BottomEdge
|
||||
|| Plasmoid.location == PlasmaCore.Types.LeftEdge)
|
||||
|
||||
onEntered: {
|
||||
if (drag.hasUrls) {
|
||||
plasmoid.expanded = true;
|
||||
Plasmoid.expanded = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,13 +27,13 @@ DropArea {
|
|||
anchors.fill: parent
|
||||
|
||||
onClicked: {
|
||||
plasmoid.expanded = !plasmoid.expanded;
|
||||
Plasmoid.expanded = !Plasmoid.expanded;
|
||||
}
|
||||
}
|
||||
|
||||
PlasmaCore.IconItem {
|
||||
id: kdeConnectIcon
|
||||
anchors.fill: parent
|
||||
source: plasmoid.icon
|
||||
source: Plasmoid.icon
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
*/
|
||||
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Layouts 1.1
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
@ -46,7 +47,7 @@ PlasmaComponents.ListItem
|
|||
PlasmaCore.ToolTipArea {
|
||||
id: dropAreaToolTip
|
||||
anchors.fill: parent
|
||||
location: plasmoid.location
|
||||
location: Plasmoid.location
|
||||
active: true
|
||||
mainText: i18n("File Transfer")
|
||||
subText: i18n("Drop a file to transfer it onto your phone.")
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
*/
|
||||
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import QtQuick 2.1
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
|
@ -35,7 +36,7 @@ Item
|
|||
Plasmoid.compactRepresentation: CompactRepresentation {
|
||||
}
|
||||
|
||||
readonly property bool isConstrained: (plasmoid.formFactor == PlasmaCore.Types.Vertical || plasmoid.formFactor == PlasmaCore.Types.Horizontal)
|
||||
readonly property bool isConstrained: (Plasmoid.formFactor == PlasmaCore.Types.Vertical || Plasmoid.formFactor == PlasmaCore.Types.Horizontal)
|
||||
|
||||
Plasmoid.preferredRepresentation: isConstrained ? Plasmoid.compactRepresentation : Plasmoid.fullRepresentation
|
||||
|
||||
|
@ -44,9 +45,9 @@ Item
|
|||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
plasmoid.removeAction("configure");
|
||||
Plasmoid.removeAction("configure");
|
||||
if (KCMShell.authorize("kcm_kdeconnect.desktop").length > 0) {
|
||||
plasmoid.setAction("launchkcm", i18n("KDE Connect Settings..."), "configure");
|
||||
Plasmoid.setAction("launchkcm", i18n("KDE Connect Settings..."), "configure");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue