InputHandler // Specify display durations for tooltips.

This commit is contained in:
ShikiSuen 2022-11-27 08:34:28 +08:00
parent 1fe0442042
commit 6ff42a8dbc
2 changed files with 3 additions and 0 deletions

View File

@ -206,6 +206,7 @@ extension InputHandler {
var newEmptyState = compositor.isEmpty ? IMEState.ofEmpty() : generateStateOfInputting()
newEmptyState.tooltip = NSLocalizedString("Wildcard key cannot be the initial key.", comment: "") + "  "
newEmptyState.data.tooltipColorState = .redAlert
newEmptyState.tooltipDuration = 1.0
delegate.switchState(newEmptyState)
return true
}

View File

@ -160,6 +160,7 @@ extension InputHandler {
var newState = generateStateOfInputting()
newState.tooltip = NSLocalizedString(tooltipMessage, comment: "") + "  "
newState.data.tooltipColorState = .normal
newState.tooltipDuration = 1.85
delegate.switchState(newState)
return true
}
@ -178,6 +179,7 @@ extension InputHandler {
var newState = generateStateOfInputting()
newState.tooltip = NSLocalizedString(tooltipMessage, comment: "") + "  "
newState.data.tooltipColorState = .normal
newState.tooltipDuration = 1.85
delegate.switchState(newState)
return true
}