diff --git a/src/gui/tray/ActivityActionButton.qml b/src/gui/tray/ActivityActionButton.qml index d13cb08362b56..6693153b77deb 100644 --- a/src/gui/tray/ActivityActionButton.qml +++ b/src/gui/tray/ActivityActionButton.qml @@ -20,6 +20,8 @@ AbstractButton { property string verb: "" property bool isTalkReplyButton: false + leftPadding: root.text === "" ? Style.smallSpacing : Style.standardSpacing + rightPadding: root.text === "" ? Style.smallSpacing : Style.standardSpacing background: NCButtonBackground { color: Style.currentUserHeaderColor diff --git a/src/gui/tray/ActivityItem.qml b/src/gui/tray/ActivityItem.qml index eb06c7213c39e..09e847a78a198 100644 --- a/src/gui/tray/ActivityItem.qml +++ b/src/gui/tray/ActivityItem.qml @@ -80,7 +80,7 @@ ItemDelegate { Layout.fillWidth: true Layout.leftMargin: Style.trayListItemIconSize + activityContent.spacing - Layout.minimumHeight: Style.minActivityHeight + Layout.preferredHeight: Style.standardPrimaryButtonHeight displayActions: model.displayActions objectType: model.objectType diff --git a/src/gui/tray/CustomButton.qml b/src/gui/tray/CustomButton.qml index 3cdfd1491432e..dfd3a6554f41e 100644 --- a/src/gui/tray/CustomButton.qml +++ b/src/gui/tray/CustomButton.qml @@ -26,8 +26,8 @@ Button { hovered: root.hovered } - leftPadding: root.text === "" ? 5 : 10 - rightPadding: root.text === "" ? 5 : 10 + leftPadding: root.text === "" ? Style.smallSpacing : Style.standardSpacing + rightPadding: root.text === "" ? Style.smallSpacing : Style.standardSpacing implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding NCToolTip { diff --git a/src/gui/tray/NCButtonContents.qml b/src/gui/tray/NCButtonContents.qml index 42fbd52ffdddc..2ca45fd191c0a 100644 --- a/src/gui/tray/NCButtonContents.qml +++ b/src/gui/tray/NCButtonContents.qml @@ -33,17 +33,19 @@ RowLayout { Image { id: icon - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + Layout.fillWidth: !buttonLabel.visible source: root.hovered ? root.imageSourceHover : root.imageSource fillMode: Image.PreserveAspectFit + horizontalAlignment: Image.AlignHCenter + verticalAlignment: Image.AlignVCenter + visible: root.hovered ? root.imageSourceHover !== "" : root.imageSource !== "" } Label { id: buttonLabel - Layout.maximumWidth: icon.width > 0 ? parent.width - icon.width - parent.spacing : parent.width - Layout.fillWidth: icon.status !== Image.Ready + Layout.fillWidth: true text: root.text textFormat: Text.PlainText @@ -52,7 +54,7 @@ RowLayout { color: root.hovered ? root.textColorHovered : root.textColor - horizontalAlignment: Text.AlignHCenter + horizontalAlignment: icon.visible ? Text.AlignLeft : Text.AlignHCenter verticalAlignment: Text.AlignVCenter elide: Text.ElideRight