Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 24, 2023
1 parent b47fa12 commit e283d63
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions koordinates/gui/koordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ def eventFilter(self, obj, event):
if not self._enabled:
# swallow clicks, we don't want to user to dismiss the menu by clicking
# disabled actions
if event.type() in (QEvent.MouseButtonPress, QEvent.MouseButtonDblClick, QEvent.MouseButtonRelease):
if event.type() in (QEvent.MouseButtonPress,
QEvent.MouseButtonDblClick,
QEvent.MouseButtonRelease):
return True
else:
if event.type() == QEvent.HoverEnter:
Expand All @@ -301,7 +303,8 @@ def createWidget(self, parent):
self._action_group.setExclusive(False)
self._action_group.addButton(check_box)
check_box.installEventFilter(self)
check_box.setStyleSheet('margin-top: 10px; margin-right:30px; margin-bottom:10px; margin-left:{}px;'.format(
check_box.setStyleSheet(
'margin-top: 10px; margin-right:30px; margin-bottom:10px; margin-left:{}px;'.format(
15 + self._indent * 20
))
check_box.toggled.connect(self._on_radio_button_toggled)
Expand Down Expand Up @@ -551,7 +554,9 @@ def __init__(self, parent):
)
self.sort_menu = QMenu(self.button_sort_order)

sort_by_action = CustomLabelWidgetAction(self.tr('Sort by'), enabled=False, parent=self.sort_menu)
sort_by_action = CustomLabelWidgetAction(
self.tr('Sort by'), enabled=False,
parent=self.sort_menu)
self.sort_menu.addAction(sort_by_action)

self._sort_menu_event_filter = WidgetActionMenuHoverEventFilter(self.sort_menu)
Expand Down

0 comments on commit e283d63

Please sign in to comment.