[sushi] evince: always use the full allocation for PDF files
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi] evince: always use the full allocation for PDF files
- Date: Tue, 10 May 2011 17:35:40 +0000 (UTC)
commit 509f8239133bb4cffdccef313acb77c3d1f809eb
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue May 10 01:15:39 2011 -0400
evince: always use the full allocation for PDF files
src/js/viewers/evince.js | 16 ++--------------
1 files changed, 2 insertions(+), 14 deletions(-)
---
diff --git a/src/js/viewers/evince.js b/src/js/viewers/evince.js
index cf46346..238c058 100644
--- a/src/js/viewers/evince.js
+++ b/src/js/viewers/evince.js
@@ -9,7 +9,6 @@ let Gettext = imports.gettext.domain("sushi");
let Utils = imports.ui.utils;
let Features = imports.util.features;
-let PDF_X_PADDING = 40;
let SPINNER_SIZE = 48;
function EvinceRenderer(args) {
@@ -73,27 +72,16 @@ EvinceRenderer.prototype = {
this._scrolledWin.add(this._view);
this._actor.get_widget().add(this._scrolledWin);
-
- let pageSize = this._pdfLoader.get_max_page_size();
- this._pageWidth = Math.floor(pageSize[0]);
- this._pageHeight = Math.floor(pageSize[1]);
-
this._mainWindow.refreshSize();
},
getSizeForAllocation : function(allocation) {
- let width = this._pageWidth + PDF_X_PADDING;
- let height = this._pageHeight;
-
if (!this._document) {
[ width, height ] = [ this._spinnerBox.get_preferred_size()[0].width,
this._spinnerBox.get_preferred_size()[0].height ];
} else {
- let scaledSize = Utils.getScaledSize([ width, height ],
- allocation,
- true);
-
- [ width, height ] = scaledSize;
+ /* always give the view the maximum possible allocation */
+ [ width, height ] = allocation;
}
return [ width, height ];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]