54 """ |
55 """ |
55 Private method to populate the style combo box. |
56 Private method to populate the style combo box. |
56 """ |
57 """ |
57 curStyle = Preferences.getUI("Style") |
58 curStyle = Preferences.getUI("Style") |
58 styles = sorted(list(QStyleFactory.keys())) |
59 styles = sorted(list(QStyleFactory.keys())) |
59 self.styleComboBox.addItem(self.trUtf8('System'), "System") |
60 self.styleComboBox.addItem(self.tr('System'), "System") |
60 for style in styles: |
61 for style in styles: |
61 self.styleComboBox.addItem(style, style) |
62 self.styleComboBox.addItem(style, style) |
62 currentIndex = self.styleComboBox.findData(curStyle) |
63 currentIndex = self.styleComboBox.findData(curStyle) |
63 if currentIndex == -1: |
64 if currentIndex == -1: |
64 currentIndex = 0 |
65 currentIndex = 0 |
69 """ |
70 """ |
70 Private method to select the style sheet file via a dialog. |
71 Private method to select the style sheet file via a dialog. |
71 """ |
72 """ |
72 file = E5FileDialog.getOpenFileName( |
73 file = E5FileDialog.getOpenFileName( |
73 self, |
74 self, |
74 self.trUtf8("Select style sheet file"), |
75 self.tr("Select style sheet file"), |
75 self.styleSheetEdit.text(), |
76 self.styleSheetEdit.text(), |
76 self.trUtf8( |
77 self.tr( |
77 "Qt Style Sheets (*.qss);;Cascading Style Sheets (*.css);;" |
78 "Qt Style Sheets (*.qss);;Cascading Style Sheets (*.css);;" |
78 "All files (*)")) |
79 "All files (*)")) |
79 |
80 |
80 if file: |
81 if file: |
81 self.styleSheetEdit.setText(Utilities.toNativeSeparators(file)) |
82 self.styleSheetEdit.setText(Utilities.toNativeSeparators(file)) |