Skip to content

Commit

Permalink
Showing only one horizontal scrollbar causes labels and sequences to …
Browse files Browse the repository at this point in the history
…misalign

(possibly only on Mac)
  • Loading branch information
e-pettersen committed Jan 3, 2024
1 parent f2e51f4 commit 3553492
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/bundles/seq_view/bundle_info.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<BundleInfo name="ChimeraX-SeqView" version="2.11"
<BundleInfo name="ChimeraX-SeqView" version="2.11.1"
package="chimerax.seq_view"
supercedes="ChimeraX-SEQ-VIEW"
minSessionVersion="1" maxSessionVersion="1">
Expand Down
8 changes: 8 additions & 0 deletions src/bundles/seq_view/src/seq_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1472,16 +1472,24 @@ def usePhyloTree(self, tree, callback=None):
"""

def _label_scene(self, grid=True):
from Qt.QtCore import Qt
if self.wrap_okay():
label_scene = self.main_scene
if grid:
self.label_view.hide()
#self._vdivider.hide()

self.label_view.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
self.main_view.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
else:
label_scene = self.label_scene
if grid:
self.label_view.show()
#self._vdivider.show()

# Having only one scroll bar showing causes labels not to align with sequences on Mac
self.label_view.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
self.main_view.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
return label_scene

"""
Expand Down

0 comments on commit 3553492

Please sign in to comment.