Descriptionui/gtk3: Refactor color of a selected candidate on lookup window
Recenly 'background-color' CSS property does not indicate the actual
background color in GTK 3.22 and IBus uses '-gtk-secondary-caret-color'
CSS property instead.
But I found every themes do not have '-gtk-secondary-caret-color'
CSS property even if the latest GTK is used. Some themes, e.g.
distro themes or third party themes, uses 'background-color' CSS
property for the background color of the selected text.
This patch compares the colors of the normal 'background-color' and
the selected 'background-color' and in case they are different,
uses the selected 'background-color', otherwise the selected
'-gtk-secondary-caret-color'.
Also now IBus checks the colors of a dummy GtkTextView rather than
ones of GtkLabel on the lookup window because some themes
do not configure the selected bacground color in GtkLabel.
BUG=https://github.com/ibus/ibus/issues/1871
Committed: bdc83bcbe3c9f07a267499c297db12c68af82fa2
Patch Set 1 #
Total comments: 2
Patch Set 2 : Updated with message #2 #Patch Set 3 : Added set_parent(null) #
Total comments: 4
Patch Set 4 : Updated with message #6 #Patch Set 5 : Updated with changed signal #Patch Set 6 : Fixed typo #
Total comments: 4
Patch Set 7 : Updated with messsage #8 #MessagesTotal messages: 11
|