Bug 910812

Summary: line spacing in tree views and other things wrong in "classic" theme
Product: [Fedora] Fedora Reporter: David Mansfield <bugzilla>
Component: eclipseAssignee: Matthias Clasen <mclasen>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: akurtako, andjrobins, dap78, iny, jerboaa, mbenitez, mclasen, overholt, rgrunber, swagiaal
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-05 23:02:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
package explorer under MATE desktop - normal for eclipse over last 8 years
none
package explorer under GNOME desktop - large spacing
none
summary of spacing in different platforms none

Description David Mansfield 2013-02-13 16:05:25 UTC
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 18:06:26 UTC
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 21:38:03 UTC
Created attachment 697416 [details]
package explorer under MATE desktop - normal for eclipse over last 8 years

Comment 3 David Mansfield 2013-02-14 21:38:49 UTC
Created attachment 697417 [details]
package explorer under GNOME desktop - large spacing

Comment 4 Krzysztof Daniel 2013-02-15 07:02:41 UTC
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 14:04:55 UTC
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 14:06:54 UTC
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 14:13:41 UTC
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 14:24:09 UTC
changing the description since eclipse is no longer referenced and "package explorer" is ambiguous.

Comment 9 David Mansfield 2013-02-15 15:30:35 UTC
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 08:10:05 UTC
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 15:47:00 UTC
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 23:32:40 UTC
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 11:10:03 UTC
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 15:44:30 UTC
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 16:07:04 UTC
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 17:05:49 UTC
> 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 17:13:49 UTC
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 05:59:18 UTC
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 17:59:59 UTC
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 15:22:37 UTC
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 23:02:40 UTC
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.