[gitg] Do not color removed/added when nothing removed and nothing added
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Do not color removed/added when nothing removed and nothing added
- Date: Mon, 21 Dec 2015 21:38:48 +0000 (UTC)
commit 7d6524c0114504986503a903a16b2fe1616edd9e
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Mon Dec 21 22:38:25 2015 +0100
Do not color removed/added when nothing removed and nothing added
libgitg/gitg-diff-stat.vala | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/libgitg/gitg-diff-stat.vala b/libgitg/gitg-diff-stat.vala
index 6a59989..f7fcb5a 100644
--- a/libgitg/gitg-diff-stat.vala
+++ b/libgitg/gitg-diff-stat.vala
@@ -158,8 +158,13 @@ public class Gitg.DiffStat : Gtk.DrawingArea
x -= padding.right + wbar;
}
- if (added == 0 ||
- removed == 0)
+ if (added == 0 && removed == 0)
+ {
+ sctx.save();
+ sctx.render_background(context, x, ybar, wrest, hbar);
+ sctx.restore();
+ }
+ else if (added == 0 || removed == 0)
{
sctx.save();
sctx.add_class(added == 0 ? "removed-only" : "added-only");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]