A little further into finalizing Profile setting
This commit is contained in:
@@ -126,6 +126,30 @@ class Settings:
|
||||
self.parent_window = parent
|
||||
self.settings = QtCore.QSettings('Lector', 'Lector')
|
||||
|
||||
self.default_profile1 = {
|
||||
'font': 'Noto Sans',
|
||||
'foreground': '#000000',
|
||||
'background': '#d8d8d8',
|
||||
'padding': 140,
|
||||
'font_size': 20,
|
||||
'line_spacing': 1.5}
|
||||
|
||||
self.default_profile2 = {
|
||||
'font': 'Roboto',
|
||||
'foreground': '#c2c2c2',
|
||||
'background': '#161616',
|
||||
'padding': 140,
|
||||
'font_size': 20,
|
||||
'line_spacing': 1.5}
|
||||
|
||||
self.default_profile3 = {
|
||||
'font': 'Roboto',
|
||||
'foreground': '#657b83',
|
||||
'background': '#002b36',
|
||||
'padding': 140,
|
||||
'font_size': 20,
|
||||
'line_spacing': 1.5}
|
||||
|
||||
def read_settings(self):
|
||||
self.settings.beginGroup('mainWindow')
|
||||
self.parent_window.resize(self.settings.value(
|
||||
@@ -142,6 +166,14 @@ class Settings:
|
||||
self.parent_window.database_path = self.settings.value(
|
||||
'databasePath',
|
||||
QtCore.QStandardPaths.writableLocation(QtCore.QStandardPaths.AppDataLocation))
|
||||
self.parent_window.display_profiles = self.settings.value(
|
||||
'displayProfiles', [
|
||||
self.default_profile1,
|
||||
self.default_profile2,
|
||||
self.default_profile3])
|
||||
self.parent_window.current_profile_index = self.settings.value(
|
||||
'currentProfileIndex', 0)
|
||||
|
||||
self.settings.endGroup()
|
||||
|
||||
def save_settings(self):
|
||||
|
Reference in New Issue
Block a user