diff options
| author | tassaron | 2022-05-05 22:29:16 -0400 |
|---|---|---|
| committer | tassaron | 2022-05-05 22:29:16 -0400 |
| commit | c36a3dc64501db64978ba71d5219976e3f7b2315 (patch) | |
| tree | ae56d0bbf5ca809e1439ea65eb51c7d5c66dd6c2 /src/gui/mainwindow.py | |
| parent | e14e046804d50cfc00968a9f2fedb9b615b6d3d2 (diff) | |
start mainwindow smaller and with classic visualizer
instead of a giant blank canvas, invite the user with some classic components and a smaller window more appropriate for this small utility :)
Diffstat (limited to 'src/gui/mainwindow.py')
| -rw-r--r-- | src/gui/mainwindow.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/mainwindow.py b/src/gui/mainwindow.py index 2bfc4e3..c2e2c83 100644 --- a/src/gui/mainwindow.py +++ b/src/gui/mainwindow.py @@ -53,9 +53,9 @@ class MainWindow(QtWidgets.QMainWindow): self.resize( int(self.width() * - (dpi / 96)), + (dpi / 144)), int(self.height() * - (dpi / 96)) + (dpi / 144)) ) self.core = Core() @@ -432,6 +432,11 @@ class MainWindow(QtWidgets.QMainWindow): # Close MainWindow when receiving Ctrl+C from terminal signal.signal(signal.SIGINT, lambda *args: self.close()) + # Add initial components if none are in the list + if not self.core.selectedComponents: + self.addComponent(0, 1) + self.addComponent(0, 0) + def __repr__(self): return ( '%s\n' |
