Skip to content

Commit

Permalink
- I enlarged the 'minimal update' area in Fl_Input_, so that characte…
Browse files Browse the repository at this point in the history
…rs that overlap the font box will be correctly erased during minimal redraw. The original code assumes that character fin in a box from 0,0 to charcter width/height. However, many newer fonts overlap that box and leave traces when redrawn. See 'j' and 'W' in Helvetica on Mac and Windows.

- added textsize etc. support for Fluid Live Mode for Fl_Input type.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4436 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Matthias Melcher committed Jul 20, 2005
1 parent 0692766 commit a15e974
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -2,6 +2,7 @@ CHANGES IN FLTK 1.1.7

- Documentation fixes (STR #648, STR #692, STR #730, STR
#744, STR #745, STR #942)
- Fixed left overhang of large chracters in Fl_Input_ (STR #941)
- Fixed button resizing in File Chooser (STR #884)
- Fixed Fluid redraw issue (STR #912)
- Added 32bit BMP Image file format support (STR #918)
Expand Down
7 changes: 7 additions & 0 deletions fluid/factory.cxx
Expand Up @@ -444,6 +444,13 @@ class Fl_Input_Type : public Fl_Widget_Type {
}
Fl_Widget_Type *_make() {return new Fl_Input_Type();}
int pixmapID() { return 14; }
virtual void copy_properties() {
Fl_Widget_Type::copy_properties();
Fl_Input_ *d = (Fl_Input_*)live_widget, *s = (Fl_Input_*)o;
d->textfont(s->textfont());
d->textsize(s->textsize());
d->textcolor(s->textcolor());
}
};
static Fl_Input_Type Fl_Input_type;

Expand Down
2 changes: 1 addition & 1 deletion src/Fl_Input_.cxx
Expand Up @@ -253,7 +253,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
else if (readonly()) xx -= 3;
}
// clip to and erase it:
fl_push_clip((int)xx, Y+ypos, (int)(r-xx+1), height);
fl_push_clip((int)xx-1-height/8, Y+ypos, (int)(r-xx+2+height/4), height);
draw_box(box(), X-Fl::box_dx(box()), Y-Fl::box_dy(box()),
W+Fl::box_dw(box()), H+Fl::box_dh(box()), color());
// it now draws entire line over it
Expand Down

0 comments on commit a15e974

Please sign in to comment.