diff options
author | Mike FABIAN <maiku.fabian@gmail.com> | 2012-12-04 10:50:40 -0500 |
---|---|---|
committer | Peng Huang <shawn.p.huang@gmail.com> | 2012-12-04 10:50:40 -0500 |
commit | 0639472efba34707d6f2d91511fc4c59c5255611 (patch) | |
tree | 58daa4160fd5d1bdc82c09d37213e892dd0a5e41 /ui | |
parent | 098bc1f5871241fec93831bc37715e45cc4182d6 (diff) |
Fix red colour in rgb value in pango.vala
The red part of the rgb value was always passed as 0
to Pango.attr_foreground_new(r, g, b) and
Pango.attr_background_new(r, g, b).
BUG=
Review URL: https://codereview.appspot.com/6874050
Patch from Mike FABIAN <maiku.fabian@gmail.com>.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk3/pango.vala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/gtk3/pango.vala b/ui/gtk3/pango.vala index 9f8f0654..cfa2c671 100644 --- a/ui/gtk3/pango.vala +++ b/ui/gtk3/pango.vala @@ -50,17 +50,17 @@ Pango.AttrList get_pango_attr_list_from_ibus_text(IBus.Text text) { switch(attr.type) { case IBus.AttrType.FOREGROUND: { - uint16 r = (uint16)(attr.value & 0x00ff0000) >> 8; + uint16 r = (uint16)((attr.value & 0x00ff0000) >> 8); uint16 g = (uint16)(attr.value & 0x0000ff00); - uint16 b = (uint16)(attr.value & 0x000000ff) << 8; + uint16 b = (uint16)((attr.value & 0x000000ff) << 8); pango_attr = Pango.attr_foreground_new(r, g, b); break; } case IBus.AttrType.BACKGROUND: { - uint16 r = (uint16)(attr.value & 0x00ff0000) >> 8; + uint16 r = (uint16)((attr.value & 0x00ff0000) >> 8); uint16 g = (uint16)(attr.value & 0x0000ff00); - uint16 b = (uint16)(attr.value & 0x000000ff) << 8; + uint16 b = (uint16)((attr.value & 0x000000ff) << 8); pango_attr = Pango.attr_background_new(r, g, b); break; } |