Commit f1e86bdc authored by Julian Sparber's avatar Julian Sparber

accountsettings: add placeholder text

https://gitlab.gnome.org/World/fractal/issues/21
parent c4d608b1
......@@ -120,6 +120,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="placeholder-text">Type your name</property>
</object>
</child>
<child>
......
......@@ -49,6 +49,7 @@ impl<'a> Address<'a> {
let b = gtk::Box::new(gtk::Orientation::Horizontal, 0);
b.pack_start(&self.entry, true, true, 0);
b.pack_end(&self.button, false, false, 0);
if let Some(text) = text {
self.address = Some(text.clone());
self.entry.set_text(&text);
......@@ -60,6 +61,12 @@ impl<'a> Address<'a> {
self.button.show();
}
else {
let text = match self.medium {
AddressType::Email => "Add Email",
AddressType::Phone => "Add Phone",
};
self.entry.set_placeholder_text(text);
self.action = Some(AddressAction::Add);
let label = gtk::Image::new_from_icon_name("list-add-symbolic", 1);
self.button.set_image(&label);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment