Skip to content

Commit

Permalink
InputPanel: format code
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Ricchi <[email protected]>
  • Loading branch information
AndreaRicchi committed Jun 21, 2024
1 parent 14509d3 commit ec47129
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/qml/InputPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,20 @@ Item {
}

function loadLettersLayout() {
var description = InputEngine.descriptionOfLayout(languageLayout);
var source = InputEngine.fileOfLayout(languageLayout);
if(description !== "" && source !== ""){
layoutLoader.langDescription = description
layoutLoader.setSource(source + ".qml", {
"inputPanel": root});
}
else{
layoutLoader.langDescription = "English"
layoutLoader.setSource("EnLayout.qml", {
"inputPanel": root});
}
var description = InputEngine.descriptionOfLayout(languageLayout);
var source = InputEngine.fileOfLayout(languageLayout);
if (description !== "" && source !== "") {
layoutLoader.langDescription = description;
layoutLoader.setSource(source + ".qml", {
"inputPanel": root
});
} else {
layoutLoader.langDescription = "English";
layoutLoader.setSource("EnLayout.qml", {
"inputPanel": root
});
}
}

objectName: "inputPanel"
width: parent.width
Expand Down Expand Up @@ -116,8 +117,10 @@ Item {

Loader {
id: layoutLoader

// lang description only needed for layouts that share a file
property string langDescription

anchors {
fill: parent
margins: 5
Expand Down

0 comments on commit ec47129

Please sign in to comment.