[QGIS-Developer] SVG toolbar icons suddenly appearing in black
Raymond Nijssen
r.nijssen at terglobo.nl
Thu Sep 23 02:26:11 PDT 2021
Hi devs!
The dark blue icons on my plugin toolbar buttons are black for some of
my customers (on Windows). One of them mentioned that they turned black
after a QGIS update. On my Linux system they are still blue. I guess it
has to do with Qt.
Here's the content of the svg file:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<defs>
<style>
.a {
fill: #1b3d6e;
}
</style>
</defs>
<path class="a"
d="M15.52,6.54a7.29,7.29,0,0,0-1.77,7.38l-9.9,9.9-.34,4.33,5.94-.6v-2.8h2.8V22h2.8l3.37-3.36a7.26,7.26,0,1,0-2.9-12Zm5.37,2.1a2,2,0,1,1,0,2.81A2,2,0,0,1,20.89,8.64Z"/>
</svg>
And here's how I make the buttons:
icon_fn = os.path.join(self.plugin_dir, 'img', 'icon_configuration.svg')
icon = QIcon(icon_fn)
action = QAction(icon, 'Configure', self.iface.mainWindow())
self.toolbar.addAction(action)
Hope anyone can clarify. The svg files were made by a designer, I guess
in some Adobe application. Hope I don't need adjusting them.
Kind regards,
Raymond
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icon_configuration.svg
Type: image/svg+xml
Size: 340 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210923/dd514771/attachment.svg>
More information about the QGIS-Developer
mailing list