Skip to content

Commit

Permalink
Fix Gtk-WARNING Don't know color
Browse files Browse the repository at this point in the history
Documentation for Gtk.TextBuffer.create_tag gives an example of using a
string for the foreground colour, not a Gdk.Color.
  • Loading branch information
quozl committed Aug 5, 2020
1 parent 6be1180 commit d36f122
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions calculate.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ def create_history_object(self):
Gdk.color_parse(self.color.get_fill_color()).green_float +
Gdk.color_parse(self.color.get_fill_color()).blue_float) / 3.0
if bright < 0.5:
col = Gdk.color_parse('white')
col = 'white'
else:
col = Gdk.color_parse('black')
col = 'black'
tagcolor = buf.create_tag(foreground=col)

# Add label, equation and result
Expand Down

0 comments on commit d36f122

Please sign in to comment.