diff options
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -28,6 +28,8 @@ from PyQt5 import QtSvg from PyQt5.QtSvg import * from PyQt5.QtGui import QIcon +import extras.config as config + current_dir = os.path.dirname(os.path.abspath(__file__)) Form, Base = uic.loadUiType(os.path.join(current_dir, "Main_Window.ui")) @@ -55,6 +57,10 @@ class MainWindow(Base, Form): self.setAttribute(QtCore.Qt.WA_TranslucentBackground) self.setStyle(QtWidgets.QStyleFactory.create('Fusion')) + # set fullscreen mode if enabled in config.ini + if config.fullscreen_mode(): + UI_Handeler.fullscreen(self) + self.current_page = None self.headerContainer = self.findChild(QWidget, 'headerContainer') @@ -98,9 +104,8 @@ class MainWindow(Base, Form): self.settingsBtn) steering_icon = ":/Images/Images/steering-wheel.svg" - getsize = QtSvg.QSvgRenderer(steering_icon) svg_widget = QtSvg.QSvgWidget(steering_icon) - svg_widget.setFixedSize(getsize.defaultSize()) + svg_widget.setFixedSize(QtSvg.QSvgRenderer(steering_icon).defaultSize()) svg_widget.setStyleSheet("background-color: transparent;") self.steeringCtrlButton.setIcon(QIcon(svg_widget.grab())) |