Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwindecoration/qml/Buttons.qml
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 55 | RowLayout { | |||
---|---|---|---|---|---|
58 | anchors.left: parent.left; | 58 | anchors.left: parent.left; | ||
59 | anchors.right: parent.right; | 59 | anchors.right: parent.right; | ||
60 | anchors.margins: units.smallSpacing / 2 | 60 | anchors.margins: units.smallSpacing / 2 | ||
61 | height: Math.max(units.iconSizes.small, titlebar.implicitHeight) + units.smallSpacing/2 | 61 | height: Math.max(units.iconSizes.small, titlebar.implicitHeight) + units.smallSpacing/2 | ||
62 | ButtonGroup { | 62 | ButtonGroup { | ||
63 | id: leftButtonsView | 63 | id: leftButtonsView | ||
64 | anchors.left: parent.left; | 64 | anchors.left: parent.left; | ||
65 | height: buttonPreviewRow.height | 65 | height: buttonPreviewRow.height | ||
66 | model: configurationModule.leftButtons | 66 | model: leftButtons | ||
67 | key: "decoButtonLeft" | 67 | key: "decoButtonLeft" | ||
68 | } | 68 | } | ||
69 | Item { | 69 | Item { | ||
70 | Layout.fillWidth: true | 70 | Layout.fillWidth: true | ||
71 | anchors.centerIn: parent | 71 | anchors.centerIn: parent | ||
72 | height: titlebar.implicitHeight | 72 | height: titlebar.implicitHeight | ||
73 | Label { | 73 | Label { | ||
74 | id: titlebar | 74 | id: titlebar | ||
75 | anchors.centerIn: parent | 75 | anchors.centerIn: parent | ||
76 | font: titleFont | 76 | font: titleFont | ||
77 | text: i18n("Titlebar") | 77 | text: i18n("Titlebar") | ||
78 | } | 78 | } | ||
79 | } | 79 | } | ||
80 | ButtonGroup { | 80 | ButtonGroup { | ||
81 | id: rightButtonsView | 81 | id: rightButtonsView | ||
82 | anchors.right: parent.right; | 82 | anchors.right: parent.right; | ||
83 | height: buttonPreviewRow.height | 83 | height: buttonPreviewRow.height | ||
84 | model: configurationModule.rightButtons | 84 | model: rightButtons | ||
85 | key: "decoButtonRight" | 85 | key: "decoButtonRight" | ||
86 | } | 86 | } | ||
87 | DropArea { | 87 | DropArea { | ||
88 | anchors.fill: parent | 88 | anchors.fill: parent | ||
89 | keys: [ "decoButtonAdd", "decoButtonRight", "decoButtonLeft" ] | 89 | keys: [ "decoButtonAdd", "decoButtonRight", "decoButtonLeft" ] | ||
90 | onEntered: { | 90 | onEntered: { | ||
91 | drag.accept(); | 91 | drag.accept(); | ||
92 | } | 92 | } | ||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | |||||
139 | Text { | 139 | Text { | ||
140 | id: iCannotBelieveIDoThis | 140 | id: iCannotBelieveIDoThis | ||
141 | text: "gnarf" | 141 | text: "gnarf" | ||
142 | visible: false | 142 | visible: false | ||
143 | } | 143 | } | ||
144 | GridView { | 144 | GridView { | ||
145 | id: availableGrid | 145 | id: availableGrid | ||
146 | Layout.fillWidth: true | 146 | Layout.fillWidth: true | ||
147 | model: configurationModule.availableButtons | 147 | model: availableButtons | ||
148 | interactive: false | 148 | interactive: false | ||
149 | cellWidth: iconLabel.implicitWidth | 149 | cellWidth: iconLabel.implicitWidth | ||
150 | cellHeight: units.iconSizes.small + iCannotBelieveIDoThis.implicitHeight + 4*units.smallSpacing | 150 | cellHeight: units.iconSizes.small + iCannotBelieveIDoThis.implicitHeight + 4*units.smallSpacing | ||
151 | height: Math.ceil(cellHeight * 2.5) | 151 | height: Math.ceil(cellHeight * 2.5) | ||
152 | opacity: (leftButtonsView.dragging || rightButtonsView.dragging) ? 0.25 : 1.0 | 152 | opacity: (leftButtonsView.dragging || rightButtonsView.dragging) ? 0.25 : 1.0 | ||
153 | delegate: Item { | 153 | delegate: Item { | ||
154 | id: availableDelegate | 154 | id: availableDelegate | ||
155 | width: availableGrid.cellWidth | 155 | width: availableGrid.cellWidth | ||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |