Skip to content

Commit

Permalink
cleanup table behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
X-sam committed Jul 16, 2024
1 parent e67ef3c commit 8c9b0e7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/python/main/ayab/knitprogress.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from __future__ import annotations
from PySide6.QtCore import QCoreApplication, QRect, Qt
from PySide6.QtWidgets import QTableWidget, QTableWidgetItem, QHeaderView
from PySide6.QtWidgets import QTableWidget, QTableWidgetItem, QHeaderView, QAbstractItemView
from PySide6.QtGui import QBrush, QColor
from typing import TYPE_CHECKING, Optional, cast, List
from math import floor
Expand Down Expand Up @@ -52,8 +52,14 @@ def __init__(self, parent: GuiMain):
self.verticalHeader().setSectionResizeMode(
QHeaderView.ResizeMode.Fixed
)
self.verticalHeader().setSectionsClickable(False)
self.horizontalHeader().setMinimumSectionSize(0)
self.horizontalHeader().setDefaultSectionSize(self.__prefs.value("lower_display_stitch_width"))
self.horizontalHeader().setSectionsClickable(False)
self.setSelectionBehavior(QAbstractItemView.SelectionBehavior.SelectItems)
self.setSelectionMode(QAbstractItemView.SelectionMode.SingleSelection)
self.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers)

self.previousStatus: Optional[Status] = None
self.scene = parent.scene

Expand Down

0 comments on commit 8c9b0e7

Please sign in to comment.