summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-12-08 01:33:48 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-12-08 01:33:48 (GMT)
commitc31b787125d1d103b9e0da15d7d4359802e8b5f6 (patch)
tree31b789818b378a732cf36501e4c1e673a2357eb6
parentb7324d9e0c75a09395220123f8222032a08c7d77 (diff)
downloadeeshow-c31b787125d1d103b9e0da15d7d4359802e8b5f6.zip
eeshow-c31b787125d1d103b9e0da15d7d4359802e8b5f6.tar.gz
eeshow-c31b787125d1d103b9e0da15d7d4359802e8b5f6.tar.bz2
file/git-hist.c: try different syntax for background color in Pango markup
For compatibility with historical versions of libpango, which don't support #rrggbbaa
-rw-r--r--file/git-hist.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/file/git-hist.c b/file/git-hist.c
index ed2b673..4648983 100644
--- a/file/git-hist.c
+++ b/file/git-hist.c
@@ -340,6 +340,9 @@ const char *vcs_git_summary(const struct vcs_hist *h)
}
+#define BRANCH_BG "background=\"#00e000\" bgalpha=\"50%%\""
+
+
char *vcs_git_summary_for_pango(const struct vcs_hist *h,
char *(*formatter)(const char *fmt, ...))
{
@@ -353,8 +356,7 @@ char *vcs_git_summary_for_pango(const struct vcs_hist *h,
if (h->n_branches)
return formatter(
- "<small><span background=\"#00e00080\"><b>%s</b>%s</span>"
- " %s</small>",
+ "<small><span " BRANCH_BG "><b>%s</b>%s</span> %s</small>",
h->branches[0], h->n_branches > 1 ? "+" : "", summary);
else
return formatter("<small>%s</small>", summary);
@@ -398,7 +400,7 @@ char *vcs_git_long_for_pango(const struct vcs_hist *h,
for (i = 0; i != h->n_branches; i++)
s = append(s, formatter(
- "%s<span background=\"#00e00080\"><b> %s </b></span>",
+ "%s<span " BRANCH_BG "><b> %s </b></span>",
i ? " " : "", h->branches[i]));
s = append(s, formatter(
"%s<b>%s</b> %s%s &lt;%s&gt;<small>\n%s%s</small>",