Skip to content

Commit

Permalink
Color Palette Bug : Fixed #922 [skip ci]
Browse files Browse the repository at this point in the history
The event transition was not working properly, so I added an Event Box.
  • Loading branch information
nyabkun committed Feb 20, 2021
1 parent f46b1e1 commit 539af1f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions gui/colors/paletteview.py
Expand Up @@ -552,6 +552,10 @@ class _PaletteGridLayout (ColorAdjusterWidget):

def __init__(self):
ColorAdjusterWidget.__init__(self)

evbox = Gtk.EventBox()
self.add(evbox)

# Sizing
s = self._SWATCH_SIZE_NOMINAL
self.set_size_request(s, s)
Expand All @@ -561,11 +565,11 @@ def __init__(self):
#: User can click on empty slots
self.can_select_empty = False
# Current index
self.connect("button-press-event", self._button_press_cb)
self.connect_after("button-release-event", self._button_release_cb)
evbox.connect("button-press-event", self._button_press_cb)
evbox.connect_after("button-release-event", self._button_release_cb)
# Dragging
self.connect("motion-notify-event", self._motion_notify_cb)
self.add_events(Gdk.EventMask.POINTER_MOTION_MASK)
evbox.connect("motion-notify-event", self._motion_notify_cb)
evbox.add_events(Gdk.EventMask.POINTER_MOTION_MASK)
# Tooltips
self._tooltip_index = None
self.set_has_tooltip(True)
Expand Down

1 comment on commit 539af1f

@charbelnicolas
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think this fix introduced this bug?

#1159

Please sign in to comment.