SideBySide2: Replace system scrollbar with one on the overview
Draw the viewport as a semi-transparent box on top of the overview bar on the right side of SideBySide2. This allows the reader to see how much of the visible file content is currently displayed. Handle drag events on this box and translate them into scroll events on the CM3 instances. This allows the reader to grab the viewport representation with the mouse and move it over another section. Make the height of each edit insert, delete or edit region related to the number of lines impacted. Regions that touch more lines will take up more vertical space on the overview bar. Remove the scrollbar from the B CM3. Rely on keyboard up/down, page up/down, mouse wheel, and dragging the viewport widget placed in the overview bar area. Change-Id: Ica0355a4b5f4a350b2db6c8557186fbb4758a24f
This commit is contained in:
@@ -38,6 +38,10 @@ class SkipManager {
|
||||
this.commentManager = commentManager;
|
||||
}
|
||||
|
||||
OverviewBar getOverviewBar() {
|
||||
return host.diffTable.overview;
|
||||
}
|
||||
|
||||
void render(int context, DiffInfo diff) {
|
||||
if (context == AccountDiffPreference.WHOLE_FILE_CONTEXT) {
|
||||
return;
|
||||
@@ -106,6 +110,7 @@ class SkipManager {
|
||||
for (SkipBar bar : skipBars) {
|
||||
bar.expandSideAll();
|
||||
}
|
||||
getOverviewBar().refresh();
|
||||
skipBars = null;
|
||||
line0 = null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user