diff --git a/gajim/data/style/default.css b/gajim/data/style/default.css index 0f137f39bf16f771ae498b310c9f1f5c88e014f1..57338b5bf3b9c5c7c4815fe465fc5da1b03f2bc4 100644 --- a/gajim/data/style/default.css +++ b/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 diff --git a/gajim/gtkgui_helpers.py b/gajim/gtkgui_helpers.py index f7167412039caacb0ae09c1ccd66e08b7a461c1b..4dc1c54919e03726f62bfbd038000c2128f7ca61 100644 --- a/gajim/gtkgui_helpers.py +++ b/gajim/gtkgui_helpers.py @@ -54,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 diff --git a/gajim/message_textview.py b/gajim/message_textview.py index 6ae5904a9de27ff92ae888c14bd3881a246aa2c8..df24a344246c0a979a033256e3385c93a1713f8a 100644 --- a/gajim/message_textview.py +++ b/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>'