Skip to content

Commit 855d6c9

Browse files
committed
#205 fix image rendering issues
1 parent 1cf7612 commit 855d6c9

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

auratext/Core/Modules.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,18 @@ def save_document(self, force_dialog=False):
367367

368368

369369
def add_image_tab(self, tab, image_path, tab_name):
370+
from PyQt6.QtWidgets import QScrollArea
371+
scroll_area = QScrollArea()
372+
scroll_area.setAlignment(Qt.AlignmentFlag.AlignCenter)
373+
370374
label = QLabel()
371375
pixmap = QPixmap(image_path)
372376
label.setPixmap(pixmap)
373377
label.setAlignment(Qt.AlignmentFlag.AlignCenter)
374-
tab.addTab(label, tab_name)
378+
379+
scroll_area.setWidget(label)
380+
tab.addTab(scroll_area, tab_name)
381+
tab.setCurrentWidget(scroll_area)
375382

376383

377384

0 commit comments

Comments
 (0)