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 539733 - No way to control treeview separator height
No way to control treeview separator height
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2008-06-23 11:21 UTC by Christian Dywan
Modified: 2008-08-02 04:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Implement GtkTreeView::separator-height (2.22 KB, patch)
2008-07-01 09:00 UTC, Christian Dywan
rejected Details | Review
Respect GtkWidget::separator-height and wide-separators (1.55 KB, patch)
2008-07-01 09:02 UTC, Christian Dywan
committed Details | Review

Description Christian Dywan 2008-06-23 11:21:33 UTC
Separators in the treeview have a hardcoded height of 2 (height = 2 + 2 * focus_pad). There is no way to change that size.

To solve this problem, Maemo's Gtk introduced a style property GtkTreeView:separator-height. Even better would be if the already existing style property GtkWidget:separator-height could be used for this. However this one defaults to '2' instead of '0'.
Comment 1 Matthias Clasen 2008-06-29 06:48:00 UTC
GtkWidget:separator-height is conditional on :wide-separators, so you could probably use it similarly to how GtkHSeparator uses it:

  gtk_widget_style_get (widget,
                        "wide-separators",  &wide_separators,
                        "separator-height", &separator_height,
                        NULL);

  if (wide_separators)
    requisition->height = separator_height;
  else
    requisition->height = widget->style->ythickness;
Comment 2 Christian Dywan 2008-07-01 09:00:17 UTC
Created attachment 113763 [details] [review]
Implement GtkTreeView::separator-height

This is what Maemo does, a new property in GtkTreeView.
Comment 3 Christian Dywan 2008-07-01 09:02:40 UTC
Created attachment 113764 [details] [review]
Respect GtkWidget::separator-height and wide-separators

This is a patch that makes use of the existing GtkWidget::separator-height, conditional to wide-separators as suggested by Matthias.
Comment 4 Tim Janik 2008-07-01 09:09:09 UTC
(In reply to comment #3)
> Created an attachment (id=113764) [edit]
> Respect GtkWidget::separator-height and wide-separators
> 
> This is a patch that makes use of the existing GtkWidget::separator-height,
> conditional to wide-separators as suggested by Matthias.

Thanks, the patch looks good. I'd say can be comitted after Kris also had a peek at it.
Comment 5 Kristian Rietveld 2008-07-21 11:44:42 UTC
Looks good to me.
Comment 6 Matthias Clasen 2008-08-02 04:32:32 UTC
2008-08-02  Matthias Clasen  <mclasen@redhat.com>

        Bug 539733 – No way to control treeview separator height

        * gtk/gtktreeview.c: Respect the wide-separators and
        separator-height style properties when drawing separators.
        Patch by Christian Dywan