Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 29bbcae

Browse files
committedOct 12, 2020
updated UI size to fit on laptop screen
1 parent be962ff commit 29bbcae

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed
 

‎pycpd.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ def __init__(self, parent=None, width=5, height=4, dpi=100):
6060
FigureCanvas.__init__(self, self.fig)
6161
self.setParent(parent)
6262

63-
FigureCanvas.setSizePolicy(self, QSizePolicy.Expanding,
64-
QSizePolicy.Expanding)
65-
FigureCanvas.updateGeometry(self)
63+
self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
64+
self.updateGeometry()
6665

6766

6867

@@ -780,7 +779,7 @@ def initUI(self):
780779
rw = QWidget()
781780

782781
self.bh = BoreholeData()
783-
self.locmap = MapCanvas(self, width=5, height=4, dpi=100)
782+
self.locmap = MapCanvas(self)
784783
self.locmap.setMinimumSize(800, 550)
785784
toolbar = NavigationToolbar(self.locmap, self)
786785

@@ -807,10 +806,10 @@ def initUI(self):
807806

808807
mapctrl.setLayout(mcl)
809808

810-
self.splot = SpectrumCanvas(self, width=5, height=4, dpi=100)
811-
self.splot.setMinimumSize(500,400)
812-
self.lachplot = LachenbruchCanvas(self, width=5, height=4, dpi=100)
813-
self.lachplot.setMinimumSize(500,400)
809+
self.splot = SpectrumCanvas(self)
810+
self.splot.setMinimumSize(500, 450)
811+
self.lachplot = LachenbruchCanvas(self)
812+
self.lachplot.setMinimumSize(500, 450)
814813

815814
self.plots = QTabWidget()
816815
self.plots.addTab(self.splot, 'Spectrum')
@@ -869,6 +868,7 @@ def initUI(self):
869868

870869

871870
hbox = QHBoxLayout()
871+
hbox.setContentsMargins(0, 0, 0, 0)
872872
#hbox.addStretch(1)
873873
hbox.addWidget(lw)
874874
hbox.addWidget(rw)
@@ -889,7 +889,7 @@ def initUI(self):
889889
lw.setLayout(rvbox1)
890890
rw.setLayout(rvbox2)
891891

892-
mw.setLayout(hbox)
892+
mw.setLayout(hbox)
893893

894894
self.setGeometry(100, 100, 300, 150)
895895
self.setWindowTitle('Curie-Point Depth Calculator')

0 commit comments

Comments
 (0)
Please sign in to comment.