OSDN Git Service

Various palette improvements
authorTor Norbye <tnorbye@google.com>
Thu, 27 Jan 2011 03:33:37 +0000 (19:33 -0800)
committerTor Norbye <tnorbye@google.com>
Fri, 28 Jan 2011 00:12:19 +0000 (16:12 -0800)
commit4165cd94690a68be74232fa98ef40f9699fa2072
tree8b899da68ba5570dab9ac28623519e565c68a7b3
parentc14e1be26b4fd9ca4f1f210df3ea9b1c083f5c1e
Various palette improvements

1. Look up the theme background and foreground colors using theme
   resources, if possible.  These theme resources are then used to set
   the foreground and background colors on the labels used as a
   fallback for non-previewable widgets.  In other words, when you're
   looking at a dark theme, the layouts such as LinearLayout is now
   shown using a white label on a dark background, making the palette
   view more consistent visually.

2. Configure scrollbar increments properly such that scrolling the
   views with scrollwheels or mouse gestures works better.

3. Fix a bug in the way preview images were copied out of the rendered
   image; the root coordinates were not taken into account, which
   matters for themes like Theme.Dialog.

Change-Id: I4832166a0560d33fe4e4dd8079c82a180e07e897
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/AccordionControl.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ImageUtils.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PaletteControl.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PreviewIconFactory.java
eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ImageUtilsTest.java