Optimize viewMethod change
This commit is contained in:
parent
4f0489703a
commit
f7700ed5d7
2 changed files with 2 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -52,3 +52,4 @@ compile_commands.json
|
||||||
*creator.user*
|
*creator.user*
|
||||||
|
|
||||||
/build/*
|
/build/*
|
||||||
|
.vscode
|
|
@ -72,10 +72,7 @@ Meui.Window {
|
||||||
source: settings.viewMethod === 0 ? listSource : gridSource
|
source: settings.viewMethod === 0 ? listSource : gridSource
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (settings.viewMethod === 1)
|
settings.viewMethod ^= 1 // reverse settings.viewMethod
|
||||||
settings.viewMethod = 0
|
|
||||||
else
|
|
||||||
settings.viewMethod = 1
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue