mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-01 02:10:47 +03:00
96f791daf1
See also: https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/ https://hynek.me/til/copyright-years/
29 lines
689 B
QML
29 lines
689 B
QML
// SPDX-FileCopyrightText: Nheko Contributors
|
|
//
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import QtQuick 2.9
|
|
import QtQuick.Controls 2.5
|
|
import im.nheko 1.0
|
|
|
|
Label {
|
|
id: root
|
|
|
|
property alias fullText: metrics.text
|
|
property alias elideWidth: metrics.elideWidth
|
|
property int fullTextWidth: Math.ceil(metrics.advanceWidth)
|
|
|
|
color: Nheko.colors.text
|
|
text: (textFormat == Text.PlainText) ? metrics.elidedText : TimelineManager.escapeEmoji(metrics.elidedText)
|
|
maximumLineCount: 1
|
|
elide: Text.ElideRight
|
|
textFormat: Text.PlainText
|
|
|
|
TextMetrics {
|
|
id: metrics
|
|
|
|
font.pointSize: root.font.pointSize
|
|
elide: Text.ElideRight
|
|
}
|
|
|
|
}
|