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
This commit is contained in:
parent
685e821d0a
commit
e41ca57045
3 changed files with 9 additions and 10 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue