Commit e41ca570 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Improve look&feel of kdeconnect plasmoid

Provide a good initial size
Use compact representation when on a panel, full when on the desktop (this
prevented the icon to show on the system tray).

Reviewed by Albert Vaca
parent 685e821d
......@@ -24,11 +24,6 @@ import org.kde.plasma.core 2.0 as PlasmaCore
Item {
id: view
//TODO: Use this to detect if we should be iconized or full size
function isConstrained() {
return (plasmoid.formFactor == Vertical || plasmoid.formFactor == Horizontal);
}
PlasmaCore.IconItem {
id: icon
source: "kdeconnect"
......
......@@ -27,9 +27,6 @@ import org.kde.kdeconnect 1.0 as KdeConnect
Item {
id: kdeconnect
implicitWidth: 290
implicitHeight: 340
PlasmaComponents.Label {
visible: devicesView.count==0
text: i18n("No paired devices available")
......
......@@ -23,8 +23,15 @@ import org.kde.plasma.plasmoid 2.0
Item
{
Plasmoid.compactRepresentation: CompactRepresentation { }
width: units.gridUnit * 20
height: units.gridUnit * 32
function isConstrained() {
return (plasmoid.formFactor == Vertical || plasmoid.formFactor == Horizontal);
}
Plasmoid.compactRepresentation: CompactRepresentation {}
Plasmoid.fullRepresentation: FullRepresentation {}
Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation
Plasmoid.preferredRepresentation: isConstrained() ? Plasmoid.compactRepresentation : Plasmoid.fullRepresentation
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment