From c36a3dc64501db64978ba71d5219976e3f7b2315 Mon Sep 17 00:00:00 2001
From: tassaron
Date: Thu, 5 May 2022 22:29:16 -0400
Subject: 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 :)
---
src/gui/mainwindow.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
(limited to 'src/gui/mainwindow.py')
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'
--
cgit v1.2.3
' value='346b9df75c0dbf06bf54d758f3a74b0985b14f0e'/>
| 🚨 these dotfiles are HEAVILY tailored for my needs and setup. Feel free to explore and find ideas, but use at your own risk. | |
| Commit message (Collapse) | Author | Files | Lines |