From eb463e05fe60108d580bdf9e17a9feadb14327e2 Mon Sep 17 00:00:00 2001 From: Sean Flanigan Date: Mon, 1 Aug 2011 12:40:07 +1000 Subject: [PATCH] better sizing/alignment for operations button panel --- .../editor/table/InlineTargetCellEditor.java | 18 ++---------------- .../org/zanata/webtrans/public/Application.css | 6 +++--- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/InlineTargetCellEditor.java b/server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/InlineTargetCellEditor.java index 597d24c731..28ba570962 100644 --- a/server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/InlineTargetCellEditor.java +++ b/server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/InlineTargetCellEditor.java @@ -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"); @@ -408,27 +408,13 @@ public void editCell(CellEditInfo cellEditInfo, TransUnit cellValue, Callback 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; diff --git a/server/zanata-war/src/main/resources/org/zanata/webtrans/public/Application.css b/server/zanata-war/src/main/resources/org/zanata/webtrans/public/Application.css index bb27160f81..7b56c75749 100644 --- a/server/zanata-war/src/main/resources/org/zanata/webtrans/public/Application.css +++ b/server/zanata-war/src/main/resources/org/zanata/webtrans/public/Application.css @@ -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 {