10 import os |
10 import os |
11 |
11 |
12 from PyQt6.QtCore import Qt, pyqtSlot |
12 from PyQt6.QtCore import Qt, pyqtSlot |
13 from PyQt6.QtWidgets import QHeaderView, QLabel, QListWidgetItem, QMenu, QWidget |
13 from PyQt6.QtWidgets import QHeaderView, QLabel, QListWidgetItem, QMenu, QWidget |
14 |
14 |
15 from eric7 import Preferences, Utilities |
15 from eric7 import Preferences |
16 from eric7.EricGui import EricPixmapCache |
16 from eric7.EricGui import EricPixmapCache |
17 from eric7.EricWidgets.EricApplication import ericApp |
17 from eric7.EricWidgets.EricApplication import ericApp |
18 from eric7.EricWidgets.EricPathPicker import EricPathPickerModes |
18 from eric7.EricWidgets.EricPathPicker import EricPathPickerModes |
19 from eric7.Globals import getConfig |
19 from eric7.Globals import getConfig |
|
20 from eric7.SystemUtilities import FileSystemUtilities |
20 |
21 |
21 from .Ui_PreviewerQSS import Ui_PreviewerQSS |
22 from .Ui_PreviewerQSS import Ui_PreviewerQSS |
22 |
23 |
23 |
24 |
24 class PreviewerQSS(QWidget, Ui_PreviewerQSS): |
25 class PreviewerQSS(QWidget, Ui_PreviewerQSS): |
117 # icons directory |
118 # icons directory |
118 styleIconsPath = os.path.join( |
119 styleIconsPath = os.path.join( |
119 getConfig("ericIconDir"), "StyleIcons" |
120 getConfig("ericIconDir"), "StyleIcons" |
120 ) |
121 ) |
121 |
122 |
122 styleIconsPath = Utilities.fromNativeSeparators(styleIconsPath) |
123 styleIconsPath = FileSystemUtilities.fromNativeSeparators( |
|
124 styleIconsPath |
|
125 ) |
123 styleSheet = styleSheet.replace("${path}", styleIconsPath) |
126 styleSheet = styleSheet.replace("${path}", styleIconsPath) |
124 self.scrollAreaWidgetContents.setStyleSheet(styleSheet) |
127 self.scrollAreaWidgetContents.setStyleSheet(styleSheet) |
125 else: |
128 else: |
126 self.scrollAreaWidgetContents.setStyleSheet("") |
129 self.scrollAreaWidgetContents.setStyleSheet("") |
127 self.toolButton_1.menu().setStyleSheet( |
130 self.toolButton_1.menu().setStyleSheet( |