diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-12-11 23:05:00 +0100 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-12-11 23:10:43 +0100 |
commit | 842848cb6d6c88fcf2c2b17d5e933458fa5d2ece (patch) | |
tree | 448a7265bba10569d2161ee52c789634a8199e55 /android/experimental | |
parent | 83cd0040fa9bc6e63f800c4ca04c18ccfba06e31 (diff) |
fdo#87098 change zoom level tile layer zoom level on load
This patch sets the zoom level to a value that shows the whole
document width on the tile layer however it does not resize the
view until next zoom. This still needs to be tracked down.
Change-Id: I16940a2951e1be4b46cbd1870fda45f296aff70a
Diffstat (limited to 'android/experimental')
-rw-r--r-- | android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java index 8876c1356d12..2b6c4cd171b9 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java @@ -41,13 +41,9 @@ public class LOKitThread extends Thread { return; } - RectF rect = new RectF(0, 0, mTileProvider.getPageWidth(), mTileProvider.getPageHeight()); - DisplayMetrics displayMetrics = LibreOfficeMainActivity.mAppContext.getResources().getDisplayMetrics(); - mViewportMetrics = new ImmutableViewportMetrics(displayMetrics); - mViewportMetrics = mViewportMetrics.setPageRect(rect, rect); - mLayerClient.setPageRect(0, 0, mTileProvider.getPageWidth(), mTileProvider.getPageHeight()); - mLayerClient.setViewportMetrics(mLayerClient.getViewportMetrics()); + mViewportMetrics = mLayerClient.getViewportMetrics(); + mLayerClient.setViewportMetrics(mViewportMetrics.setZoomFactor(mViewportMetrics.getWidth() / mViewportMetrics.getPageWidth())); mLayerClient.forceRedraw(); } |