Skip to content

Commit

Permalink
Update and vectorize the DB manager icon (#5262)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkinglinz authored and nirvn committed Oct 3, 2017
1 parent b27382d commit da4cfd5
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions images/images.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<file>themes/default/console/iconSyntaxErrorConsole.png</file>
<file>themes/default/console/iconResetColorConsole.png</file>
<file>themes/default/copyright_label.svg</file>
<file>themes/default/dbmanager.svg</file>
<file>themes/default/extents.svg</file>
<file>themes/default/gpsicons/barchart.svg</file>
<file>themes/default/gpsicons/polarchart.svg</file>
Expand Down
1 change: 1 addition & 0 deletions images/themes/default/dbmanager.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions python/plugins/db_manager/db_manager_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from qgis.PyQt.QtWidgets import QAction, QApplication
from qgis.PyQt.QtGui import QIcon

from qgis.core import QgsProject, QgsMapLayer, QgsDataSourceUri
from qgis.core import QgsProject, QgsMapLayer, QgsDataSourceUri, QgsApplication

from . import resources_rc # NOQA

Expand All @@ -37,8 +37,9 @@ def __init__(self, iface):
self.dlg = None

def initGui(self):
self.action = QAction(QIcon(":/db_manager/icon"), QApplication.translate("DBManagerPlugin", "DB Manager"),
self.action = QAction(QgsApplication.getThemeIcon('dbmanager.svg'), QApplication.translate("DBManagerPlugin", "DB Manager"),
self.iface.mainWindow())

self.action.setObjectName("dbManager")
self.action.triggered.connect(self.run)
# Add toolbar button and menu item
Expand All @@ -51,7 +52,7 @@ def initGui(self):
else:
self.iface.addPluginToMenu(QApplication.translate("DBManagerPlugin", "DB Manager"), self.action)

self.layerAction = QAction(QIcon(":/db_manager/icon"), QApplication.translate("DBManagerPlugin", "Update Sql Layer"),
self.layerAction = QAction(QgsApplication.getThemeIcon('dbmanager.svg'), QApplication.translate("DBManagerPlugin", "Update Sql Layer"),
self.iface.mainWindow())
self.layerAction.setObjectName("dbManagerUpdateSqlLayer")
self.layerAction.triggered.connect(self.onUpdateSqlLayer)
Expand Down
Binary file removed python/plugins/db_manager/icons/dbmanager.png
Binary file not shown.
1 change: 1 addition & 0 deletions python/plugins/db_manager/icons/dbmanager.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion python/plugins/db_manager/metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ qgisMinimumVersion=2.0
author=Giuseppe Sucameli
email=brush.tyler@gmail.com

icon=icons/dbmanager.png
icon=icons/dbmanager.svg

class_name=DBManagerPlugin
2 changes: 1 addition & 1 deletion python/plugins/db_manager/resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<file alias="warning">icons/warning-20px.png</file>
<file>icons/plugged.png</file>
<file>icons/unplugged.png</file>
<file alias="icon">icons/dbmanager.png</file>
<file>icons/about.png</file>
<file alias="icon">icons/dbmanager.svg</file>
</qresource>
<qresource prefix="/db_manager/actions">
<file alias="del_table">icons/toolbar/action_del_table.png</file>
Expand Down

0 comments on commit da4cfd5

Please sign in to comment.