src/eric7/WebBrowser/StatusBar/ImagesIcon.py

branch
eric7
changeset 9413
80c06d472826
parent 9221
bf71ee032bb4
child 9473
3f23dbf37dbe
equal deleted inserted replaced
9412:45e7bb09c120 9413:80c06d472826
16 from PyQt6.QtWidgets import QGraphicsColorizeEffect, QMenu 16 from PyQt6.QtWidgets import QGraphicsColorizeEffect, QMenu
17 from PyQt6.QtWebEngineCore import QWebEngineSettings 17 from PyQt6.QtWebEngineCore import QWebEngineSettings
18 18
19 from .StatusBarIcon import StatusBarIcon 19 from .StatusBarIcon import StatusBarIcon
20 20
21 import UI.PixmapCache 21 from eric7.EricGui import EricPixmapCache
22 import Preferences 22 from eric7 import Preferences
23 23
24 24
25 class ImagesIcon(StatusBarIcon): 25 class ImagesIcon(StatusBarIcon):
26 """ 26 """
27 Class implementing the images loading status bar icon. 27 Class implementing the images loading status bar icon.
37 super().__init__(window) 37 super().__init__(window)
38 38
39 self.setToolTip( 39 self.setToolTip(
40 self.tr("Modify images loading settings temporarily" " or globally") 40 self.tr("Modify images loading settings temporarily" " or globally")
41 ) 41 )
42 self.__icon = UI.PixmapCache.getPixmap("filePixmap").scaled(16, 16) 42 self.__icon = EricPixmapCache.getPixmap("filePixmap").scaled(16, 16)
43 self.setPixmap(self.__icon) 43 self.setPixmap(self.__icon)
44 44
45 self._window.tabWidget().currentChanged.connect(self.__updateIcon) 45 self._window.tabWidget().currentChanged.connect(self.__updateIcon)
46 self.clicked.connect(self.__showMenu) 46 self.clicked.connect(self.__showMenu)
47 47
130 Private slot to toggle the global images loading setting. 130 Private slot to toggle the global images loading setting.
131 131
132 @param enable flag indicating the state to set 132 @param enable flag indicating the state to set
133 @type bool 133 @type bool
134 """ 134 """
135 from WebBrowser.WebBrowserWindow import WebBrowserWindow 135 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow
136 136
137 WebBrowserWindow.webSettings().setAttribute( 137 WebBrowserWindow.webSettings().setAttribute(
138 QWebEngineSettings.WebAttribute.AutoLoadImages, enable 138 QWebEngineSettings.WebAttribute.AutoLoadImages, enable
139 ) 139 )
140 Preferences.setWebBrowser("AutoLoadImages", enable) 140 Preferences.setWebBrowser("AutoLoadImages", enable)

eric ide

mercurial