Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
sailfish-apps
Received
Commits
cbdecba9
Commit
cbdecba9
authored
Nov 17, 2017
by
kempe
Browse files
Select correct player layout in settings
parent
31604772
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
qml/pages/SettingsPage.qml
qml/pages/SettingsPage.qml
+12
-1
qml/pages/SettingsPageForm.ui.qml
qml/pages/SettingsPageForm.ui.qml
+2
-0
No files found.
qml/pages/SettingsPage.qml
View file @
cbdecba9
...
...
@@ -20,15 +20,26 @@ SettingsPageForm {
onPlayerLayoutChanged
:
{
settings
.
setValue
(
"
playerLayout
"
,
fileName
)
console
.
lo
g
(
"
Changing layout to
"
,
fileName
)
console
.
debu
g
(
"
Changing layout to
"
,
fileName
)
}
Component.onCompleted
:
{
// Select correct Api language
for
(
var
i
=
0
;
i
<
apiLanguageModel
.
count
;
i
++
)
{
var
item
=
apiLanguageModel
.
get
(
i
)
if
(
settings
.
value
(
"
apiUrl
"
)
===
item
.
apiUrl
)
{
apiLanguageComboBox
.
currentIndex
=
i
;
}
}
// Select correct player layout
for
(
var
i
=
0
;
i
<
playerLayoutModel
.
count
;
i
++
)
{
var
item
=
playerLayoutModel
.
get
(
i
)
if
(
settings
.
value
(
"
playerLayout
"
)
===
item
.
fileName
)
{
playerLayoutComboBox
.
currentIndex
=
i
;
}
}
playerLayoutChanged
.
connect
(
window
.
playerLayoutUpdated
)
}
}
qml/pages/SettingsPageForm.ui.qml
View file @
cbdecba9
...
...
@@ -10,6 +10,8 @@ Page {
property
alias
aboutAction
:
aboutAction
property
alias
buttonResetDb
:
buttonResetDb
property
alias
playerLayoutComboBox
:
playerLayoutComboBox
property
alias
playerLayoutModel
:
playerLayoutModel
property
alias
apiLanguageComboBox
:
apiLanguageComboBox
property
alias
apiLanguageModel
:
apiLanguageModel
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment