OSDN Git Service

Set hover fill color
authorTor Norbye <tnorbye@google.com>
Mon, 18 Oct 2010 18:56:07 +0000 (11:56 -0700)
committerTor Norbye <tnorbye@google.com>
Mon, 18 Oct 2010 19:00:22 +0000 (12:00 -0700)
The code which paints the hover didn't actually set the hover fill color
on the graphics context so it was just blending with white. This happens
to be the color the fill was initialized to so the problem wasn't
noticeable.

Change-Id: I95f0eface23f2a772b687ba348997a3eac2d85a9

eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/LayoutCanvas.java

index e945ba2..8991f55 100755 (executable)
@@ -1032,6 +1032,7 @@ class LayoutCanvas extends Canvas implements ISelectionProvider {
                 if (mHoverFillColor != null) {
                     int oldAlpha = gc.getAlpha();
                     gc.setAlpha(SwtDrawingStyle.HOVER.getFillAlpha());
+                    gc.setBackground(mHoverFillColor);
                     gc.fillRectangle(x, y, w, h);
                     gc.setAlpha(oldAlpha);
                 }