Skip to content

Commit

Permalink
Add button to open style gallery in the style manager
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 13, 2021
1 parent 2bf46cd commit bc3a55a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/gui/symbology/qgsstylemanagerdialog.cpp
Expand Up @@ -47,6 +47,7 @@
#include <QStandardItemModel>
#include <QMenu>
#include <QClipboard>
#include <QDesktopServices>

#include "qgsapplication.h"
#include "qgslogger.h"
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit bc3a55a

Please sign in to comment.