Commit 533a736b authored by Julian Sparber's avatar Julian Sparber

implement redesin of the autocomplete popover, fix #146

- align the popover horizontally to @
- make the popover keyboard accessible
- fix spacing and background color in popover
- highlight users blue inside the message entry
- highlight users also when wrong case
- give focus to first suggestion
- allow to autocomplete with enter and tab
- escape and click outside of the popover closes it
- open popover on @ and tab to autocomplete previous word
parent 6f9dd1c3
......@@ -111,8 +111,11 @@ row .timestamp {
font-size: x-small;
}
.member-uid {
row:not(:selected) .member-uid {
color: @insensitive_fg_color;
}
.member-uid {
font-size: x-small;
}
......@@ -139,6 +142,24 @@ row .timestamp {
.messages-history row:selected .msg-emote
{ color: @theme_selected_fg_color; }
.autocomplete {
margin-left: 150px;
}
.autocomplete,
.autocomplete list,
.autocomplete row:not(:hover):not(:selected) {
background-color: @theme_bg_color;
}
.autocomplete .frame {
border: 0;
}
.autocomplete row {
border-radius: 3px;
padding: 6px;
}
.invite-selected,
.invite-selected row {
......
......@@ -3,16 +3,21 @@
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkPopover" id="autocomplete_popover">
<property name="width_request">300</property>
<property name="width_request">400</property>
<property name="can_focus">False</property>
<style>
<class name="autocomplete"/>
</style>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkListBox" id="autocomplete_listbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin">6</property>
</object>
</child>
</object>
......
This diff is collapsed.
......@@ -62,8 +62,10 @@ impl<'a> MemberBox<'a> {
avatar.default(String::from("avatar-default-symbolic"),
Some(globals::USERLIST_ICON_SIZE));
get_member_info(backend.clone(), avatar.clone(), username.clone(), self.member.uid.clone(), globals::USERLIST_ICON_SIZE, 10);
avatar.set_margin_start(5);
avatar.set_margin_start(3);
avatar.set_valign(gtk::Align::Center);
v.set_margin_start(3);
v.pack_start(&username, true, true, 0);
if show_uid {
v.pack_start(&uid, true, true, 0);
......
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