Better alignment for elements in ChatWindow and GroupChatWindow
This commit is contained in:
parent
16fd31ca37
commit
a3fc0b6f5c
|
@ -38,9 +38,9 @@
|
|||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes"><b>1</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -286,6 +286,10 @@
|
|||
</object>
|
||||
<object class="GtkBox" id="chat_control_hbox">
|
||||
<property name="can_focus">True</property>
|
||||
<property name="margin_left">7</property>
|
||||
<property name="margin_right">7</property>
|
||||
<property name="margin_top">5</property>
|
||||
<property name="margin_bottom">7</property>
|
||||
<property name="spacing">1</property>
|
||||
<child>
|
||||
<object class="GtkPaned" id="paned1">
|
||||
|
@ -296,13 +300,11 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkEventBox" id="banner_eventbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">3</property>
|
||||
<property name="margin_right">3</property>
|
||||
<property name="margin_bottom">1</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="hbox3004">
|
||||
<property name="visible">True</property>
|
||||
|
@ -332,9 +334,9 @@
|
|||
<object class="GtkLabel" id="banner_name_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label"><span weight="heavy" size="large">Contact name</span></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
@ -346,10 +348,10 @@
|
|||
<object class="GtkLabel" id="banner_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label">label</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="selectable">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<signal name="populate-popup" handler="on_banner_label_populate_popup" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
|
@ -498,11 +500,11 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="conversation_scrolledwindow">
|
||||
<property name="height_request">60</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="border_width">3</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
|
@ -519,6 +521,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="spacing">3</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="authentication_button">
|
||||
<property name="can_focus">True</property>
|
||||
|
@ -529,8 +532,8 @@
|
|||
<property name="focus_on_click">False</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="lock_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="stock">gtk-dialog-authentication</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
|
@ -538,7 +541,7 @@
|
|||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
@ -546,7 +549,6 @@
|
|||
<object class="GtkScrolledWindow" id="message_scrolledwindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="border_width">3</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<property name="vscrollbar_policy">never</property>
|
||||
<property name="shadow_type">in</property>
|
||||
|
@ -563,7 +565,7 @@
|
|||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
@ -878,7 +880,6 @@
|
|||
<property name="relief">none</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="size">menu</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<property name="icons">audio-volume-muted
|
||||
audio-volume-high
|
||||
|
@ -911,9 +912,7 @@ audio-volume-medium</property>
|
|||
<property name="has_tooltip">True</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
<property name="yalign">0.4699999988079071</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="size">menu</property>
|
||||
<property name="adjustment">adjustment2</property>
|
||||
<property name="icons">audio-mic-volume-muted
|
||||
audio-mic-volume-high
|
||||
|
@ -976,6 +975,7 @@ audio-mic-volume-low</property>
|
|||
<child>
|
||||
<object class="GtkButton" id="send_button">
|
||||
<property name="label" translatable="yes">_Send</property>
|
||||
<property name="width_request">80</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
|
@ -984,6 +984,7 @@ audio-mic-volume-low</property>
|
|||
<property name="tooltip_text" translatable="yes">Send message</property>
|
||||
<property name="image">image4</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -996,6 +997,7 @@ audio-mic-volume-low</property>
|
|||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
|
|
@ -12,15 +12,16 @@
|
|||
<child>
|
||||
<object class="GtkBox" id="groupchat_control_vbox">
|
||||
<property name="can_focus">True</property>
|
||||
<property name="border_width">3</property>
|
||||
<property name="margin_left">7</property>
|
||||
<property name="margin_right">7</property>
|
||||
<property name="margin_top">5</property>
|
||||
<property name="margin_bottom">7</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkEventBox" id="banner_eventbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">3</property>
|
||||
<property name="margin_right">3</property>
|
||||
<property name="margin_bottom">1</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="hbox3024">
|
||||
<property name="visible">True</property>
|
||||
|
@ -49,9 +50,9 @@
|
|||
<object class="GtkLabel" id="banner_name_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label"><span weight="heavy" size="large">room jid</span></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
@ -63,10 +64,10 @@
|
|||
<object class="GtkLabel" id="banner_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label">label</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="selectable">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
@ -94,7 +95,6 @@
|
|||
<object class="GtkPaned" id="hpaned">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="border_width">3</property>
|
||||
<property name="position">495</property>
|
||||
<property name="position_set">True</property>
|
||||
<signal name="notify" handler="on_hpaned_notify" swapped="no"/>
|
||||
|
@ -103,6 +103,7 @@
|
|||
<property name="width_request">0</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_right">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
|
@ -150,6 +151,7 @@
|
|||
<property name="width_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="margin_left">4</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
|
@ -178,6 +180,7 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="actions_hbox">
|
||||
<property name="height_request">34</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
|
@ -407,12 +410,14 @@
|
|||
<child>
|
||||
<object class="GtkButton" id="send_button">
|
||||
<property name="label" translatable="yes">_Send</property>
|
||||
<property name="width_request">80</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Send message</property>
|
||||
<property name="image">image1</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
|
|
@ -1475,6 +1475,15 @@ class ChatControl(ChatControlBase):
|
|||
# Add lock image to show chat encryption
|
||||
self.lock_image = self.xml.get_object('lock_image')
|
||||
|
||||
# Remove padding from authentication button or else it will
|
||||
# be higher than the message box
|
||||
style_provider = Gtk.CssProvider()
|
||||
css = 'GtkButton { padding-top: 0px; padding-bottom: 0px}'
|
||||
style_provider.load_from_data(css.encode())
|
||||
context = self.authentication_button.get_style_context()
|
||||
context.add_provider(style_provider,
|
||||
Gtk.STYLE_PROVIDER_PRIORITY_USER)
|
||||
|
||||
# Convert to GC icon
|
||||
img = self.xml.get_object('convert_to_gc_button_image')
|
||||
img.set_from_pixbuf(gtkgui_helpers.load_icon(
|
||||
|
|
Loading…
Reference in New Issue