Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/CompactRepresentation.qml
Show All 18 Lines | |||||
19 | 19 | | |||
20 | import QtQuick 2.0 | 20 | import QtQuick 2.0 | ||
21 | import QtQuick.Layouts 1.1 | 21 | import QtQuick.Layouts 1.1 | ||
22 | 22 | | |||
23 | import org.kde.plasma.core 2.0 as PlasmaCore | 23 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
24 | import org.kde.draganddrop 2.0 as DragDrop | 24 | import org.kde.draganddrop 2.0 as DragDrop | ||
25 | 25 | | |||
26 | DragDrop.DropArea { | 26 | DragDrop.DropArea { | ||
27 | readonly property bool inPanel: (plasmoid.location == PlasmaCore.Types.TopEdge | ||||
28 | || plasmoid.location == PlasmaCore.Types.RightEdge | ||||
29 | || plasmoid.location == PlasmaCore.Types.BottomEdge | ||||
30 | || plasmoid.location == PlasmaCore.Types.LeftEdge) | ||||
31 | | ||||
32 | Layout.minimumWidth: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? height : units.iconSizes.small | ||||
33 | Layout.minimumHeight: plasmoid.formFactor === PlasmaCore.Types.Vertical ? width : (units.iconSizes.small + 2 * theme.mSize(theme.defaultFont).height) | ||||
34 | | ||||
35 | Layout.maximumWidth: inPanel && plasmoid.formFactor != PlasmaCore.Types.Vertical ? units.iconSizeHints.panel : -1 | ||||
36 | Layout.maximumHeight: inPanel && plasmoid.formFactor != PlasmaCore.Types.Vertical ? units.iconSizeHints.panel : -1 | ||||
37 | | ||||
27 | property Item folderView: null | 38 | property Item folderView: null | ||
28 | 39 | | |||
29 | onContainsDragChanged: { | 40 | onContainsDragChanged: { | ||
30 | if (containsDrag) { | 41 | if (containsDrag) { | ||
31 | hoverActivateTimer.restart(); | 42 | hoverActivateTimer.restart(); | ||
32 | } else { | 43 | } else { | ||
33 | hoverActivateTimer.stop(); | 44 | hoverActivateTimer.stop(); | ||
34 | } | 45 | } | ||
Show All 38 Lines |