Hello! + possible patch/fix/thing =)

william@nails.maybe.net
Fri, 5 Jan 2001 14:56:16 -0800 (PST)


I checked out AbiWord quite a while ago and I was certainly impressed. I
just downloaded the latest version out of CVS and I must say that I'm even
more impressed =) Great work everyone; AbiWord will really "scratch the
itch" of so many Linux geeks out there!

I noticed a little bugglet in the color selection under Linux GTK (I'm
using GTK version 1.1.13): the color selection widget is stretched
out-of-whack and the wheel is actually a big funny oval thing. I fiddled
with it for a little bit and came up with a sort-of fix; it seems kind of
hackish but it definitly works... I hope it can be of some help.

Here's what I did:
- Instead of putting the color selector widget straight into the notebook
page, I created a horizontal box and put a vertical box inside of it and
then put the color selection widget inside of that vertical box. The
horizontal box is then placed into the notebook page. This gives the
callers more control of the sizing of the contained widgets. Those
changes are summarized here.
- In src/xap/unix/xap_UnixDialog_FontChooser.cpp, I changed these lines
[[--------
GtkWidget * colorSelector = gtk_color_selection_new();
UT_ASSERT(colorSelector);

gtk_widget_show(colorSelector);
--------]]

to

[[-------
GtkWidget * colorSelector = gtk_color_selection_new();
GtkWidget * colorSelectorVBox = gtk_vbox_new( TRUE, 0 );
GtkWidget * colorSelectorHBox = gtk_hbox_new( TRUE, 0 );

UT_ASSERT(colorSelector);
UT_ASSERT(colorSelectorVBox);
UT_ASSERT(colorSelectorHBox);

gtk_box_pack_start( GTK_BOX(colorSelectorVBox), colorSelector,
FALSE, FALSE, 0 );
gtk_box_pack_start( GTK_BOX(colorSelectorHBox), colorSelectorVBox,
FALSE, FALSE, 0 );

gtk_widget_show_all(colorSelectorHBox);
------]]

- I also changed the line
gtk_notebook_insert_page(&fontsel->notebook,
colorSelector,
tabLabel,
3);
to
gtk_notebook_insert_page(&fontsel->notebook, colorSelectorHBox,
tabLabel,
3);

- I don't know if this is "The Right Way" to fix this sort of problem, but
it seems to work.

I hope this helps at least a little bit.

Sorry if it's formatted ugly-like; I'm typing it up in 'pine' since I
already lost my actual changes ;0

William R. Tipton
william@nails.maybe.net



This archive was generated by hypermail 1.03b2.