mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 22:46:04 +03:00
to dismiss an activity use a round button with hover enabled
change size of dismiss button for items in activity list fix #5275 Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
4c1ab7092b
commit
f8feb6403f
4 changed files with 22 additions and 19 deletions
|
@ -32,10 +32,6 @@ ItemDelegate {
|
|||
|
||||
contentItem: ColumnLayout {
|
||||
id: contentLayout
|
||||
anchors.left: root.left
|
||||
anchors.right: root.right
|
||||
anchors.rightMargin: Style.standardSpacing
|
||||
anchors.leftMargin: Style.standardSpacing
|
||||
|
||||
spacing: Style.activityContentSpace
|
||||
|
||||
|
@ -75,7 +71,7 @@ ItemDelegate {
|
|||
ActivityItemActions {
|
||||
id: activityActions
|
||||
|
||||
visible: !root.isFileActivityList && model.linksForActionButtons.length > 1 && !isTalkReplyOptionVisible
|
||||
visible: !root.isFileActivityList && model.linksForActionButtons.length > 0 && !isTalkReplyOptionVisible
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: Style.trayListItemIconSize + activityContent.spacing
|
||||
|
|
|
@ -34,7 +34,6 @@ RowLayout {
|
|||
|
||||
Layout.minimumWidth: primaryButton ? Style.activityItemActionPrimaryButtonMinWidth : Style.activityItemActionSecondaryButtonMinWidth
|
||||
Layout.preferredHeight: parent.height
|
||||
Layout.preferredWidth: primaryButton ? -1 : parent.height
|
||||
|
||||
verb: model.modelData.verb
|
||||
primaryButton: (model.index === 0 && verb !== "DELETE") || model.modelData.primary
|
||||
|
@ -61,6 +60,7 @@ RowLayout {
|
|||
Layout.fillHeight: true
|
||||
|
||||
active: root.displayActions && (root.linksContextMenu.length > 0)
|
||||
visible: active
|
||||
|
||||
sourceComponent: Button {
|
||||
id: moreActionsButton
|
||||
|
|
|
@ -177,34 +177,42 @@ RowLayout {
|
|||
}
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
RoundButton {
|
||||
id: dismissActionButton
|
||||
|
||||
Layout.preferredWidth: Style.trayListItemIconSize
|
||||
Layout.preferredHeight: Style.trayListItemIconSize
|
||||
Layout.preferredWidth: Style.headerButtonIconSize
|
||||
Layout.preferredHeight: Style.headerButtonIconSize
|
||||
|
||||
visible: root.showDismissButton && !fileDetailsButton.visible
|
||||
|
||||
icon.source: "image://svgimage-custom-color/clear.svg" + "/" + Style.ncTextColor
|
||||
imageSourceHover: "image://svgimage-custom-color/clear.svg" + "/" + UserModel.currentUser.headerTextColor
|
||||
//imageSourceHover: "image://svgimage-custom-color/clear.svg" + "/" + UserModel.currentUser.headerTextColor
|
||||
|
||||
toolTipText: qsTr("Dismiss")
|
||||
flat: true
|
||||
display: Button.IconOnly
|
||||
hoverEnabled: true
|
||||
padding: 0
|
||||
//toolTipText: qsTr("Dismiss")
|
||||
|
||||
bgColor: Style.menuBorder
|
||||
//bgColor: Style.menuBorder
|
||||
|
||||
onClicked: root.dismissButtonClicked()
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
Button {
|
||||
id: fileDetailsButton
|
||||
|
||||
Layout.preferredWidth: Style.trayListItemIconSize
|
||||
Layout.preferredHeight: Style.trayListItemIconSize
|
||||
Layout.preferredWidth: Style.headerButtonIconSize
|
||||
Layout.preferredHeight: Style.headerButtonIconSize
|
||||
|
||||
icon.source: "image://svgimage-custom-color/more.svg" + "/" + Style.adjustedCurrentUserHeaderColor
|
||||
imageSourceHover: "image://svgimage-custom-color/more.svg" + "/" + Style.currentUserHeaderTextColor
|
||||
toolTipText: qsTr("Open file details")
|
||||
bgColor: Style.currentUserHeaderColor
|
||||
//imageSourceHover: "image://svgimage-custom-color/more.svg" + "/" + Style.currentUserHeaderTextColor
|
||||
//toolTipText: qsTr("Open file details")
|
||||
//bgColor: Style.currentUserHeaderColor
|
||||
|
||||
flat: true
|
||||
display: Button.IconOnly
|
||||
padding: 0
|
||||
|
||||
visible: model.showFileDetails
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ import com.nextcloud.desktopclient 1.0 as NC
|
|||
|
||||
ScrollView {
|
||||
id: controlRoot
|
||||
|
||||
property alias model: sortedActivityList.sourceModel
|
||||
property bool isFileActivityList: false
|
||||
property int iconSize: Style.trayListItemIconSize
|
||||
|
|
Loading…
Reference in a new issue