Cleanup button placement in CommentedActionDialog

Fix odd spacing with the 'Cancel' button and add a small margin above
the 'Cancel' and Action buttons to make the dialog more visually
appealing.  One example of this dialog is available with the
Cherry Pick To button on a change page.

Change-Id: If89a500401a646de9b1a367b41fb9af94acf1413
This commit is contained in:
Brad Larson
2013-08-09 15:02:50 -05:00
parent 44ab777033
commit 6dbd2e6cc4

View File

@@ -67,7 +67,7 @@ public abstract class CommentedActionDialog<T> extends AutoCenterDialogBox
});
cancelButton = new Button(Util.C.commentedActionButtonCancel());
DOM.setStyleAttribute(cancelButton.getElement(), "marginLeft", "300px");
DOM.setStyleAttribute(cancelButton.getElement(), "float", "right");
cancelButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
@@ -82,6 +82,7 @@ public abstract class CommentedActionDialog<T> extends AutoCenterDialogBox
buttonPanel = new FlowPanel();
buttonPanel.add(sendButton);
buttonPanel.add(cancelButton);
DOM.setStyleAttribute(buttonPanel.getElement(), "margin-top", "4px");
panel = new FlowPanel();
panel.add(new SmallHeading(heading));