OSDN Git Service

Scale drag previews with the screen zoom
authorTor Norbye <tnorbye@google.com>
Fri, 28 Jan 2011 15:42:05 +0000 (07:42 -0800)
committerTor Norbye <tnorbye@google.com>
Sat, 29 Jan 2011 17:19:51 +0000 (09:19 -0800)
commit7e3aaccad3c2cb13ff7eb13e464565edbafe3426
tree34e28e1eaa67f625cb1d6e70573d022c597912e9
parent88e063336c69eb346b7d1505ea05b07dff8781ce
Scale drag previews with the screen zoom

If you have zoomed your layout, which is going to be common when
designing for 10" screens, then the drag preview shown when dragging
from the palette is not sized correctly. It assumes a 100% zoom.

This changeset looks at the current canvas zoom and scales the preview
image such that it matches the canvas zoom, so if you're zoomed in
then the preview will be larger, and vice versa.

Change-Id: I471b4d8ae459aad79d50a2b54ecca6bd7d7cf943
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.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ImageUtilsTest.java