Bug 910812 - line spacing in tree views and other things wrong in "classic" theme
line spacing in tree views and other things wrong in "classic" theme
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: eclipse (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Matthias Clasen
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-13 11:05 EST by David Mansfield
Modified: 2014-02-05 18:02 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-02-05 18:02:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
package explorer under MATE desktop - normal for eclipse over last 8 years (22.70 KB, image/png)
2013-02-14 16:38 EST, David Mansfield
no flags Details
package explorer under GNOME desktop - large spacing (77.91 KB, image/png)
2013-02-14 16:38 EST, David Mansfield
no flags Details
summary of spacing in different platforms (13.00 KB, image/png)
2013-06-03 13:59 EDT, David Mansfield
no flags Details

  None (edit)
Description David Mansfield 2013-02-13 11:05:25 EST
Description of problem:
In the package explorer (and possibly other "tree" views) the items in the tree view appear to be "double spaced".  this only happens in gnome.  in xfce in the same account on the same machine it is fine, so it may have something to do with the gtk theme being applied.  I have tried hacking the e4_default_gtk.css (line-height css property) and while I can change the font (font-size css property), I cannot change the spacing. 

Version-Release number of selected component (if applicable):
eclipse-platform-4.2.2-0.1.git20121217.fc18.x86_64

How reproducible:
always

Steps to Reproduce:
1.open a project.
2.
3.
  
Actual results:
items in "package explorer" are double spaced compared to the way they should be

Expected results:
single spaced.


Additional info:
impact: half the information can be seen at a time.
Comment 1 Andrew Overholt 2013-02-14 13:06:26 EST
Can you please attach screenshots?  Is the spacing different in Eclipse than it is in other GTK apps?  Say, gtk-demo (part of gtk2-devel)?
Comment 2 David Mansfield 2013-02-14 16:38:03 EST
Created attachment 697416 [details]
package explorer under MATE desktop - normal for eclipse over last 8 years
Comment 3 David Mansfield 2013-02-14 16:38:49 EST
Created attachment 697417 [details]
package explorer under GNOME desktop - large spacing
Comment 4 Krzysztof Daniel 2013-02-15 02:02:41 EST
Eclipse seems to inherit the spacing from GTK (the spacing is the same in gtk-demo). Here is an example of a similar problem http://nostar.net/pics/gnome_vs_kde_treeview.png. Assigning to gtk.
Comment 5 David Mansfield 2013-02-15 09:04:55 EST
Additionally, the two screenshots for this bug are both gtk, although one is gtk-2 (MATE desktop) and one is gtk-3 (GNOME).
Comment 6 David Mansfield 2013-02-15 09:06:54 EST
In fact I see the bug was changed to gtk2 component, I think the bug is gtk3 component.  I'm going to change it to gtk3 as it is fine in gtk2.
Comment 7 Alexander Kurtakov 2013-02-15 09:13:41 EST
Eclipse on Fedora 18 uses the gtk2 library. The problem you see is most probably caused by the a change in gtk themes. Could you please verify whether changing the gtk theme changes the line spacing?
Comment 8 David Mansfield 2013-02-15 09:24:09 EST
changing the description since eclipse is no longer referenced and "package explorer" is ambiguous.
Comment 9 David Mansfield 2013-02-15 10:30:35 EST
After some researching and hacking, the following in ~/.gtkrc-2.0 is enough to restore sanity (btw this confirms what was said in comment#7 that this is gtk2 indeed).

-------
style "tree" {
  GtkTreeView::vertical-separator = 0
  font_name = "xxxxx 8"
}
class "GtkTreeView" style "tree"
---------

I'm not sure what the font is if an "unknown" font is used, but the 8 seems to help as well.

HTH.
Comment 10 Krzysztof Daniel 2013-02-18 03:10:05 EST
Just a small correction: the .gtkrc-2.0 file states:
# -- THEME AUTO-WRITTEN DO NOT EDIT

The styling correction can be added to ~/.gtkrc.mine.
Comment 11 David Mansfield 2013-02-19 10:47:00 EST
a small correction to your small correction ;-)

The file .gtkrc-2.0 did not exist until I created it.  

Moving the contents to .gtkrc.mine did NOT override the theme in eclipse the way having it in .gtkrc-2.0 did.
Comment 12 David Mansfield 2013-02-20 18:32:40 EST
For the purposes of googlers, here's my final solution, cobbled together from bits on the 'net.

I still believe in my heart this is an eclipse (fedora) "bug", in that when a user chooses "classic theme" it should NOT be "distorted" by the gtk adwaita theme, but should look like it has for years (the very definition of classic), which is approximated by this gtkrc, however this comment does serve as a practical workaround, and this does seem to be an aesthetic issue.

Save the belowe gtkrc snippet to /some/path/gtkrc.eclipse and launch eclipse like:

GTK2_RC_FILES=/some/path/gtkrc.eclipse eclipse

--------- cut ----------

style "gtkcompact" {
GtkButton::default_border={0,0,0,0}
GtkButton::default_outside_border={0,0,0,0}
GtkButtonBox::child_min_width=0
GtkButtonBox::child_min_heigth=0
GtkButtonBox::child_internal_pad_x=0
GtkButtonBox::child_internal_pad_y=0
GtkMenu::vertical-padding=1
GtkMenuBar::internal_padding=0
GtkMenuItem::horizontal_padding=4
GtkToolbar::internal-padding=0
GtkToolbar::space-size=0
GtkOptionMenu::indicator_size=0
GtkOptionMenu::indicator_spacing=0
GtkPaned::handle_size=4
GtkRange::trough_border=0
GtkRange::stepper_spacing=0
GtkScale::value_spacing=0
GtkScrolledWindow::scrollbar_spacing=0
GtkTreeView::vertical-separator=0
GtkTreeView::horizontal-separator=0
GtkTreeView::fixed-height-mode=TRUE
GtkWidget::focus_padding=0
font_name = "xxxxx 9"
}
class "GtkWidget" style "gtkcompact"
Comment 13 Roland Pallai 2013-05-26 07:10:03 EDT
I hit this issue with the Geany IDE's treeview (gtk2) - default treeview spacing looks ugly. I'm using Adwaita GTK theme under KDE.

Fixed with David's hint (short version):
cat >>~/.gtkrc-2.0-kde4 <<_EOF
style "compactTree" { GtkTreeView::vertical-separator=0 }
class "GtkTreeView" style "compactTree"
_EOF

Thanks, David!
Comment 14 Matthias Clasen 2013-05-31 11:44:30 EDT
This is not a gtk3 bug.
It is not even a gtk2 bug - if anything, you are complaining about the theme defaults. But if applications have very specific requirements, they should install and parse their own rc file.
Comment 15 David Mansfield 2013-05-31 12:07:04 EDT
I object to the closure of this bug on the following grounds:

My basic claim (which may not yet be effectively stated as it took a while to understand the nature of the problem):

The eclipse "classic" theme should look like it always has, which is the very definition of "classic".

The eclipse "classic" theme should not be altered by the look+feel of the GTK/Gnome theme, that is what the eclipse "GTK" theme is for.

To me this is an eclipse bug (which is where I had it originally), I think.

The fact that the "GTK" theme becomes "ugly" or whatever is a completely different debate, and one that can never be resolved productively IMHO.

Matthias, how do you feel about this?
Comment 16 Matthias Clasen 2013-05-31 13:05:49 EDT
> Matthias, how do you feel about this?

No feelings at all. It is just not a gtk3 bug.
Comment 17 David Mansfield 2013-05-31 13:13:49 EDT
Re-opening as per comment#15 and comment#16.

Re-assigning to eclipse.  Not sure which subcomponent "owns" the themes so leaving it at "eclipse".
Comment 18 Alexander Kurtakov 2013-06-03 01:59:18 EDT
It is not gtk3 bug because Eclipse uses Gtk 2.x still. 
David, would you please test eclipse with gtk 3.x? On Fedora 19 just export SWT_GTK3=1 and launch eclipse from the same terminal.
Comment 19 David Mansfield 2013-06-03 13:59:59 EDT
Created attachment 756447 [details]
summary of spacing in different platforms

I have tried with GTK3 enable SWT in F19 (beta). Result is better but far from good.  I have attached an image showing the different line spacing on different platforms. You can see from this image that the "classic" theme in linux under F19 is still being adversely affected by the desktop theme.
Comment 20 Fedora End Of Life 2013-12-21 10:22:37 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 21 Fedora End Of Life 2014-02-05 18:02:40 EST
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.