mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-09-17 04:29:54 +00:00
prepare to release 1.10.3
+ added ability to set transparent background
This commit is contained in:
@ -96,12 +96,10 @@ class pyTextWidget(plasmascript.Applet):
|
||||
self.timer = QTimer()
|
||||
QObject.connect(self.timer, SIGNAL("timeout()"), self.startPolling)
|
||||
|
||||
self.theme = Plasma.Svg(self)
|
||||
self.initTooltip()
|
||||
self.reInit()
|
||||
self.applet.setLayout(self.ptm['layout'])
|
||||
self.theme = Plasma.Svg(self)
|
||||
self.theme.setImagePath("widgets/background")
|
||||
self.setBackgroundHints(Plasma.Applet.DefaultBackground)
|
||||
|
||||
self.setHasConfigurationInterface(True)
|
||||
|
||||
@ -694,6 +692,19 @@ class pyTextWidget(plasmascript.Applet):
|
||||
self.startPolling()
|
||||
|
||||
|
||||
def setTransparentBackground(self, hasBackground=2):
|
||||
"""function to set background to the widget"""
|
||||
if self.debug: qDebug("[PTM] [main.py] [setTransparentBackground]")
|
||||
if self.debug: qDebug("[PTM] [main.py] [setTransparentBackground] : Run function with hasBackground '%s'" %(hasBackground))
|
||||
if (hasBackground == 2):
|
||||
self.theme.setImagePath("widgets/background")
|
||||
self.setBackgroundHints(Plasma.Applet.DefaultBackground)
|
||||
else:
|
||||
self.theme.setImagePath("")
|
||||
self.setBackgroundHints(Plasma.Applet.NoBackground)
|
||||
|
||||
|
||||
|
||||
def setNetdev(self):
|
||||
"""function to set network device"""
|
||||
if self.debug: qDebug("[PTM] [main.py] [setNetdev]")
|
||||
|
Reference in New Issue
Block a user