Reputation: 682
The Sound Recorder app of GNOME has this in-window hint at start-up. How do I do this? I was browsing through the source code and found that it is written either in Vala or Javascript (not sure). Also, I want to put the hint inside the GtkListBox (Sound Recorder's is inside a list box too). How would I go about doing this in the C binding of GTK+?
Upvotes: 1
Views: 117
Reputation: 4296
According to their repo (I searched the hint string in there), they are using GtkStack
widget with GtkStackPage
s:
<object class="AdwToastOverlay" id="toastOverlay">
<property name="child">
<object class="GtkStack" id="mainStack">
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<object class="GtkStackPage">
<property name="name">empty</property>
<property name="child">
<object class="AdwStatusPage" id="emptyPage">
<property name="title" translatable="yes">Add Recordings</property>
<property name="description" translatable="yes">Use the <b>Record</b> button to make sound recordings</property>
</object>
</property>
</object>
</child>
It seems that GtkStack
was available with GTK3, but not GtkStackPage
(Gtk4 only).
Upvotes: 1