- added a partial translation for Chinese Simplified language, by 俊霄 余
- trying to separate the Preferences settings from App init and to make them dependent on the self.defaults dictionary - updated the language strings from the source
This commit is contained in:
committed by
Marius Stanciu
parent
dd39657e4f
commit
7dc67e2b05
@@ -1,4 +1,5 @@
|
||||
from PyQt6 import QtWidgets
|
||||
import sys
|
||||
|
||||
from appGUI.preferences.utilities.AutoCompletePrefGroupUI import AutoCompletePrefGroupUI
|
||||
from appGUI.preferences.utilities.FAGrbPrefGroupUI import FAGrbPrefGroupUI
|
||||
@@ -8,30 +9,35 @@ from appGUI.preferences.utilities.FAExcPrefGroupUI import FAExcPrefGroupUI
|
||||
|
||||
class UtilPreferencesUI(QtWidgets.QWidget):
|
||||
|
||||
def __init__(self, decimals, parent=None):
|
||||
def __init__(self, defaults, decimals, parent=None):
|
||||
QtWidgets.QWidget.__init__(self, parent=parent)
|
||||
self.layout = QtWidgets.QHBoxLayout()
|
||||
self.setLayout(self.layout)
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.vlay = QtWidgets.QVBoxLayout()
|
||||
self.fa_excellon_group = FAExcPrefGroupUI(decimals=self.decimals)
|
||||
self.fa_excellon_group = FAExcPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.fa_excellon_group.setMinimumWidth(260)
|
||||
|
||||
self.fa_gcode_group = FAGcoPrefGroupUI(decimals=self.decimals)
|
||||
self.fa_gcode_group = FAGcoPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.fa_gcode_group.setMinimumWidth(260)
|
||||
|
||||
self.vlay.addWidget(self.fa_excellon_group)
|
||||
self.vlay.addWidget(self.fa_gcode_group)
|
||||
|
||||
self.fa_gerber_group = FAGrbPrefGroupUI(decimals=self.decimals)
|
||||
self.fa_gerber_group = FAGrbPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.fa_gerber_group.setMinimumWidth(260)
|
||||
|
||||
self.kw_group = AutoCompletePrefGroupUI(decimals=self.decimals)
|
||||
self.kw_group = AutoCompletePrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.kw_group.setMinimumWidth(260)
|
||||
|
||||
self.layout.addLayout(self.vlay)
|
||||
self.layout.addWidget(self.fa_gerber_group)
|
||||
# this does not make sense in Linux and MacOs so w edo not display it for those OS's
|
||||
if sys.platform not in ['linux', 'darwin']:
|
||||
self.vlay = QtWidgets.QVBoxLayout()
|
||||
|
||||
self.vlay.addWidget(self.fa_excellon_group)
|
||||
self.vlay.addWidget(self.fa_gcode_group)
|
||||
|
||||
self.layout.addLayout(self.vlay)
|
||||
self.layout.addWidget(self.fa_gerber_group)
|
||||
|
||||
self.layout.addWidget(self.kw_group)
|
||||
|
||||
self.layout.addStretch(1)
|
||||
|
||||
Reference in New Issue
Block a user