translated the gui prefs group
This commit is contained in:
@@ -655,7 +655,7 @@ class EvalEntry2(QtWidgets.QLineEdit):
|
||||
return QtCore.QSize(EDIT_SIZE_HINT, default_hint_size.height())
|
||||
|
||||
|
||||
class FCColorEntry(QtWidgets.QWidget):
|
||||
class FCColorEntry(QtWidgets.QFrame):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
@@ -668,6 +668,7 @@ class FCColorEntry(QtWidgets.QWidget):
|
||||
|
||||
self.layout = QtWidgets.QHBoxLayout()
|
||||
self.layout.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
|
||||
self.layout.setContentsMargins(0, 0, 0, 0)
|
||||
self.layout.addWidget(self.entry)
|
||||
self.layout.addWidget(self.button)
|
||||
self.setLayout(self.layout)
|
||||
|
||||
@@ -102,7 +102,8 @@ class ComboboxOptionUI(BasicOptionUI):
|
||||
|
||||
class ColorOptionUI(BasicOptionUI):
|
||||
def build_entry_widget(self) -> QtWidgets.QWidget:
|
||||
return FCColorEntry()
|
||||
entry = FCColorEntry()
|
||||
return entry
|
||||
|
||||
|
||||
class HeadingOptionUI(OptionUI):
|
||||
|
||||
@@ -13,12 +13,12 @@ from flatcamGUI.preferences.OptionUI import OptionUI, CheckboxOptionUI, RadioSet
|
||||
SeparatorOptionUI, HeadingOptionUI, ComboboxOptionUI, ColorOptionUI, FullWidthButtonOptionUI
|
||||
|
||||
|
||||
class GeneralGUIPrefGroupUI2(OptionsGroupUI2):
|
||||
class GeneralGUIPrefGroupUI(OptionsGroupUI2):
|
||||
|
||||
def __init__(self, decimals=4, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
self.decimals = decimals
|
||||
self.setTitle(str(_("GUI Preferences 2")))
|
||||
self.setTitle(str(_("GUI Preferences")))
|
||||
|
||||
self.layout_field = self.option_dict()["layout"].get_field()
|
||||
self.layout_field.activated.connect(self.on_layout)
|
||||
@@ -117,6 +117,8 @@ class GeneralGUIPrefGroupUI2(OptionsGroupUI2):
|
||||
"First 6 digits are the color and the last 2\n"
|
||||
"digits are for alpha (transparency) level."
|
||||
),
|
||||
# FIXME: opacity slider?
|
||||
SeparatorOptionUI(),
|
||||
|
||||
HeadingOptionUI(label_text="Right-Left Selection Color", label_tooltip=None),
|
||||
ColorOptionUI(
|
||||
|
||||
@@ -2,14 +2,14 @@ from flatcamGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
from flatcamGUI.preferences.PreferencesSectionUI import PreferencesSectionUI
|
||||
from flatcamGUI.preferences.general.GeneralAppPrefGroupUI import GeneralAppPrefGroupUI
|
||||
from flatcamGUI.preferences.general.GeneralAPPSetGroupUI import GeneralAPPSetGroupUI
|
||||
from flatcamGUI.preferences.general.GeneralGUIPrefGroupUI import GeneralGUIPrefGroupUI2
|
||||
from flatcamGUI.preferences.general.GeneralGUIPrefGroupUI import GeneralGUIPrefGroupUI
|
||||
|
||||
|
||||
class GeneralPreferencesUI(PreferencesSectionUI):
|
||||
|
||||
def __init__(self, decimals, **kwargs):
|
||||
self.decimals = decimals
|
||||
self.general_gui_group = GeneralGUIPrefGroupUI2(decimals=self.decimals)
|
||||
self.general_gui_group = GeneralGUIPrefGroupUI(decimals=self.decimals)
|
||||
self.general_app_group = GeneralAppPrefGroupUI(decimals=self.decimals)
|
||||
self.general_app_set_group = GeneralAPPSetGroupUI(decimals=self.decimals)
|
||||
super().__init__(**kwargs)
|
||||
|
||||
Reference in New Issue
Block a user