Skip to content

Commit fb77cbc

Browse files
committed
fix: spaces and sizes in the file actions window.
Signed-off-by: Camila Ayres <[email protected]>
1 parent aa96145 commit fb77cbc

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

src/gui/declarativeui/FileActionsWindow.qml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* SPDX-License-Identifier: GPL-2.0-or-later
44
*/
55

6+
pragma ComponentBehavior: Bound
7+
68
import QtQuick
79
import QtQuick.Window
810
import QtQuick.Layouts
@@ -13,8 +15,8 @@ import Style
1315

1416
ApplicationWindow {
1517
id: root
16-
height: Style.trayWindowWidth
17-
width: Systray.useNormalWindow ? Style.trayWindowHeight : Style.trayWindowWidth
18+
height: Style.filesActionsHeight
19+
width: Style.filesActionsWidth
1820
flags: Systray.useNormalWindow ? Qt.Window : Qt.Dialog | Qt.FramelessWindowHint
1921
visible: true
2022
color: "transparent"
@@ -69,8 +71,8 @@ ApplicationWindow {
6971

7072
Image {
7173
source: "image://svgimage-custom-color/file-open.svg/" + palette.windowText
72-
width: Style.minimumActivityItemHeight
73-
height: Style.minimumActivityItemHeight
74+
Layout.maximumWidth: Style.minimumActivityItemHeight
75+
Layout.maximumHeight: Style.minimumActivityItemHeight
7476
Layout.alignment: Qt.AlignVCenter
7577
Layout.margins: Style.extraSmallSpacing
7678
}
@@ -112,7 +114,7 @@ ApplicationWindow {
112114
Rectangle {
113115
id: lineTop
114116
Layout.fillWidth: true
115-
height: Style.extraExtraSmallSpacing
117+
Layout.minimumHeight: Style.extraExtraSmallSpacing
116118
color: palette.dark
117119
}
118120

@@ -186,9 +188,8 @@ ApplicationWindow {
186188
id: fileActionsDelegate
187189

188190
RowLayout {
191+
id: fileAction
189192
Layout.fillWidth: true
190-
Layout.margins: Style.standardSpacing
191-
spacing: Style.standardSpacing
192193
height: implicitHeight
193194
width: parent.width
194195

@@ -203,25 +204,27 @@ ApplicationWindow {
203204
implicitHeight: Style.activityListButtonHeight
204205

205206
padding: Style.standardSpacing
206-
spacing: Style.standardSpacing
207207

208208
contentItem: Row {
209209
id: fileActionsContent
210210
anchors.fill: parent
211-
anchors.margins: Style.standardSpacing
211+
anchors.topMargin: Style.standardSpacing
212+
anchors.rightMargin: Style.standardSpacing
213+
anchors.bottomMargin: Style.standardSpacing
214+
anchors.leftMargin: Style.smallSpacing
212215
spacing: Style.standardSpacing
213216
Layout.fillWidth: true
214217

215218
Image {
216-
source: icon + palette.windowText
217-
width: Style.activityListButtonHeight
218-
height: Style.activityListButtonHeight
219+
source: fileAction.icon + palette.windowText
220+
width: Style.activityListButtonIconSize
221+
height: Style.activityListButtonIconSize
219222
fillMode: Image.PreserveAspectFit
220223
anchors.verticalCenter: parent.verticalCenter
221224
}
222225

223226
Label {
224-
text: name
227+
text: fileAction.name
225228
color: palette.text
226229
font.pixelSize: Style.defaultFontPtSize
227230
verticalAlignment: Text.AlignVCenter
@@ -232,7 +235,7 @@ ApplicationWindow {
232235
background: Rectangle {
233236
color: "transparent"
234237
radius: root.windowRadius
235-
border.width: parent.hovered ? Style.trayWindowBorderWidth : 0
238+
border.width: fileActionButton.hovered ? Style.trayWindowBorderWidth : 0
236239
border.color: palette.dark
237240
anchors.margins: Style.standardSpacing
238241
height: parent.height
@@ -244,7 +247,7 @@ ApplicationWindow {
244247
anchors.fill: parent
245248
anchors.margins: Style.standardSpacing
246249
cursorShape: Qt.PointingHandCursor
247-
onClicked: fileActionModel.createRequest(index)
250+
onClicked: fileActionModel.createRequest(fileAction.index)
248251
}
249252
}
250253
}

0 commit comments

Comments
 (0)