This commit is contained in:
恍兮惚兮 2024-05-08 17:50:28 +08:00
parent 586a808c81
commit 4f14460506
3 changed files with 5 additions and 15 deletions

View File

@ -50,20 +50,14 @@ class Settin(closeashidewindow):
setstylesheetsignal = pyqtSignal()
def resizefunction(self):
ww = self.size().width() - self.window_width * 0.2 - 30
for w in self.needfitwidgets:
w.setFixedWidth(
int(self.size().width() - self.window_width * 0.2 - self.scrollwidth)
)
w.setFixedWidth(int(ww))
for grid, maxl in self.needfitcols:
for c in range(maxl):
grid.setColumnMinimumWidth(
c,
int(
self.size().width()
- self.window_width * 0.2
- self.scrollwidth // maxl
),
int(ww / maxl),
)
def resizeEvent(self, a0: QResizeEvent) -> None:
@ -121,7 +115,6 @@ class Settin(closeashidewindow):
self.window_width = 900 if globalconfig["languageuse"] == 0 else 1200
self.window_height = 500
self.scrollwidth = 20
self.savelastrect = None
self.hooks = []
@ -317,9 +310,6 @@ class Settin(closeashidewindow):
scroll = QScrollArea()
scroll.setHorizontalScrollBarPolicy(1)
scroll.setStyleSheet("""QScrollArea{background-color:transparent;border:0px}""")
scroll.verticalScrollBar().setStyleSheet(
"QScrollBar{width:%spx;}" % self.scrollwidth
)
self.needfitwidgets.append(widget)
scroll.setWidget(widget)

View File

@ -87,7 +87,7 @@ def initsome11(self, l, label=None):
grids.append(line)
line = []
else:
line += []
line += [""]
if len(line):
grids.append(line)
return grids

View File

@ -66,7 +66,7 @@ def getocrgrid(self):
grids.append(line)
line = []
else:
line += []
line += [""]
i += 1
if len(line):
grids.append(line)