Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 393292

Summary: Toolbar buttons cut off in ubuntu 12.10
Product: [Eclipse Project] Platform Reporter: Jorge Cercas <jms.cercas>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: bjorn.arnelid, christoph.cantillon, csaba_22, ericwill, heuvelman.erik, jacobgodserv, pmatveev42, pwebster
Version: 4.2.1Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
image showing toolbar buttons not rendering
none
image after eclipse startup
none
image after program launch
none
Screenshot of missing icons on buttons
none
Buttons cut off
heuvelman.erik: review?
Screenshot of top toolbar
none
demo swt app
none
demo video none

Description Jorge Cercas CLA 2012-10-31 17:07:22 EDT
Created attachment 223055 [details]
image showing toolbar buttons not rendering

I've noticed that Eclipse is not rendering the toolbar buttons after interacting with the IDE, e.g.: clicking on run as...

The current setup:

OS........ Ubuntu 12.10
Java...... Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)
Eclipse... eclipse-jee-juno-SR1-win32-x86_64
Comment 1 Jorge Cercas CLA 2012-10-31 17:12:07 EDT
in my previous comment, the Eclipse entry sould read
Eclipse.... eclipse-jee-juno-SR1-linux-gtk-x86_64
Comment 2 Paul Webster CLA 2012-11-01 07:28:17 EDT
Please provide specific steps, with view names.

PW
Comment 3 Jorge Cercas CLA 2012-11-03 07:00:36 EDT
(In reply to comment #2)
> Please provide specific steps, with view names.
> 
> PW

1. Launch Eclipse
 - on the left: Package Explorer view
 - 6 Editor views in the center
 - at the bottom: Console view [active], Problems view
2. Launch program with the Run toolbar button.

I've noticed that I do not see this problem when luancing the program using the CTRL+F11 shotcut. i.e. the toolbar (e.g. console toolbar) gets re-rendered.
Comment 4 Paul Webster CLA 2012-11-05 11:09:39 EST
Could you please take screencap of your eclipse before and immediately after you launch?

Is there anything reported in your error log?  <workspace>/.metadata/.log

I created a java program and set my configuration similar to yours.  Started up eclipse, the console view was active and empty.

When I use the Run toolbar, it launched my program but filled in the console toolbar correctly.

PW
Comment 5 Jorge Cercas CLA 2012-11-05 16:17:14 EST
Created attachment 223199 [details]
image after eclipse startup

image capture after eclipse startup
Comment 6 Jorge Cercas CLA 2012-11-05 16:18:18 EST
Created attachment 223200 [details]
image after program launch
Comment 7 Paul Webster CLA 2012-11-06 08:17:46 EST
(In reply to comment #5)
> Created attachment 223199 [details]
> image after eclipse startup

I don't see any proper icons in this image ... it looks like it's not even rendering the toolbar before hand

PW
Comment 8 Jorge Cercas CLA 2012-11-06 18:01:15 EST
Yip, it seems to happen on all toolbars but for what it's worth, I see the problem a lot more on the bottom toolbar - perhaps because it's the one that gets "refreshed" on a program launch.
Comment 9 Csaba Ráduly CLA 2014-07-17 07:10:23 EDT
Created attachment 245142 [details]
Screenshot of missing icons on buttons

Similar things happen to me with Eclipse Luna release 4.4 on Ubuntu 14.04 with xfce (xubuntu).

Hovering the mouse over the buttons makes the icons on the buttons reappear. But sometimes they disappear again (sometimes as soon as the mouse leaves the button)
Comment 10 Erik Heuvelman CLA 2014-10-16 02:09:42 EDT
Created attachment 247910 [details]
Buttons cut off

Same problem here with xubuntu 14.04 and eclipse kepler.
Comment 11 Jacob Godserv CLA 2014-11-05 10:33:45 EST
Created attachment 248410 [details]
Screenshot of top toolbar

This happens to me, and fairly randomly, and on different toolbars. The last time it happened, I triggered a refresh by hitting F5.
Comment 12 Björn Arnelid CLA 2014-12-01 10:35:33 EST
I have been able to reproduce this problem on fedora 19 and eclipse 4.4.1 if i set the following in eclipse.ini:
--launcher.GTK_version
2

I get cut of toolbar buttons that will only be rendered correctly after mouseover.

The problem will disappear if going to: 
window -> Preferences -> Appearance

and setting "Colour and Font Theme" to any value.
Comment 13 Leo Ufimtsev CLA 2014-12-10 11:47:02 EST
There is a submission very similar to this:
Bug 436352 - Icons are painted partially after exiting Welcome page contents
Comment 14 Pavel Matveev CLA 2017-10-25 19:32:10 EDT
Problem actual not only for toolbar icons. It`s happens for labels and other widgets containing GtkImage. It`s happens for gtk2+cairo when anyone create GC for Control without dispose. It`s really fun bug for investigation) Create GC for Control (Composite or anyone) without dispose and after redraw ToolItems and Labels with images periodically have cutted icons. For example, sizingGC in Nebula Grid periodically cut toolbar and label icons for my rcp application under gtk2+cairo.
ЗЫ: я потратил неделю на поиск причины этого обрезания иконок))))) может в org.eclipse.swt.widgets.Control.internal_new_GC(GCData) какая-то проблема...
Comment 15 Pavel Matveev CLA 2017-10-26 07:27:38 EDT
Created attachment 271188 [details]
demo swt app
Comment 16 Pavel Matveev CLA 2017-10-26 07:33:43 EDT
Created attachment 271189 [details]
demo video

run with
-Dorg.eclipse.swt.internal.gtk.cairoGraphics=true
-Dorg.eclipse.swt.internal.gtk.useCairo=true

with
-Dorg.eclipse.swt.internal.gtk.cairoGraphics=false
-Dorg.eclipse.swt.internal.gtk.useCairo=false
It works fine
Comment 17 Eric Williams CLA 2018-08-30 16:57:19 EDT
GTK2 only issues are no longer being fixed, as GTK2 support is being dropped in 4.10. Please file a new bug if you continue to experience the issue on GTK3.22 with Eclipse 4.9.