Compare commits

...

1 commit

Author SHA1 Message Date
Andrey Butirsky
80c06bd238 DRAFT: refactor plasmoid. -> Plasmoid.
Automated by:
find ~/kde6/src/ -name *.qml -execdir sed "/plasmoid\./{s//Plasmoid./g;h};${x;/./{x;q0};x;q1}" -i ./.git \; -execdir git add -u \; -execdir git checkout -qB work/bam/Plasmoid \;
find -type d -name .git -execdir git commit -m "DRAFT: refactor plasmoid. -> Plasmoid." \;  -execdir git push \;

https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/446
2023-10-06 17:06:45 +03:00
3 changed files with 14 additions and 11 deletions

View file

@ -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
}
}

View file

@ -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.")

View file

@ -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");
}
}
}