Bug 163761 - New Option: Hide tree branch lines
Summary: New Option: Hide tree branch lines
Alias: None
Product: Oxygen
Classification: Plasma
Component: style (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Camilla Boemann
Depends on:
Reported: 2008-06-11 08:21 UTC by Josh Berry
Modified: 2009-01-18 04:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:

adds the option (5.02 KB, patch)
2008-10-21 17:58 UTC, Huynh Huu Long

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Berry 2008-06-11 08:21:27 UTC
Version:            (using Devel)
Installed from:    Compiled sources
Compiler:          gcc 4.2 
OS:                Linux

In the Oxygen style, there is presently no way to disable the dotted lines in a tree view connecting parent nodes with their children.

I've never much liked the aesthetics of those dotted lines -- I personally feel they just add visual noise without conveying any additional information.  The parent-child relationship is already obvious (to me, at least) because of the indentation.

(Also, as a side note, the lines themselves seem ... jarring compared to the rest of the Oxygen theme.  Perhaps lighter, smooth lines would look better?)

I'd like an option to turn off those lines if possible.  I'm fine with having them on by default, as I know it's a matter of personal taste.

Comment 1 Camilla Boemann 2008-08-03 20:40:08 UTC
Do you know of any other style that can do this, because i think it is impossible
Comment 2 Josh Berry 2008-08-03 20:56:06 UTC
I know for a fact it was possible in Qt3, as some KDE3 styles (e.g. Baghira) had that option.  I will investigate and see if any KDE4 styles have the option.
Comment 3 Camilla Boemann 2008-08-03 21:13:30 UTC
Just two quick notes:
1) even if some style are able to do it with an ugly hack, doesn't mean we will do it too
2) I've not decided yet if this is something we would even want in oxygen

Just so you don't get your hopes up :/
Comment 4 Josh Berry 2008-08-05 20:36:39 UTC
Here is a trivial patch against kdebase trunk that permanently disables tree branch lines in oxygen.  I hope this addresses your point #1:

Index: runtime/kstyles/oxygen/oxygen.cpp
--- runtime/kstyles/oxygen/oxygen.cpp	(revision 842651)
+++ runtime/kstyles/oxygen/oxygen.cpp	(working copy)
@@ -1670,7 +1670,7 @@
                 //### FIXME: set sane color.
                     QBrush brush(Qt::Dense4Pattern);
                     brush.setColor(pal.mid().color() );
-                    p->fillRect(r, brush);
+                    //p->fillRect(r, brush);
                 case Tree::ExpanderOpen:

I did this in about 5 minutes, so it's obviously a proof-of-concept, but I'd be happy to clean it up, make an option, etc.  (I'm not that familiar with Qt programming, so if you or someone else wouldn't mind answering questions, that would be helpful.)

As to your point #2, I'm honestly perplexed as to why you wouldn't want it.

All I'm proposing is to make it an option, and leave branch lines on by default.  That way everyone's happy.  Oxygen has very few options to begin with, so I don't think adding one more would clutter or confuse things.
Comment 5 Camilla Boemann 2008-08-06 13:21:41 UTC
Thanks - I'd never had guessed it was that easy.

As for if we will do it or not - I just warned you that we haven't talked/decided about it yet. It doesn't mean we won't do it.

The reason we might not want it is that we don't want anything that conflicts with the artistic direction called oxygen. That doesn't mean we won't have an option or do it default as you suggest, but it could be.

stay tuned, and thanks again
Comment 6 Josh Berry 2008-10-21 08:40:58 UTC
Has there been any further discussion on this option?
Comment 7 Huynh Huu Long 2008-10-21 17:58:25 UTC
Created attachment 28051 [details]
adds the option

Here's a patch which hasn't been discussed yet... Adding an option is not exactly easy: you have to add about 12 lines somewhere in the code, so IMHO the design should be improved before adding any new options.
Comment 8 Josh Berry 2008-11-13 09:19:02 UTC
Sorry it took so long to get to this.  I've applied the patch to my checkout, and from a purely end-user perspective, it looks good.

I'd love to see this checked in.

Comment 9 Josh Berry 2008-12-04 05:52:21 UTC
What is the status of this?  I know it's not going to make it into 4.2, but will it be slated for 4.3?
Comment 10 Josh Berry 2009-01-14 07:58:27 UTC
Well, 4.2 has come and gone, and still no word.

I've been using this patch for quite some time now, with no noticeable problems.  Can it be committed for 4.3?

Comment 11 Camilla Boemann 2009-01-16 15:20:37 UTC
Ok I've talked to pinheiro - It will go into 4.3 :) as an option
Comment 12 Josh Berry 2009-01-16 21:23:03 UTC
Great, many thanks!
Comment 13 Huynh Huu Long 2009-01-18 01:35:57 UTC
SVN commit 912670 by huynhhuu:

New Option: Hide tree branch lines
BUG: 163761

 M  +9 -1      config/oxygenconf.cpp  
 M  +2 -0      config/oxygenconf.h  
 M  +8 -4      oxygen.cpp  
 M  +1 -0      oxygen.h  

WebSVN link: http://websvn.kde.org/?view=rev&revision=912670
Comment 14 Josh Berry 2009-01-18 04:29:36 UTC
Great, thanks for checking this in!  I'm looking forward to seeing it in my next update.