Skip to content

Commit

Permalink
Fix default text orientation to horizontal
Browse files Browse the repository at this point in the history
  • Loading branch information
LEOYoon-Tsaw committed May 13, 2024
1 parent d915736 commit 07dfac7
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions SquirrelConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,12 @@ class SquirrelConfig {
// isLinear
func updateCandidateListLayout(prefix: String) -> Bool {
let candidateListLayout = getString("\(prefix)/candidate_list_layout")
if candidateListLayout == "stacked" {
switch candidateListLayout {
case "stacked":
return false
} else if candidateListLayout == "linear" {
case "linear":
return true
} else {
default:
// Deprecated. Not to be confused with text_orientation: horizontal
return getBool("\(prefix)/horizontal") ?? false
}
Expand All @@ -144,13 +145,14 @@ class SquirrelConfig {
// isVertical
func updateTextOrientation(prefix: String) -> Bool {
let textOrientation = getString("\(prefix)/text_orientation")
if textOrientation == "horizontal" {
switch textOrientation {
case "horizontal":
return false
} else if textOrientation == "vertical" {
case "vertical":
return true
} else {
default:
// Deprecated.
return getBool("\(prefix)/vertical") ?? true
return getBool("\(prefix)/vertical") ?? false
}
}
}
Expand Down

0 comments on commit 07dfac7

Please sign in to comment.