fix: fix scroll speed on Windows

This commit is contained in:
Jonathan Rainville 2021-03-30 10:35:53 -04:00 committed by Iuri Matias
parent a337b293da
commit 996b36714d
3 changed files with 19 additions and 1 deletions

View File

@ -33,6 +33,15 @@ QtObject:
proc getDataDir*(self: UtilsView): string {.slot.} =
result = accountConstants.DATADIR
proc getOs*(self: UtilsView): string {.slot.} =
if defined(windows):
return "windows"
elif (defined(macosx)):
return "mac"
elif (defined(linux)):
return "linux"
return "unknown"
proc joinPath*(self: UtilsView, start: string, ending: string): string {.slot.} =
result = os.joinPath(start, ending)

View File

@ -37,7 +37,12 @@ ScrollView {
anchors.bottomMargin: Style.current.bigPadding
spacing: appSettings.useCompactMode ? 0 : 4
boundsBehavior: Flickable.StopAtBounds
flickDeceleration: 10000
flickDeceleration: {
if (utilsModel.getOs() === Constants.windows) {
return 5000
}
return 10000
}
Layout.fillWidth: true
Layout.fillHeight: true
verticalLayoutDirection: ListView.BottomToTop

View File

@ -67,6 +67,10 @@ QtObject {
readonly property string seedWalletType: "seed"
readonly property string generatedWalletType: "generated"
readonly property string windows: "windows"
readonly property string linux: "linux"
readonly property string mac: "mac"
// Transaction states
readonly property int addressRequested: 1
readonly property int declined: 2