After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 84955 - Gtkcombo popup window wrong size
Gtkcombo popup window wrong size
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.0.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-06-11 23:46 UTC by Marco Pesenti Gritti
Modified: 2011-02-04 16:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch fixing scrollbar issue, but not fixing the problem (2.03 KB, patch)
2002-06-12 20:13 UTC, Owen Taylor
none Details | Review
patch fixing the problem (1.56 KB, patch)
2002-06-12 20:44 UTC, Marco Pesenti Gritti
none Details | Review

Description Marco Pesenti Gritti 2002-06-11 23:46:28 UTC
When the horizontal scrollbar is showed in a combo box popup window, it's
sized incorrectly. (as result also vertical scrollbar is showed when not
necessary).

The bug is in the gtk_combo_get_pos function.
We are getting the scrollbar_spacing in this way:
GTK_SCROLLED_WINDOW_GET_CLASS (combo->popup)->scrollbar_spacing
and ignoring that the value could be negative.
The SCROLLBAR_SPACING(w) macro defined in gtkscrolledwindow.c in
case of negatives values is falling back to DEFAULT_SCROLLBAR_SPACING.

Using that macro would probably fix the problem, at least it fixed it in
some code I stealed from gtkcombo ;)
But the macro is private...
Comment 1 Owen Taylor 2002-06-12 20:13:34 UTC
Created attachment 9179 [details] [review]
Patch fixing scrollbar issue, but not fixing the problem
Comment 2 Owen Taylor 2002-06-12 20:14:53 UTC
Just fixing the scrollbar issue doesn't seem to make the vscrollbar
go away. (Trying with the entry test in testgtk, removing some
items to make sure that the vertical height was less than the
maximum of 400 pixels.)

Maybe there is some theme issue or something involved...looks
like it needs more investigation.
Comment 3 Marco Pesenti Gritti 2002-06-12 20:44:39 UTC
Created attachment 9180 [details] [review]
patch fixing the problem
Comment 4 Marco Pesenti Gritti 2002-06-12 20:48:21 UTC
This works but dont ask me why ;)
I tried it with testgtk and galeon and the issue seem fixed.

I have vim configured with a different code style, so spaces/tabs
could be messed up. I'm sorry to not have time to look at it now :(
Comment 5 Owen Taylor 2002-10-10 19:46:34 UTC
Your change looks right to me. (The reason it is needed is that
we pop up the popup before we've ever size requested the scrollbars)

I've applied a fix now that is pretty much equivalent except
that I called size_request() on the vscrollbar as well,
and I added _gtk_scrolled_window_get_scrollbar_spacing.

Thanks, and sorry for the delay.

Thu Oct 10 14:35:31 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkscrolledwindow.[ch]: Privately export
        _gtk_scrolled_window_get_scrollbar_spacing().

        * gtk/gtkcombo.c: Properly account from scrollbar
        spacing when computing the size of the popup window.
        (#84955, Marco Pesenti Gritti)