mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 14:36:01 +03:00
Fix predefined status text formatting
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
This commit is contained in:
parent
d74057835c
commit
652c0dcff7
2 changed files with 27 additions and 7 deletions
|
@ -31,6 +31,8 @@ AbstractButton {
|
||||||
property int emojiWidth: -1
|
property int emojiWidth: -1
|
||||||
property int internalSpacing: Style.standardSpacing
|
property int internalSpacing: Style.standardSpacing
|
||||||
property string emoji: ""
|
property string emoji: ""
|
||||||
|
property string statusText: ""
|
||||||
|
property string clearAtText: ""
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: root.hovered || root.checked ? Style.lightHover : "transparent"
|
color: root.hovered || root.checked ? Style.lightHover : "transparent"
|
||||||
|
@ -48,11 +50,28 @@ AbstractButton {
|
||||||
verticalAlignment: Image.AlignVCenter
|
verticalAlignment: Image.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Row {
|
||||||
text: root.text
|
spacing: Style.smallSpacing
|
||||||
textFormat: Text.PlainText
|
Label {
|
||||||
color: Style.ncTextColor
|
text: root.statusText
|
||||||
verticalAlignment: Text.AlignVCenter
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,7 +261,8 @@ ColumnLayout {
|
||||||
internalSpacing: statusFieldLayout.spacing + userStatusMessageTextField.leftPadding
|
internalSpacing: statusFieldLayout.spacing + userStatusMessageTextField.leftPadding
|
||||||
|
|
||||||
emoji: modelData.icon
|
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)
|
onClicked: userStatusSelectorModel.setPredefinedStatus(modelData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -303,7 +304,7 @@ ColumnLayout {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
visible: userStatusSelectorModel.errorMessage != ""
|
visible: userStatusSelectorModel.errorMessage != ""
|
||||||
text: "<b>Error:</b> " + userStatusSelectorModel.errorMessage
|
text: "Error: " + userStatusSelectorModel.errorMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
Loading…
Reference in a new issue