Skip to content

Commit

Permalink
Merge pull request #8 from DarthWynaut/main
Browse files Browse the repository at this point in the history
Automatically copy the hex code when left clicking
  • Loading branch information
devansharora18 committed Oct 29, 2023
2 parents 91528c3 + 64082ae commit cd77ab4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ def context_menu_handler(event):
remove_action.triggered.connect(lambda: self.remove_color(color, color_widget))

context_menu.exec(event.globalPosition().toPoint())
elif event.button() == Qt.MouseButton.LeftButton:
self.copy_to_clipboard(color.name())

color_widget.mousePressEvent = context_menu_handler

Expand Down

0 comments on commit cd77ab4

Please sign in to comment.