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 97326 - need access to gtk_range_calc_layout()
need access to gtk_range_calc_layout()
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: Other
2.0.x
Other All
: Low normal
: Small API
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-10-31 14:37 UTC by Sven Neumann
Modified: 2013-02-04 02:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot of our derived scale widget (40.15 KB, image/png)
2002-10-31 17:41 UTC, Sven Neumann
Details

Description Sven Neumann 2002-10-31 14:37:47 UTC
To implement a custom scale widget one would derive from GtkScale or
GtkRange. If one wants to override the expose method implemented in
GtkRange one needs access to gtk_range_calc_layout(). This is because the
GtkRange implementation delays all calculations by setting
range->need_recalc and calls gtk_range_calc_layout() from the expose
method. To make it possible to implement a different look, derived widgets
need to be able to trigger the recalculation so they can draw the UI
elements into the correct locations.
Comment 1 Owen Taylor 2002-10-31 17:22:03 UTC
I think that deriving from these widgets really is something
we don't want to encourage ... it greatly constrains the
changes we can make to internal implementation details,
and thus, the extent we can improve or fix the widgets.
Comment 2 Sven Neumann 2002-10-31 17:39:46 UTC
You are probably right that deriving from GtkRange shouldn't be
encouraged. There are situations however where it makes sense. We can
live with the ugly hack we used for the GimpColorScale implementation
(I'll attach a screenshot) but of course we'd prefer a better
solution. It's up to you...
Comment 3 Sven Neumann 2002-10-31 17:41:42 UTC
Created attachment 11939 [details]
screenshot of our derived scale widget