SideBySide2: Fix line length columnMargin to appear at correct column
This element is inside of the scrolling area, to the right of the line number gutter managed by CodeMirror. Adding the width of the gutter is incorrect, moving the margin marker that many columns right. Change-Id: Ieaea5a48815a145ee748af9b97c6dc589c60f5dd
This commit is contained in:
@@ -628,12 +628,12 @@ public class SideBySide2 extends Screen {
|
||||
|
||||
void setLineLength(int columns) {
|
||||
columnMarginA.getStyle().setMarginLeft(
|
||||
columns * cmA.defaultCharWidth()
|
||||
+ cmA.getGutterElement().getOffsetWidth(), Unit.PX);
|
||||
columns * cmA.defaultCharWidth(),
|
||||
Unit.PX);
|
||||
|
||||
columnMarginB.getStyle().setMarginLeft(
|
||||
columns * cmB.defaultCharWidth()
|
||||
+ cmB.getGutterElement().getOffsetWidth(), Unit.PX);
|
||||
columns * cmB.defaultCharWidth(),
|
||||
Unit.PX);
|
||||
}
|
||||
|
||||
void setShowLineNumbers(boolean b) {
|
||||
|
||||
Reference in New Issue
Block a user