Fix UserSettings in QML

This commit is contained in:
Joseph Donofry 2020-06-09 21:05:27 -04:00
parent 6bb73f84a3
commit 07ffd9e7e9
No known key found for this signature in database
GPG key ID: E8A1D78EF044B0CB
4 changed files with 5 additions and 19 deletions

View file

@ -48,7 +48,7 @@ Flow {
TextMetrics { TextMetrics {
id: textMetrics id: textMetrics
font.family: settings.emoji_font_family font.family: settings.emojiFont
elide: Text.ElideRight elide: Text.ElideRight
elideWidth: 150 elideWidth: 150
text: model.key text: model.key
@ -58,7 +58,7 @@ Flow {
anchors.baseline: reactionCounter.baseline anchors.baseline: reactionCounter.baseline
id: reactionText id: reactionText
text: textMetrics.elidedText + (textMetrics.elidedText == textMetrics.text ? "" : "…") text: textMetrics.elidedText + (textMetrics.elidedText == textMetrics.text ? "" : "…")
font.family: settings.emoji_font_family font.family: settings.emojiFont
color: reaction.hovered ? colors.highlight : colors.text color: reaction.hovered ? colors.highlight : colors.text
maximumLineCount: 1 maximumLineCount: 1
} }

View file

@ -71,7 +71,7 @@ MouseArea {
pixelDelta = wheel.pixelDelta.y pixelDelta = wheel.pixelDelta.y
} }
pixelDelta = Math.round(pixelDelta) pixelDelta = Math.round(pixelDelta)
if (!pixelDelta) { if (!pixelDelta) {
return flickableItem.contentY; return flickableItem.contentY;

View file

@ -25,20 +25,6 @@ Page {
id: fontMetrics id: fontMetrics
} }
Settings {
id: settings
category: "user"
property bool avatar_circles: true
property string emoji_font_family: "default"
}
Settings {
id: timelineSettings
category: "user/timeline"
property bool buttons: true
property bool message_hover_highlight: false
}
EmojiPicker { EmojiPicker {
id: emojiPopup id: emojiPopup
width: 7 * 52 + 20 width: 7 * 52 + 20

View file

@ -76,7 +76,7 @@ Popup {
contentItem: Text { contentItem: Text {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
font.family: settings.emoji_font_family font.family: settings.emojiFont
font.pixelSize: 36 font.pixelSize: 36
text: model.unicode text: model.unicode
@ -276,7 +276,7 @@ Popup {
sourceSize.height: 32 sourceSize.height: 32
fillMode: Image.Pad fillMode: Image.Pad
smooth: true smooth: true
source: "image://colorimage/:/icons/icons/ui/search.png?" + (parent.hovered ? colors.highlight : colors.buttonText) source: "image://colorimage/:/icons/icons/emoji-categories/search.png?" + (parent.hovered ? colors.highlight : colors.buttonText)
} }
MouseArea MouseArea