File tree 2 files changed +11
-5
lines changed
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -169,12 +169,12 @@ func (i *IMETooltip) parsePreeditString(preeditStr string) {
169
169
h := & Highlight {}
170
170
g .foreground = i .s .ws .foreground
171
171
g .background = i .s .ws .background
172
- if i .s .ws .screenbg == "dark " {
173
- h .foreground = warpColor (editor . colors . fg , 30 )
174
- h .background = warpColor (editor . colors . bg , 30 )
172
+ if i .s .ws .screenbg == "light " {
173
+ h .foreground = warpColor (i . s . ws . background , - 30 )
174
+ h .background = warpColor (i . s . ws . foreground , - 30 )
175
175
} else {
176
- h .foreground = warpColor (editor . colors . fg , - 30 )
177
- h .background = warpColor (editor . colors . fg , - 30 )
176
+ h .foreground = warpColor (i . s . ws . foreground , 30 )
177
+ h .background = warpColor (i . s . ws . background , 30 )
178
178
}
179
179
h .underline = true
180
180
Original file line number Diff line number Diff line change @@ -2815,6 +2815,12 @@ func (w *Workspace) InputMethodEvent(event *gui.QInputMethodEvent) {
2815
2815
2816
2816
// InputMethodQuery is
2817
2817
func (w * Workspace ) InputMethodQuery (query core.Qt__InputMethodQuery ) * core.QVariant {
2818
+ if w .screen == nil {
2819
+ return core .NewQVariant ()
2820
+ }
2821
+ if w .screen .tooltip == nil {
2822
+ return core .NewQVariant ()
2823
+ }
2818
2824
if ! w .screen .tooltip .isShown {
2819
2825
return core .NewQVariant ()
2820
2826
}
You can’t perform that action at this time.
0 commit comments