Skip to content

Commit 6a84076

Browse files
committed
tablet mode (when score maximized)
tap up - previous tune tap down - next tune tap left - previous page tap right - next page
1 parent c0b89d3 commit 6a84076

File tree

2 files changed

+38
-5
lines changed

2 files changed

+38
-5
lines changed

CHANGES

+4-2
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,8 @@ different panes. Tie/untie option added for notes. Broken rhythm
603603
- Export MIDI no longer includes the markers which are used for follow score
604604
- Added tablet mode: when music score is maximized
605605
- Right click on score panel toggles full screen mode (Shift-Alt-F)
606-
- Left click on right quarter of the screen turns to next page
607-
- Left click on left quarter of the screen turns to previous page
606+
- Left click on right third of the screen turns to next page
607+
- Left click on left third of the screen turns to previous page
608+
- Left click on bottom third of the screen turns to next tune
609+
- Left click on top third of the screen turns to previous tune
608610
- Fixed: follow score stopped working when screen in portrait mode

easy_abc.py

+34-3
Original file line numberDiff line numberDiff line change
@@ -5582,13 +5582,44 @@ def OnMusicPaneClick(self, evt):
55825582
if self.score_is_maximized:
55835583
width, height = self.music_pane.Size
55845584
x, y = evt.Position
5585-
threshold = width / 4
5585+
x_threshold = width / 3
5586+
y_threshold = height / 3
55865587
new_page = -1
5588+
tune_list = self.tune_list
5589+
total_tunes = tune_list.GetItemCount()
55875590

5588-
if x < threshold:
5591+
if x < x_threshold:
5592+
# previous page
55895593
new_page = self.current_page_index - 1
5590-
elif x > (width - threshold):
5594+
if new_page < 0:
5595+
new_page += self.current_svg_tune.page_count
5596+
elif x > (width - x_threshold):
5597+
# next page
55915598
new_page = self.current_page_index + 1
5599+
if new_page >= self.current_svg_tune.page_count:
5600+
new_page = 0
5601+
elif y < y_threshold:
5602+
# previous tune
5603+
new_tune = tune_list.GetFirstSelected()
5604+
if new_tune < 0:
5605+
new_tune = 0
5606+
else:
5607+
new_tune -= 1
5608+
if new_tune < 0:
5609+
new_tune = total_tunes - 1
5610+
tune_list.DeselectAll()
5611+
tune_list.Select(new_tune)
5612+
elif y > (height - y_threshold):
5613+
# next tune
5614+
new_tune = tune_list.GetFirstSelected()
5615+
if new_tune < 0:
5616+
new_tune = 0
5617+
else:
5618+
new_tune += 1
5619+
if new_tune >= total_tunes:
5620+
new_tune = 0
5621+
tune_list.DeselectAll()
5622+
tune_list.Select(new_tune)
55925623

55935624
if 0 <= new_page < self.current_svg_tune.page_count and new_page != self.current_page_index:
55945625
self.select_page(new_page)

0 commit comments

Comments
 (0)