Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
akiyosi committed Dec 31, 2022
1 parent 363bdda commit f3e0480
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 5 additions & 5 deletions editor/imetooltip.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ func (i *IMETooltip) parsePreeditString(preeditStr string) {
h := &Highlight{}
g.foreground = i.s.ws.foreground
g.background = i.s.ws.background
if i.s.ws.screenbg == "dark" {
h.foreground = warpColor(editor.colors.fg, 30)
h.background = warpColor(editor.colors.bg, 30)
if i.s.ws.screenbg == "light" {
h.foreground = warpColor(i.s.ws.background, -30)
h.background = warpColor(i.s.ws.foreground, -30)
} else {
h.foreground = warpColor(editor.colors.fg, -30)
h.background = warpColor(editor.colors.fg, -30)
h.foreground = warpColor(i.s.ws.foreground, 30)
h.background = warpColor(i.s.ws.background, 30)
}
h.underline = true

Expand Down
6 changes: 6 additions & 0 deletions editor/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -2815,6 +2815,12 @@ func (w *Workspace) InputMethodEvent(event *gui.QInputMethodEvent) {

// InputMethodQuery is
func (w *Workspace) InputMethodQuery(query core.Qt__InputMethodQuery) *core.QVariant {
if w.screen == nil {
return core.NewQVariant()
}
if w.screen.tooltip == nil {
return core.NewQVariant()
}
if !w.screen.tooltip.isShown {
return core.NewQVariant()
}
Expand Down

0 comments on commit f3e0480

Please sign in to comment.