Bug 302889 - Treeview lines are not far enough from branch expanders
Summary: Treeview lines are not far enough from branch expanders
Status: RESOLVED FIXED
Alias: None
Product: Oxygen
Classification: Plasma
Component: gtk2-engine (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-02 11:46 UTC by Ruslan Kabatsayev
Modified: 2012-07-02 16:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ruslan Kabatsayev 2012-07-02 11:46:21 UTC
See screenshot: http://6g6.eu/sih0-screenshot-07022012-033244-pm.png
Notice that treeview lines touch "+" expander icons in oxygen-gtk. At left, in oxygen-qt, they have some gap between lines and "+".


Reproducible: Always

Steps to Reproduce:
1. Set use "+/-" expanders instead of ">/v"
2. Start oxygen-gtk-demo at Lists page
3.
Comment 1 Hugo Pereira Da Costa 2012-07-02 12:35:31 UTC
Confirmed. Also with 'normal' expanders as far as I can tell. Also the bar is too short.
 Must be a regression, I'm pretty sure it was ok at some point (will double check and bisect if yes)

Thanks for reporting ;)
Comment 2 Hugo Pereira Da Costa 2012-07-02 13:18:51 UTC
... v1.2.1 is correct, v1.2.2 is not. So bisecting now ...
Comment 3 Hugo Pereira Da Costa 2012-07-02 13:23:13 UTC
commit 077db4ce21ca240ff99cdb339176adca342c28bf
Author: Ruslan Kabatsayev <b7.10110111@gmail.com>
Date:   Thu Feb 23 20:46:22 2012 +0400

    Reduce TreeView cell vertical padding in a legal way (via gtkrc)

Is the bad guy.
Comment 4 Ruslan Kabatsayev 2012-07-02 13:25:55 UTC
I guess this means we just should change some magic numbers in lines rendering code.
Comment 5 Hugo Pereira Da Costa 2012-07-02 13:26:57 UTC
will try. Provided that there is enough "space" for it
(you reduced separator size from 15 to 10, which likely affects both the height -wanted- and the width -unwanted-)
Comment 6 Hugo Pereira Da Costa 2012-07-02 13:40:31 UTC
The other issue with your patch above is that the horizontal positioning of the expander is also inconsistent with Qt
(too close from edge) which is also related.

We 'might' be able to fix it by playing with gtk_tree_view_set_level_indentation( treeView, 5 ); (added to oxygentreeviewengine, say), and reposition the objects. But then the hit area for the expander might be shifted with the actual position of the expander ...
Comment 7 Hugo Pereira Da Costa 2012-07-02 13:42:07 UTC
ps: also not that this change was not ported to gtk3 -see gtk.css: -GtkTreeView-expander-size: 15px;
which as a result, remains consistent with oxygen-qt, but might have too high treeview rows ... (did not check)
Comment 8 Hugo Pereira Da Costa 2012-07-02 13:42:29 UTC
all in all its a bit of a mess :)
Comment 9 Ruslan Kabatsayev 2012-07-02 13:48:40 UTC
This is a BIG mess. If there were separate width & height for expander, this would be what we need.
But, as for now, what if we leave the width as is, and just fix the gaps? I don't feel like returning to those oversized rows...
Comment 10 Ruslan Kabatsayev 2012-07-02 13:50:55 UTC
BTW, there's some issue in oxygen-qt: the gaps between + and line above it and between + and line below it are different. Looks like top line should be longer by 1px.
Comment 11 Hugo Pereira Da Costa 2012-07-02 14:06:11 UTC
for Qt that might be a round by one issue between expander size and its actual rendering. Tree lines are entirely rendered by Qt. So only option is to make the expander size smaller by one unit (I think).

For gtk, up to you I guess. You take care of it ? 

(my own solution would be to just revert the initial change, since I was personally not so annoyed by the "large" rows).
Comment 12 Ruslan Kabatsayev 2012-07-02 14:08:49 UTC
OK, I'll do this.
Comment 13 Ruslan Kabatsayev 2012-07-02 16:00:49 UTC
Git commit 28c7ade51284cc1ad1e6172205965f9d793eb854 by Ruslan Kabatsayev.
Committed on 02/07/2012 at 18:01.
Pushed by kabatsayev into branch 'master'.

Fix treeview lines look with new expander-size

M  +4    -4    src/oxygenstyle.cpp
M  +8    -0    src/oxygenstylewrapper.cpp

http://commits.kde.org/oxygen-gtk/28c7ade51284cc1ad1e6172205965f9d793eb854