Preferences/ConfigurationPages/HelpAppearancePage.py

changeset 945
8cd4d08fa9f6
parent 882
34b86be88bf0
child 1109
9552b5e16a07
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
15 from .ConfigurationPageBase import ConfigurationPageBase 15 from .ConfigurationPageBase import ConfigurationPageBase
16 from .Ui_HelpAppearancePage import Ui_HelpAppearancePage 16 from .Ui_HelpAppearancePage import Ui_HelpAppearancePage
17 17
18 import Preferences 18 import Preferences
19 import Utilities 19 import Utilities
20
20 21
21 class HelpAppearancePage(ConfigurationPageBase, Ui_HelpAppearancePage): 22 class HelpAppearancePage(ConfigurationPageBase, Ui_HelpAppearancePage):
22 """ 23 """
23 Class implementing the Help Viewer Appearance page. 24 Class implementing the Help Viewer Appearance page.
24 """ 25 """
36 37
37 # set initial values 38 # set initial values
38 self.standardFont = Preferences.getHelp("StandardFont") 39 self.standardFont = Preferences.getHelp("StandardFont")
39 self.standardFontSample.setFont(self.standardFont) 40 self.standardFontSample.setFont(self.standardFont)
40 self.standardFontSample.setText("{0} {1}"\ 41 self.standardFontSample.setText("{0} {1}"\
41 .format(self.standardFont.family(), 42 .format(self.standardFont.family(),
42 self.standardFont.pointSize())) 43 self.standardFont.pointSize()))
43 44
44 self.fixedFont = Preferences.getHelp("FixedFont") 45 self.fixedFont = Preferences.getHelp("FixedFont")
45 self.fixedFontSample.setFont(self.fixedFont) 46 self.fixedFontSample.setFont(self.fixedFont)
46 self.fixedFontSample.setText("{0} {1}"\ 47 self.fixedFontSample.setText("{0} {1}"\
47 .format(self.fixedFont.family(), 48 .format(self.fixedFont.family(),
48 self.fixedFont.pointSize())) 49 self.fixedFont.pointSize()))
49 50
50 self.helpColours["SaveUrlColor"] = \ 51 self.helpColours["SaveUrlColor"] = \
51 self.initColour("SaveUrlColor", self.secureURLsColourButton, 52 self.initColour("SaveUrlColor", self.secureURLsColourButton,
52 Preferences.getHelp) 53 Preferences.getHelp)
53 54
54 self.autoLoadImagesCheckBox.setChecked(Preferences.getHelp("AutoLoadImages")) 55 self.autoLoadImagesCheckBox.setChecked(Preferences.getHelp("AutoLoadImages"))
55 56
56 self.styleSheetEdit.setText(Preferences.getHelp("UserStyleSheet")) 57 self.styleSheetEdit.setText(Preferences.getHelp("UserStyleSheet"))
90 def on_secureURLsColourButton_clicked(self): 91 def on_secureURLsColourButton_clicked(self):
91 """ 92 """
92 Private slot to set the colour for secure URLs. 93 Private slot to set the colour for secure URLs.
93 """ 94 """
94 self.helpColours["SaveUrlColor"] = \ 95 self.helpColours["SaveUrlColor"] = \
95 self.selectColour(self.secureURLsColourButton, 96 self.selectColour(self.secureURLsColourButton,
96 self.helpColours["SaveUrlColor"]) 97 self.helpColours["SaveUrlColor"])
97 98
98 @pyqtSlot() 99 @pyqtSlot()
99 def on_styleSheetButton_clicked(self): 100 def on_styleSheetButton_clicked(self):
100 """ 101 """
107 "") 108 "")
108 109
109 if file: 110 if file:
110 self.styleSheetEdit.setText(Utilities.toNativeSeparators(file)) 111 self.styleSheetEdit.setText(Utilities.toNativeSeparators(file))
111 112
113
112 def create(dlg): 114 def create(dlg):
113 """ 115 """
114 Module function to create the configuration page. 116 Module function to create the configuration page.
115 117
116 @param dlg reference to the configuration dialog 118 @param dlg reference to the configuration dialog

eric ide

mercurial