Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Cambra <claudio.cambra@gmail.com>2022-11-08 19:33:10 +0300
committerGitHub <noreply@github.com>2022-11-08 19:33:10 +0300
commit2c1ef6e4a8094a3db4c2c07f75f7ca10dda06010 (patch)
tree45af0d6380dec04834591516479759981a64e41f
parent4c32d54dfb73d334c4baa1433510fb9a9ebe8c38 (diff)
parent1a0903f178af6092c22e937be5d4ae7798e181d4 (diff)
Merge pull request #5129 from nextcloud/bugfix/sync-now-button-elide
Ensure 'Sync now' button doesn't have its text elided
-rw-r--r--src/gui/tray/ActivityActionButton.qml2
-rw-r--r--src/gui/tray/CallNotificationDialog.qml4
-rw-r--r--src/gui/tray/CustomButton.qml7
-rw-r--r--src/gui/tray/NCButtonContents.qml4
-rw-r--r--src/gui/tray/SyncStatus.qml11
5 files changed, 15 insertions, 13 deletions
diff --git a/src/gui/tray/ActivityActionButton.qml b/src/gui/tray/ActivityActionButton.qml
index 7741f4f16..d13cb0836 100644
--- a/src/gui/tray/ActivityActionButton.qml
+++ b/src/gui/tray/ActivityActionButton.qml
@@ -71,7 +71,7 @@ AbstractButton {
text: root.text
textColor: root.textColor
textColorHovered: root.textColorHovered
- bold: root.primaryButton
+ font.bold: root.primaryButton
}
}
}
diff --git a/src/gui/tray/CallNotificationDialog.qml b/src/gui/tray/CallNotificationDialog.qml
index c942877ad..d53daf7bc 100644
--- a/src/gui/tray/CallNotificationDialog.qml
+++ b/src/gui/tray/CallNotificationDialog.qml
@@ -220,7 +220,7 @@ Window {
visible: isAnswerCallButton
text: modelData.label
- bold: true
+ contentsFont.bold: true
bgColor: Style.ncBlue
bgNormalOpacity: 0.8
@@ -247,7 +247,7 @@ Window {
CustomButton {
id: declineCall
text: qsTr("Decline")
- bold: true
+ contentsFont.bold: true
bgColor: Style.errorBoxBackgroundColor
bgNormalOpacity: 0.8
diff --git a/src/gui/tray/CustomButton.qml b/src/gui/tray/CustomButton.qml
index f07acc31c..3cdfd1491 100644
--- a/src/gui/tray/CustomButton.qml
+++ b/src/gui/tray/CustomButton.qml
@@ -15,10 +15,9 @@ Button {
property color textColor: Style.ncTextColor
property color textColorHovered: textColor
- property alias bgColor: bgRectangle.color
-
- property bool bold: false
+ property alias contentsFont: contents.font
+ property alias bgColor: bgRectangle.color
property alias bgNormalOpacity: bgRectangle.normalOpacity
property alias bgHoverOpacity: bgRectangle.hoverOpacity
@@ -37,12 +36,12 @@ Button {
}
contentItem: NCButtonContents {
+ id: contents
hovered: root.hovered
imageSourceHover: root.imageSourceHover
imageSource: root.imageSource
text: root.text
textColor: root.textColor
textColorHovered: root.textColorHovered
- bold: root.bold
}
}
diff --git a/src/gui/tray/NCButtonContents.qml b/src/gui/tray/NCButtonContents.qml
index 806cc0843..1e6231efd 100644
--- a/src/gui/tray/NCButtonContents.qml
+++ b/src/gui/tray/NCButtonContents.qml
@@ -28,7 +28,7 @@ RowLayout {
property color textColor: Style.ncTextColor
property color textColorHovered: textColor
- property bool bold: false
+ property alias font: buttonLabel.font
Image {
id: icon
@@ -40,6 +40,8 @@ RowLayout {
}
Label {
+ id: buttonLabel
+
Layout.maximumWidth: icon.width > 0 ? parent.width - icon.width - parent.spacing : parent.width
Layout.fillWidth: icon.status !== Image.Ready
diff --git a/src/gui/tray/SyncStatus.qml b/src/gui/tray/SyncStatus.qml
index b6ff2713c..55da5589b 100644
--- a/src/gui/tray/SyncStatus.qml
+++ b/src/gui/tray/SyncStatus.qml
@@ -102,18 +102,19 @@ RowLayout {
CustomButton {
FontMetrics {
id: syncNowFm
- font.bold: true
+ font: parent.contentsFont
}
- Layout.preferredWidth: syncNowFm.boundingRect(text).width + leftPadding + rightPadding
+ Layout.preferredWidth: syncNowFm.boundingRect(text).width +
+ leftPadding +
+ rightPadding +
+ Style.standardSpacing * 2
Layout.rightMargin: Style.trayHorizontalMargin
- FontMetrics { font.bold: true }
-
text: qsTr("Sync now")
textColor: Style.adjustedCurrentUserHeaderColor
textColorHovered: Style.currentUserHeaderTextColor
- bold: true
+ contentsFont.bold: true
bgColor: Style.currentUserHeaderColor
visible: !syncStatus.syncing &&