Fix style sheets for expanded context lines

We were adding the diffText css to context lines which were hidden at
first and then expanded.  This caused those lines to have an extra 2
pixel shift to the right.  The change was very subtle but could be noticed
with close inspection.

Also set the vertical alignment of expanded table rows so they match the
valign property of alredy visible rows.

Signed-off-by: Brad Larson <bklarson@gmail.com>
Change-Id: I9e507400e2780cf13a67b4781b3754443957548f
This commit is contained in:
Brad Larson
2012-04-12 12:21:05 -05:00
parent df5039b155
commit 7e5cc7de82

View File

@@ -34,6 +34,7 @@ import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTMLTable.CellFormatter;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.InlineLabel;
import com.google.gwtexpui.safehtml.client.SafeHtml;
import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder;
@@ -382,7 +383,11 @@ public class SideBySideTable extends AbstractPatchContentTable {
CellFormatter fmt = table.getCellFormatter();
for (int i = 0 + offset; i < loopTo + offset; i++) {
insertRow(row + i);
// The overridden version of insertRow adds some css classes we don't
// want.
super.insertRow(row + i);
table.getRowFormatter().setVerticalAlign(row + i,
HasVerticalAlignment.ALIGN_TOP);
int lineA = line.getStartA() + i;
int lineB = line.getStartB() + i;
if (numRows < 0) {