Profile reset, Scroll past end, HTML whitespace error fixed

This commit is contained in:
BasioMeusPuga
2017-11-15 14:50:24 +05:30
parent dc9e2720f2
commit c91d643717
3 changed files with 48 additions and 15 deletions

View File

@@ -9,7 +9,7 @@ class Settings:
self.parent_window = parent
self.settings = QtCore.QSettings('Lector', 'Lector')
self.default_profile1 = {
default_profile1 = {
'font': 'Noto Sans',
'foreground': '#000000',
'background': '#d8d8d8',
@@ -17,7 +17,7 @@ class Settings:
'font_size': 20,
'line_spacing': 1.5}
self.default_profile2 = {
default_profile2 = {
'font': 'Roboto',
'foreground': '#c2c2c2',
'background': '#161616',
@@ -25,7 +25,7 @@ class Settings:
'font_size': 20,
'line_spacing': 1.5}
self.default_profile3 = {
default_profile3 = {
'font': 'Roboto',
'foreground': '#657b83',
'background': '#002b36',
@@ -33,6 +33,9 @@ class Settings:
'font_size': 20,
'line_spacing': 1.5}
self.default_profiles = [
default_profile1, default_profile2, default_profile3]
def read_settings(self):
self.settings.beginGroup('mainWindow')
self.parent_window.resize(self.settings.value(
@@ -50,10 +53,7 @@ class Settings:
'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])
'displayProfiles', self.default_profiles)
self.parent_window.current_profile_index = int(self.settings.value(
'currentProfileIndex', 0))
self.settings.endGroup()