Daniel Brötzmann pushed to branch mainwindow at gajim / gajim
Commits:
2688edca by wurstsalat at 2021-03-09T20:43:38+01:00
ChatList: Add Start Chat placeholder
- - - - -
da3aec33 by wurstsalat at 2021-03-09T20:54:28+01:00
Tooltips: Reduce icon sizes
- - - - -
5ffb2902 by wurstsalat at 2021-03-09T20:58:30+01:00
ChatList: Increase list header spacing
- - - - -
4 changed files:
- gajim/common/const.py
- gajim/data/style/gajim.css
- gajim/gtk/chat_list.py
- gajim/gtk/tooltips.py
Changes:
=====================================
gajim/common/const.py
=====================================
@@ -24,6 +24,7 @@ class RowHeaderType(IntEnum):
class AvatarSize(IntEnum):
TAB = 16
+ STATUS_CIRCLE = 24
ROSTER = 32
ACCOUNT_SIDE_BAR = 40
WORKSPACE = 40
@@ -31,7 +32,7 @@ class AvatarSize(IntEnum):
CHAT = 48
NOTIFICATION = 48
GROUP_INFO = 100
- TOOLTIP = 125
+ TOOLTIP = 100
VCARD = 200
PUBLISH = 200
=====================================
gajim/data/style/gajim.css
=====================================
@@ -155,16 +155,6 @@
padding: 12px;
background: transparent;
}
-.chatlist-placeholder {
- padding: 24px 12px;
-}
-.chatlist-placeholder image {
- color: alpha(@theme_text_color, 0.3);
-}
-.chatlist-placeholder label {
- color: alpha(@theme_text_color, 0.5);
- font-weight: bold;
-}
.chatlist {
background: transparent;
}
@@ -236,7 +226,7 @@
border-radius: 10px;
}
.header-box label {
- padding: 0px 18px 0px 18px;
+ padding: 12px 18px 6px 18px;
font-weight: bold;
color:@insensitive_fg_color;
font-size: small;
=====================================
gajim/gtk/chat_list.py
=====================================
@@ -111,18 +111,17 @@ def _sort_func(row1, row2):
return -1 if row1.is_recent else 1
def _set_placeholder(self):
- icon = Gtk.Image.new_from_icon_name(
- 'go-up-symbolic', Gtk.IconSize.DND)
- icon.set_halign(Gtk.Align.END)
- label = Gtk.Label(label=_('Add a chat to get started'))
- label.set_line_wrap(True)
- label.set_max_width_chars(20)
- box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=18)
- box.get_style_context().add_class('chatlist-placeholder')
- box.add(icon)
- box.add(label)
- box.show_all()
- self.set_placeholder(box)
+ button = Gtk.Button.new_with_label(_('Start Chat'))
+ button.get_style_context().add_class('suggested-action')
+ button.set_halign(Gtk.Align.CENTER)
+ button.set_valign(Gtk.Align.CENTER)
+ button.connect('clicked', self._on_start_chat_clicked)
+ button.show()
+ self.set_placeholder(button)
+
+ @staticmethod
+ def _on_start_chat_clicked(_widget):
+ app.app.activate_action('start-chat', GLib.Variant('s', ''))
def set_filter_text(self, text):
self._current_filter_text = text
=====================================
gajim/gtk/tooltips.py
=====================================
@@ -197,7 +197,7 @@ def _build_resource_grid(self, resources, scale):
row_num = 0
for contact in resources:
show_surface = get_show_circle(
- contact.show, AvatarSize.ROSTER, scale)
+ contact.show, AvatarSize.STATUS_CIRCLE, scale)
show_image = Gtk.Image.new_from_surface(show_surface)
show_image.set_halign(Gtk.Align.START)
show_image.set_valign(Gtk.Align.CENTER)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/c3defe4b397c189e32cbf3a8306dc6e65fff1c6a...5ffb2902d2b01512d95d9660719dc537ce41e23f
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/c3defe4b397c189e32cbf3a8306dc6e65fff1c6a...5ffb2902d2b01512d95d9660719dc537ce41e23f
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits