Browse Source

some minor tinkering

master
Christian Voigt 1 year ago
parent
commit
98caa3ef17
  1. 36
      main.py

36
main.py

@ -1,7 +1,7 @@
import sys
from PyQt5.QtCore import (
Qt, QSettings, QByteArray
Qt, QSettings, QByteArray, QSize
)
from PyQt5.QtWidgets import (
@ -31,42 +31,44 @@ class GuiTest(QMainWindow):
window_layout = QHBoxLayout()
window_layout.setContentsMargins(0, 0, 0, 0)
# the common user enjoys a bit of control. so why force window sizes on them, eh?
self.read_window_settings()
region_view_width = 512
region_view = QWidget()
region_view_layout = QVBoxLayout()
region_view.setStyleSheet("background-color: #cccccc;")
region_view_layout.setContentsMargins(0, 0, 0, 0)
# defaults are fine
world_regions_widget = WorldRegionsWidget()
# the common user enjoys a bit of control. so why force window sizes on them, eh?
self.read_window_settings()
region_view_layout.addWidget(world_regions_widget)
region_view_layout.addWidget(
WorldRegionsWidget()
)
region_view.setLayout(region_view_layout)
region_view.setMinimumSize(QSize(512, 512))
staging_view_width = 256
staging_view = QWidget()
staging_view_layout = QVBoxLayout()
staging_view_layout.setContentsMargins(0, 0, 0, 0)
staging_view.setMinimumWidth(staging_view_width)
staging_view.setLayout(staging_view_layout)
general_progress_bar = QProgressBar()
general_progress_bar.setRange(0, 100)
general_progress_bar.setValue(0)
general_progress_bar.setAlignment(Qt.AlignCenter)
general_progress_bar.setMaximumWidth(staging_view_width)
main_view = QWidget()
main_view_layout = QVBoxLayout()
main_view_layout.setContentsMargins(0, 0, 0, 0)
main_view.setMinimumWidth(256)
main_view.setLayout(main_view_layout)
window_layout.addWidget(main_view)
window_layout.addWidget(region_view)
window_layout.addWidget(staging_view)
window.setLayout(window_layout)
application_frame_layout.addWidget(window)
application_frame.setLayout(application_frame_layout)
self.statusBar().showMessage("Ready")
self.statusBar().addPermanentWidget(general_progress_bar)
self.statusBar().showMessage("Ready")
self.setCentralWidget(application_frame)

Loading…
Cancel
Save