enhacing GTK visual quality
- From: Antonio Campos <acampos ceronet com>
- To: "gtk-devel-list gnome org" <gtk-devel-list gnome org>
- Subject: enhacing GTK visual quality
- Date: Thu, 24 Aug 2000 01:30:51 +0200
Before it's just too late for GTK 2.0, I'm proposing two little
enhacements for improving GTK widgets quality:
1) When a label gets an allocation space inferior to the requested by
the widget label,
for example, a label not fitting into the room left by a button (this
may happen on "shrinkable" windows, or on the first line of a clist,
etc...), the text is just clipped away:
|--------------|
|ust to big label to fi|
|--------------|
(the above ASCII "art" tries to resemble a button with a label "just to
big label to fit" inside the button).
This is VERY ugly. It seems to me that Gnome has widgets to override
this. (but this behaviour should reside in GTK and not in Gnome,
obviously, because if not we'll be duplicating efforts). I tried to fix
it myself, but I can't understand the X text
management enough in gtklabel.c.
The right thing:
|--------------|
|... to big label to f...|
|--------------|
(the above tries to resemble the same button with the label surrounded
by ..., indicating that the label is just to big the be seen. Note that
the points ... are in both laterals - the left and the right one -. Why
should this be this way?. Well, if the label is set at the left or at
the right or in the middle or whatever (with Gtkmisc::alignment?), the
alignment shouldn't be destroyed by the points ... I mean, if the part
of the text that doesn't enter in the button space if the left part,
then only the left points ... should appear, the same for the right
part, or in both simultaneously.)
2) The long and interminable story of the buttons don't getting
depressed (visually) when the users click on them using the keyboard
I have worked hardly to try to avoid that ugly imperfection of GTK, but
without results, or without a clear way of doing it without breaking
signals semantics...
Anyway, here are my investigations (please, fell free to e-mail me
personally if you have something to help here):
Handling the button_press, button_release and clicked signals (for the
mouse) are done in gtkbutton.c. button_press then calls
real_button_press or so, and the like for button_release with
real_button_release. On those real_... functions are the calls for
painting the button (pressed/depressed).
However, keyboard handling is completely done in another ways.
The first function (when the user press a button using the keyboard)
that is called is the handler for the keypress signal on the gtkwindow.c
module. Then this module produces an ACTIVE signal that the button
widget class connects directly to the clicked signal (in gtkbutton.c all
of this), so finally the clicked signal is produced. The problem is that
the redrawing part is never called because the button_press and
button_release functions are never called with the keyboard.
This is more or less what's happening in gtkwindow.c and gtkbutton.c
I'm asking for help here, because I think it shouldn't be a hard thing
to tweak by a Gtkhacker.
Anyway, comments are appreciated...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]