mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 13:05:51 +03:00
Replace use of CustomButton with standard Button
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
7dc8a7ab0c
commit
b97ee9a61e
12 changed files with 29 additions and 53 deletions
|
@ -130,7 +130,7 @@ Page {
|
|||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
id: closeButton
|
||||
|
||||
Layout.rowSpan: headerGridLayout.rows
|
||||
|
@ -142,10 +142,7 @@ Page {
|
|||
icon.source: "image://svgimage-custom-color/clear.svg" + "/" + palette.buttonText
|
||||
icon.width: Style.activityListButtonIconSize
|
||||
icon.height: Style.activityListButtonIconSize
|
||||
toolTipText: qsTr("Dismiss")
|
||||
|
||||
visible: root.showCloseButton
|
||||
|
||||
onClicked: root.closeButtonClicked()
|
||||
}
|
||||
|
||||
|
|
|
@ -152,11 +152,10 @@ GridLayout {
|
|||
|
||||
spacing: 0
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
id: createLinkButton
|
||||
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
toolTipText: qsTr("Create a new share link")
|
||||
Layout.preferredWidth: Style.activityListButtonWidth
|
||||
Layout.preferredHeight: Style.activityListButtonHeight
|
||||
|
||||
|
@ -171,7 +170,7 @@ GridLayout {
|
|||
onClicked: root.createNewLinkShare()
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
id: copyLinkButton
|
||||
|
||||
function copyShareLink() {
|
||||
|
@ -190,8 +189,6 @@ GridLayout {
|
|||
Layout.preferredWidth: shareLinkCopied ? implicitWidth : Style.activityListButtonWidth
|
||||
Layout.preferredHeight: Style.activityListButtonHeight
|
||||
|
||||
toolTipText: qsTr("Copy share link location")
|
||||
|
||||
text: shareLinkCopied ? qsTr("Copied!") : ""
|
||||
|
||||
icon.source: shareLinkCopied ? "image://svgimage-custom-color/copy.svg/" + palette.brightText :
|
||||
|
@ -219,11 +216,9 @@ GridLayout {
|
|||
}
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
id: moreButton
|
||||
|
||||
toolTipText: qsTr("Share options")
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
||||
Layout.preferredWidth: Style.activityListButtonWidth
|
||||
Layout.preferredHeight: Style.activityListButtonHeight
|
||||
|
|
|
@ -220,7 +220,7 @@ Page {
|
|||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
id: closeButton
|
||||
|
||||
Layout.rowSpan: headerGridLayout.rows
|
||||
|
@ -232,8 +232,6 @@ Page {
|
|||
icon.source: "image://svgimage-custom-color/clear.svg" + "/" + palette.buttonText
|
||||
icon.width: Style.activityListButtonIconSize
|
||||
icon.height: Style.activityListButtonIconSize
|
||||
toolTipText: qsTr("Dismiss")
|
||||
|
||||
onClicked: root.closeShareDetails()
|
||||
}
|
||||
|
||||
|
@ -716,26 +714,23 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
height: Style.standardPrimaryButtonHeight
|
||||
|
||||
icon.source: "image://svgimage-custom-color/close.svg/" + Style.errorBoxBackgroundColor
|
||||
imageSourceHover: "image://svgimage-custom-color/close.svg/" + palette.brightText
|
||||
icon.source: hovered
|
||||
? "image://svgimage-custom-color/close.svg/" + palette.brightText
|
||||
: "image://svgimage-custom-color/close.svg/" + Style.errorBoxBackgroundColor
|
||||
text: qsTr("Unshare")
|
||||
|
||||
onClicked: root.deleteShare()
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
height: Style.standardPrimaryButtonHeight
|
||||
|
||||
icon.source: "image://svgimage-custom-color/add.svg/" + root.accentColor
|
||||
imageSourceHover: "image://svgimage-custom-color/add.svg/" + palette.brightText
|
||||
icon.source: hovered
|
||||
? "image://svgimage-custom-color/add.svg/" + palette.brightText
|
||||
: "image://svgimage-custom-color/add.svg/" + root.accentColor
|
||||
text: qsTr("Add another link")
|
||||
|
||||
visible: root.isLinkShare && root.canCreateLinkShares
|
||||
enabled: visible
|
||||
|
||||
onClicked: root.createNewLinkShare()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ ApplicationWindow {
|
|||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
padding: Style.smallSpacing
|
||||
text: qsTr("Reload")
|
||||
onClicked: reloadMaterialisedItems(accountUserIdAtHost)
|
||||
|
|
|
@ -86,7 +86,7 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
id: deleteButton
|
||||
|
||||
Layout.minimumWidth: implicitWidth
|
||||
|
|
|
@ -149,12 +149,12 @@ Page {
|
|||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
text: qsTr("Signal file provider domain")
|
||||
onClicked: root.controller.signalFileProviderDomain(root.accountUserIdAtHost)
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
text: qsTr("Create debug archive")
|
||||
onClicked: root.controller.createDebugArchive(root.accountUserIdAtHost)
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ GridLayout {
|
|||
horizontalAlignment: Text.AlignRight
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
Layout.row: 0
|
||||
Layout.column: 2
|
||||
Layout.alignment: Layout.AlignRight | Layout.AlignVCenter
|
||||
|
|
|
@ -26,7 +26,7 @@ Repeater {
|
|||
|
||||
model: root.linksForActionButtons
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
id: activityActionButton
|
||||
|
||||
property string verb: model.modelData.verb
|
||||
|
|
|
@ -158,7 +158,7 @@ RowLayout {
|
|||
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
||||
spacing: Style.extraSmallSpacing
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
id: fileDetailsButton
|
||||
|
||||
width: Style.activityListButtonWidth
|
||||
|
@ -178,7 +178,7 @@ RowLayout {
|
|||
onClicked: Systray.presentShareViewInTray(model.openablePath)
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
id: dismissActionButton
|
||||
|
||||
width: Style.activityListButtonWidth
|
||||
|
|
|
@ -210,7 +210,7 @@ ApplicationWindow {
|
|||
id: linksRepeater
|
||||
model: root.links
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
id: answerCall
|
||||
readonly property string verb: modelData.verb
|
||||
readonly property bool isAnswerCallButton: verb === "WEB"
|
||||
|
@ -219,7 +219,6 @@ ApplicationWindow {
|
|||
text: modelData.label
|
||||
|
||||
icon.source: root.talkIcon + palette.brightText
|
||||
imageSourceHover: root.talkIcon + palette.brightText
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Style.callNotificationPrimaryButtonMinHeight
|
||||
|
@ -233,15 +232,13 @@ ApplicationWindow {
|
|||
Accessible.name: qsTr("Answer Talk call notification")
|
||||
Accessible.onPressAction: answerCall.clicked()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
id: declineCall
|
||||
text: qsTr("Decline")
|
||||
|
||||
icon.source: root.deleteIcon + "white"
|
||||
imageSourceHover: root.deleteIcon + "white"
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Style.callNotificationPrimaryButtonMinHeight
|
||||
|
|
|
@ -739,7 +739,7 @@ ApplicationWindow {
|
|||
|
||||
active: false
|
||||
|
||||
sourceComponent: CustomButton {
|
||||
sourceComponent: Button {
|
||||
id: newActivitiesButton
|
||||
hoverEnabled: true
|
||||
padding: Style.smallSpacing
|
||||
|
@ -767,9 +767,9 @@ ApplicationWindow {
|
|||
|
||||
OpacityAnimator {
|
||||
id: fadeoutActivitiesButtonDisappear
|
||||
target: newActivitiesButton;
|
||||
from: 1;
|
||||
to: 0;
|
||||
target: newActivitiesButton
|
||||
from: 1
|
||||
to: 0
|
||||
duration: Style.newActivityButtonDisappearFadeTimeout
|
||||
loops: 1
|
||||
running: false
|
||||
|
|
|
@ -84,13 +84,9 @@ RowLayout {
|
|||
}
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
id: syncNowButton
|
||||
|
||||
FontMetrics {
|
||||
id: syncNowFm
|
||||
}
|
||||
|
||||
Layout.rightMargin: Style.trayHorizontalMargin
|
||||
|
||||
text: qsTr("Sync now")
|
||||
|
@ -109,11 +105,7 @@ RowLayout {
|
|||
}
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Layout.preferredWidth: syncNowFm.boundingRect(text).width +
|
||||
leftPadding +
|
||||
rightPadding +
|
||||
Style.standardSpacing * 2
|
||||
Button {
|
||||
Layout.rightMargin: Style.trayHorizontalMargin
|
||||
|
||||
text: qsTr("Resolve conflicts")
|
||||
|
|
Loading…
Reference in a new issue