Skip to content
Permalink
Browse files

Add button to open style gallery in the style manager

  • Loading branch information
nyalldawson committed Jan 13, 2021
1 parent 2bf46cd commit bc3a55aa0778c09dd4f601e8f4ce0467d83cfb6c
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/gui/symbology/qgsstylemanagerdialog.cpp
@@ -47,6 +47,7 @@
#include <QStandardItemModel>
#include <QMenu>
#include <QClipboard>
#include <QDesktopServices>

#include "qgsapplication.h"
#include "qgslogger.h"
@@ -172,6 +173,14 @@ QgsStyleManagerDialog::QgsStyleManagerDialog( QgsStyle *style, QWidget *parent,
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsStyleManagerDialog::showHelp );
connect( buttonBox, &QDialogButtonBox::rejected, this, &QgsStyleManagerDialog::onClose );

QPushButton *downloadButton = buttonBox->addButton( tr( "Browse Online Styles" ), QDialogButtonBox::ResetRole );
downloadButton->setToolTip( tr( "Download new styles from the online QGIS style repository" ) );
downloadButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionFindReplace.svg" ) ) );
connect( downloadButton, &QPushButton::clicked, this, [ = ]
{
QDesktopServices::openUrl( QUrl( QStringLiteral( "https://plugins.qgis.org/styles" ) ) );
} );

mMessageBar = new QgsMessageBar();
mMessageBar->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed );
mVerticalLayout->insertWidget( 0, mMessageBar );

0 comments on commit bc3a55a

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