import QtQuick

Text {
    readonly property string title: niri.focusedWindow?.title ?? ""

    text:             title
    color:            Theme.subtle
    font.pixelSize:   Theme.fontSize
    font.family:      Theme.font
    elide:               Text.ElideRight
    maximumLineCount:    1
    horizontalAlignment: Text.AlignHCenter
    opacity:          title.length > 0 ? 1.0 : 0.0

    Behavior on opacity {
        NumberAnimation { duration: 120 }
    }
}
