Kaydet (Commit) 842848cb authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

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
üst 83cd0040
...@@ -41,13 +41,9 @@ public class LOKitThread extends Thread { ...@@ -41,13 +41,9 @@ public class LOKitThread extends Thread {
return; 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.setPageRect(0, 0, mTileProvider.getPageWidth(), mTileProvider.getPageHeight());
mLayerClient.setViewportMetrics(mLayerClient.getViewportMetrics()); mViewportMetrics = mLayerClient.getViewportMetrics();
mLayerClient.setViewportMetrics(mViewportMetrics.setZoomFactor(mViewportMetrics.getWidth() / mViewportMetrics.getPageWidth()));
mLayerClient.forceRedraw(); mLayerClient.forceRedraw();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment