The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Nec color in label tool

These changes was commited to the Birdfont repository Tue, 17 Mar 2015 08:03:01 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Tue, 17 Mar 2015 08:03:01 +0000 (09:03 +0100)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Tue, 17 Mar 2015 08:03:01 +0000 (09:03 +0100)
commit 003575abe7307ba8f5ad0fafdcf22e9045ce934d
tree 6a42c68241e3caadc3d5cfdc2c18fc3cb3c00bc7
parent f9499dd6040aca05b5543876435cdaa3ac7a220a
Nec color in label tool

libbirdfont/LabelTool.vala
--- a/libbirdfont/LabelTool.vala +++ b/libbirdfont/LabelTool.vala @@ -83,8 +83,13 @@ cr.save (); bgx = Toolbox.allocation_width - counter_box_width - 15; bgy = y + 2; - - Theme.color (cr, "Background 3"); + + if (is_selected ()) { + Theme.color (cr, "Background 6"); + } else { + Theme.color (cr, "Background 3"); + } + draw_rounded_rectangle (cr, bgx, bgy, counter_box_width, counter_box_height, 3); cr.fill (); cr.restore (); @@ -97,8 +102,12 @@ center_x = bgx + (counter_box_width / 2.0 - glyph_count.get_extent () / 2.0); center_y = bgy + (counter_box_height / 2.0 + 5); - Theme.text_color (glyph_count, "Foreground Inverted"); - + if (is_selected ()) { + Theme.text_color (glyph_count, "Foreground"); + } else { + Theme.text_color (glyph_count, "Foreground Inverted"); + } + glyph_count.set_font_size (text_height); glyph_count.draw_at_baseline (cr, center_x, center_y); }