forked from Shinonome/dots-hyprland
on screen kb: init
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
import "root:/"
|
||||
import "root:/services"
|
||||
import "root:/modules/common"
|
||||
import "root:/modules/common/widgets"
|
||||
import "layouts.js" as Layouts
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Hyprland
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property var activeLayoutName: ConfigOptions?.osk.layout ?? Layouts.defaultLayout
|
||||
property var layouts: Layouts.byName
|
||||
property var currentLayout: layouts[activeLayoutName]
|
||||
|
||||
implicitWidth: keyRows.implicitWidth
|
||||
implicitHeight: keyRows.implicitHeight
|
||||
|
||||
ColumnLayout {
|
||||
id: keyRows
|
||||
anchors.fill: parent
|
||||
spacing: 5
|
||||
|
||||
Repeater {
|
||||
model: root.currentLayout.keys
|
||||
|
||||
delegate: RowLayout {
|
||||
id: keyRow
|
||||
required property var modelData
|
||||
spacing: 5
|
||||
|
||||
Repeater {
|
||||
model: modelData
|
||||
// A normal key looks like this: {label: "a", labelShift: "A", shape: "normal", keycode: 30, type: "normal"}
|
||||
delegate: OskKey {
|
||||
required property var modelData
|
||||
keyData: modelData
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user