window: Use AdwButtonContent for Today button

Text buttons in headerbars should come with an icon,
or an arrow if they're a dropdown. For this, we
have AdwButtonContent.

This commit makes use of AdwButtonContent for
the Today button, adding an icon and allowing
for the button to be flat in the headerbar.
This commit is contained in:
Christopher Davis
2022-02-21 16:03:17 +00:00
committed by Georges Basile Stavracas Neto
parent 83719270a4
commit 844fa595fd
3 changed files with 9 additions and 1 deletions
+6 -1
View File
@@ -121,8 +121,13 @@
</child>
<child>
<object class="GtkButton" id="today_button">
<property name="label" translatable="yes">Today</property>
<property name="action-name">win.today</property>
<property name="child">
<object class="AdwButtonContent">
<property name="label" translatable="yes">Today</property>
<property name="icon-name">calendar-today-symbolic</property>
</object>
</property>
</object>
</child>
<child>
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><g fill="#2e3436"><path d="m 3.042969 1 c -1.128907 0 -2.042969 0.914062 -2.042969 2.042969 v 9.875 c 0 1.132812 0.914062 2.042969 2.042969 2.042969 h 9.914062 c 1.128907 0 2.042969 -0.910157 2.042969 -2.042969 v -9.875 c 0 -1.128907 -0.914062 -2.042969 -2.042969 -2.042969 z m -0.042969 4.960938 h 10 v 7 h -10 z m 0 0"/><path d="m 5 7 v 4 h 4 v -4 z m 1 1 h 2 v 2 h -2 z m 0 0"/></g></svg>

After

Width:  |  Height:  |  Size: 518 B

+1
View File
@@ -4,5 +4,6 @@
<file compressed="true">calendar-month-symbolic.svg</file>
<file compressed="true">calendar-week-symbolic.svg</file>
<file compressed="true">calendar-year-symbolic.svg</file>
<file compressed="true">calendar-today-symbolic.svg</file>
</gresource>
</gresources>