Philipp Hörist pushed to branch master at gajim / gajim
Commits:
dfc3749a by Philipp Hörist at 2019-02-02T17:03:57Z
Remove unused import
- - - - -
15dc059b by Philipp Hörist at 2019-02-02T18:12:06Z
Use css value for message input placeholder
- - - - -
3 changed files:
- gajim/data/style/default.css
- gajim/gtkgui_helpers.py
- gajim/message_textview.py
Changes:
=====================================
gajim/data/style/default.css
=====================================
@@ -1 +1 @@
-
.gajim-incoming-nickname {
color: rgb(164, 0, 0)
}
.gajim-outgoing-nickname {
color: rgb(52, 101, 164)
}
.gajim-outgoing-message-text {
color: rgb(85, 87, 83)
}
.gajim-status-message {
color: rgb(78, 154, 6)
}
.gajim-url {
color: rgb(32, 74, 135)
}
.gajim-highlight-message {
color: rgb(255, 128, 128)
}
.gajim-restored-message {
color: rgb(85, 87, 83)
}
.gajim-roster-disconnected {
background: rgb(171 ,97 ,97)
}
.gajim-roster-connected {
background: rgb(173, 195, 198)
}
.gajim-state-composing {
color: rgb(0, 139, 0)
}
.gajim-state-inactive {
color: rgb(158, 158, 158)
}
.gajim-state-gone {
color: rgb(128, 128, 128)
}
.gajim-state-paused {
color: rgb(0, 0, 205)
}
\ No newline at end of file
+
.gajim-incoming-nickname {
color: rgb(164, 0, 0)
}
.gajim-outgoing-nickname {
color: rgb(52, 101, 164)
}
.gajim-outgoing-message-text {
color: rgb(85, 87, 83)
}
.gajim-status-message {
color: rgb(78, 154, 6)
}
.gajim-url {
color: rgb(32, 74, 135)
}
.gajim-highlight-message {
color: rgb(255, 128, 128)
}
.gajim-restored-message {
color: rgb(85, 87, 83)
}
.gajim-roster-disconnected {
background: rgb(171 ,97 ,97)
}
.gajim-roster-connected {
background: rgb(173, 195, 198)
}
.gajim-state-composing {
color: rgb(0, 139, 0)
}
.gajim-state-inactive {
color: rgb(158, 158, 158)
}
.gajim-state-gone {
color: rgb(128, 128, 128)
}
.gajim-state-paused {
color: rgb(0, 0, 205)
}
.gajim-message-placeholder {
color: rgb(195, 195, 192)
}
\ No newline at end of file
=====================================
gajim/gtkgui_helpers.py
=====================================
@@ -41,7 +41,6 @@ except Exception:
from gajim.common.i18n import _
from gajim.common import app
-from gajim.common.const import PEPEventType
HAS_PYWIN32 = True
if os.name == 'nt':
@@ -55,14 +54,6 @@ if os.name == 'nt':
log = logging.getLogger('gajim.gtkgui_helpers')
-class Color:
- BLACK = Gdk.RGBA(red=0, green=0, blue=0, alpha=1)
- GREEN = Gdk.RGBA(red=115/255, green=210/255, blue=22/255, alpha=1)
- RED = Gdk.RGBA(red=204/255, green=0, blue=0, alpha=1)
- GREY = Gdk.RGBA(red=195/255, green=195/255, blue=192/255, alpha=1)
- ORANGE = Gdk.RGBA(red=245/255, green=121/255, blue=0/255, alpha=1)
-
-
def get_pixbuf_from_data(file_data):
"""
Get image data and returns GdkPixbuf.Pixbuf
=====================================
gajim/message_textview.py
=====================================
@@ -24,10 +24,9 @@ from gi.repository import GLib
from gi.repository import GObject
from gi.repository import Pango
-from gajim import gtkgui_helpers
-
from gajim.common import app
from gajim.common.i18n import _
+from gajim.common.const import StyleAttr
from gajim.gtk.util import scroll_to_end
@@ -76,9 +75,12 @@ class MessageTextView(Gtk.TextView):
self.color_tags = []
self.fonts_tags = []
self.other_tags = {}
+
+ color = app.css_config.get_value(
+ '.gajim-message-placeholder', StyleAttr.COLOR)
self.placeholder_tag = buffer_.create_tag('placeholder')
- self.placeholder_tag.set_property('foreground_rgba',
- gtkgui_helpers.Color.GREY)
+ self.placeholder_tag.set_property('foreground', color)
+
self.other_tags['bold'] = buffer_.create_tag('bold')
self.other_tags['bold'].set_property('weight', Pango.Weight.BOLD)
self.begin_tags['bold'] = '<strong>'
View it on GitLab:
https://dev.gajim.org/gajim/gajim/compare/3f03e6e0a4440d9addcd1df73d7258997e7145e2...15dc059bf37e27e8b9f98831f5e4c666270c39cf
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/compare/3f03e6e0a4440d9addcd1df73d7258997e7145e2...15dc059bf37e27e8b9f98831f5e4c666270c39cf
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