Skip to content
Permalink
Browse files

[dbmanager] vectorize icons to fix toolbar in hidpi context

  • Loading branch information
nirvn committed Jul 2, 2018
1 parent 9b0241c commit 53d4ad3fa168b0a0eb7bb94bde686fff00843758
@@ -234,20 +234,23 @@
<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/mActionDraw.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>
@@ -1,22 +1 @@
<svg height="24" width="24" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -8)">
<path d="m2.5 15.5h19v14h-19z" fill="#e6e6e6" stroke="#6e97c4"/>
<path d="m2.5 10.5h19v5h-19z" fill="#bad9ec" stroke="#6e97c4"/>
<path d="m5 13h4" fill="none" overflow="visible" stroke="#6e97c4" stroke-width="2"/>
<path d="m11 13h7.999999" fill="none" stroke="#6e97c4" stroke-width="2"/>
<path d="m5 17.5h4" fill="none" overflow="visible" stroke="#6e97c4"/>
<path d="m11 17.5h7.999999" fill="none" stroke="#6e97c4"/>
<path d="m5 20.5h4" fill="none" overflow="visible" stroke="#6e97c4"/>
<path d="m11 20.5h7.999999" fill="none" stroke="#6e97c4"/>
<path d="m5 23.5h4" fill="none" overflow="visible" stroke="#6e97c4"/>
<path d="m11 23.5h7.999999" fill="none" stroke="#6e97c4"/>
<path d="m5 26.5h4" fill="none" overflow="visible" stroke="#6e97c4"/>
<path d="m11 26.5h7.999999" fill="none" stroke="#6e97c4"/>
<g transform="matrix(.69230769 0 0 .69230769 1.8461539 9.8461539)">
<rect fill="#5a8c5a" height="13" rx="2.6149371" ry="2.6149368" width="13" x="19" y="19"/>
<path d="m21.6 25.499999l7.8 0" style="fill:#fff;fill-rule:evenodd;stroke:#fff;stroke-width:2.5999999;stroke-linecap:round;stroke-linejoin:round;overflow:visible"/>
<path d="m25.5 29.399999l0-7.799999" style="fill:#fff;fill-rule:evenodd;stroke:#fff;stroke-width:2.5999999;stroke-linecap:round;stroke-linejoin:round;overflow:visible"/>
<path d="m20.3 25.499999h10.4c0 0 0 0 0-2.6 0-2.599999-.65-2.599999-5.2-2.599999-4.55 0-5.2 0-5.2 2.599999 0 2.6 0 2.6 0 2.6z" fill="#fcffff" fill-rule="evenodd" opacity=".3"/>
</g>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M2.5 7.5h19v14h-19z" fill="#e6e6e6" stroke="#6e97c4"/><path d="M2.5 2.5h19v5h-19z" fill="#bad9ec" stroke="#6e97c4"/><path overflow="visible" d="M5 5h4" fill="none" stroke="#6e97c4" stroke-width="2"/><path d="M11 5h8" fill="none" stroke="#6e97c4" stroke-width="2"/><path overflow="visible" d="M5 9.5h4" fill="none" stroke="#6e97c4"/><path d="M11 9.5h8" fill="none" stroke="#6e97c4"/><path overflow="visible" d="M5 12.5h4" fill="none" stroke="#6e97c4"/><path d="M11 12.5h8" fill="none" stroke="#6e97c4"/><path overflow="visible" d="M5 15.5h4" fill="none" stroke="#6e97c4"/><path d="M11 15.5h8" fill="none" stroke="#6e97c4"/><path overflow="visible" d="M5 18.5h4" fill="none" stroke="#6e97c4"/><path d="M11 18.5h8" fill="none" stroke="#6e97c4"/><g transform="translate(-.615 -.615) scale(.76923)" stroke-width=".9"><rect y="19" x="19" width="13" ry="2.353" rx="2.353" height="13" fill="#5a8c5a"/><path d="M21.6 25.5h7.8M25.5 29.4v-7.8" overflow="visible" fill="#fff" fill-rule="evenodd" stroke="#fff" stroke-width="2.34" stroke-linecap="round" stroke-linejoin="round"/><path d="M20.3 25.5h10.4v-2.6c0-2.6-.65-2.6-5.2-2.6s-5.2 0-5.2 2.6v2.6z" opacity=".3" fill="#fcffff" fill-rule="evenodd"/></g></svg>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M2.5 7.5h19v14h-19z" fill="#e6e6e6" stroke="#6e97c4"/><path d="M2.5 2.5h19v5h-19z" fill="#bad9ec" stroke="#6e97c4"/><path overflow="visible" d="M5 5h4" fill="none" stroke="#6e97c4" stroke-width="2"/><path d="M11 5h8" fill="none" stroke="#6e97c4" stroke-width="2"/><path overflow="visible" d="M5 9.5h4" fill="none" stroke="#6e97c4"/><path d="M11 9.5h8" fill="none" stroke="#6e97c4"/><path overflow="visible" d="M5 12.5h4" fill="none" stroke="#6e97c4"/><path d="M11 12.5h8" fill="none" stroke="#6e97c4"/><path overflow="visible" d="M5 15.5h4" fill="none" stroke="#6e97c4"/><path d="M11 15.5h8" fill="none" stroke="#6e97c4"/><path overflow="visible" d="M5 18.5h4" fill="none" stroke="#6e97c4"/><path d="M11 18.5h8" fill="none" stroke="#6e97c4"/><g transform="matrix(.9091 0 0 .9091 32.182 2.182)" stroke-width="1.1"><rect height="11" rx="2.213" width="11" x="-20" y="13" ry="2.213" fill="#c4a000"/><path d="M-15 14v2.063a2.501 2.501 0 0 0-1.375.78l-1.781-1.03-.5.874 1.781 1.032A2.46 2.46 0 0 0-17 18.5c0 .275.043.534.125.781l-1.781 1.032.5.875 1.781-1.032c.353.4.833.67 1.375.782V23h1v-2.063a2.501 2.501 0 0 0 1.375-.78l1.781 1.03.5-.875-1.781-1.03A2.46 2.46 0 0 0-12 18.5a2.46 2.46 0 0 0-.125-.781l1.781-1.032-.5-.875-1.781 1.032c-.353-.4-.833-.67-1.375-.782V14zm.5 3.5a1 1 0 1 1 0 2 1 1 0 0 1 0-2z" fill="#fcffff"/><path d="M-19 19l9-.01v-2C-10 14-11 14-14.5 14s-4.5 0-4.5 3v2z" opacity=".3" fill="#fcffff" fill-rule="evenodd"/></g></svg>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M2.5 7.5h19v14h-19z" fill="#e6e6e6" stroke="#6e97c4"/><path d="M2.5 2.5h19v5h-19z" fill="#bad9ec" stroke="#6e97c4"/><path overflow="visible" d="M5 5h4" fill="none" stroke="#6e97c4" stroke-width="2"/><path d="M11 5h8" fill="none" stroke="#6e97c4" stroke-width="2"/><path overflow="visible" d="M5 9.5h4" fill="none" stroke="#6e97c4"/><path d="M11 9.5h8" fill="none" stroke="#6e97c4"/><path overflow="visible" d="M5 12.5h4" fill="none" stroke="#6e97c4"/><path d="M11 12.5h8" fill="none" stroke="#6e97c4"/><path overflow="visible" d="M5 15.5h4" fill="none" stroke="#6e97c4"/><path d="M11 15.5h8" fill="none" stroke="#6e97c4"/><path overflow="visible" d="M5 18.5h4" fill="none" stroke="#6e97c4"/><path d="M11 18.5h8" fill="none" stroke="#6e97c4"/><g transform="translate(30.287 .805)"><rect y="13.195" x="-16.287" width="10" rx="2.011" height="10" ry="2.011" fill="#d26464"/><path d="M-15.287 18.195h8v-2c0-2-.5-2-4-2s-4 0-4 2v2z" opacity=".3" fill="#fcffff" fill-rule="evenodd"/><path d="M-13.409 20.316l4.243-4.242M-13.409 16.074l4.243 4.242" overflow="visible" fill="#fff" fill-rule="evenodd" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></g></svg>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M2.5 7.5h19v14h-19z" fill="#e6e6e6" stroke="#6e97c4"/><path d="M2.5 2.5h19v5h-19z" fill="#bad9ec" stroke="#6e97c4"/><path overflow="visible" d="M5 5h4" fill="none" stroke="#6e97c4" stroke-width="2"/><path d="M11 5h8" fill="none" stroke="#6e97c4" stroke-width="2"/><path overflow="visible" d="M5 9.5h4" fill="none" stroke="#6e97c4"/><path d="M11 9.5h8" fill="none" stroke="#6e97c4"/><path overflow="visible" d="M5 12.5h4" fill="none" stroke="#6e97c4"/><path d="M11 12.5h8" fill="none" stroke="#6e97c4"/><path overflow="visible" d="M5 15.5h4" fill="none" stroke="#6e97c4"/><path d="M11 15.5h8" fill="none" stroke="#6e97c4"/><path overflow="visible" d="M5 18.5h4" fill="none" stroke="#6e97c4"/><path d="M11 18.5h8" fill="none" stroke="#6e97c4"/><g stroke-width="1.002" stroke-linejoin="round" stroke-dashoffset=".5"><path d="M-23.498 8.015l4.993 2.895-5.96 4.333z" overflow="visible" fill="#505050" stroke="#2a2a2a" stroke-width=".752" stroke-linecap="round" transform="matrix(1 0 0 .99552 29.84 7.45)"/><path d="M-15.33-6.189l4.993 2.895-8.168 14.204-4.993-2.895 8.168-14.204" overflow="visible" fill="#fb7123" stroke="#474747" stroke-width=".752" stroke-linecap="round" transform="matrix(1 0 0 .99552 29.84 7.45)"/><path d="M-13.73-4.147l-7.207 12.533" overflow="visible" opacity=".5" fill="none" stroke="#fcffff" stroke-width="2.004" transform="matrix(1 0 0 .99552 29.84 7.45)"/><path d="M-12.066-3.183l-7.207 12.534" overflow="visible" opacity=".363" fill-opacity=".706" stroke="#000" stroke-width="2.004" transform="matrix(1 0 0 .99552 29.84 7.45)"/><path d="M-23.195 13.985l4.038-3.168-1.662-.963-2.376 4.13z" overflow="visible" fill="#969696" stroke="#969696" stroke-width=".501" stroke-linecap="square" transform="matrix(1 0 0 .99552 29.84 7.45)"/><path d="M-14.986-7.232l5.377 3.117-1.047 1.82-5.377-3.117z" overflow="visible" fill="#e6e6e6" stroke="#969696" stroke-width=".501" stroke-linecap="round" transform="matrix(1 0 0 .99552 29.84 7.45)"/><path d="M-23.882 13.763l.79-5.226 1.662.963z" overflow="visible" fill="#e6e6e6" stroke="#e6e6e6" stroke-width=".501" stroke-linecap="square" transform="matrix(1 0 0 .99552 29.84 7.45)"/></g></svg>
@@ -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
@@ -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("/mActionDraw.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"))
@@ -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)
@@ -241,17 +241,17 @@ def registerDatabaseActions(self, mainWindow):
mainWindow.registerAction(action, None, self.deleteActionSlot)
action.setShortcuts(QKeySequence.Delete)

