Philipp Hörist pushed to branch master at gajim / gajim
Commits: 564068c2 by Daniel Brötzmann at 2019-08-15T08:13:02Z GroupchatInfo: Apply some text styling
- - - - - 6c9c4c1a by Daniel Brötzmann at 2019-08-15T08:13:30Z ChatBanners: Unify display of contact name
- - - - -
7 changed files:
- gajim/chat_control.py - gajim/data/gui/chat_control.ui - gajim/data/gui/groupchat_control.ui - gajim/data/gui/groupchat_info_scrolled.ui - gajim/data/style/gajim.css - gajim/groupchat_control.py - gajim/gtk/groupchat_info.py
Changes:
===================================== gajim/chat_control.py ===================================== @@ -732,8 +732,6 @@ class ChatControl(ChatControlBase):
status = contact.status if status is not None: - banner_name_label.set_ellipsize(Pango.EllipsizeMode.END) - self.banner_status_label.set_ellipsize(Pango.EllipsizeMode.END) status_reduced = helpers.reduce_chars_newlines(status, max_lines=1) else: status_reduced = ''
===================================== gajim/data/gui/chat_control.ui ===================================== @@ -364,15 +364,14 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkBox" id="hbox3004"> + <object class="GtkBox"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="spacing">6</property> <child> <object class="GtkEventBox" id="avatar_eventbox"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="margin_top">5</property> - <property name="margin_bottom">5</property> <property name="visible_window">False</property> <child> <object class="GtkImage" id="avatar_image"> @@ -395,17 +394,22 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="valign">center</property> - <property name="margin_left">5</property> <property name="hexpand">True</property> - <property name="row_spacing">2</property> + <property name="row_spacing">3</property> + <property name="column_spacing">3</property> <child> <object class="GtkLabel" id="banner_name_label"> <property name="name">ChatControl-BannerNameLabel</property> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label"><span weight="heavy" size="large">Contact name</span></property> - <property name="use_markup">True</property> + <property name="halign">start</property> + <property name="hexpand">True</property> + <property name="label">Contact name</property> + <property name="ellipsize">end</property> <property name="xalign">0</property> + <style> + <class name="large-header"/> + </style> </object> <packing> <property name="left_attach">0</property> @@ -418,12 +422,16 @@ <property name="name">ChatControl-BannerLabel</property> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="halign">start</property> <property name="hexpand">True</property> <property name="label">label</property> - <property name="use_markup">True</property> <property name="selectable">True</property> + <property name="ellipsize">end</property> <property name="xalign">0</property> <signal name="populate-popup" handler="on_banner_label_populate_popup" swapped="no"/> + <style> + <class name="dim-label"/> + </style> </object> <packing> <property name="left_attach">1</property>
===================================== gajim/data/gui/groupchat_control.ui ===================================== @@ -115,19 +115,21 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkBox" id="hbox3024"> + <object class="GtkBox"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="spacing">6</property> <child> <object class="GtkImage" id="gc_banner_status_image"> + <property name="width_request">48</property> + <property name="height_request">48</property> <property name="visible">True</property> <property name="can_focus">False</property> <property name="stock">gtk-missing-image</property> </object> <packing> <property name="expand">False</property> - <property name="fill">False</property> - <property name="padding">5</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> @@ -136,10 +138,15 @@ <property name="name">GroupChatControl-BannerNameLabel</property> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label"><span weight="heavy" size="large">room jid</span></property> - <property name="use_markup">True</property> + <property name="hexpand">True</property> + <property name="label">Group Chat Name</property> <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="single_line_mode">True</property> <property name="xalign">0</property> + <style> + <class name="large-header"/> + </style> </object> <packing> <property name="expand">False</property>
===================================== gajim/data/gui/groupchat_info_scrolled.ui ===================================== @@ -8,22 +8,6 @@ <property name="halign">center</property> <property name="row_spacing">6</property> <property name="column_spacing">12</property> - <child> - <object class="GtkLabel" id="name_label"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="halign">end</property> - <property name="valign">start</property> - <property name="label" translatable="yes">Name</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> <child> <object class="GtkLabel" id="address_label"> <property name="visible">True</property> @@ -88,22 +72,6 @@ <property name="top_attach">4</property> </packing> </child> - <child> - <object class="GtkLabel" id="name"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="halign">start</property> - <property name="valign">start</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="single_line_mode">True</property> - <property name="max_width_chars">40</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> <child> <object class="GtkLabel" id="address"> <property name="visible">True</property> @@ -206,16 +174,17 @@ <object class="GtkLabel"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="halign">end</property> + <property name="halign">center</property> <property name="valign">start</property> <property name="label" translatable="yes">Configuration</property> <style> - <class name="dim-label"/> + <class name="bold16"/> </style> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">9</property> + <property name="width">2</property> </packing> </child> <child> @@ -307,7 +276,24 @@ </packing> </child> <child> - <placeholder/> + <object class="GtkLabel" id="name"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="halign">center</property> + <property name="valign">start</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="single_line_mode">True</property> + <property name="max_width_chars">40</property> + <style> + <class name="large-header"/> + </style> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">2</property> + </packing> </child> </object> </interface>
===================================== gajim/data/style/gajim.css ===================================== @@ -9,11 +9,6 @@ .gajim-state-tab-muc-msg { color: rgb(0, 0, 205) } -.gajim-banner { - font-size: 13pt; - font-weight: 700 - } -
.chatcontrol-actionbar-button { padding: 0px 5px 0px 5px; @@ -43,8 +38,6 @@
.chatcontrol-separator {margin-bottom: 5px;}
-#SubjectPopover box { padding: 10px; } - .link-button { min-height: 0px }
/* VCardWindow */
===================================== gajim/groupchat_control.py ===================================== @@ -280,6 +280,7 @@ class GroupchatControl(ChatControlBase): self.banner_actionbar = self.xml.get_object('banner_actionbar') self.hide_roster_button = Gtk.Button.new_from_icon_name( 'go-next-symbolic', Gtk.IconSize.MENU) + self.hide_roster_button.set_valign(Gtk.Align.CENTER) self.hide_roster_button.connect('clicked', lambda *args: self.show_roster()) self.banner_actionbar.pack_end(self.hide_roster_button) @@ -1072,7 +1073,7 @@ class GroupchatControl(ChatControlBase): if self.is_connected: if self.contact.avatar_sha: surface = app.interface.get_avatar(self.contact, - AvatarSize.ROSTER, + AvatarSize.CHAT, self.scale_factor) banner_status_img.set_from_surface(surface) return @@ -1103,7 +1104,6 @@ class GroupchatControl(ChatControlBase): Draw the text in the fat line at the top of the window that houses the room jid """ - self.name_label.set_ellipsize(Pango.EllipsizeMode.END) self.name_label.set_text(self.room_name)
def _nec_update_avatar(self, obj):
===================================== gajim/gtk/groupchat_info.py ===================================== @@ -144,7 +144,6 @@ class GroupChatInfoScrolled(Gtk.ScrolledWindow): has_name = bool(info.muc_name) self._ui.name.set_text(info.muc_name or '') self._ui.name.set_visible(has_name) - self._ui.name_label.set_visible(has_name)
# Set description has_desc = bool(info.muc_description)
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/05cad259e3d5209f17df15602528d706e8...