Commit 3f45856f authored by Daniel García Moreno's avatar Daniel García Moreno

Merge branch 'jsparber/fractal-roommenu'

parents e22370b0 e5827c5e
......@@ -79,6 +79,20 @@ row .timestamp {
font-size: small;
}
.room-menu {
padding: 0 6px;
margin-top: 0;
margin-bottom: 0;
border-radius: 0;
border-top-style: none;
border-bottom-style: none;
}
.room-menu:hover:not(:backdrop) {
background-image: none;
text-shadow: none;
}
.room-title {
padding: 5px;
padding-bottom: 2px;
......
......@@ -1439,139 +1439,141 @@
<child>
<object class="GtkHeaderBar" id="room_header_bar"> <!--right titlebar-->
<property name="show-close-button">True</property>
<property name="has-subtitle">False</property>
<property name="hexpand">True</property>
<child type="title">
<object class="GtkBox" id="room_details_box">
<object class="GtkMenuButton" id="room_menu_button">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">4</property>
<property name="spacing">6</property>
<property name="receives_default">True</property>
<property name="vexpand">true</property>
<property name="valign">fill</property>
<property name="popover">room_popover</property>
<child>
<object class="GtkBox" id="room_info">
<object class="GtkBox" id="room_details_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox">
<object class="GtkBox" id="room_info">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="orientation">horizontal</property>
<property name="valign">center</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="room_image">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_right">3</property>
<property name="halign">center</property>
<property name="orientation">horizontal</property>
<property name="spacing">3</property>
<child>
<object class="GtkBox" id="room_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
<style>
<class name="room-avatar-container"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="room_name">
<property name="can_focus">False</property>
<property name="label" translatable="yes">Room name</property>
<property name="ellipsize">end</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">pan-down-symbolic</property>
</object>
</child>
<style>
<class name="room-avatar-container"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="room_name">
<object class="GtkLabel" id="room_topic">
<property name="can_focus">False</property>
<property name="label" translatable="yes">Room name</property>
<property name="halign">center</property>
<property name="margin_bottom">4</property>
<property name="label" translatable="yes">Room topic</property>
<property name="justify">center</property>
<property name="ellipsize">end</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="font-desc" value="&lt;Introducir valor&gt; 8"/>
</attributes>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkLabel" id="room_topic">
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="margin_bottom">4</property>
<property name="label" translatable="yes">Room topic</property>
<property name="justify">center</property>
<property name="ellipsize">end</property>
<attributes>
<attribute name="font-desc" value="&lt;Introducir valor&gt; 8"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkMenuButton" id="members_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>
<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>
<accessibility>
</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</property>
</object>
</child>
<style>
<class name="flat"/>
<class name="room-menu"/>
</style>
</object>
<packing>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkMenuButton" id="room_menu_button">
<object class="GtkMenuButton" id="members_menu_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="popover">room_popover</property>
<property name="popover">members_popover</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">open-menu-symbolic</property>
<property name="icon_name">system-users-symbolic</property>
</object>
</child>
<accessibility>
</accessibility>
<child internal-child="accessible">
<object class="AtkObject" id="a11y-room_menu_button">
<property name="AtkObject::accessible_name" translatable="yes">Room</property>
<object class="AtkObject" id="a11y-members_menu_button">
<property name="AtkObject::accessible_name" translatable="yes">Members</property>
</object>
</child>
</object>
<packing>
<property name="pack_type">end</property>
<property name="position">0</property>
<property name="position">1</property>
</packing>
</child>
</object>
......@@ -1667,7 +1669,7 @@
<class name="main-window"/>
</style>
</object>
<!-- Synchronize left header and sidebar -->
<!-- Synchronize left header and sidebar -->
<object class="GtkSizeGroup">
<property name="mode">horizontal</property>
<widgets>
......
......@@ -2659,6 +2659,12 @@ impl App {
.expect("Couldn't find main_window in ui file.");
window.set_application(gtk_app);
/* we have to overwrite the default behavior for valign of the title widget
* since it is force to be centered */
gtk_builder
.get_object::<gtk::MenuButton>("room_menu_button")
.expect("Can't find back_button in ui file.").set_valign(gtk::Align::Fill);
let op = Arc::new(Mutex::new(
AppOp::new(gtk_app.clone(), gtk_builder.clone(), apptx, itx)
));
......
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