Merge pull request #7142 from nextcloud/bugfix/native-ui

Fix alignment and size of buttons.
This commit is contained in:
Matthieu Gallien 2024-09-26 12:02:31 +02:00 коммит произвёл GitHub
Родитель 1d41c4e1b0 aec2eaf73f
Коммит e467fc87f6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
5 изменённых файлов: 38 добавлений и 25 удалений

Просмотреть файл

@ -134,11 +134,14 @@ Page {
id: closeButton
Layout.rowSpan: headerGridLayout.rows
Layout.preferredWidth: Style.iconButtonWidth
Layout.preferredHeight: width
Layout.preferredWidth: Style.activityListButtonWidth
Layout.preferredHeight: Style.activityListButtonHeight
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
Layout.rightMargin: headerGridLayout.textRightMargin
icon.source: "image://svgimage-custom-color/clear.svg" + "/" + palette.buttonText
icon.width: Style.activityListButtonIconSize
icon.height: Style.activityListButtonIconSize
toolTipText: qsTr("Dismiss")
visible: root.showCloseButton

Просмотреть файл

@ -186,9 +186,9 @@ GridLayout {
property bool shareLinkCopied: false
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: shareLinkCopied ? implicitWidth : Style.iconButtonWidth
Layout.preferredHeight: Style.iconButtonWidth
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
Layout.preferredWidth: shareLinkCopied ? implicitWidth : Style.activityListButtonWidth
Layout.preferredHeight: Style.activityListButtonHeight
toolTipText: qsTr("Copy share link location")
@ -232,15 +232,15 @@ GridLayout {
CustomButton {
id: moreButton
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: Style.iconButtonWidth
Layout.preferredHeight: width
toolTipText: qsTr("Share options")
Layout.preferredWidth: Style.activityListButtonWidth
Layout.preferredHeight: Style.activityListButtonHeight
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
icon.source: "image://svgimage-custom-color/more.svg/" + palette.buttonText
icon.width: Style.smallIconSize
icon.height: Style.smallIconSize
icon.width: Style.activityListButtonIconSize
icon.height: Style.activityListButtonIconSize
visible: !root.isPlaceholderLinkShare && !root.isSecureFileDropPlaceholderLinkShare && !root.isInternalLinkShare
enabled: visible

Просмотреть файл

@ -224,11 +224,14 @@ Page {
id: closeButton
Layout.rowSpan: headerGridLayout.rows
Layout.preferredWidth: Style.iconButtonWidth
Layout.preferredHeight: width
Layout.preferredWidth: Style.activityListButtonWidth
Layout.preferredHeight: Style.activityListButtonHeight
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
Layout.rightMargin: root.padding
icon.source: "image://svgimage-custom-color/clear.svg" + "/" + palette.buttonText
icon.width: Style.activityListButtonIconSize
icon.height: Style.activityListButtonIconSize
toolTipText: qsTr("Dismiss")
onClicked: root.closeShareDetails()
@ -764,7 +767,13 @@ Page {
height: Style.standardPrimaryButtonHeight
Layout.preferredWidth: Style.activityListButtonWidth
Layout.preferredHeight: Style.activityListButtonHeight
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
icon.source: "image://svgimage-custom-color/copy.svg/" + palette.brightText
icon.width: Style.smallIconSize
icon.height: Style.smallIconSize
text: shareLinkCopied ? qsTr("Share link copied!") : qsTr("Copy share link")
visible: root.isLinkShare
enabled: visible

Просмотреть файл

@ -159,11 +159,13 @@ RowLayout {
CustomButton {
id: fileDetailsButton
Layout.preferredWidth: Style.dismissButtonSize
Layout.preferredHeight: Style.dismissButtonSize
Layout.alignment: Qt.AlignTop | Qt.AlignRight
Layout.preferredWidth: Style.activityListButtonWidth
Layout.preferredHeight: Style.activityListButtonHeight
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
icon.source: "image://svgimage-custom-color/more.svg/" + palette.buttonText
icon.width: Style.activityListButtonIconSize
icon.height: Style.activityListButtonIconSize
ToolTip {
text: qsTr("Open file details")
@ -171,8 +173,6 @@ RowLayout {
}
display: Button.IconOnly
leftPadding: 0
rightPadding: 0
visible: model.showFileDetails
@ -182,17 +182,15 @@ RowLayout {
CustomButton {
id: dismissActionButton
Layout.preferredWidth: Style.dismissButtonSize
Layout.preferredHeight: Style.dismissButtonSize
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
visible: root.showDismissButton && !fileDetailsButton.visible
Layout.preferredWidth: Style.activityListButtonWidth
Layout.preferredHeight: Style.activityListButtonHeight
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
icon.source: "image://svgimage-custom-color/clear.svg/" + palette.buttonText
icon.width: Style.activityListButtonIconSize
icon.height: Style.activityListButtonIconSize
display: Button.IconOnly
leftPadding: 0
rightPadding: 0
ToolTip {
text: qsTr("Dismiss")

Просмотреть файл

@ -105,6 +105,9 @@ QtObject {
property int addAccountButtonHeight: 50
property int activityListButtonWidth: 42
property int activityListButtonHeight: 32
property int activityListButtonIconSize: 18
property int headerButtonIconSize: 32
property int addButtonIconSize: 26
property int dismissButtonSize: 26