Skip to content

Commit

Permalink
IDEX-4296: Move Setting compare windows size to show method
Browse files Browse the repository at this point in the history
Signed-off-by: Igor Vinokur <ivinokur@codenvy.com>
  • Loading branch information
Igor Vinokur committed Feb 15, 2016
1 parent 6bb0aa7 commit f58aefc
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ public CompareViewImpl(CompareFactory compareFactory,

setWidget(UI_BINDER.createAndBindUi(this));

dockPanel.setSize(String.valueOf((com.google.gwt.user.client.Window.getClientWidth() / 100) * 95) + "px",
String.valueOf((com.google.gwt.user.client.Window.getClientHeight() / 100) * 90) + "px");

Button closeButton = createButton(locale.buttonClose(), "git-compare-close-btn", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Expand All @@ -98,7 +95,8 @@ public void setDelegate(ActionDelegate delegate) {
/** {@inheritDoc} */
@Override
public void show(String oldContent, String newContent, String revision, String file) {
comparePanel.clear();
dockPanel.setSize(String.valueOf((com.google.gwt.user.client.Window.getClientWidth() / 100) * 95) + "px",
String.valueOf((com.google.gwt.user.client.Window.getClientHeight() / 100) * 90) + "px");

super.show();

Expand All @@ -122,6 +120,7 @@ public void show(String oldContent, String newContent, String revision, String f
compareConfig.setShowLineStatus(false);

CompareWidget compare = new CompareWidget(compareConfig, themeAgent.getCurrentThemeId(), loaderFactory);
comparePanel.clear();
comparePanel.add(compare);
}

Expand Down

0 comments on commit f58aefc

Please sign in to comment.