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 684980 - Improve the appearance of the dragged header
Improve the appearance of the dragged header
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2012-09-27 17:15 UTC by Stefano Facchini
Modified: 2012-10-22 23:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
treeview: Move the dragged header in the headers window (1.11 KB, patch)
2012-09-27 17:16 UTC, Stefano Facchini
accepted-commit_now Details | Review
treeview: Add support for styling the dragged header (2.13 KB, patch)
2012-09-27 17:16 UTC, Stefano Facchini
reviewed Details | Review

Description Stefano Facchini 2012-09-27 17:15:33 UTC
Currently, dragging a header to reorder columns has the effect of moving the header itself below the header line, which looks wrong.
Comment 1 Stefano Facchini 2012-09-27 17:16:17 UTC
Created attachment 225270 [details] [review]
treeview: Move the dragged header in the headers window
Comment 2 Stefano Facchini 2012-09-27 17:16:31 UTC
Created attachment 225271 [details] [review]
treeview: Add support for styling the dragged header
Comment 3 Stefano Facchini 2012-09-27 17:21:14 UTC
Corresponding patch for gnome-themes-standard at bug 684982
Comment 4 Matthias Clasen 2012-10-03 09:36:01 UTC
Cosimo, can you look at this ?
Comment 5 Cosimo Cecchi 2012-10-03 18:10:42 UTC
Review of attachment 225270 [details] [review]:

I don't know about this; the patch itself looks good, but it causes problems when dragging the last column in a view, which will tipycally be expanded, so its header would be bigger than all the others and would cover them completely while dragging; to understand what I mean, take testtreecolumns from tests/ and add e.g. 5 columns to one window, then try to drag the rightmost column in that window.
Maybe it's better if we make the column header freely draggable around instead?
Also, man are those vertical arrows on DnD ugly :)
Comment 6 Cosimo Cecchi 2012-10-03 18:16:58 UTC
Review of attachment 225270 [details] [review]:

Uhm, I see you solved this problem in the theme using transparency instead - that's also a valid solution. I think we should probably do this then.
Comment 7 Cosimo Cecchi 2012-10-03 18:20:00 UTC
Review of attachment 225271 [details] [review]:

::: gtk/gtktreeview.c
@@ +9812,3 @@
 
+  context = gtk_widget_get_style_context (button);
+  gtk_style_context_add_class (context, STYLE_CLASS_DRAGGED_HEADER);

Can you use GTK_STYLE_CLASS_DND for this?
Comment 8 Cosimo Cecchi 2012-10-03 18:20:36 UTC
I'd rather land this after the 3.6 branchpoint in any case.
Comment 9 Matthias Clasen 2012-10-22 23:22:48 UTC
Pushed both of these, with GTK_STYLE_CLASS_DND instead of STYLE_CLASS_DRAGGED_HEADER