diff --git a/gramps/gui/views/listview.py b/gramps/gui/views/listview.py index 5dde6981f..a0941dd7a 100644 --- a/gramps/gui/views/listview.py +++ b/gramps/gui/views/listview.py @@ -67,7 +67,7 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.sgettext from ..ddtargets import DdTargets from ..plug.quick import create_quickreport_menu, create_web_connect_menu -from ..utils import is_right_click +from ..utils import is_right_click, rgb_to_hex from ..widgets.interactivesearchbox import InteractiveSearchBox #---------------------------------------------------------------- @@ -281,11 +281,12 @@ class ListView(NavigationView): function because we don't want to set the color of untagged rows. ''' fg_color = model.get_value(iter_, model.color_column()) - #for color errors, typically color column is badly set - if fg_color: - renderer.set_property('foreground', fg_color) - else: - LOG.debug('Bad color set: ' + str(fg_color)) + if not fg_color: + context = self.list.get_style_context() + color = context.get_color(Gtk.StateFlags.ACTIVE) + fg_color = rgb_to_hex((color.red, color.green, color.blue)) + + renderer.set_property('foreground', fg_color) def set_active(self): """ diff --git a/gramps/gui/views/treemodels/citationbasemodel.py b/gramps/gui/views/treemodels/citationbasemodel.py index 372f7347b..3d2a7c918 100644 --- a/gramps/gui/views/treemodels/citationbasemodel.py +++ b/gramps/gui/views/treemodels/citationbasemodel.py @@ -138,7 +138,7 @@ class CitationBaseModel(object): tag_handle = data[0] cached, tag_color = self.get_cached_value(tag_handle, "TAG_COLOR") if not cached: - tag_color = "#000000000000" + tag_color = "" tag_priority = None for handle in data[COLUMN_TAGS]: tag = self.db.get_tag_from_handle(handle) @@ -297,7 +297,7 @@ class CitationBaseModel(object): tag_handle = data[0] cached, tag_color = self.get_cached_value(tag_handle, "TAG_COLOR") if not cached: - tag_color = "#000000000000" + tag_color = "" tag_priority = None for handle in data[COLUMN2_TAGS]: tag = self.db.get_tag_from_handle(handle) diff --git a/gramps/gui/views/treemodels/eventmodel.py b/gramps/gui/views/treemodels/eventmodel.py index b3597b274..2a143043d 100644 --- a/gramps/gui/views/treemodels/eventmodel.py +++ b/gramps/gui/views/treemodels/eventmodel.py @@ -208,7 +208,7 @@ class EventModel(FlatBaseModel): tag_handle = data[0] cached, tag_color = self.get_cached_value(tag_handle, "TAG_COLOR") if not cached: - tag_color = "#000000000000" + tag_color = "" tag_priority = None for handle in data[COLUMN_TAGS]: tag = self.db.get_tag_from_handle(handle) diff --git a/gramps/gui/views/treemodels/familymodel.py b/gramps/gui/views/treemodels/familymodel.py index 6d8a24e06..6274e2a91 100644 --- a/gramps/gui/views/treemodels/familymodel.py +++ b/gramps/gui/views/treemodels/familymodel.py @@ -220,7 +220,7 @@ class FamilyModel(FlatBaseModel): tag_handle = data[0] cached, tag_color = self.get_cached_value(tag_handle, "TAG_COLOR") if not cached: - tag_color = "#000000000000" + tag_color = "" tag_priority = None for handle in data[13]: tag = self.db.get_tag_from_handle(handle) diff --git a/gramps/gui/views/treemodels/mediamodel.py b/gramps/gui/views/treemodels/mediamodel.py index 56795e8a7..3918e221b 100644 --- a/gramps/gui/views/treemodels/mediamodel.py +++ b/gramps/gui/views/treemodels/mediamodel.py @@ -187,7 +187,7 @@ class MediaModel(FlatBaseModel): tag_handle = data[0] cached, tag_color = self.get_cached_value(tag_handle, "TAG_COLOR") if not cached: - tag_color = "#000000000000" + tag_color = "" tag_priority = None for handle in data[11]: tag = self.db.get_tag_from_handle(handle) diff --git a/gramps/gui/views/treemodels/notemodel.py b/gramps/gui/views/treemodels/notemodel.py index fe2784124..ca1786466 100644 --- a/gramps/gui/views/treemodels/notemodel.py +++ b/gramps/gui/views/treemodels/notemodel.py @@ -150,7 +150,7 @@ class NoteModel(FlatBaseModel): tag_handle = data[0] cached, value = self.get_cached_value(tag_handle, "TAG_COLOR") if not cached: - tag_color = "#000000000000" + tag_color = "" tag_priority = None for handle in data[Note.POS_TAGS]: tag = self.db.get_tag_from_handle(handle) diff --git a/gramps/gui/views/treemodels/peoplemodel.py b/gramps/gui/views/treemodels/peoplemodel.py index e823ea39d..0f0fc3d73 100644 --- a/gramps/gui/views/treemodels/peoplemodel.py +++ b/gramps/gui/views/treemodels/peoplemodel.py @@ -545,7 +545,7 @@ class PeopleBaseModel(BaseModel): tag_handle = data[0] cached, value = self.get_cached_value(tag_handle, "TAG_COLOR") if not cached: - tag_color = "#000000000000" + tag_color = "" tag_priority = None for handle in data[COLUMN_TAGS]: tag = self.db.get_tag_from_handle(handle) diff --git a/gramps/gui/views/treemodels/placemodel.py b/gramps/gui/views/treemodels/placemodel.py index 1e50c6f9a..461d77093 100644 --- a/gramps/gui/views/treemodels/placemodel.py +++ b/gramps/gui/views/treemodels/placemodel.py @@ -200,7 +200,7 @@ class PlaceBaseModel(object): tag_handle = data[0] cached, value = self.get_cached_value(tag_handle, "TAG_COLOR") if not cached: - tag_color = "#000000000000" + tag_color = "" tag_priority = None for handle in data[16]: tag = self.db.get_tag_from_handle(handle) diff --git a/gramps/gui/views/treemodels/repomodel.py b/gramps/gui/views/treemodels/repomodel.py index 4ebfc05a5..3a4b2400d 100644 --- a/gramps/gui/views/treemodels/repomodel.py +++ b/gramps/gui/views/treemodels/repomodel.py @@ -253,7 +253,7 @@ class RepositoryModel(FlatBaseModel): tag_handle = data[0] cached, tag_color = self.get_cached_value(tag_handle, "TAG_COLOR") if not cached: - tag_color = "#000000000000" + tag_color = "" tag_priority = None for handle in data[8]: tag = self.db.get_tag_from_handle(handle) diff --git a/gramps/gui/views/treemodels/sourcemodel.py b/gramps/gui/views/treemodels/sourcemodel.py index f445e9e02..cd0f4bcf8 100644 --- a/gramps/gui/views/treemodels/sourcemodel.py +++ b/gramps/gui/views/treemodels/sourcemodel.py @@ -143,7 +143,7 @@ class SourceModel(FlatBaseModel): tag_handle = data[0] cached, value = self.get_cached_value(tag_handle, "TAG_COLOR") if not cached: - tag_color = "#000000000000" + tag_color = "" tag_priority = None for handle in data[11]: tag = self.db.get_tag_from_handle(handle) diff --git a/gramps/gui/views/treemodels/treebasemodel.py b/gramps/gui/views/treemodels/treebasemodel.py index 49617b91c..9f6eaa5db 100644 --- a/gramps/gui/views/treemodels/treebasemodel.py +++ b/gramps/gui/views/treemodels/treebasemodel.py @@ -897,7 +897,7 @@ class TreeBaseModel(GObject.GObject, Gtk.TreeModel, BaseModel): # Header rows dont get the foreground color set if col == self.color_column(): #color must not be utf-8 - return "#000000000000" + return "" # Return the node name for the first column if col == 0: