- removed the setting for HDPI from Preferences and QSettings: QT6 does it automatically now

This commit is contained in:
Marius Stanciu
2021-08-28 22:42:44 +03:00
committed by Marius Stanciu
parent 4afc706e20
commit 30802901c7
4 changed files with 7 additions and 54 deletions

View File

@@ -1617,13 +1617,14 @@ class MainGUI(QtWidgets.QMainWindow):
self.clear_btn.setToolTip(
_("Clear the GUI settings for FlatCAM,\n"
"such as: layout, gui state, style, hdpi support etc.")
"such as: layout, gui state, style etc.")
)
self.pref_tab_bottom_layout_1.addWidget(self.clear_btn)
self.pref_tab_bottom_layout_2 = QtWidgets.QHBoxLayout()
self.pref_tab_bottom_layout_2.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight | QtCore.Qt.AlignmentFlag.AlignVCenter)
self.pref_tab_bottom_layout_2.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight |
QtCore.Qt.AlignmentFlag.AlignVCenter)
self.pref_tab_bottom_layout.addLayout(self.pref_tab_bottom_layout_2)
self.pref_apply_button = FCButton()

View File

@@ -104,22 +104,6 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
grid0.addWidget(self.style_label, 5, 0)
grid0.addWidget(self.style_combo, 5, 1)
# Enable High DPI Support
self.hdpi_cb = FCCheckBox('%s' % _('HDPI Support'))
self.hdpi_cb.setToolTip(
_("Enable High DPI support for the application.\n"
"It will be applied at the next app start.")
)
qsettings = QSettings("Open Source", "FlatCAM")
if qsettings.contains("hdpi"):
self.hdpi_cb.set_value(qsettings.value('hdpi', type=int))
else:
self.hdpi_cb.set_value(False)
self.hdpi_cb.stateChanged.connect(self.handle_hdpi)
grid0.addWidget(self.hdpi_cb, 6, 0, 1, 3)
# Enable Hover box
self.hover_cb = FCCheckBox('%s' % _('Hover Shape'))
self.hover_cb.setToolTip(
@@ -334,15 +318,6 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
# This will write the setting to the platform specific storage.
del qsettings
@staticmethod
def handle_hdpi(state):
# set current HDPI
qsettings = QSettings("Open Source", "FlatCAM")
qsettings.setValue('hdpi', state)
# This will write the setting to the platform specific storage.
del qsettings
# Setting selection colors (left - right) handlers
def on_sf_color_entry(self):
self.app.defaults['global_sel_fill'] = self.app.defaults['global_sel_fill'][7:9]