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-09-29 20:37:55 +0300
committerClaudio Cambra <claudio.cambra@gmail.com>2022-09-29 20:37:55 +0300
commitd47ccc17f492f8507a730cd4d10d5be8f109e2e3 (patch)
tree001e67ed6cc3f4274399920f99efb78b1f15a24d
parent53573745a3767d6ca14b186a8ecb8924e278ffba (diff)
Fix predefined status text formattingbugfix/fix-predefined-status-text
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
-rw-r--r--src/gui/PredefinedStatusButton.qml29
-rw-r--r--src/gui/UserStatusSelector.qml5
2 files changed, 27 insertions, 7 deletions
diff --git a/src/gui/PredefinedStatusButton.qml b/src/gui/PredefinedStatusButton.qml
index 929b246d3..416f7e752 100644
--- a/src/gui/PredefinedStatusButton.qml
+++ b/src/gui/PredefinedStatusButton.qml
@@ -31,6 +31,8 @@ AbstractButton {
property int emojiWidth: -1
property int internalSpacing: Style.standardSpacing
property string emoji: ""
+ property string statusText: ""
+ property string clearAtText: ""
background: Rectangle {
color: root.hovered || root.checked ? Style.lightHover : "transparent"
@@ -48,11 +50,28 @@ AbstractButton {
verticalAlignment: Image.AlignVCenter
}
- Label {
- text: root.text
- textFormat: Text.PlainText
- color: Style.ncTextColor
- verticalAlignment: Text.AlignVCenter
+ Row {
+ spacing: Style.smallSpacing
+ Label {
+ text: root.statusText
+ textFormat: Text.PlainText
+ color: Style.ncTextColor
+ verticalAlignment: Text.AlignVCenter
+ font.bold: true
+ }
+
+ Label {
+ text: "-"
+ color: Style.ncTextColor
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ Label {
+ text: root.clearAtText
+ textFormat: Text.PlainText
+ color: Style.ncTextColor
+ verticalAlignment: Text.AlignVCenter
+ }
}
}
}
diff --git a/src/gui/UserStatusSelector.qml b/src/gui/UserStatusSelector.qml
index f7ec75027..e7c40e446 100644
--- a/src/gui/UserStatusSelector.qml
+++ b/src/gui/UserStatusSelector.qml
@@ -261,7 +261,8 @@ ColumnLayout {
internalSpacing: statusFieldLayout.spacing + userStatusMessageTextField.leftPadding
emoji: modelData.icon
- text: "<b>%1</b> – %2".arg(modelData.message).arg(userStatusSelectorModel.clearAtReadable(modelData))
+ statusText: modelData.message
+ clearAtText: userStatusSelectorModel.clearAtReadable(modelData)
onClicked: userStatusSelectorModel.setPredefinedStatus(modelData)
}
}
@@ -303,7 +304,7 @@ ColumnLayout {
width: parent.width
visible: userStatusSelectorModel.errorMessage != ""
- text: "<b>Error:</b> " + userStatusSelectorModel.errorMessage
+ text: "Error: " + userStatusSelectorModel.errorMessage
}
RowLayout {