refaktor
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user