SideBySide2: Draw a line under the file header when "fullscreen"

When the Gerrit menus and patch list header have been hidden to show
more of the file contents, draw a line under the tiny header (reviewed
box, path, navigation cluster) to separate it from the displayed file
contents.  This makes it less likely the header is confused with a
line of text, without getting in the way.

Change-Id: Icb5f77c9e67decc3f8e3e2f5e59f7278926b7a08
This commit is contained in:
Shawn Pearce
2013-11-21 01:41:38 -08:00
committed by Michael Zhou
parent 78e400cde3
commit a310bbc448
2 changed files with 10 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ class DiffTable extends Composite {
private static final Binder uiBinder = GWT.create(Binder.class);
interface DiffTableStyle extends CssResource {
String fullscreen();
String intralineBg();
String diff();
String activeLine();
@@ -107,6 +108,11 @@ class DiffTable extends Composite {
UIObject.setVisible(fileCommentRow, show
&& (fileCommentPanelA.getBoxCount() > 0
|| fileCommentPanelB.getBoxCount() > 0));
if (show) {
host.header.removeStyleName(style.fullscreen());
} else {
host.header.addStyleName(style.fullscreen());
}
host.resizeCodeMirror();
}

View File

@@ -23,6 +23,10 @@ limitations under the License.
@external .cm-keymap-fat-cursor, CodeMirror-cursor;
@external .cm-searching, .cm-trailingspace, .cm-tab;
.fullscreen {
border-bottom: 1px solid #ddd;
}
.difftable { max-width: 1484px; }
.difftable .CodeMirror-lines { padding: 0; }
.difftable .CodeMirror pre {