Changeset View
Changeset View
Standalone View
Standalone View
applets/showActivityManager/package/contents/ui/main.qml
Show All 22 Lines | |||||
23 | import org.kde.plasma.core 2.0 as PlasmaCore | 23 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
24 | 24 | | |||
25 | MouseArea { | 25 | MouseArea { | ||
26 | id: iconContainer | 26 | id: iconContainer | ||
27 | property string activeSource: "Status" | 27 | property string activeSource: "Status" | ||
28 | height: units.iconSizes.large | 28 | height: units.iconSizes.large | ||
29 | width: units.iconSizes.large | 29 | width: units.iconSizes.large | ||
30 | 30 | | |||
31 | Layout.minimumWidth: units.iconSizes.small | 31 | readonly property bool inPanel: (plasmoid.location == PlasmaCore.Types.TopEdge | ||
mart: to detect if this is in a panel was intended from the beginning the formfactor, not the… | |||||
We've had this discussion on IRC before and you agreed with my reasoning as well as saying "it doesn't matter". Do you want to reopen this discussion now that the code is in ~10 places ...? hein: We've had this discussion on IRC before and you agreed with my reasoning as well as saying "it… | |||||
32 | Layout.minimumHeight: units.iconSizes.small | 32 | || plasmoid.location == PlasmaCore.Types.RightEdge | ||
33 | || plasmoid.location == PlasmaCore.Types.BottomEdge | ||||
34 | || plasmoid.location == PlasmaCore.Types.LeftEdge) | ||||
35 | | ||||
36 | Layout.maximumWidth: inPanel ? units.iconSizeHints.panel : -1 | ||||
37 | Layout.maximumHeight: inPanel ? units.iconSizeHints.panel : -1 | ||||
this will break fitts law on an horizontal panel, as mouse wouldn't work on screen edge? mart: this will break fitts law on an horizontal panel, as mouse wouldn't work on screen edge? | |||||
hein: It works fine. | |||||
33 | 38 | | |||
34 | Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation | 39 | Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation | ||
35 | 40 | | |||
36 | onClicked: { | 41 | onClicked: { | ||
37 | var service = dataSource.serviceForSource(activeSource) | 42 | var service = dataSource.serviceForSource(activeSource) | ||
38 | var operation = service.operationDescription("toggleActivityManager") | 43 | var operation = service.operationDescription("toggleActivityManager") | ||
39 | service.startOperationCall(operation) | 44 | service.startOperationCall(operation) | ||
40 | } | 45 | } | ||
Show All 23 Lines |
to detect if this is in a panel was intended from the beginning the formfactor, not the location