diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-10-20 14:35:20 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-10-22 06:32:50 +0000 |
commit | a63b5eb711cc50efe2725d716e0774e147376d25 (patch) | |
tree | 7886e4ed2742af6b86e24b57cc7785d2cebde02d /ui/qt/main_welcome.cpp | |
parent | 528894e72f973c5db5dc76c975620754f7bbe5aa (diff) |
Qt: Make "Learn" on the welcome screen clickable.
Make the "Learn" header a ClickableLabel to match "Open" and "Capture".
Link to the docs page for now. Adjust its stylesheet and properties to
match ast well.
Change-Id: Id9c7c05269de8134af28f0f9c1e2820a60442236
Reviewed-on: https://code.wireshark.org/review/18358
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/main_welcome.cpp')
-rw-r--r-- | ui/qt/main_welcome.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/ui/qt/main_welcome.cpp b/ui/qt/main_welcome.cpp index 8f2df3e290..ce1162e5f2 100644 --- a/ui/qt/main_welcome.cpp +++ b/ui/qt/main_welcome.cpp @@ -26,6 +26,7 @@ #include <epan/prefs.h> #include "ui/capture_globals.h" +#include "ui/help_url.h" #include "ws_version_info.h" @@ -37,6 +38,7 @@ #include "wireshark_application.h" #include <QClipboard> +#include <QDesktopServices> #include <QDir> #include <QListWidget> #include <QMenu> @@ -97,17 +99,16 @@ MainWelcome::MainWelcome(QWidget *parent) : .arg(tango_sky_blue_2, 6, 16, QChar('0')); // Background color welcome_ui_->mainWelcomeBanner->setStyleSheet(welcome_ss); - QString title_ss = QString( - "QLabel {" - " color: #%1;" - "}" - ) - .arg(tango_aluminium_4, 6, 16, QChar('0')); // Text color - QString title_button_ss = title_ss + QString( - "QLabel::hover {" + QString title_button_ss = QString( + "QLabel {" " color: #%1;" "}" - ).arg(tango_sky_blue_4, 6, 16, QChar('0')); + "QLabel::hover {" + " color: #%2;" + "}" + ) + .arg(tango_aluminium_4, 6, 16, QChar('0')) // Text color + .arg(tango_sky_blue_4, 6, 16, QChar('0')); // Hover color // XXX Is there a better term than "flavor"? Provider? Admonition (a la DocBook)? // Release_source? @@ -138,7 +139,7 @@ MainWelcome::MainWelcome(QWidget *parent) : } welcome_ui_->captureLabel->setStyleSheet(title_button_ss); welcome_ui_->recentLabel->setStyleSheet(title_button_ss); - welcome_ui_->helpLabel->setStyleSheet(title_ss); + welcome_ui_->helpLabel->setStyleSheet(title_button_ss); #ifdef Q_OS_MAC recent_files_->setAttribute(Qt::WA_MacShowFocusRect, false); @@ -503,6 +504,11 @@ void MainWelcome::on_captureLabel_clicked() wsApp->doTriggerMenuItem(WiresharkApplication::CaptureOptionsDialog); } +void MainWelcome::on_helpLabel_clicked() +{ + QDesktopServices::openUrl(QUrl(topic_online_url(ONLINEPAGE_DOCS))); +} + void MainWelcome::on_recentLabel_clicked() { wsApp->doTriggerMenuItem(WiresharkApplication::FileOpenDialog); |