Skip to content

Commit 3eabce5

Browse files
committed
Add some icons for browser directory actions
1 parent 561d90c commit 3eabce5

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

images/images.qrc

+3
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,9 @@
729729
<file>themes/default/mIconExteriorRing.svg</file>
730730
<file>themes/default/mIconInteriorRings.svg</file>
731731
<file>themes/default/mIconFieldBinary.svg</file>
732+
<file>themes/default/mActionTerminal.svg</file>
733+
<file>themes/default/mIconFolder24.svg</file>
734+
<file>themes/default/mActionNewFolder.svg</file>
732735
</qresource>
733736
<qresource prefix="/images/tips">
734737
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
Loading
Loading
+1
Loading

src/app/browser/qgsinbuiltdataitemproviders.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void QgsAppDirectoryItemGuiProvider::populateContextMenu( QgsDataItem *item, QMe
5353

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

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

169169
menu->addSeparator();
170170

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

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

0 commit comments

Comments
 (0)