diff --git a/Combo.qml b/Combo.qml index c6bb6c8..01bfd3d 100644 --- a/Combo.qml +++ b/Combo.qml @@ -1,5 +1,6 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 as QQC2 +import "fauxcyrillic.js" as Faux // Selettore a tendina etichettato in stile costruttivista. @@ -21,7 +22,7 @@ Column { spacing: 4 Text { - text: comboWrap.label + text: Faux.apply(comboWrap.label) color: "#f0dfba" font.family: themeFont.name font.pixelSize: 12 diff --git a/Field.qml b/Field.qml index 0193c9b..19ed65c 100644 --- a/Field.qml +++ b/Field.qml @@ -1,4 +1,5 @@ import QtQuick 2.15 +import "fauxcyrillic.js" as Faux // Campo di input etichettato in stile costruttivista. @@ -20,7 +21,7 @@ Column { spacing: 4 Text { - text: field.label + text: Faux.apply(field.label) color: "#f0dfba" font.family: themeFont.name font.pixelSize: 12 diff --git a/Main.qml b/Main.qml index f4510ff..01c4320 100644 --- a/Main.qml +++ b/Main.qml @@ -6,6 +6,7 @@ import QtQuick 2.15 import QtQuick.Layouts 1.15 +import "fauxcyrillic.js" as Faux Rectangle { id: root @@ -38,7 +39,7 @@ Rectangle { function tryLogin() { var username = userModel.count > 0 ? root.selectedUser : userField.text if (username.length === 0) { - errorText.text = "INSERISCI L'UTENTE" + errorText.text = Faux.apply("INSERISCI L'UTENTE") shake.start() return } @@ -137,7 +138,7 @@ Rectangle { Text { id: dateText anchors.horizontalCenter: parent.horizontalCenter - text: root.italianDate(new Date()) + text: Faux.apply(root.italianDate(new Date())) color: "#ef6a55" font.family: themeFont.name font.pixelSize: Math.max(13, Math.min(root.width * 0.014, 22)) @@ -151,7 +152,7 @@ Rectangle { running: true onTriggered: { clockText.text = Qt.formatTime(new Date(), "HH:mm") - dateText.text = root.italianDate(new Date()) + dateText.text = Faux.apply(root.italianDate(new Date())) } } } @@ -208,7 +209,7 @@ Rectangle { spacing: 2 Text { - text: "ACCESSO" + text: Faux.apply("ACCESSO") color: root.cream font.family: themeFont.name font.pixelSize: Math.max(20, Math.min(root.width * 0.024, 34)) @@ -217,7 +218,7 @@ Rectangle { } Text { - text: "INSERISCI LE CREDENZIALI" + text: Faux.apply("INSERISCI LE CREDENZIALI") color: "#e85a48" font.family: themeFont.name font.pixelSize: Math.max(10, Math.min(root.width * 0.011, 15)) @@ -289,7 +290,7 @@ Rectangle { Text { anchors.centerIn: parent - text: "ENTRA" + text: Faux.apply("ENTRA") color: root.paper font.bold: true font.letterSpacing: 3 @@ -392,7 +393,7 @@ Rectangle { Connections { target: sddm function onLoginFailed() { - errorText.text = "ACCESSO NEGATO" + errorText.text = Faux.apply("ACCESSO NEGATO") passField.text = "" shake.start() } diff --git a/PowerButton.qml b/PowerButton.qml index 1bbf303..0fa6f1a 100644 --- a/PowerButton.qml +++ b/PowerButton.qml @@ -1,4 +1,5 @@ import QtQuick 2.15 +import "fauxcyrillic.js" as Faux // Pulsante di sistema (sospendi / riavvia / spegni). @@ -21,7 +22,7 @@ Rectangle { Text { anchors.centerIn: parent - text: pbtn.label + text: Faux.apply(pbtn.label) color: pbtn.enabled ? "#f0dfba" : "#aaf0dfba" font.family: themeFont.name font.pixelSize: 13 diff --git a/dist/org.enne2.costruttivista.sddm.tar.gz b/dist/org.enne2.costruttivista.sddm.tar.gz index be8ba5a..12efd08 100644 Binary files a/dist/org.enne2.costruttivista.sddm.tar.gz and b/dist/org.enne2.costruttivista.sddm.tar.gz differ diff --git a/fauxcyrillic.js b/fauxcyrillic.js new file mode 100644 index 0000000..cfa4545 --- /dev/null +++ b/fauxcyrillic.js @@ -0,0 +1,23 @@ +// Sostituzione faux-cirillica: lettere latine → omologhe cirilliche +// visivamente identiche (homoglyph), per l'effetto manifesto sovietico. +// Le lettere senza omologo convincente (S, N, R, D, G, I, L, U, V, W, Z, F, Q, J) +// restano latine per mantenere la leggibilità. +.pragma library + +var MAP = { + 'A': '\u0410', 'B': '\u0412', 'E': '\u0415', 'K': '\u041A', 'M': '\u041C', + 'H': '\u041D', 'O': '\u041E', 'P': '\u0420', 'C': '\u0421', 'T': '\u0422', + 'X': '\u0425', 'Y': '\u0423', + 'a': '\u0430', 'e': '\u0435', 'k': '\u043A', 'm': '\u043C', 'h': '\u043D', + 'o': '\u043E', 'p': '\u0440', 'c': '\u0441', 't': '\u0442', 'x': '\u0445', + 'y': '\u0443' +}; + +function apply(text) { + var out = ''; + for (var i = 0; i < text.length; i++) { + var ch = text.charAt(i); + out += MAP[ch] !== undefined ? MAP[ch] : ch; + } + return out; +}