Commit 6dd39d7a authored by Bruno Guillaume's avatar Bruno Guillaume

Adapt to real screen size

parent 94c02980
......@@ -22,7 +22,7 @@ import subprocess
class Dep2pict(QMainWindow):
def __init__(self, parent = None):
def __init__(self, screen, parent = None):
super(Dep2pict, self).__init__(parent)
d2p = True
......@@ -47,7 +47,7 @@ class Dep2pict(QMainWindow):
if d2p:
self.setWindowTitle('Dep2pict')
self.setGeometry(0, 0, 1920, 600)
self.setGeometry(0, 0, screen.width(), screen.height()/2)
self.show()
if len(sys.argv) > 1:
......@@ -226,5 +226,6 @@ class Dep2pict(QMainWindow):
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = Dep2pict()
screen = app.desktop().screenGeometry()
ex = Dep2pict(screen)
sys.exit(app.exec_())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment