From c02260c4d18fece5541878e6635d7e4e0062319b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sat, 4 Mar 2017 09:53:14 +0100 Subject: [PATCH] Move CSS Code into gajim.css --- data/gui/chat_control.ui | 1 + data/gui/vcard_information_window.ui | 11 ++++++++++- data/style/gajim.css | 7 +++++++ src/chat_control.py | 9 --------- src/vcard.py | 6 ------ 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/data/gui/chat_control.ui b/data/gui/chat_control.ui index 1d1140258..7301c02a3 100644 --- a/data/gui/chat_control.ui +++ b/data/gui/chat_control.ui @@ -606,6 +606,7 @@ 3 + ChatControl-AuthenticationButton True False True diff --git a/data/gui/vcard_information_window.ui b/data/gui/vcard_information_window.ui index 117db6b6c..c14d10f00 100644 --- a/data/gui/vcard_information_window.ui +++ b/data/gui/vcard_information_window.ui @@ -1,5 +1,5 @@ - + @@ -914,6 +914,9 @@ start none 0 + 1 @@ -929,6 +932,9 @@ True none 0 + 1 @@ -1327,6 +1333,9 @@ start none 0 + 1 diff --git a/data/style/gajim.css b/data/style/gajim.css index e69de29bb..fa95bb88c 100644 --- a/data/style/gajim.css +++ b/data/style/gajim.css @@ -0,0 +1,7 @@ +/* Gajim Application CSS File */ + +/* ChatControl */ +#ChatControl-AuthenticationButton { padding-top: 0px; padding-bottom: 0px} + +/* VCardWindow */ +.VCard-GtkLinkButton { padding-left: 5px; border-left: none; } \ No newline at end of file diff --git a/src/chat_control.py b/src/chat_control.py index e944e7e58..8f069b3e0 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -157,15 +157,6 @@ 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( diff --git a/src/vcard.py b/src/vcard.py index f7e485a62..6054ee817 100644 --- a/src/vcard.py +++ b/src/vcard.py @@ -147,16 +147,10 @@ class VcardWindow: buffer_ = self.xml.get_object('textview_annotation').get_buffer() buffer_.set_text(annotations[self.contact.jid]) - style_provider = Gtk.CssProvider() - css = 'GtkButton { padding-left: 5px; border-left: none; }' - style_provider.load_from_data(css.encode()) for widget_name in ('URL_label', 'EMAIL_WORK_USERID_label', 'EMAIL_HOME_USERID_label'): widget = self.xml.get_object(widget_name) - context = widget.get_style_context() - context.add_provider(style_provider, - Gtk.STYLE_PROVIDER_PRIORITY_USER) widget.hide() self.xml.connect_signals(self)