Skip to content
Snippets Groups Projects
Commit 15dc059b authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Use css value for message input placeholder

parent dfc3749a
No related branches found
No related tags found
No related merge requests found
.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-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 \ No newline at end of file
......
...@@ -54,14 +54,6 @@ if os.name == 'nt': ...@@ -54,14 +54,6 @@ if os.name == 'nt':
log = logging.getLogger('gajim.gtkgui_helpers') 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): def get_pixbuf_from_data(file_data):
""" """
Get image data and returns GdkPixbuf.Pixbuf Get image data and returns GdkPixbuf.Pixbuf
......
...@@ -24,10 +24,9 @@ from gi.repository import GLib ...@@ -24,10 +24,9 @@ from gi.repository import GLib
from gi.repository import GObject from gi.repository import GObject
from gi.repository import Pango from gi.repository import Pango
from gajim import gtkgui_helpers
from gajim.common import app from gajim.common import app
from gajim.common.i18n import _ from gajim.common.i18n import _
from gajim.common.const import StyleAttr
from gajim.gtk.util import scroll_to_end from gajim.gtk.util import scroll_to_end
...@@ -76,9 +75,12 @@ class MessageTextView(Gtk.TextView): ...@@ -76,9 +75,12 @@ class MessageTextView(Gtk.TextView):
self.color_tags = [] self.color_tags = []
self.fonts_tags = [] self.fonts_tags = []
self.other_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 = buffer_.create_tag('placeholder')
self.placeholder_tag.set_property('foreground_rgba', self.placeholder_tag.set_property('foreground', color)
gtkgui_helpers.Color.GREY)
self.other_tags['bold'] = buffer_.create_tag('bold') self.other_tags['bold'] = buffer_.create_tag('bold')
self.other_tags['bold'].set_property('weight', Pango.Weight.BOLD) self.other_tags['bold'].set_property('weight', Pango.Weight.BOLD)
self.begin_tags['bold'] = '<strong>' self.begin_tags['bold'] = '<strong>'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment