Skip to content
Permalink
Browse files

Add some icons for browser directory actions

  • Loading branch information
nyalldawson committed Nov 13, 2018
1 parent 561d90c commit 3eabce527c6ba3608c8e594d1a27dc3b9a1897bd
@@ -729,6 +729,9 @@
<file>themes/default/mIconExteriorRing.svg</file>
<file>themes/default/mIconInteriorRings.svg</file>
<file>themes/default/mIconFieldBinary.svg</file>
<file>themes/default/mActionTerminal.svg</file>
<file>themes/default/mIconFolder24.svg</file>
<file>themes/default/mActionNewFolder.svg</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M1.5 2.502V21.25s.03 1.25 1.212 1.25h18.576s1.21 0 1.21-1.25L22.5 5.833h-8.562L10.708 2.5H1.5z" fill="#eee" stroke="#888a85"/><g transform="translate(33)"><rect y="13" x="-20" width="11" rx="2.011" height="11" 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" width="24" height="24" version="1"><path d="M.994 20.406v.392c0 .65.523 1.173 1.173 1.173h19.554a1.17 1.17 0 0 0 1.173-1.173v-.392c0 .65-.054-2.013-.054-2.013l-21.775.424s-.071 2.24-.071 1.59z" opacity=".2"/><rect width="21.9" height="18.772" x=".994" y="2.012" rx="1.173" ry="1.173" fill="#4f4f4f"/><path d="M2.167 2.012A1.17 1.17 0 0 0 .994 3.185v.39c0-.65.523-1.172 1.173-1.172h19.554c.65 0 1.173.523 1.173 1.173v-.391a1.17 1.17 0 0 0-1.173-1.173z" opacity=".1" fill="#fff"/><path d="M3.1 5.399v-1.13L8 7.156v1.03l-4.9 2.888v-1.13l3.937-2.266z" aria-label="&gt;" style="fill:#e6e6e6" font-weight="400" font-size="40" font-family="sans-serif" letter-spacing="0" word-spacing="0" fill="#e6e6e6"/><path fill="#e6e6e6" d="M9 10h4v1H9z"/></svg>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M1.5 2.502V21.25s.03 1.25 1.212 1.25h18.576s1.21 0 1.21-1.25L22.5 5.833h-8.562L10.708 2.5H1.5z" fill="#eee" stroke="#888a85"/></svg>
@@ -53,7 +53,7 @@ void QgsAppDirectoryItemGuiProvider::populateContextMenu( QgsDataItem *item, QMe

QMenu *newMenu = new QMenu( tr( "New" ), menu );

QAction *createFolder = new QAction( tr( "Directory…" ), menu );
QAction *createFolder = new QAction( QgsApplication::getThemeIcon( QStringLiteral( "mActionNewFolder.svg" ) ), tr( "Directory…" ), menu );
connect( createFolder, &QAction::triggered, this, [ = ]
{
bool ok = false;
@@ -168,7 +168,7 @@ void QgsAppDirectoryItemGuiProvider::populateContextMenu( QgsDataItem *item, QMe

menu->addSeparator();

QAction *openFolder = new QAction( tr( "Open Directory…" ), menu );
QAction *openFolder = new QAction( QgsApplication::getThemeIcon( QStringLiteral( "mIconFolder24.svg" ) ), tr( "Open Directory…" ), menu );
connect( openFolder, &QAction::triggered, this, [ = ]
{
QDesktopServices::openUrl( QUrl::fromLocalFile( directoryItem->dirPath() ) );
@@ -177,7 +177,7 @@ void QgsAppDirectoryItemGuiProvider::populateContextMenu( QgsDataItem *item, QMe

if ( QgsGui::instance()->nativePlatformInterface()->capabilities() & QgsNative::NativeOpenTerminalAtPath )
{
QAction *openTerminal = new QAction( tr( "Open in Terminal…" ), menu );
QAction *openTerminal = new QAction( QgsApplication::getThemeIcon( QStringLiteral( "mActionTerminal.svg" ) ), tr( "Open in Terminal…" ), menu );
connect( openTerminal, &QAction::triggered, this, [ = ]
{
QgsGui::instance()->nativePlatformInterface()->openTerminalAtPath( directoryItem->dirPath() );

0 comments on commit 3eabce5

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