mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-19 18:18:38 +00:00
Bugfixes
This commit is contained in:
parent
616090da3d
commit
979fea1cee
@ -190,7 +190,10 @@ QtObject:
|
|||||||
notify = newVersionChanged
|
notify = newVersionChanged
|
||||||
|
|
||||||
proc readTextFile*(self: UtilsView, filepath: string): string {.slot.} =
|
proc readTextFile*(self: UtilsView, filepath: string): string {.slot.} =
|
||||||
|
try:
|
||||||
return readFile(filepath)
|
return readFile(filepath)
|
||||||
|
except:
|
||||||
|
return ""
|
||||||
|
|
||||||
proc writeTextFile*(self: UtilsView, filepath: string, text: string): bool {.slot.} =
|
proc writeTextFile*(self: UtilsView, filepath: string, text: string): bool {.slot.} =
|
||||||
try:
|
try:
|
||||||
|
@ -189,7 +189,13 @@ ScrollView {
|
|||||||
minimumValue: 50
|
minimumValue: 50
|
||||||
maximumValue: 200
|
maximumValue: 200
|
||||||
stepSize: 50
|
stepSize: 50
|
||||||
value: parseFloat(utilsModel.readTextFile(uiScaleFilePath)) * 100
|
value: {
|
||||||
|
let scaleFactorStr = utilsModel.readTextFile(uiScaleFilePath)
|
||||||
|
if (scaleFactorStr === "") {
|
||||||
|
return 100
|
||||||
|
}
|
||||||
|
return parseFloat(scaleFactorStr) * 100
|
||||||
|
}
|
||||||
onValueChanged: {
|
onValueChanged: {
|
||||||
utilsModel.writeTextFile(uiScaleFilePath, value / 100.0)
|
utilsModel.writeTextFile(uiScaleFilePath, value / 100.0)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user