mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-11-05 16:43:26 +00:00
Expand last diff view to fill parent
This commit is contained in:
parent
ff7c2bbc79
commit
c5ce8ba7a2
2 changed files with 12 additions and 1 deletions
|
@ -215,6 +215,10 @@ class Gitg.DiffViewFile : Gtk.Grid
|
|||
}
|
||||
|
||||
d_lines = new Gee.HashMap<int, PatchSet.Patch?>();
|
||||
|
||||
this.bind_property("vexpand", d_sourceview_hunks, "vexpand", BindingFlags.SYNC_CREATE);
|
||||
|
||||
d_sourceview_hunks.draw.connect_after(sourceview_hunks_on_draw);
|
||||
}
|
||||
|
||||
private void update_theme()
|
||||
|
|
|
@ -410,8 +410,10 @@ public class Gitg.DiffView : Gtk.Grid
|
|||
d_commit_details.expander_visible = (files.size > 1);
|
||||
}
|
||||
|
||||
foreach (var file in files)
|
||||
for (var i = 0; i < files.size; i++)
|
||||
{
|
||||
var file = files[i];
|
||||
|
||||
file.expanded = d_commit_details.expanded;
|
||||
file.maxlines = maxlines;
|
||||
|
||||
|
@ -421,6 +423,11 @@ public class Gitg.DiffView : Gtk.Grid
|
|||
|
||||
this.bind_property("wrap", file, "wrap", BindingFlags.DEFAULT | BindingFlags.SYNC_CREATE);
|
||||
this.bind_property("tab-width", file, "tab-width", BindingFlags.DEFAULT | BindingFlags.SYNC_CREATE);
|
||||
|
||||
if (i == files.size - 1)
|
||||
{
|
||||
file.vexpand = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue