Remove custom properties for background and opacity from CustomButton component.
authorCamila Ayres <hello@camilasan.com>
Wed, 28 Aug 2024 16:43:36 +0000 (18:43 +0200)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 6 Sep 2024 08:55:41 +0000 (10:55 +0200)
Signed-off-by: Camila Ayres <hello@camilasan.com>
src/gui/filedetails/FileDetailsPage.qml
src/gui/filedetails/ShareDelegate.qml
src/gui/filedetails/ShareDetailsPage.qml
src/gui/macOS/ui/FileProviderEvictionDialog.qml
src/gui/macOS/ui/FileProviderFileDelegate.qml
src/gui/tray/ActivityItemActions.qml
src/gui/tray/ActivityItemContent.qml
src/gui/tray/CallNotificationDialog.qml
src/gui/tray/CustomButton.qml
src/gui/tray/SyncStatus.qml
src/gui/tray/Window.qml

index 14926556d6d2cabf0cc5d8e1a5fab84241f0f046..c35a541435449b23be43b86bd2107aa8aaee36ce 100644 (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
index 65e88ecf756443c74e83c4a5b1d80014fc11bcee..592f4f74533b2aa2574045c82cb524f58c1e28ad 100644 (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
index a1a8c1bdc29cad634aa8b8e70efc93ae9d5ed7c4..4866dfe60dd9e9f3ada3e4cc08c217fc541572a6 100644 (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 }
index 01db805c8bb538fbb081893bcc0e2c9d171dd508..4d5fecd2574dec575ae64c7a9c8fab1847757ff7 100644 (file)
@@ -57,7 +57,6 @@ ApplicationWindow {
                 textColor: Style.ncTextColor
                 textColorHovered: Style.ncHeaderTextColor
                 contentsFont.bold: true
-                bgColor: Style.ncBlue
                 text: qsTr("Reload")
                 onClicked: reloadMaterialisedItems(accountUserIdAtHost)
             }
index d364a364c3744bb0d0d905addcd7900464de9a4a..92231a6aa6876277e75d7cd2b9880f6daae59fcd 100644 (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)
         }
index f398b96d775b4f7ab04a955227892224e36e5ba5..3a4bad498e027dc5b5b63a881bc6b094f6f15cd0 100644 (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)
     }
index ad42de48a3975268dd6373360a5f5b5287593889..704cd8c7686996bb02b1dfe38d47148e3ac71353 100644 (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")
index c2d9b0562af87c43c220799ae822d5dea29fbb3c..82504595099aa5159cc168cbe7b5d4404d3d7960 100644 (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
 
index c6b58c749e09ef950e7a9df76de2814db9df25ed..9ec4a0ee99dc9b5e2b1632cccc4bbf315b516680 100644 (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
index d304d9991b3e2f2e689d73be946f12d968c40992..1cbff3062e5450df7fe27fb8a06d7401cab8f518 100644 (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 &&
index f8831d6d44c2142304899c9065b8f1e1aff488b7..209942ed24c94ebb9a8737cb8ef99fbe33296b11 100644 (file)
@@ -866,10 +866,6 @@ ApplicationWindow {
                 textColor: Style.currentUserHeaderTextColor\r
                 textColorHovered: Style.currentUserHeaderTextColor\r
                 contentsFont.bold: true\r
-                bgNormalColor: Qt.lighter(bgHoverColor, 1.25)\r
-                bgHoverColor: Style.currentUserHeaderColor\r
-                bgNormalOpacity: Style.newActivitiesBgNormalOpacity\r
-                bgHoverOpacity: Style.newActivitiesBgHoverOpacity\r
 \r
                 anchors.fill: parent\r
 \r