Remove custom properties for background and opacity from CustomButton component.

Signed-off-by: Camila Ayres <hello@camilasan.com>
This commit is contained in:
Camila Ayres 2024-08-28 18:43:36 +02:00 committed by Matthieu Gallien
parent 2ed21d0ea6
commit 40e2f69968
No known key found for this signature in database
GPG Key ID: 7D0F74F05C22F553
11 changed files with 14 additions and 64 deletions

View File

@ -139,8 +139,6 @@ Page {
Layout.rightMargin: headerGridLayout.textRightMargin
icon.source: "image://svgimage-custom-color/clear.svg" + "/" + palette.buttonText
bgColor: palette.highlight
bgNormalOpacity: 0
toolTipText: qsTr("Dismiss")
visible: root.showCloseButton

View File

@ -162,9 +162,6 @@ GridLayout {
toolTipText: qsTr("Create a new share link")
bgColor: palette.highlight
bgNormalOpacity: 0
icon.source: "image://svgimage-custom-color/add.svg/" + palette.buttonText
icon.width: Style.smallIconSize
icon.height: Style.smallIconSize
@ -199,8 +196,6 @@ GridLayout {
text: shareLinkCopied ? qsTr("Copied!") : ""
textColor: palette.brightText
contentsFont.bold: true
bgColor: shareLinkCopied ? Style.positiveColor : palette.highlight
bgNormalOpacity: shareLinkCopied ? 1 : 0
icon.source: shareLinkCopied ? "image://svgimage-custom-color/copy.svg/" + palette.brightText :
"image://svgimage-custom-color/copy.svg/" + palette.buttonText
@ -212,13 +207,14 @@ GridLayout {
onClicked: copyShareLink()
Behavior on bgColor {
ColorAnimation { duration: Style.shortAnimationDuration }
}
// TODO
// Behavior on bgColor {
// ColorAnimation { duration: Style.shortAnimationDuration }
// }
Behavior on bgNormalOpacity {
NumberAnimation { duration: Style.shortAnimationDuration }
}
// Behavior on bgNormalOpacity {
// NumberAnimation { duration: Style.shortAnimationDuration }
// }
Behavior on Layout.preferredWidth {
SmoothedAnimation { duration: Style.shortAnimationDuration }
@ -245,9 +241,6 @@ GridLayout {
toolTipText: qsTr("Share options")
bgColor: palette.highlight
bgNormalOpacity: 0
icon.source: "image://svgimage-custom-color/more.svg/" + palette.buttonText
icon.width: Style.smallIconSize
icon.height: Style.smallIconSize

View File

@ -229,8 +229,6 @@ Page {
Layout.rightMargin: root.padding
icon.source: "image://svgimage-custom-color/clear.svg" + "/" + palette.buttonText
bgColor: palette.highlight
bgNormalOpacity: 0
toolTipText: qsTr("Dismiss")
onClicked: root.closeShareDetails()
@ -731,10 +729,6 @@ Page {
textColor: Style.errorBoxBackgroundColor
textColorHovered: "white"
contentsFont.bold: true
bgNormalColor: palette.button
bgHoverColor: Style.errorBoxBackgroundColor
bgNormalOpacity: 1.0
bgHoverOpacity: 1.0
onClicked: root.deleteShare()
}
@ -748,10 +742,6 @@ Page {
textColor: root.accentColor
textColorHovered: palette.brightText
contentsFont.bold: true
bgNormalColor: palette.button
bgHoverColor: root.accentColor
bgNormalOpacity: 1.0
bgHoverOpacity: 1.0
visible: root.isLinkShare && root.canCreateLinkShares
enabled: visible
@ -791,22 +781,19 @@ Page {
text: shareLinkCopied ? qsTr("Share link copied!") : qsTr("Copy share link")
textColor: palette.brightText
contentsFont.bold: true
bgColor: shareLinkCopied ? Style.positiveColor : root.accentColor
bgNormalOpacity: 1.0
bgHoverOpacity: shareLinkCopied ? 1.0 : Style.hoverOpacity
visible: root.isLinkShare
enabled: visible
onClicked: copyShareLink()
Behavior on bgColor {
ColorAnimation { duration: Style.shortAnimationDuration }
}
// TODO
// Behavior on bgColor {
// ColorAnimation { duration: Style.shortAnimationDuration }
// }
Behavior on bgHoverOpacity {
NumberAnimation { duration: Style.shortAnimationDuration }
}
// Behavior on bgHoverOpacity {
// NumberAnimation { duration: Style.shortAnimationDuration }
// }
Behavior on Layout.preferredWidth {
SmoothedAnimation { duration: Style.shortAnimationDuration }

View File

@ -57,7 +57,6 @@ ApplicationWindow {
textColor: Style.ncTextColor
textColorHovered: Style.ncHeaderTextColor
contentsFont.bold: true
bgColor: Style.ncBlue
text: qsTr("Reload")
onClicked: reloadMaterialisedItems(accountUserIdAtHost)
}

View File

@ -94,7 +94,6 @@ Item {
text: qsTr("Delete")
textColorHovered: Style.ncHeaderTextColor
bgColor: Style.errorBoxBackgroundColor
contentsFont.bold: true
onClicked: root.evictItem(root.identifier, root.domainIdentifier)
}

View File

@ -47,7 +47,6 @@ Repeater {
textColor: Style.adjustedCurrentUserHeaderColor
textColorHovered: Style.currentUserHeaderTextColor
contentsFont.bold: true
bgColor: Style.currentUserHeaderColor
visible: verb !== "REPLY" || (verb === "REPLY" && root.talkReplyButtonVisible)
}

View File

@ -174,8 +174,6 @@ RowLayout {
display: Button.IconOnly
leftPadding: 0
rightPadding: 0
bgColor: palette.mid
bgNormalOpacity: 0
visible: model.showFileDetails
@ -196,8 +194,6 @@ RowLayout {
display: Button.IconOnly
leftPadding: 0
rightPadding: 0
bgColor: palette.mid
bgNormalOpacity: 0
ToolTip {
text: qsTr("Dismiss")

View File

@ -220,8 +220,6 @@ ApplicationWindow {
visible: isAnswerCallButton
text: modelData.label
contentsFont.bold: true
bgColor: Style.ncBlue
bgNormalOpacity: 0.8
textColor: palette.brightText
@ -247,8 +245,6 @@ ApplicationWindow {
id: declineCall
text: qsTr("Decline")
contentsFont.bold: true
bgColor: Style.errorBoxBackgroundColor
bgNormalOpacity: 0.8
textColor: palette.brightText

View File

@ -30,17 +30,6 @@ Button {
property alias contentsFont: contents.font
property alias bgColor: bgRectangle.color
property alias bgNormalColor: bgRectangle.normalColor
property alias bgHoverColor: bgRectangle.hoverColor
property alias bgNormalOpacity: bgRectangle.normalOpacity
property alias bgHoverOpacity: bgRectangle.hoverOpacity
background: NCButtonBackground {
id: bgRectangle
hovered: root.hovered
}
leftPadding: root.text === "" ? Style.smallSpacing : Style.standardSpacing
rightPadding: root.text === "" ? Style.smallSpacing : Style.standardSpacing
implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding

View File

@ -101,7 +101,6 @@ RowLayout {
textColor: Style.adjustedCurrentUserHeaderColor
textColorHovered: Style.currentUserHeaderTextColor
contentsFont.bold: true
bgColor: Style.currentUserHeaderColor
visible: !activityModel.hasSyncConflicts &&
!syncStatus.syncing &&
@ -126,7 +125,6 @@ RowLayout {
textColor: Style.adjustedCurrentUserHeaderColor
textColorHovered: Style.currentUserHeaderTextColor
contentsFont.bold: true
bgColor: Style.currentUserHeaderColor
visible: activityModel.hasSyncConflicts &&
!syncStatus.syncing &&

View File

@ -866,10 +866,6 @@ ApplicationWindow {
textColor: Style.currentUserHeaderTextColor
textColorHovered: Style.currentUserHeaderTextColor
contentsFont.bold: true
bgNormalColor: Qt.lighter(bgHoverColor, 1.25)
bgHoverColor: Style.currentUserHeaderColor
bgNormalOpacity: Style.newActivitiesBgNormalOpacity
bgHoverOpacity: Style.newActivitiesBgHoverOpacity
anchors.fill: parent