Make corrscope window size dpi-independent, widen window (#238)

Tested on Linux, Wine, and Windows 10.
pull/357/head
nyanpasu64 2019-04-09 06:28:25 -07:00 zatwierdzone przez GitHub
rodzic 452bf29d5e
commit 99a81d3635
1 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -52,7 +52,13 @@ class MainWindow(QWidget):
left_tabs: "TabWidget"
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)