refaktor
This commit is contained in:
@@ -4,7 +4,7 @@ import QtQuick.Controls
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Io
|
||||
import "../../colors"
|
||||
import "../../config"
|
||||
import "./modules"
|
||||
|
||||
PanelWindow {
|
||||
@@ -72,6 +72,7 @@ PanelWindow {
|
||||
text: "Language Learner"
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: parent.height * 0.8
|
||||
font.family: Config.font
|
||||
color: Colors.tertiary
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import "../../../colors"
|
||||
import "../../../config"
|
||||
|
||||
Item { // Chooser
|
||||
id: learnerResult
|
||||
@@ -94,6 +94,7 @@ Item { // Chooser
|
||||
anchors.verticalCenterOffset: -parent.height * 0.125
|
||||
anchors.horizontalCenterOffset: parent.width * 0.1
|
||||
font.pixelSize: parent.height * 0.8
|
||||
font.family: Config.jfont
|
||||
color: modelData.correctness ? "green" : "red"
|
||||
}
|
||||
}
|
||||
@@ -108,7 +109,7 @@ Item { // Chooser
|
||||
border.color: Colors.primaryContainer_fg
|
||||
|
||||
Image {
|
||||
source: modelData.correctness ? "../../../colors/icons/correct.svg" : "../../../colors/icons/wrong.svg"
|
||||
source: modelData.correctness ? Config.configDir+"/modules/jl/assets/correct.svg" : Config.configDir+"/modules/jl/assets/wrong.svg"
|
||||
anchors.centerIn: parent
|
||||
width: parent.height*0.8
|
||||
height: parent.height*0.8
|
||||
@@ -135,6 +136,7 @@ Item { // Chooser
|
||||
anchors.centerIn: parent
|
||||
anchors.horizontalCenterOffset: 10
|
||||
font.pixelSize: parent.height * 0.8
|
||||
font.family: Config.font
|
||||
color: modelData.correctness ? "green" : "red"
|
||||
}
|
||||
}
|
||||
@@ -180,6 +182,7 @@ Item { // Chooser
|
||||
anchors.centerIn: parent
|
||||
anchors.verticalCenterOffset: -parent.height * 0.1
|
||||
font.pixelSize: parent.height * 0.8
|
||||
font.family: Config.font
|
||||
color: Colors.primary
|
||||
}
|
||||
}
|
||||
@@ -199,6 +202,7 @@ Item { // Chooser
|
||||
text: "[" + results[results.length-1].correct + "]"
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: learnerLastResultKana.font.pixelSize/2
|
||||
font.family: Config.font
|
||||
color: Colors.primary
|
||||
}
|
||||
}
|
||||
@@ -221,6 +225,7 @@ Item { // Chooser
|
||||
width: parent.width
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pixelSize: Math.min(parent.width / text.length * 1.2, parent.height * 0.8)
|
||||
font.family: Config.font
|
||||
color: Colors.primary
|
||||
}
|
||||
}
|
||||
@@ -253,6 +258,7 @@ Item { // Chooser
|
||||
text: "Again"
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: Math.min(parent.width / text.length * 1.2, parent.height * 0.8)
|
||||
font.family: Config.font
|
||||
color: parent.parent.containsMouse ? Colors.secondary_fg : Colors.secondary
|
||||
}
|
||||
}
|
||||
@@ -281,6 +287,7 @@ Item { // Chooser
|
||||
text: "Menu"
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: Math.min(parent.width / text.length * 1.2, parent.height * 0.8)
|
||||
font.family: Config.font
|
||||
color: parent.parent.containsMouse ? Colors.secondary_fg : Colors.secondary
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import "../../../colors"
|
||||
import "../../../config"
|
||||
|
||||
Item { // Kana_Try
|
||||
id: kanaVoicing
|
||||
@@ -96,6 +96,7 @@ Item { // Kana_Try
|
||||
text: "Im Spiel - Runde: " + kanaVoicing.roundNum
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: parent.height * 0.6
|
||||
font.family: Config.font
|
||||
color: Colors.primary
|
||||
}
|
||||
}
|
||||
@@ -116,6 +117,7 @@ Item { // Kana_Try
|
||||
text: typeof kanaVoicing.currentKana.hira === "undefined" ? "" : kanaVoicing.currentKana.hira
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: Math.min(parent.width / text.length * 1.2, parent.height * 0.8)
|
||||
font.family: Config.jfont
|
||||
color: Colors.primary
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import "../../../colors"
|
||||
import "../../../config"
|
||||
|
||||
Item { // Chooser
|
||||
id: languageChooser
|
||||
@@ -29,6 +29,7 @@ Item { // Chooser
|
||||
text: "Wähle ein Modus:"
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: parent.height * 0.6
|
||||
font.family: Config.font
|
||||
color: Colors.primary
|
||||
}
|
||||
}
|
||||
@@ -61,6 +62,7 @@ Item { // Chooser
|
||||
text: "Kana to Voicing"
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: Math.min(parent.width / text.length * 1.2, parent.height * 0.8)
|
||||
font.family: Config.font
|
||||
color: parent.parent.containsMouse ? Colors.secondary_fg : Colors.secondary
|
||||
}
|
||||
}
|
||||
@@ -89,6 +91,7 @@ Item { // Chooser
|
||||
text: "Voicing to Kana"
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: Math.min(parent.width / text.length * 1.2, parent.height * 0.8)
|
||||
font.family: Config.font
|
||||
color: parent.parent.containsMouse ? Colors.secondary_fg : Colors.secondary
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import "../../../colors"
|
||||
import "../../../config"
|
||||
|
||||
Item { // Kana_Try
|
||||
id: voicingKana
|
||||
@@ -141,6 +141,7 @@ Item { // Kana_Try
|
||||
text: "Runde: " + roundNum + " - [" + targetKana.voice.join("|") + "]:"
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: parent.height * 0.6
|
||||
font.family: Config.font
|
||||
color: Colors.primary
|
||||
}
|
||||
}
|
||||
@@ -203,7 +204,8 @@ Item { // Kana_Try
|
||||
anchors.centerIn: parent
|
||||
anchors.verticalCenterOffset: -parent.height * 0.1
|
||||
font.pixelSize: parent.height * 0.8
|
||||
color: parent.parent.containsMouse ? Colors.secondary_fg : Colors.secondary
|
||||
font.family: Config.jfont
|
||||
color: parent.parent.containsMouse ? Colors.secondary_fg : Colors.secondary
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -227,6 +229,7 @@ Item { // Kana_Try
|
||||
text: "Wähle das richtige Zeichen"
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: parent.height * 0.6
|
||||
font.family: Config.font
|
||||
color: Colors.primary
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user