mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 03:49:20 +03:00
Fix alignment and size of buttons.
Signed-off-by: Camila Ayres <hello@camilasan.com>
This commit is contained in:
parent
1d41c4e1b0
commit
aec2eaf73f
5 changed files with 38 additions and 25 deletions
|
@ -134,11 +134,14 @@ Page {
|
||||||
id: closeButton
|
id: closeButton
|
||||||
|
|
||||||
Layout.rowSpan: headerGridLayout.rows
|
Layout.rowSpan: headerGridLayout.rows
|
||||||
Layout.preferredWidth: Style.iconButtonWidth
|
Layout.preferredWidth: Style.activityListButtonWidth
|
||||||
Layout.preferredHeight: width
|
Layout.preferredHeight: Style.activityListButtonHeight
|
||||||
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||||
Layout.rightMargin: headerGridLayout.textRightMargin
|
Layout.rightMargin: headerGridLayout.textRightMargin
|
||||||
|
|
||||||
icon.source: "image://svgimage-custom-color/clear.svg" + "/" + palette.buttonText
|
icon.source: "image://svgimage-custom-color/clear.svg" + "/" + palette.buttonText
|
||||||
|
icon.width: Style.activityListButtonIconSize
|
||||||
|
icon.height: Style.activityListButtonIconSize
|
||||||
toolTipText: qsTr("Dismiss")
|
toolTipText: qsTr("Dismiss")
|
||||||
|
|
||||||
visible: root.showCloseButton
|
visible: root.showCloseButton
|
||||||
|
|
|
@ -186,9 +186,9 @@ GridLayout {
|
||||||
|
|
||||||
property bool shareLinkCopied: false
|
property bool shareLinkCopied: false
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
||||||
Layout.preferredWidth: shareLinkCopied ? implicitWidth : Style.iconButtonWidth
|
Layout.preferredWidth: shareLinkCopied ? implicitWidth : Style.activityListButtonWidth
|
||||||
Layout.preferredHeight: Style.iconButtonWidth
|
Layout.preferredHeight: Style.activityListButtonHeight
|
||||||
|
|
||||||
toolTipText: qsTr("Copy share link location")
|
toolTipText: qsTr("Copy share link location")
|
||||||
|
|
||||||
|
@ -232,15 +232,15 @@ GridLayout {
|
||||||
CustomButton {
|
CustomButton {
|
||||||
id: moreButton
|
id: moreButton
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
|
||||||
Layout.preferredWidth: Style.iconButtonWidth
|
|
||||||
Layout.preferredHeight: width
|
|
||||||
|
|
||||||
toolTipText: qsTr("Share options")
|
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.source: "image://svgimage-custom-color/more.svg/" + palette.buttonText
|
||||||
icon.width: Style.smallIconSize
|
icon.width: Style.activityListButtonIconSize
|
||||||
icon.height: Style.smallIconSize
|
icon.height: Style.activityListButtonIconSize
|
||||||
|
|
||||||
visible: !root.isPlaceholderLinkShare && !root.isSecureFileDropPlaceholderLinkShare && !root.isInternalLinkShare
|
visible: !root.isPlaceholderLinkShare && !root.isSecureFileDropPlaceholderLinkShare && !root.isInternalLinkShare
|
||||||
enabled: visible
|
enabled: visible
|
||||||
|
|
|
@ -224,11 +224,14 @@ Page {
|
||||||
id: closeButton
|
id: closeButton
|
||||||
|
|
||||||
Layout.rowSpan: headerGridLayout.rows
|
Layout.rowSpan: headerGridLayout.rows
|
||||||
Layout.preferredWidth: Style.iconButtonWidth
|
Layout.preferredWidth: Style.activityListButtonWidth
|
||||||
Layout.preferredHeight: width
|
Layout.preferredHeight: Style.activityListButtonHeight
|
||||||
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||||
Layout.rightMargin: root.padding
|
Layout.rightMargin: root.padding
|
||||||
|
|
||||||
icon.source: "image://svgimage-custom-color/clear.svg" + "/" + palette.buttonText
|
icon.source: "image://svgimage-custom-color/clear.svg" + "/" + palette.buttonText
|
||||||
|
icon.width: Style.activityListButtonIconSize
|
||||||
|
icon.height: Style.activityListButtonIconSize
|
||||||
toolTipText: qsTr("Dismiss")
|
toolTipText: qsTr("Dismiss")
|
||||||
|
|
||||||
onClicked: root.closeShareDetails()
|
onClicked: root.closeShareDetails()
|
||||||
|
@ -764,7 +767,13 @@ Page {
|
||||||
|
|
||||||
height: Style.standardPrimaryButtonHeight
|
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.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")
|
text: shareLinkCopied ? qsTr("Share link copied!") : qsTr("Copy share link")
|
||||||
visible: root.isLinkShare
|
visible: root.isLinkShare
|
||||||
enabled: visible
|
enabled: visible
|
||||||
|
|
|
@ -159,11 +159,13 @@ RowLayout {
|
||||||
CustomButton {
|
CustomButton {
|
||||||
id: fileDetailsButton
|
id: fileDetailsButton
|
||||||
|
|
||||||
Layout.preferredWidth: Style.dismissButtonSize
|
Layout.preferredWidth: Style.activityListButtonWidth
|
||||||
Layout.preferredHeight: Style.dismissButtonSize
|
Layout.preferredHeight: Style.activityListButtonHeight
|
||||||
Layout.alignment: Qt.AlignTop | Qt.AlignRight
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
||||||
|
|
||||||
icon.source: "image://svgimage-custom-color/more.svg/" + palette.buttonText
|
icon.source: "image://svgimage-custom-color/more.svg/" + palette.buttonText
|
||||||
|
icon.width: Style.activityListButtonIconSize
|
||||||
|
icon.height: Style.activityListButtonIconSize
|
||||||
|
|
||||||
ToolTip {
|
ToolTip {
|
||||||
text: qsTr("Open file details")
|
text: qsTr("Open file details")
|
||||||
|
@ -171,8 +173,6 @@ RowLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
display: Button.IconOnly
|
display: Button.IconOnly
|
||||||
leftPadding: 0
|
|
||||||
rightPadding: 0
|
|
||||||
|
|
||||||
visible: model.showFileDetails
|
visible: model.showFileDetails
|
||||||
|
|
||||||
|
@ -182,17 +182,15 @@ RowLayout {
|
||||||
CustomButton {
|
CustomButton {
|
||||||
id: dismissActionButton
|
id: dismissActionButton
|
||||||
|
|
||||||
Layout.preferredWidth: Style.dismissButtonSize
|
Layout.preferredWidth: Style.activityListButtonWidth
|
||||||
Layout.preferredHeight: Style.dismissButtonSize
|
Layout.preferredHeight: Style.activityListButtonHeight
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
||||||
|
|
||||||
visible: root.showDismissButton && !fileDetailsButton.visible
|
|
||||||
|
|
||||||
icon.source: "image://svgimage-custom-color/clear.svg/" + palette.buttonText
|
icon.source: "image://svgimage-custom-color/clear.svg/" + palette.buttonText
|
||||||
|
icon.width: Style.activityListButtonIconSize
|
||||||
|
icon.height: Style.activityListButtonIconSize
|
||||||
|
|
||||||
display: Button.IconOnly
|
display: Button.IconOnly
|
||||||
leftPadding: 0
|
|
||||||
rightPadding: 0
|
|
||||||
|
|
||||||
ToolTip {
|
ToolTip {
|
||||||
text: qsTr("Dismiss")
|
text: qsTr("Dismiss")
|
||||||
|
|
|
@ -105,6 +105,9 @@ QtObject {
|
||||||
|
|
||||||
property int addAccountButtonHeight: 50
|
property int addAccountButtonHeight: 50
|
||||||
|
|
||||||
|
property int activityListButtonWidth: 42
|
||||||
|
property int activityListButtonHeight: 32
|
||||||
|
property int activityListButtonIconSize: 18
|
||||||
property int headerButtonIconSize: 32
|
property int headerButtonIconSize: 32
|
||||||
property int addButtonIconSize: 26
|
property int addButtonIconSize: 26
|
||||||
property int dismissButtonSize: 26
|
property int dismissButtonSize: 26
|
||||||
|
|
Loading…
Reference in a new issue