5 |
5 |
6 """ |
6 """ |
7 Module implementing the Print Remover configuration page. |
7 Module implementing the Print Remover configuration page. |
8 """ |
8 """ |
9 |
9 |
10 from __future__ import unicode_literals # __IGNORE_WARNING__ |
|
11 |
|
12 import os |
10 import os |
13 |
11 |
14 from PyQt5.QtCore import pyqtSlot |
12 from PyQt5.QtCore import pyqtSlot |
15 from PyQt5.QtWidgets import QListWidgetItem, QInputDialog, QLineEdit |
13 from PyQt5.QtWidgets import QListWidgetItem, QInputDialog, QLineEdit |
16 |
14 |
17 from E5Gui.E5Application import e5App |
15 from E5Gui.E5Application import e5App |
18 |
16 |
19 from Preferences.ConfigurationPages.ConfigurationPageBase import \ |
17 from Preferences.ConfigurationPages.ConfigurationPageBase import ( |
20 ConfigurationPageBase |
18 ConfigurationPageBase |
|
19 ) |
21 from .Ui_PrintRemoverPage import Ui_PrintRemoverPage |
20 from .Ui_PrintRemoverPage import Ui_PrintRemoverPage |
22 |
21 |
23 import UI.PixmapCache |
22 import UI.PixmapCache |
24 |
23 |
25 |
24 |
43 from PyQt5.QtGui import QPalette |
42 from PyQt5.QtGui import QPalette |
44 palette = e5App().palette() |
43 palette = e5App().palette() |
45 lightness = palette.color(QPalette.Window).lightness() |
44 lightness = palette.color(QPalette.Window).lightness() |
46 usesDarkPalette = lightness <= 128 |
45 usesDarkPalette = lightness <= 128 |
47 if usesDarkPalette: |
46 if usesDarkPalette: |
48 iconSuffix = "dark" |
47 iconSuffix = "dark" |
49 else: |
48 else: |
50 iconSuffix = "light" |
49 iconSuffix = "light" |
51 |
50 |
52 self.editButton.setIcon(UI.PixmapCache.getIcon( |
51 self.editButton.setIcon(UI.PixmapCache.getIcon( |
53 os.path.join("PrintRemover", "icons", |
52 os.path.join("PrintRemover", "icons", |