Philipp Hörist pushed to branch master at gajim / gajim
Commits:
c02260c4 by Philipp Hörist at 2017-03-04T09:53:14+01:00
Move CSS Code into gajim.css
- - - - -
5 changed files:
- data/gui/chat_control.ui
- data/gui/vcard_information_window.ui
- data/style/gajim.css
- src/chat_control.py
- src/vcard.py
Changes:
=====================================
data/gui/chat_control.ui
=====================================
--- a/data/gui/chat_control.ui
+++ b/data/gui/chat_control.ui
@@ -606,6 +606,7 @@
<property name="spacing">3</property>
<child>
<object class="GtkButton" id="authentication_button">
+ <property
name="name">ChatControl-AuthenticationButton</property>
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="receives_default">True</property>
=====================================
data/gui/vcard_information_window.ui
=====================================
--- a/data/gui/vcard_information_window.ui
+++ b/data/gui/vcard_information_window.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.12"/>
<object class="GtkWindow" id="vcard_information_window">
@@ -914,6 +914,9 @@
<property name="halign">start</property>
<property name="relief">none</property>
<property name="xalign">0</property>
+ <style>
+ <class name="VCard-GtkLinkButton"/>
+ </style>
</object>
<packing>
<property name="left_attach">1</property>
@@ -929,6 +932,9 @@
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="xalign">0</property>
+ <style>
+ <class name="VCard-GtkLinkButton"/>
+ </style>
</object>
<packing>
<property name="left_attach">1</property>
@@ -1327,6 +1333,9 @@
<property name="halign">start</property>
<property name="relief">none</property>
<property name="xalign">0</property>
+ <style>
+ <class name="VCard-GtkLinkButton"/>
+ </style>
</object>
<packing>
<property name="left_attach">1</property>
=====================================
data/style/gajim.css
=====================================
--- 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
=====================================
src/chat_control.py
=====================================
--- 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(
=====================================
src/vcard.py
=====================================
--- 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)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/c02260c4d18fece5541878e6635d7e4e0062319b
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits