Author: spitzak
Date: 2008-07-15 21:59:32 -0700 (Tue, 15 Jul 2008)
New Revision: 6145
Log:
Fixed glitch in how Choice is drawn. If you made it taller the blue
selection color was not a rectangular shape.
Modified:
trunk/src/Choice.cxx
Modified: trunk/src/Choice.cxx
===================================================================
--- trunk/src/Choice.cxx 2008-07-16 04:52:58 UTC (rev 6144)
+++ trunk/src/Choice.cxx 2008-07-16 04:59:32 UTC (rev 6145)
@@ -88,10 +88,6 @@
if (damage() & (DAMAGE_ALL|DAMAGE_VALUE)) {
setcolor(color());
fillrect(r);
- if (flag(FOCUSED)) {
- setcolor(selection_color());
- Rectangle fr(r); fr.inset(2); fillrect(fr);
- }
Widget* o = get_item();
//if (!o && children()) o = child(0);
if (o) {
@@ -100,7 +96,6 @@
if (focused()) o->set_flag(SELECTED);
else o->clear_flag(SELECTED);
if (any_of(INACTIVE|INACTIVE_R)) o->set_flag(INACTIVE_R);
- r.move_x(2);
push_clip(r);
push_matrix();
if (!o->h()) o->layout();
@@ -109,8 +104,8 @@
int n = h/int(o->labelsize()+o->leading());
if (n > 1) h -= int((n-1)*o->labelsize()+(n-1.5)*o->leading());
// center the item vertically:
- translate(r.x(), r.y()+((r.h()-h)>>1));
- int save_w = o->w(); o->w(r.w());
+ translate(r.x()+2, r.y()+((r.h()-h)>>1));
+ int save_w = o->w(); o->w(r.w()-4);
fl_hide_underscore = true;
o->draw();
fl_hide_underscore = false;
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit