Use small "Authored by" & "Committed by" labels

Prefix the author name hyperlink,
in a way that harmonizes it with the commiter label.

Use small lettering for those portions to keep them compact,
since they are not that important compared to the names.

Related: https://gitlab.gnome.org/GNOME/gitg/-/issues/440
This commit is contained in:
Jean-François Fortin Tam 2024-02-10 13:11:46 -05:00 committed by Alberto Fanjul
parent 6fc9e8cd4e
commit 1335904f82
2 changed files with 4 additions and 4 deletions

View file

@ -226,7 +226,7 @@ class Gitg.DiffViewCommitDetails : Gtk.Grid
var author = commit.get_author();
d_label_author.label = author_to_markup(author);
d_label_author.label = _("<small>Authored by</small> %s").printf(author_to_markup(author));
var committer = commit.get_committer();
@ -234,7 +234,7 @@ class Gitg.DiffViewCommitDetails : Gtk.Grid
committer.get_email() != author.get_email() ||
committer.get_time().compare(author.get_time()) != 0)
{
d_label_committer.label = _("Committed by %s").printf(author_to_markup(committer));
d_label_committer.label = _("<small>Committed by</small> %s").printf(author_to_markup(committer));
}
else
{

View file

@ -43,7 +43,7 @@
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="valign">start</property>
<property name="label">Author name &amp;lt;&lt;a href="email@example.com"&gt;email@example.com&lt;/a&gt;&amp;gt;</property>
<property name="label">Authored by &lt;a href="email@example.com" title="email@example.com"&gt;Author name&lt;/a&gt;</property>
<property name="selectable">True</property>
<property name="ellipsize">end</property>
<property name="use_markup">True</property>
@ -82,7 +82,7 @@
<property name="halign">start</property>
<property name="valign">start</property>
<property name="margin_top">6</property>
<property name="label">Committed by Committer name &amp;lt;&lt;a href="email@example.com"&gt;email@example.com&lt;/a&gt;&amp;gt;</property>
<property name="label">Committed by &lt;a href="email@example.com" title="email@example.com"&gt;Committer name&lt;/a&gt;</property>
<property name="selectable">True</property>
<property name="ellipsize">end</property>
<property name="use_markup">True</property>