Make unshare button less prominent, move out of bottom button box

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2022-11-23 14:33:49 +01:00 committed by Claudio Cambra
parent 4d837bd027
commit 5e0a2672fb
3 changed files with 24 additions and 15 deletions

View file

@ -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

View file

@ -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

View file

@ -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
}