Skip to content

Commit

Permalink
Show placeholder icon for emoji selector
Browse files Browse the repository at this point in the history
ref #85
  • Loading branch information
diegogangl committed Jan 17, 2021
1 parent 1897f24 commit f1fad95
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions GTG/gtk/browser/tag_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def set_emoji(self, widget):

text = self.hidden_entry.get_text()
self.ti_bt_label.set_text(text)
self.ti_bt_label.set_opacity(1)

with GObject.signal_handler_block(self.hidden_entry, self.emoji_id):
self.hidden_entry.set_text('')
Expand Down Expand Up @@ -223,6 +224,13 @@ def set_tag(self, tag):
if len(icon) < 6:
self.ti_bt_label.set_text(icon)
self.tag.set_attribute('icon', icon)
self.ti_bt_label.set_opacity(1)
else:
self.ti_bt_label.set_text('🏷️')
self.ti_bt_label.set_opacity(0.5)
else:
self.ti_bt_label.set_text('🏷️')
self.ti_bt_label.set_opacity(0.5)
# If available, update color selection
if (tag.get_attribute('color') is not None):
col = tag.get_attribute('color')
Expand Down

0 comments on commit f1fad95

Please sign in to comment.