Commit 0c99e0e2 authored by Julian Sparber's avatar Julian Sparber

roomheaderbar: move room menu to new settings button

make the room title and description open the room settings and remove
the old members button, to replace it with the new room settings menu
button
parent a2de6ac5
......@@ -1068,13 +1068,13 @@
<property name="has-subtitle">False</property>
<property name="hexpand">True</property>
<child type="title">
<object class="GtkMenuButton" id="room_menu_button">
<object class="GtkButton" id="room_panel_title">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="vexpand">true</property>
<property name="valign">fill</property>
<property name="popover">room_popover</property>
<property name="action_name">app.room_details</property>
<child>
<object class="GtkBox" id="room_details_box">
<property name="visible">True</property>
......@@ -1118,9 +1118,6 @@
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
<accessibility>
<relation type="label-for" target="room_menu_button"/>
</accessibility>
</object>
<packing>
<property name="expand">True</property>
......@@ -1128,13 +1125,6 @@
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">pan-down-symbolic</property>
</object>
</child>
</object>
</child>
<child>
......@@ -1148,9 +1138,6 @@
<attributes>
<attribute name="font-desc" value="&lt;Introducir valor&gt; 8"/>
</attributes>
<accessibility>
<relation type="description-for" target="room_menu_button"/>
</accessibility>
</object>
<packing>
<property name="expand">False</property>
......@@ -1178,44 +1165,23 @@
</object>
</child>
<child>
<object class="GtkMenuButton" id="members_menu_button">
<object class="GtkMenuButton" id="room_menu_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="popover">members_popover</property>
<property name="popover">room_popover</property>
<child>
<object class="GtkBox">
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">horizontal</property>
<property name="margin_left">3</property>
<property name="margin_right">3</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="members_count">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">?</property>
<accessibility>
<relation type="description-for" target="members_menu_button"/>
</accessibility>
</object>
</child>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">system-users-symbolic</property>
</object>
</child>
<property name="icon_name">view-more-symbolic</property>
</object>
</child>
<accessibility>
<relation type="described-by" target="members_count"/>
</accessibility>
<child internal-child="accessible">
<object class="AtkObject" id="a11y-members_menu_button">
<property name="AtkObject::accessible_name" translatable="yes">Members</property>
<object class="AtkObject" id="a11y-room_menu_button">
<property name="AtkObject::accessible_name" translatable="yes">Room Menu</property>
</object>
</child>
</object>
......
......@@ -94,8 +94,8 @@ impl App {
/* we have to overwrite the default behavior for valign of the title widget
* since it is force to be centered */
ui.builder
.get_object::<gtk::MenuButton>("room_menu_button")
.expect("Can't find back_button in ui file.").set_valign(gtk::Align::Fill);
.get_object::<gtk::Button>("room_panel_title")
.expect("Can't find room_panel_title in ui file.").set_valign(gtk::Align::Fill);
let stack = ui.builder
.get_object::<gtk::Stack>("main_content_stack")
......
......@@ -92,11 +92,6 @@ impl AppOp {
} else {
self.more_members_btn.hide();
}
let members_count = self.ui.builder
.get_object::<gtk::Label>("members_count")
.expect("Can't find member_count in ui file.");
members_count.set_text(&format!("{}", members.len()));
}
pub fn show_all_members(&self) {
......
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