forked from Shinonome/dots-hyprland
27 lines
832 B
QML
27 lines
832 B
QML
import QtQuick
|
|
import qs.services
|
|
import qs.modules.common
|
|
import qs.modules.common.widgets
|
|
|
|
Loader {
|
|
id: root
|
|
property bool vertical: false
|
|
|
|
active: HyprlandXkb.layoutCodes.length > 1
|
|
visible: active
|
|
|
|
sourceComponent: Item {
|
|
implicitWidth: root.vertical ? undefined : layoutCodeText.implicitWidth
|
|
implicitHeight: root.vertical ? layoutCodeText.implicitHeight : undefined
|
|
StyledText {
|
|
id: layoutCodeText
|
|
anchors.centerIn: parent
|
|
horizontalAlignment: Text.AlignHCenter
|
|
text: HyprlandXkb.currentLayoutCode.split(":").join("\n")
|
|
font.pixelSize: text.includes("\n") ? Appearance.font.pixelSize.smallie : Appearance.font.pixelSize.small
|
|
color: rightSidebarButton.colText
|
|
animateChange: true
|
|
}
|
|
}
|
|
}
|