Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[dbmanager] vectorize icons to fix toolbar in hidpi context
  • Loading branch information
nirvn committed Jul 2, 2018
1 parent 7cb80a2 commit 7e8ec00
Show file tree
Hide file tree
Showing 21 changed files with 28 additions and 85 deletions.
3 changes: 3 additions & 0 deletions images/images.qrc
Expand Up @@ -234,19 +234,22 @@
<file>themes/default/mActionConditionalFormatting.svg</file>
<file>themes/default/mActionContextHelp.png</file>
<file>themes/default/mActionCreateMemory.svg</file>
<file>themes/default/mActionCreateTable.svg</file>
<file>themes/default/mActionCustomProjection.svg</file>
<file>themes/default/mActionDecreaseBrightness.svg</file>
<file>themes/default/mActionDecreaseContrast.svg</file>
<file>themes/default/mActionDeleteAttribute.svg</file>
<file>themes/default/mActionDeletePart.svg</file>
<file>themes/default/mActionDeleteRing.svg</file>
<file>themes/default/mActionDeleteSelected.svg</file>
<file>themes/default/mActionDeleteTable.svg</file>
<file>themes/default/mActionDeselectAll.svg</file>
<file>themes/default/mActionDuplicateLayer.svg</file>
<file>themes/default/mActionDuplicateComposer.svg</file>
<file>themes/default/mActionEditCopy.svg</file>
<file>themes/default/mActionEditCut.svg</file>
<file>themes/default/mActionEditPaste.svg</file>
<file>themes/default/mActionEditTable.svg</file>
<file>themes/default/mActionExpandNewTree.svg</file>
<file>themes/default/mActionExpandTree.svg</file>
<file>themes/default/mActionFileExit.svg</file>
Expand Down
23 changes: 1 addition & 22 deletions images/themes/default/mActionAddTable.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/themes/default/mActionCreateTable.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/themes/default/mActionDeleteTable.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/themes/default/mActionEditTable.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 1 addition & 47 deletions images/themes/default/mActionRefresh.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions python/plugins/db_manager/db_manager.py
Expand Up @@ -29,7 +29,7 @@
from qgis.PyQt.QtGui import QIcon, QKeySequence

from qgis.gui import QgsMessageBar
from qgis.core import Qgis, QgsSettings, QgsMapLayer
from qgis.core import Qgis, QgsApplication, QgsSettings, QgsMapLayer
from qgis.utils import OverrideCursor

from .info_viewer import InfoViewer
Expand Down Expand Up @@ -429,7 +429,7 @@ def setupUi(self):
sep.setObjectName("DB_Manager_DbMenu_placeholder")
sep.setVisible(False)

self.actionRefresh = self.menuDb.addAction(QIcon(":/db_manager/actions/refresh"), self.tr("&Refresh"),
self.actionRefresh = self.menuDb.addAction(QgsApplication.getThemeIcon("/mActionRefresh.svg"), self.tr("&Refresh"),
self.refreshActionSlot, QKeySequence("F5"))
self.actionSqlWindow = self.menuDb.addAction(QIcon(":/db_manager/actions/sql_window"), self.tr("&SQL Window"),
self.runSqlWindow, QKeySequence("F2"))
Expand Down Expand Up @@ -463,5 +463,11 @@ def setupUi(self):
# add actions to the toolbar
self.toolBar.addAction(self.actionRefresh)
self.toolBar.addAction(self.actionSqlWindow)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionImport)
self.toolBar.addAction(self.actionExport)

widget = self.toolBar.widgetForAction(self.actionImport)
widget.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
widget = self.toolBar.widgetForAction(self.actionExport)
widget.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)

0 comments on commit 7e8ec00

Please sign in to comment.