Daniel Brötzmann pushed to branch mainwindow at gajim / gajim
Commits:
74653d70 by wurstsalat at 2021-04-29T22:42:18+02:00
MUCJoinLeft: Use brighter colors in dark mode
- - - - -
55009009 by wurstsalat at 2021-04-29T22:44:32+02:00
QuoteWidget: Fix deprecation warning
- - - - -
d74e7bf5 by wurstsalat at 2021-04-29T23:07:33+02:00
MUCUserStatus: Add styling
- - - - -
3 changed files:
- gajim/data/style/default-dark.css
- gajim/gtk/conversation/quote_widget.py
- gajim/gtk/conversation/rows/muc_user_status.py
Changes:
=====================================
gajim/data/style/default-dark.css
=====================================
@@ -28,10 +28,10 @@
color: rgb(80, 95, 230);
}
.gajim-user-disconnected {
- color: rgb(80, 30, 30);
+ color: rgb(230, 170, 170);
}
.gajim-user-connected {
- color: rgb(30, 80, 50);
+ color: rgb(160, 200, 170);
}
.gajim-roster-disconnected {
background: rgb(80, 30, 30);
=====================================
gajim/gtk/conversation/quote_widget.py
=====================================
@@ -23,7 +23,7 @@ def __init__(self, account):
self.get_style_context().add_class('conversation-quote')
quote_bar = Gtk.Box()
quote_bar.set_size_request(3, -1)
- quote_bar.set_margin_right(6)
+ quote_bar.set_margin_end(6)
quote_bar.get_style_context().add_class('conversation-quote-bar')
self.add(quote_bar)
=====================================
gajim/gtk/conversation/rows/muc_user_status.py
=====================================
@@ -20,10 +20,15 @@
from gajim.common.i18n import _
from gajim.common.const import AvatarSize
from gajim.common import helpers
+from gajim.common.styling import process
from .widgets import SimpleLabel
from .base import BaseRow
+from ..message_widget import MessageWidget
+
+from ...avatar import get_show_circle
+
class MUCUserStatus(BaseRow):
def __init__(self, account, user_contact, is_self):
@@ -38,15 +43,26 @@ def __init__(self, account, user_contact, is_self):
avatar_placeholder.set_size_request(AvatarSize.ROSTER, -1)
self.grid.attach(avatar_placeholder, 0, 0, 1, 1)
- icon_name = 'feather-info-symbolic'
- icon = Gtk.Image.new_from_icon_name(icon_name, Gtk.IconSize.MENU)
- self.grid.attach(icon, 1, 0, 1, 1)
+ show_icon = Gtk.Image()
+ show_icon.set_opacity(0.6)
+ surface = get_show_circle(
+ user_contact.show.value,
+ AvatarSize.SHOW_CIRCLE,
+ self.get_scale_factor())
+ show_icon.set_from_surface(surface)
+ self.grid.attach(show_icon, 1, 0, 1, 1)
self._label = SimpleLabel()
- self._label.set_text(self._make_text(user_contact, is_self))
+ self._label.set_text(self._make_show_text(user_contact, is_self))
self._label.get_style_context().add_class('gajim-status-message')
self.grid.attach(self._label, 2, 0, 1, 1)
+ if user_contact.status is not None:
+ result = process(user_contact.status)
+ message_widget = MessageWidget(account)
+ message_widget.add_content(result)
+ self.grid.attach(message_widget, 2, 1, 1, 1)
+
timestamp_widget = self.create_timestamp_widget(self.timestamp)
timestamp_widget.set_hexpand(True)
timestamp_widget.set_halign(Gtk.Align.END)
@@ -56,18 +72,14 @@ def __init__(self, account, user_contact, is_self):
self.show_all()
@staticmethod
- def _make_text(user_contact, is_self):
+ def _make_show_text(user_contact, is_self):
nick = user_contact.name
- status = user_contact.status
- status = '' if status is None else ' - %s' % status
show = helpers.get_uf_show(user_contact.show.value)
if is_self:
- message = _('You are now {show}{status}').format(show=show,
- status=status)
+ message = _('You are now {show}').format(show=show)
else:
- message = _('{nick} is now {show}{status}').format(nick=nick,
- show=show,
- status=status)
+ message = _('{nick} is now {show}').format(nick=nick,
+ show=show)
return message
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/e40936f5b1051510a4bb308b189ba93e82cdf12b...d74e7bf5d74c4dcfd85a27bb1694b3d16c03b271
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/e40936f5b1051510a4bb308b189ba93e82cdf12b...d74e7bf5d74c4dcfd85a27bb1694b3d16c03b271
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