kopia lustrzana https://github.com/corrscope/corrscope
Make corrscope window size dpi-independent, widen window (#238)
Tested on Linux, Wine, and Windows 10.pull/357/head
rodzic
452bf29d5e
commit
99a81d3635
|
@ -52,7 +52,13 @@ class MainWindow(QWidget):
|
||||||
left_tabs: "TabWidget"
|
left_tabs: "TabWidget"
|
||||||
|
|
||||||
def setupUi(self, MainWindow: QMainWindow):
|
def setupUi(self, MainWindow: QMainWindow):
|
||||||
MainWindow.resize(1160, 0)
|
# Multiplying by DPI scale is necessary on both Windows and Linux,
|
||||||
|
# since MainWindow.resize() operates in physical pixels.
|
||||||
|
scale = MainWindow.logicalDpiX() / 96.0
|
||||||
|
|
||||||
|
width = 1280
|
||||||
|
height = 0
|
||||||
|
MainWindow.resize(width * scale, height * scale)
|
||||||
|
|
||||||
s = LayoutStack(MainWindow)
|
s = LayoutStack(MainWindow)
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue