18 |
18 |
19 from .ConfigurationPageBase import ConfigurationPageBase |
19 from .ConfigurationPageBase import ConfigurationPageBase |
20 from .Ui_EditorHighlightersPage import Ui_EditorHighlightersPage |
20 from .Ui_EditorHighlightersPage import Ui_EditorHighlightersPage |
21 |
21 |
22 import Preferences |
22 import Preferences |
23 from Globals import qVersionTuple |
|
24 |
23 |
25 |
24 |
26 class EditorHighlightersPage(ConfigurationPageBase, Ui_EditorHighlightersPage): |
25 class EditorHighlightersPage(ConfigurationPageBase, Ui_EditorHighlightersPage): |
27 """ |
26 """ |
28 Class implementing the Editor Highlighter Associations configuration page. |
27 Class implementing the Editor Highlighter Associations configuration page. |
38 self.setObjectName("EditorHighlightersPage") |
37 self.setObjectName("EditorHighlightersPage") |
39 |
38 |
40 self.editorLexerList.headerItem().setText( |
39 self.editorLexerList.headerItem().setText( |
41 self.editorLexerList.columnCount(), "") |
40 self.editorLexerList.columnCount(), "") |
42 header = self.editorLexerList.header() |
41 header = self.editorLexerList.header() |
43 if qVersionTuple() >= (5, 0, 0): |
42 header.setSectionResizeMode(QHeaderView.ResizeToContents) |
44 header.setSectionResizeMode(QHeaderView.ResizeToContents) |
|
45 else: |
|
46 header.setResizeMode(QHeaderView.ResizeToContents) |
|
47 header.setSortIndicator(0, Qt.AscendingOrder) |
43 header.setSortIndicator(0, Qt.AscendingOrder) |
48 |
44 |
49 try: |
45 try: |
50 self.extsep = os.extsep |
46 self.extsep = os.extsep |
51 except AttributeError: |
47 except AttributeError: |