Skip to content

Commit

Permalink
Fixing bug with right clicking for touch position. (#31)
Browse files Browse the repository at this point in the history
* Fixing bug with right clicking for touch position.

* Updated semantics.

* semver increment.
  • Loading branch information
n2qzshce authored Apr 20, 2021
1 parent db728b0 commit 3604c56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pyinstaller-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: Build executeable

env:
semver: 1.6.3.${{ github.run_number }}
semver: 1.6.4.${{ github.run_number }}
python-version: 3.8
KIVY_GL_BACKEND: 'angle_sdl2'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
9 changes: 7 additions & 2 deletions src/ui/app_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from abc import ABC
from typing import TextIO

from kivy import metrics
from kivy.app import App
from kivy.base import EventLoop
from kivy.config import Config
Expand All @@ -29,9 +30,13 @@ def on_touch_down(self, touch):

super().on_touch_down(touch)

if not self.focused:
return

if touch.button == 'right':
logging.debug("right mouse clicked")
pos = self.to_local(*self._long_touch_pos, relative=True)
pos = self.to_local(*self._long_touch_pos, relative=False)
pos = (pos[0], pos[1] - metrics.inch(.25))
self._show_cut_copy_paste(
pos, EventLoop.window, mode='paste')

Expand Down Expand Up @@ -90,7 +95,7 @@ class LayoutIds:
text: "Check for needed migrations"
ActionButton:
id: {LayoutIds.clear_log}
text: "Clear log"
text: "Clear screen log"
ActionButton:
id: {LayoutIds.exit_button}
text: "Exit"
Expand Down

0 comments on commit 3604c56

Please sign in to comment.