Skip to content

Commit

Permalink
Set min and pref size on web view
Browse files Browse the repository at this point in the history
  • Loading branch information
Berenz committed Apr 14, 2016
1 parent f19d54a commit eb85fb0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/qz/printer/action/WebApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public void changed(ObservableValue<? extends Worker.State> ov, Worker.State old
}

log.trace("Setting HTML page width to {}", (pageWidth * pageZoom));
webView.setMinWidth(pageWidth * pageZoom);
webView.setPrefWidth(pageWidth * pageZoom);
webView.autosize();

Expand All @@ -99,6 +100,7 @@ public void handle(ActionEvent actionEvent) {
}

log.trace("Setting HTML page height to {}", (pageHeight * pageZoom));
webView.setMinHeight(pageHeight * pageZoom);
webView.setPrefHeight(pageHeight * pageZoom);
webView.autosize();

Expand Down Expand Up @@ -193,6 +195,7 @@ public void run() {
pageHeight = height;
pageZoom = zoom;

webView.setMinSize(100, 100);
webView.setPrefSize(100, 100);
webView.autosize();

Expand Down

1 comment on commit eb85fb0

@tresf
Copy link
Contributor

@tresf tresf commented on eb85fb0 Apr 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.