John Levon wrote:
>
> On Fri, May 24, 2002 at 11:03:20AM +0300, Martin Vermeer wrote:
>
> > > > - the rendering of parenthesis in the "Math delimiter" is often wrong or
> > > > confused
> > >
> > > bug 354
> > >
> > > regards
> > > john
> >
> > Fixed. Patch and add file delim1.xpm.
> >
> > Please apply also to 1.2.0
>
> Can you please re-send the latest version of this patch ?
>
JMarc asked for this also, and since Martin had not yet answered, I am
attaching them.
Garst
Index: ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/xforms/ChangeLog,v
retrieving revision 1.382
diff -u -p -r1.382 ChangeLog
--- ChangeLog 2002/05/15 23:33:40 1.382
+++ ChangeLog 2002/05/24 07:59:41
@@ -1,3 +1,7 @@
+2002-05-24 Martin Vermeer <[EMAIL PROTECTED]>
+ * FormMathsDelim.C: fix delimiter pre-display rendering
+ mess-up bug (354)
+
2002-05-15 John Levon <[EMAIL PROTECTED]>
* FormCharacter.C: avoid mis-treating Combox as FL_OBJECT
Index: FormMathsDelim.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/xforms/FormMathsDelim.C,v
retrieving revision 1.15
diff -u -p -r1.15 FormMathsDelim.C
--- FormMathsDelim.C 2002/04/23 08:16:26 1.15
+++ FormMathsDelim.C 2002/05/24 07:59:42
@@ -26,6 +26,7 @@
#include "delim.xbm"
#include "delim0.xpm"
+#include "delim1.xpm"
static int const delim_rversion[] = {
1,1,3,3,4,5,7,7,9,9,10,11,
@@ -59,10 +60,11 @@ void FormMathsDelim::build()
dialog_.reset(build_maths_delim());
fl_set_button(dialog_->radio_left, 1);
+ // Initialize button_pix to "()" as found in images/delim0.xpm:
fl_set_pixmap_data(dialog_->button_pix, const_cast<char**>(delim0));
dialog_->radio_left->u_ldata = 0;
dialog_->radio_right->u_ldata = 1;
- dialog_->radio_both->u_ldata = 2;
+ //dialog_->radio_both->u_ldata = 2;
fl_set_bmtable_data(dialog_->bmtable, 6, 4,
delim_width, delim_height, delim_bits);
@@ -112,9 +114,14 @@ bool FormMathsDelim::input(FL_OBJECT *,
}
}
- Pixmap p1, p2;
+ Pixmap p1;
- p1 = fl_get_pixmap_pixmap(dialog_->button_pix, &p1, &p2);
+ // Re-initialize button_pix to solid blue
+ // (not elegant but works, MV 24.5.2002)
+ fl_free_pixmap_pixmap(dialog_->button_pix);
+ fl_set_pixmap_data(dialog_->button_pix, const_cast<char**>(delim1));
+ p1 = fl_get_pixmap_pixmap(dialog_->button_pix, &p1, 0);
+
fl_draw_bmtable_item(dialog_->bmtable, left, p1, 0, 0);
fl_draw_bmtable_item(dialog_->bmtable, right, p1, 16, 0);
fl_redraw_object(dialog_->button_pix);
