InputHandler // Specify display durations for tooltips.
This commit is contained in:
parent
1fe0442042
commit
6ff42a8dbc
|
@ -206,6 +206,7 @@ extension InputHandler {
|
||||||
var newEmptyState = compositor.isEmpty ? IMEState.ofEmpty() : generateStateOfInputting()
|
var newEmptyState = compositor.isEmpty ? IMEState.ofEmpty() : generateStateOfInputting()
|
||||||
newEmptyState.tooltip = NSLocalizedString("Wildcard key cannot be the initial key.", comment: "") + " "
|
newEmptyState.tooltip = NSLocalizedString("Wildcard key cannot be the initial key.", comment: "") + " "
|
||||||
newEmptyState.data.tooltipColorState = .redAlert
|
newEmptyState.data.tooltipColorState = .redAlert
|
||||||
|
newEmptyState.tooltipDuration = 1.0
|
||||||
delegate.switchState(newEmptyState)
|
delegate.switchState(newEmptyState)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,6 +160,7 @@ extension InputHandler {
|
||||||
var newState = generateStateOfInputting()
|
var newState = generateStateOfInputting()
|
||||||
newState.tooltip = NSLocalizedString(tooltipMessage, comment: "") + " "
|
newState.tooltip = NSLocalizedString(tooltipMessage, comment: "") + " "
|
||||||
newState.data.tooltipColorState = .normal
|
newState.data.tooltipColorState = .normal
|
||||||
|
newState.tooltipDuration = 1.85
|
||||||
delegate.switchState(newState)
|
delegate.switchState(newState)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -178,6 +179,7 @@ extension InputHandler {
|
||||||
var newState = generateStateOfInputting()
|
var newState = generateStateOfInputting()
|
||||||
newState.tooltip = NSLocalizedString(tooltipMessage, comment: "") + " "
|
newState.tooltip = NSLocalizedString(tooltipMessage, comment: "") + " "
|
||||||
newState.data.tooltipColorState = .normal
|
newState.data.tooltipColorState = .normal
|
||||||
|
newState.tooltipDuration = 1.85
|
||||||
delegate.switchState(newState)
|
delegate.switchState(newState)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue