Community
Participate
Working Groups
Created attachment 249662 [details] toolbar comparison Eclipse 4.4 vs 4.5 See the attached picture comparing Eclipse 4.4 (default to GTK2) and Eclipse 4.5 (default to GTK3). Eclipse on GTK3 uses 19 pixel more of vertical screen space (!!!) only because the buttons and editor tab area are too large. Additional few pixels are wasted on rendering the fat status line. This should be fixed.
Toolbars too wide has been fixed in latest 4.5.
(In reply to Alexander Kurtakov from comment #1) > Toolbars too wide has been fixed in latest 4.5. I can't see any change on 4.5.0.N20150326-2000 compared with the screenshot. Toolbars are still too high, editor tabs too.
New Gerrit change created: https://git.eclipse.org/r/50127
*** Bug 470171 has been marked as a duplicate of this bug. ***
Created attachment 255302 [details] Comparison between un-patched and patched toolbars
(In reply to Eric Williams from comment #5) > Created attachment 255302 [details] > Comparison between un-patched and patched toolbars This screenshot shows the patch I am currently working on: notice the size (vertical padding) on the bottom toolbar and tabs vs. the top.
(In reply to comment #6) > (In reply to Eric Williams from comment #5) > > Created attachment 255302 [details] > > Comparison between un-patched and patched toolbars > > This screenshot shows the patch I am currently working on: notice the size > (vertical padding) on the bottom toolbar and tabs vs. the top. +1 I like the slim look.
Created attachment 255306 [details] GNOME3 comparison between un-patched and patched toolbars
(In reply to Eric Williams from comment #8) > Created attachment 255306 [details] > GNOME3 comparison between un-patched and patched toolbars This screenshot shows the patch I am currently working on when implemented on GNOME3: again, notice the size (vertical padding) on the bottom toolbar and tabs vs. the top.
(In reply to Leo Ufimtsev from comment #7) > (In reply to comment #6) > > (In reply to Eric Williams from comment #5) > > > Created attachment 255302 [details] > > > Comparison between un-patched and patched toolbars > > > > This screenshot shows the patch I am currently working on: notice the size > > (vertical padding) on the bottom toolbar and tabs vs. the top. > > +1 > I like the slim look. +1, but could IMHO even more slim.
(In reply to comment #10) > +1, but could IMHO even more slim. @Eric, would you be able to do a Gtk2 vs Gtk3 comparison with the patch, to see if there is any difference? (maybe there is some component that still has some padding on it).
It looks much better, but I also think that it could be even slimmer than that.
Created attachment 255336 [details] Comparison of toolbars and tabs between Gtk3 and Gtk2
Created attachment 255337 [details] Updated comparison between Gtk3 and Gtk2
(In reply to Leo Ufimtsev from comment #11) > @Eric, would you be able to do a Gtk2 vs Gtk3 comparison with the patch, to > see if there is any difference? (maybe there is some component that still > has some padding on it). I have attached a screenshot to compare/contrast. Notice the tabs are still slightly larger in Gtk2 than in Gtk3, and the toolbar is also markedly larger in Gtk2 than in Gtk3. Personally I think the Gtk3 screenshot looks the most consistent: the toolbar and editor tabs are proportional in size relative to each other.
(In reply to Eric Williams from comment #15) > Personally I think the Gtk3 screenshot looks the most consistent: the > toolbar and editor tabs are proportional in size relative to each other. +1, looks beautiful.
(In reply to Eric Williams from comment #15) > (In reply to Leo Ufimtsev from comment #11) > > @Eric, would you be able to do a Gtk2 vs Gtk3 comparison with the patch, to > > see if there is any difference? (maybe there is some component that still > > has some padding on it). > > I have attached a screenshot to compare/contrast. Notice the tabs are still > slightly larger in Gtk2 than in Gtk3, and the toolbar is also markedly > larger in Gtk2 than in Gtk3. Smaller is better :) > Personally I think the Gtk3 screenshot looks the most consistent: the > toolbar and editor tabs are proportional in size relative to each other. Is it expected that each button has now very strong border? For example the small view menu triangle and maximize/minimize buttons? Looks weird.
(In reply to Andrey Loskutov from comment #17) > Is it expected that each button has now very strong border? For example the > small view menu triangle and maximize/minimize buttons? Looks weird. That is due to my Xfce theme (Albatross), which does not "smooth over" buttons. Both the default Xfce and GNOME3 themes have the correct (and expected) toolbar button behavior: the button border is only displayed when the mouse hovers over the button.
(In reply to Eric Williams from comment #18) > (In reply to Andrey Loskutov from comment #17) > > Is it expected that each button has now very strong border? For example the > > small view menu triangle and maximize/minimize buttons? Looks weird. > > That is due to my Xfce theme (Albatross), which does not "smooth over" > buttons. Both the default Xfce and GNOME3 themes have the correct (and > expected) toolbar button behavior: the button border is only displayed when > the mouse hovers over the button. OK, can we see the GTK2/GTK3 comparison with default Gnome theme (Adwaita), which is what most users will have by default? Just to make sure we don't compare apples with oranges.
Created attachment 255342 [details] GNOME3 comparison between Gtk2 and Gtk3
(In reply to Andrey Loskutov from comment #19) > OK, can we see the GTK2/GTK3 comparison with default Gnome theme (Adwaita), > which is what most users will have by default? Just to make sure we don't > compare apples with oranges. I have attached a screenshot that makes the Gtk2 vs. Gtk3 comparison on GNOME3. The difference is not as pronounced in the toolbar but still visible. In general I find the toolbar to be larger in GNOME than other desktop environments (Xfce, for example).
(In reply to comment #21) > I have attached a screenshot that makes the Gtk2 vs. Gtk3 comparison on GNOME3. > The difference is not as pronounced in the toolbar but still visible. I did a pixel comparison. On Gtk3 the Toolbar is ~2 pixels smaller in height than on Gtk2. I like that, +1.
(In reply to Leo Ufimtsev from comment #22) > (In reply to comment #21) > > > I have attached a screenshot that makes the Gtk2 vs. Gtk3 comparison on GNOME3. > > The difference is not as pronounced in the toolbar but still visible. > > I did a pixel comparison. On Gtk3 the Toolbar is ~2 pixels smaller in height > than on Gtk2. I like that, +1. This is OK, BUT look at the width! The toolbar width on GTK2 is 715, on GTK3 808 pixel. This is 93 pixel too wide, so -93 (for each pixel).
(In reply to Andrey Loskutov from comment #23) > This is OK, BUT look at the width! > > The toolbar width on GTK2 is 715, on GTK3 808 pixel. This is 93 pixel too > wide, so -93 (for each pixel). Do you mean the entire width of the toolbar? Or the width of the toolbar up until the buttons end?
(In reply to Eric Williams from comment #24) > (In reply to Andrey Loskutov from comment #23) > > This is OK, BUT look at the width! > > > > The toolbar width on GTK2 is 715, on GTK3 808 pixel. This is 93 pixel too > > wide, so -93 (for each pixel). > > Do you mean the entire width of the toolbar? Or the width of the toolbar up > until the buttons end? From the first button ("new") on the left side to the last button (navigation triangle) on the right side.
(In reply to Andrey Loskutov from comment #25) > From the first button ("new") on the left side to the last button > (navigation triangle) on the right side. Ah I see. This seems to be a GNOME specific issue as far as I can tell. On Xfce the toolbar is drastically smaller, seemingly due to less padding in between buttons/smaller buttons overall. I will look into this further.
(In reply to Eric Williams from comment #26) > This seems to be a GNOME specific issue as far as I can tell. On > Xfce the toolbar is drastically smaller, seemingly due to less padding in > between buttons/smaller buttons overall. I will look into this further. I have confirmed this. The buttons in GNOME are almost double the size of that in Xfce, mainly due to a lot of padding/space around the button, whereas in Xfce the buttons sit "shoulder to shoulder", without any padding in between. I will see if I can fix this, but will include it in a commit separate from the toolbar width patch.
Created attachment 255408 [details] GNOME3 post-buttons fixed toolbar vertical comparison Gtk3
Created attachment 255409 [details] GNOME3 post-buttons fixed toolbar horizontal comparison Gtk3
@All, I have added 2 new screenshots that reflect the current state of this patch. I have resized the toolbar buttons in Gtk3, including menu buttons, toggle buttons, and drop down buttons. Previously these buttons had 8px of horizontal padding, and 5-6px of vertical padding. I have made the following adjustments: Buttons (menu, toggle, and push): vertical padding reduced to 2px on the top, and 3px on the bottom. Horizontal padding has been adjusted to 4px on both the right and the left. Arrow button (drop down menu) padding has been reduced to 0px on all four sides. The following toolbar measurements were taken when launching a child Eclipse (i.e. full toolbar but no debug buttons): toolbar width patched is 680px, toolbar width unpatched is 829px, toolbar and tab height patched is 79px, and toolbar and tab height unpatched is 99px. So far this yields a 149px (!) difference in horizontal size, and a 20px difference in vertical size. Obviously the button padding can be adjusted, but I think it looks pretty optimal with these parameters. Thoughts?
(In reply to Eric Williams from comment #30) > The following toolbar measurements were taken when launching a child Eclipse > (i.e. full toolbar but no debug buttons): > > toolbar width patched is 680px, > toolbar width unpatched is 829px, > toolbar and tab height patched is 79px, and > toolbar and tab height unpatched is 99px. > > So far this yields a 149px (!) difference in horizontal size, and a 20px > difference in vertical size. Can you please post the comparison "patched gtk3" with gtk2? > Obviously the button padding can be adjusted, but I think it looks pretty > optimal with these parameters. Thoughts? I like the current result, this is a huge improvement over original state! The width seems to be optimal now, the height of the toolbar is still a bit too high compared with gtk2 version.
Created attachment 255412 [details] GNOME3 post-buttons fixed toolbar comparison Gtk3 vs. Gtk2
(In reply to Andrey Loskutov from comment #31) > Can you please post the comparison "patched gtk3" with gtk2? Certainly, please see above. As you can see, the toolbar in Gtk2 is still larger than in Gtk3, while the height from tab to toolbar is *very slightly* smaller in Gtk3 than in Gtk2. > The width seems to be optimal now, the height of the toolbar is still a bit > too high compared with gtk2 version. Right now the height in Gtk2 vs. Gtk3 is on par. Personally I think more can be trimmed, and I am investigating. There seems to be quite a bit of space allocated to the SWT_FIXED area upon which the toolbar sits. This accounts for the padding between the tops/bottoms of the buttons vs. where the menus/tabs actually start.
Looks pretty.
Created attachment 255496 [details] With patch some elements are missing. With the patch, some buttons and the perspectives are missing on my Gtk3 build. Does this occur for you? I tested with a blank child eclipse.
Created attachment 255497 [details] Regular child eclipse. For comparison.
(In reply to Leo Ufimtsev from comment #35) > Created attachment 255496 [details] > With patch some elements are missing. > > With the patch, some buttons and the perspectives are missing on my Gtk3 > build. Does this occur for you? > I tested with a blank child eclipse. Quick access seems also missing in your screenshot
(In reply to Leo Ufimtsev from comment #35) > Created attachment 255496 [details] > With patch some elements are missing. > > With the patch, some buttons and the perspectives are missing on my Gtk3 > build. Does this occur for you? > I tested with a blank child eclipse. Thank you for pointing this out. I didn't encounter this when originally testing, but after upgrading my Eclipse from rawhide, I have noticed the error. The padding patch in ToolBar.java seems to be at fault: having padding-bottom and padding-top values of 0px causes issues in Control.java. Gtk rounds px values, so anything less than 0.5px will cause the error. I have adjusted the padding-bottom and padding-top values to 1px, which is the lowest amount of padding I can add. The padding patch for GtkMenuButton causes no issues when a padding size of 0px is chosen. I will keep this as it greatly reduces the size of the toolbar.
Created attachment 255540 [details] Quick access cuts off toolbar line It seems with the reduction in toolbar padding, an adjustment for the Quick Access bar is also needed. At the moment, the Quick Access bar cuts the bottom line of the toolbar. I will adjust the padding accordingly and post some screenshots.
Created attachment 255553 [details] Comparison between Gtk2, Gtk3 unpatched, and Gtk3 patched with Quick Access fix I have adjusted the padding values such that the Quick Access text entry now fits into the toolbar properly. This screenshot is a comparison, on GNOME3, of the toolbar height between Gtk3 (patched and unpatched), and Gtk2. Gtk2 had the highest height at 96px, Gtk3 unpatched had a height of 93px, and Gtk3 with my patch applied had a height of 82px. Note that height, in this case, includes both the toolbar and the tabs.
Gerrit change https://git.eclipse.org/r/50127 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=0519b301515901148cc1199b76a3200406342671
Thanks for the patch. Pushed to master.
(In reply to Alexander Kurtakov from comment #42) > Thanks for the patch. Pushed to master. Nice. Is this potentially something for 4.5.1 or 4.5.2?
How can we test the change? Is there a SNAPSHOT version or something like this?
(In reply to Teodor Shaterov from comment #44) > How can we test the change? Is there a SNAPSHOT version or something like > this? For the time being, you would have to clone the SWT git repository and and run a child Eclipse based on the SWT from the git repo. You can find a comprehensive guide on how to do this here: http://leoufimtsev.github.io./org/swt-dev.html#orgheadline20 ("Checking out SWT repos for development") and http://leoufimtsev.github.io./org/swt-dev.html#orgheadline27 ("Build GTK SO files"). You can then run a child Eclipse and have it use the SWT project in your workspace instead of the SWT .jar. This will let you see changes to SWT immediately.
(In reply to Teodor Shaterov from comment #44) > How can we test the change? Is there a SNAPSHOT version or something like > this? Alternatively to Eric description from comment 45 you can also download the latest I-Build from http://download.eclipse.org/eclipse/downloads/ which should contain the changes.
(In reply to Lars Vogel from comment #46) > (In reply to Teodor Shaterov from comment #44) > > How can we test the change? Is there a SNAPSHOT version or something like > > this? > > Alternatively to Eric description from comment 45 you can also download the > latest I-Build from http://download.eclipse.org/eclipse/downloads/ which > should contain the changes. Ah, I did not know that. This is is much easier. :)
I see a target milestone 4.6 M2. Does this mean that the fix will we available when the mentioned version is released?
(In reply to Teodor Shaterov from comment #48) > I see a target milestone 4.6 M2. Does this mean that the fix will we > available when the mentioned version is released? Yes, it's already in M2, but M3 is the latest: http://download.eclipse.org/eclipse/downloads/drops4/S-4.6M3-201510291100/
Created attachment 259742 [details] Eclipse 4.5.1 Mars under Kubuntu 15.10 with GTK2 and adjusted gtkrc As an interim workaround to make Eclipse better usable until the GTK3 is rolled out, the following suggestions helped me: * https://gist.github.com/andrioli/3825078 My Eclipse start script, utilising the linked gtkrc file, looks as follows: ********************************* #! /bin/sh export SWT_GTK3=0 export GTK2_RC_FILES="$HOME"/.gtkrc-2.0:"$HOME"/.gtkrc-eclipse eclipse-4.5 -vmargs -Xmx2048m -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -D"java.library.path=/usr/lib/x86_64-linux-gnu/jni/" # -Dorg.eclipse.swt.browser.DefaultType=mozilla ********************************* You can see the results in the attached screenshot.
Created attachment 261524 [details] GTK3 The toolbar, editor tabs and status bar are still significantly larger than with GTK2.
Created attachment 261525 [details] GTK2
(In reply to Sergey Prigogin from comment #51) > Created attachment 261524 [details] > GTK3 > > The toolbar, editor tabs and status bar are still significantly larger than > with GTK2. Which build of Eclipse is this?
The attachments in comment #51 and comment #52 were obtained using Eclipse SDK 4.6.0.I20160506-1030 under KDE 4.13.3 on Ubuntu 14.04.1
(In reply to Sergey Prigogin from comment #54) > The attachments in comment #51 and comment #52 were obtained using Eclipse > SDK 4.6.0.I20160506-1030 under KDE 4.13.3 on Ubuntu 14.04.1 Does the bug reproduce under any window manager/desktop environment other than KDE? Also Ubuntu 14.04 uses GTK3.10, it's possible the CSS might not work that far back.
(In reply to Eric Williams from comment #55) Under Unitity and Cinnamon the sizes are OK.
Created attachment 261528 [details] GTK3 with Unity
Created attachment 261529 [details] GTK3 with Cinnamon
Sergey, would you please open Eclipse and another Gtk application under KDE and look whether sizes are the same? What SWT does is trying to remove padding/borders and etc. but if the theme used sets the size of the widget too big (not through some padding/border) there is nothing to be done on SWT side.
Created attachment 261536 [details] Eclipse vs gedit As you can see the Eclipse toolbar has extra vertical margin. Given that Eclipse toolbar icons are smaller than the gedit ones, the toolbar should be smaller accordingly.
Is someone planning to fix this for RC2?
(In reply to Dani Megert from comment #61) > Is someone planning to fix this for RC2? Not from my side. Workaround would be to use the gtk theme that unity/cinnamon uses.
(In reply to Alexander Kurtakov from comment #62) > (In reply to Dani Megert from comment #61) > > Is someone planning to fix this for RC2? > > Not from my side. Workaround would be to use the gtk theme that > unity/cinnamon uses. So, maybe better mark this fixed again and open a new one for the specific issue/case.
Marking this one as resolved. Sergey, Please open a new bug with the full details - Operating system, desktop environment used, gtk theme used, gtk version used. Theme specific bugs (and I'm pretty sure this is one such based on your cinnamon/unity findings) should be handled differently and by someone digging into the theme used to find what/how happens. Although considering you reported with Gtk 3.10 under KDE (thus I assume Oxygen theme) and that newer versions of Gtk dropped support for the theming draw engine (so themes are only css nowadays) it would have very low priority.
(In reply to Alexander Kurtakov from comment #64) Filed bug 493589. The wrong sizes don't appear to be theme-specific. At least they are the same in Oxygen and in Klassik.
*** Bug 494609 has been marked as a duplicate of this bug. ***
*** Bug 497135 has been marked as a duplicate of this bug. ***