Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
better sizing/alignment for operations button panel
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Aug 1, 2011
1 parent 386e2a1 commit eb463e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
Expand Up @@ -282,7 +282,7 @@ else if (!event.isAltKeyDown() && !event.isControlKeyDown())

operationsPanel = new VerticalPanel();
operationsPanel.setHeight("100%");
operationsPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
operationsPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
operationsPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);

// operationsPanel.addStyleName("float-right-div");
Expand Down Expand Up @@ -408,27 +408,13 @@ public void editCell(CellEditInfo cellEditInfo, TransUnit cellValue, Callback<Tr

cellViewWidget = table.getWidget(curRow, curCol);

// int height = table.getWidget(curRow, curCol - 1).getOffsetHeight();

// int realHeight = height > MIN_HEIGHT ? height : MIN_HEIGHT;

//Disable it for autosize
// textArea.setHeight(realHeight + "px");

// Leave space for operationsPanel
int width = table.getWidget(curRow, 0).getOffsetWidth() - 60;
// layoutTable.setHeight(realHeight + "px");
textArea.setWidth(width + "px");

layoutTable.setCellWidth(this.operationsPanel, "20px");
table.setWidget(curRow, curCol, layoutTable);

textArea.setText(cellValue.getTarget());

autoSize();

int height = textArea.getOffsetHeight();
operationsPanel.setHeight(height + "px");

this.cellValue = cellValue;
textArea.setFocus(true);
isOpened = true;
Expand Down
Expand Up @@ -316,9 +316,9 @@ tr.TableEditorRow.selected td {
.TableEditorContent,.TableEditorContent-Edit {
font-size: 14px;
font-family: sans-serif;
padding: 3px;
margin: 2px;
width: 99%;
padding: 0px;
margin: 0px;
width: 98%;
}

.TableEditorContent-Empty {
Expand Down

0 comments on commit eb463e0

Please sign in to comment.