From 91978706279a19a3ac96393630876f3e50cbc518 Mon Sep 17 00:00:00 2001 From: Nippy Date: Fri, 9 Oct 2026 10:49:26 +0200 Subject: fix --- .../Components/KeyboardLayoutIndicator.qml | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'raveos-sddm-theme/sddm-rave-theme/Components/KeyboardLayoutIndicator.qml') diff --git a/raveos-sddm-theme/sddm-rave-theme/Components/KeyboardLayoutIndicator.qml b/raveos-sddm-theme/sddm-rave-theme/Components/KeyboardLayoutIndicator.qml index ffe10fa..0d95c06 100644 --- a/raveos-sddm-theme/sddm-rave-theme/Components/KeyboardLayoutIndicator.qml +++ b/raveos-sddm-theme/sddm-rave-theme/Components/KeyboardLayoutIndicator.qml @@ -1,5 +1,3 @@ -// Keyboard Layout Indicator component -// Displays the current locale/layout and switches between them when clicked (if multiple are available) import QtQuick 2.15 import QtQml 2.15 @@ -13,13 +11,10 @@ Item { width: implicitWidth height: implicitHeight - // Number of available layouts property int layoutsCount: (typeof keyboard !== "undefined" && keyboard && keyboard.layouts) ? keyboard.layouts.length : 0 - // Show if we have layout info or a valid locale fallback and not hidden visible: (config.HideKeyboardLayout !== "false") ? false : (currentShortName !== "") - // Get current layout shortname (e.g. "US", "HU") property string currentShortName: "" function updateCurrentShortName() { @@ -34,7 +29,6 @@ Item { } } - // Fallback to config locale or system locale var loc = config.Locale || Qt.locale().name if (loc) { var parts = loc.split("_") @@ -48,7 +42,6 @@ Item { Component.onCompleted: updateCurrentShortName() - // Colors matched to the theme config property color textColor: config.UserIconColor || "#ffffff" property color hoverColor: config.HoverUserIconColor || "#b7cef1" @@ -56,9 +49,7 @@ Item { id: layoutRow height: root.font.pointSize * 1.1 spacing: root.font.pointSize * 0.4 - // Removed anchors.centerIn to prevent circular binding loop with parent width/height - // Keyboard icon Canvas { id: kbdCanvas width: root.font.pointSize * 1.5 @@ -79,7 +70,6 @@ Item { ctx.lineJoin = "round" ctx.globalAlpha = 0.85 - // Draw keyboard outline var r = height * 0.15 var bx = ctx.lineWidth / 2 var by = ctx.lineWidth / 2 @@ -95,16 +85,13 @@ Item { ctx.closePath() ctx.stroke() - // Draw simple key grid ctx.lineWidth = height * 0.06 var kw = bw / 6 var kh = bh / 4 - // Row 1 & 2 keys for (var i = 0; i < 4; i++) { ctx.fillRect(bx + kw * (i + 1), by + kh, kw * 0.6, kh * 0.6) ctx.fillRect(bx + kw * (i + 0.5), by + kh * 2, kw * 0.6, kh * 0.6) } - // Spacebar ctx.fillRect(bx + kw * 1.5, by + kh * 3, kw * 3, kh * 0.6) ctx.globalAlpha = 1.0 @@ -116,7 +103,6 @@ Item { } } - // Layout Short Name (e.g. US, HU) Text { id: layoutText anchors.verticalCenter: parent.verticalCenter @@ -176,7 +162,6 @@ Item { color: delegateMouse.containsMouse ? Qt.rgba(1, 1, 1, 0.15) : "transparent" radius: config.RoundCorners !== "" ? parseInt(config.RoundCorners) / 4 : root.font.pointSize * 0.4 - // Get layout object safely property var layoutObj: (typeof keyboard !== "undefined" && keyboard && keyboard.layouts) ? keyboard.layouts[index] : null property string shortName: layoutObj && layoutObj.shortName ? layoutObj.shortName.toUpperCase() : "" property string longName: layoutObj && layoutObj.longName ? layoutObj.longName : "" -- cgit v1.3