Skip to content

Commit 2fb70dc

Browse files
committed
Better initial default size for the settings window at higher screen resolutions
1 parent 5c550a2 commit 2fb70dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ai_diffusion/ui/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,8 @@ def __init__(self, server: Server):
11211121
self.setMinimumSize(QSize(960, 480))
11221122
if screen := QGuiApplication.screenAt(QCursor.pos()):
11231123
size = screen.availableSize()
1124-
min_w = min(size.width(), QFontMetrics(self.font()).height() * 50)
1125-
self.resize(QSize(max(min_w, int(size.width() * 0.6)), int(size.height() * 0.8)))
1124+
min_w = min(size.width(), QFontMetrics(self.font()).width("M") * 100)
1125+
self.resize(QSize(min_w, int(size.height() * 0.8)))
11261126

11271127
layout = QHBoxLayout()
11281128
self.setLayout(layout)

0 commit comments

Comments
 (0)