Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
Show All 34 Lines | 27 | ColumnLayout { | |||
---|---|---|---|---|---|
35 | Layout.preferredHeight: Layout.minimumHeight | 35 | Layout.preferredHeight: Layout.minimumHeight | ||
36 | Layout.maximumWidth: Layout.minimumWidth | 36 | Layout.maximumWidth: Layout.minimumWidth | ||
37 | Layout.maximumHeight: Layout.minimumHeight | 37 | Layout.maximumHeight: Layout.minimumHeight | ||
38 | spacing: 0 // avoid gap between title and content | 38 | spacing: 0 // avoid gap between title and content | ||
39 | 39 | | |||
40 | property alias activeApplet: container.activeApplet | 40 | property alias activeApplet: container.activeApplet | ||
41 | property alias hiddenLayout: hiddenItemsView.layout | 41 | property alias hiddenLayout: hiddenItemsView.layout | ||
42 | 42 | | |||
43 | PlasmaExtras.PlasmoidHeading { | ||||
44 | | ||||
43 | RowLayout { | 45 | RowLayout { | ||
46 | anchors.fill: parent | ||||
44 | 47 | | |||
mart: not in all places you will have access to a dialog. the magic correct values should come from… | |||||
I've done the first part (the magic correct values should come from the toparea margins). Regarding the control, I'm not sure how it could be done, since the usage of the toparea element changes a lot:
How could that be done? niccolove: I've done the first part (the magic correct values should come from the toparea margins). | |||||
Okay, I tried to create a new component for this on https://phabricator.kde.org/D27695. I did not use toolBar because it was already using a different svg, but if you think that's the best idea, I can investigate that niccolove: Okay, I tried to create a new component for this on https://phabricator.kde.org/D27695. I did… | |||||
45 | PlasmaExtras.Heading { | 48 | PlasmaExtras.Heading { | ||
46 | id: heading | 49 | id: heading | ||
47 | Layout.fillWidth: true | 50 | Layout.fillWidth: true | ||
48 | level: 1 | 51 | level: 1 | ||
49 | Layout.leftMargin: { | 52 | Layout.leftMargin: { | ||
50 | //Menu mode | 53 | //Menu mode | ||
51 | if (!activeApplet && hiddenItemsView.visible && !LayoutMirroring.enabled) { | 54 | if (!activeApplet && hiddenItemsView.visible && !LayoutMirroring.enabled) { | ||
52 | return units.smallSpacing; | 55 | return units.smallSpacing; | ||
53 | 56 | | |||
54 | //applet open, sidebar | 57 | //applet open, sidebar | ||
55 | } else if (activeApplet && hiddenItemsView.visible && !LayoutMirroring.enabled) { | 58 | } else if (activeApplet && hiddenItemsView.visible && !LayoutMirroring.enabled) { | ||
56 | return hiddenItemsView.width + units.largeSpacing; | 59 | return hiddenItemsView.width + units.largeSpacing; | ||
57 | 60 | | |||
58 | //applet open, no sidebar | 61 | //applet open, no sidebar | ||
59 | } else { | 62 | } else { | ||
60 | return 0; | 63 | return 0; | ||
61 | } | 64 | } | ||
ngraham: merge conflict remnant | |||||
62 | } | 65 | } | ||
63 | Layout.rightMargin: { | 66 | Layout.rightMargin: { | ||
64 | //Menu mode | 67 | //Menu mode | ||
65 | if (!activeApplet && hiddenItemsView.visible && LayoutMirroring.enabled) { | 68 | if (!activeApplet && hiddenItemsView.visible && LayoutMirroring.enabled) { | ||
66 | return units.smallSpacing; | 69 | return units.smallSpacing; | ||
67 | 70 | | |||
68 | //applet open, sidebar | 71 | //applet open, sidebar | ||
69 | } else if (activeApplet && hiddenItemsView.visible && LayoutMirroring.enabled) { | 72 | } else if (activeApplet && hiddenItemsView.visible && LayoutMirroring.enabled) { | ||
Show All 34 Lines | 102 | PlasmaComponents.ToolButton { | |||
104 | checked: plasmoid.configuration.pin | 107 | checked: plasmoid.configuration.pin | ||
105 | onToggled: plasmoid.configuration.pin = checked | 108 | onToggled: plasmoid.configuration.pin = checked | ||
106 | icon.name: "window-pin" | 109 | icon.name: "window-pin" | ||
107 | PlasmaComponents.ToolTip { | 110 | PlasmaComponents.ToolTip { | ||
108 | text: i18n("Keep Open") | 111 | text: i18n("Keep Open") | ||
109 | } | 112 | } | ||
110 | } | 113 | } | ||
111 | } | 114 | } | ||
115 | } | ||||
112 | 116 | | |||
113 | RowLayout { | 117 | RowLayout { | ||
114 | spacing: 0 // must be 0 so that the separator is as close to the indicator as possible | 118 | spacing: 0 // must be 0 so that the separator is as close to the indicator as possible | ||
115 | 119 | | |||
116 | HiddenItemsView { | 120 | HiddenItemsView { | ||
117 | id: hiddenItemsView | 121 | id: hiddenItemsView | ||
118 | Layout.fillWidth: !activeApplet | 122 | Layout.fillWidth: !activeApplet | ||
119 | Layout.fillHeight: true | 123 | Layout.fillHeight: true | ||
Show All 23 Lines |
not in all places you will have access to a dialog. the magic correct values should come from the toparea margins itself done to go well with the correspoding background svg.
in the end, i would like to have this in a control... i kinda hope a standard toolBar control (will need some special casing when that style is running in plasma or an app in plasma mobile