From: Claudio Cambra Date: Wed, 23 Nov 2022 13:33:49 +0000 (+0100) Subject: Make unshare button less prominent, move out of bottom button box X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~11^2~79^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5e0a2672fb9311052c55a38a1eec6bb6ba86eccd;p=nextcloud-desktop.git Make unshare button less prominent, move out of bottom button box Signed-off-by: Claudio Cambra --- diff --git a/src/gui/filedetails/ShareDetailsPage.qml b/src/gui/filedetails/ShareDetailsPage.qml index 403b228c9..ade22ea19 100644 --- a/src/gui/filedetails/ShareDetailsPage.qml +++ b/src/gui/filedetails/ShareDetailsPage.qml @@ -715,27 +715,30 @@ Page { } } } + + CustomButton { + height: Style.standardPrimaryButtonHeight + + imageSource: "image://svgimage-custom-color/close.svg/" + Style.errorBoxBackgroundColor + imageSourceHover: "image://svgimage-custom-color/close.svg/" + Style.ncHeaderTextColor + text: qsTr("Unshare") + textColor: Style.errorBoxBackgroundColor + textColorHovered: "white" + contentsFont.bold: true + bgNormalColor: Style.buttonBackgroundColor + bgHoverColor: Style.errorBoxBackgroundColor + bgNormalOpacity: 1.0 + bgHoverOpacity: 1.0 + + onClicked: root.deleteShare() + } } } RowLayout { Layout.fillWidth: true - CustomButton { - Layout.fillWidth: true - implicitWidth: parent.width / 2 - height: Style.standardPrimaryButtonHeight - - imageSource: "image://svgimage-custom-color/close.svg/" + Style.ncHeaderTextColor - text: qsTr("Unshare") - textColor: Style.ncHeaderTextColor - contentsFont.bold: true - bgColor: Style.errorBoxBackgroundColor - bgNormalOpacity: 1.0 - bgHoverOpacity: Style.hoverOpacity - onClicked: root.deleteShare() - } CustomButton { Layout.fillWidth: true diff --git a/src/gui/tray/CustomButton.qml b/src/gui/tray/CustomButton.qml index dfd3a6554..c21ab16eb 100644 --- a/src/gui/tray/CustomButton.qml +++ b/src/gui/tray/CustomButton.qml @@ -18,6 +18,8 @@ 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 diff --git a/src/gui/tray/NCButtonBackground.qml b/src/gui/tray/NCButtonBackground.qml index 678c5902b..3e960a611 100644 --- a/src/gui/tray/NCButtonBackground.qml +++ b/src/gui/tray/NCButtonBackground.qml @@ -14,12 +14,16 @@ import QtQuick 2.15 +import Style 1.0 + Rectangle { property bool hovered: false property real normalOpacity: 0.3 property real hoverOpacity: 1.0 + property color normalColor: Style.buttonBackgroundColor + property color hoverColor: Style.buttonBackgroundColor - color: "transparent" + color: hovered ? hoverColor : normalColor opacity: hovered ? hoverOpacity : normalOpacity radius: width / 2 }