action = QAction(QIcon(":/db_manager/actions/create_table"),
action = QAction(QgsApplication.getThemeIcon("/mActionCreateTable.svg"),
QApplication.translate(
"DBManagerPlugin", "&Create Table…"), self)
mainWindow.registerAction(action, QApplication.translate(
"DBManagerPlugin", "&Table"), self.createTableActionSlot)
action = QAction(QIcon(":/db_manager/actions/edit_table"),
action = QAction(QgsApplication.getThemeIcon("/mActionEditTable.svg"),
QApplication.translate(
"DBManagerPlugin", "&Edit Table…"), self)
mainWindow.registerAction(action, QApplication.translate(
"DBManagerPlugin", "&Table"), self.editTableActionSlot)
action = QAction(QIcon(":/db_manager/actions/del_table"),
action = QAction(QgsApplication.getThemeIcon("/mActionDeleteTable.svg"),
QApplication.translate(
"DBManagerPlugin", "&Delete Table/View…"), self)
mainWindow.registerAction(action, QApplication.translate(
@@ -327,14 +327,14 @@ def registerDatabaseActions(self, mainWindow):
mainWindow.registerAction(action, None, self.deleteActionSlot)
action.setShortcuts(QKeySequence.Delete)

action = QAction(QIcon(":/db_manager/actions/create_table"),
action = QAction(QgsApplication.getThemeIcon("/mActionCreateTable.svg"),
QApplication.translate("DBManagerPlugin", "&Create Table…"), self)
mainWindow.registerAction(action, QApplication.translate("DBManagerPlugin", "&Table"),
self.createTableActionSlot)
action = QAction(QIcon(":/db_manager/actions/edit_table"),
action = QAction(QgsApplication.getThemeIcon("/mActionEditTable.svg"),
QApplication.translate("DBManagerPlugin", "&Edit Table…"), self)
mainWindow.registerAction(action, QApplication.translate("DBManagerPlugin", "&Table"), self.editTableActionSlot)
action = QAction(QIcon(":/db_manager/actions/del_table"),
action = QAction(QgsApplication.getThemeIcon("/mActionDeleteTable.svg"),
QApplication.translate("DBManagerPlugin", "&Delete Table/View…"), self)
mainWindow.registerAction(action, QApplication.translate("DBManagerPlugin", "&Table"),
self.deleteTableActionSlot)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><g transform="matrix(3.77863 0 0 3.77946 .002 -.013)"><path d="M.53 1.455h5.29v4.022c-1.973.87-3.596.76-5.293 0z" fill="#6d97c4"/><path overflow="visible" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal" d="M.53 1.244v4.18l.53.265-.002-4.446z" color="#000" font-family="sans-serif" white-space="normal" fill="#bacee3"/><path overflow="visible" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal" d="M5.822 1.323v4.1l-1.058.398V1.324z" color="#000" font-family="sans-serif" white-space="normal" fill="#55769a"/><path d="M5.822 1.19h.265v3.943h-.265zm-5.557 0H.53v3.943H.264z" fill="#415a75"/><path overflow="visible" d="M.53 2.46v.45c.21.146.41.226.61.288.52.158 1.256.242 2.036.242s1.47-.087 1.99-.245c.24-.082.472-.15.656-.285v-.45c0 .065-.046.164-.17.25-.124.09-.313.168-.557.242-.49.147-1.16.223-1.92.223s-1.474-.075-1.96-.223c-.246-.07-.436-.15-.56-.24a.274.274 0 0 1-.126-.25z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal" color="#000" font-family="sans-serif" white-space="normal" fill="#415a75"/><ellipse ry=".794" rx="2.779" cy="1.191" cx="3.176" fill="#bacee3" stroke="#415a75" stroke-width=".265" stroke-linecap="round" stroke-linejoin="round"/><path overflow="visible" d="M.265 5.133c0 .17.095.328.254.44.155.115.392.21.652.29.52.16 1.224.223 2.004.223s1.474-.062 1.998-.222c.26-.078.494-.176.653-.29.156-.113.26-.27.26-.44h-.265s-.008.155-.14.245c-.125.09-.315.17-.56.244-.49.148-1.186.197-1.946.197s-1.446-.046-1.933-.195C1 5.553.81 5.473.686 5.38.563 5.295.53 5.196.53 5.133zm.265-1.35v.45c.21.146.41.225.612.287.52.158 1.254.243 2.034.243.78 0 1.47-.087 1.99-.245.24-.083.472-.15.656-.285v-.45c0 .065-.046.164-.17.25-.124.09-.313.168-.557.242-.49.147-1.16.223-1.92.223s-1.473-.075-1.96-.224c-.244-.07-.434-.15-.558-.24a.273.273 0 0 1-.128-.25z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal" color="#000" font-family="sans-serif" white-space="normal" fill="#415a75"/></g><rect x="13" y="13" width="11" height="11" rx="2.01" fill="#3c5a6e"/><path d="M14 19l9-.01v-2C23 14 22 14 18.5 14S14 14 14 17v2z" fill="#fcffff" fill-rule="evenodd" opacity=".3"/><path d="M21 16.5l1.5 1.99-1.5 1.99" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round"/><path d="M17.7 17v-1.25h-2.5v5.5h2.5v-1" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/><path d="M17 18.5h4.39" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round"/></svg>

0 comments on commit 53d4ad3

Please sign in to comment.
You can’t perform that action at this time.