aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2017-12-05 11:31:05 -0800
committerMichael Mann <mmann78@netscape.net>2017-12-06 00:46:38 +0000
commit99ea13988da6a6e5234aa4f5f3614b9aacfe1c5b (patch)
tree7b22a8ca54002d56ad2c20ca7341e0049610b377
parentabcb7ec8750a263d0307bc41d86b798e5ae02966 (diff)
Qt: Speed up the splash overlay.
Instead of blurring the main welcome screen during startup, draw a dark band under the progress bar. This reduces the startup time a bit here. Port over a date check from the GTK+ UI. Change-Id: I997d0fd2e4320702fe85ee2aea02ce835a423df9 Reviewed-on: https://code.wireshark.org/review/24711 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--docbook/release-notes.asciidoc4
-rw-r--r--ui/qt/main_welcome.cpp23
-rw-r--r--ui/qt/splash_overlay.cpp13
-rw-r--r--ui/qt/splash_overlay.h1
-rw-r--r--ui/qt/splash_overlay.ui133
5 files changed, 95 insertions, 79 deletions
diff --git a/docbook/release-notes.asciidoc b/docbook/release-notes.asciidoc
index acf51a6b39..3758f6a4a6 100644
--- a/docbook/release-notes.asciidoc
+++ b/docbook/release-notes.asciidoc
@@ -13,12 +13,14 @@ used for troubleshooting, analysis, development and education.
== What's New
-* Display filter buttons can now be edited / removed / disabled via a context
+* Display filter buttons can now be edited, disabled, and removed via a context
menu directly from the toolbar
* Drag&Drop filter fields to the display filter toolbar or edit to create
a button on the fly or apply the filter as a display filter.
+* Application startup time has been reduced.
+
* The installation step for Wireshark will now install headers required to
build plugins. A pkg-config file is provided to help with this
(see doc/plugins.example for details). Note you must still rebuild all
diff --git a/ui/qt/main_welcome.cpp b/ui/qt/main_welcome.cpp
index 303308fca7..ca3d995d7c 100644
--- a/ui/qt/main_welcome.cpp
+++ b/ui/qt/main_welcome.cpp
@@ -38,6 +38,7 @@
#include "wireshark_application.h"
#include <QClipboard>
+#include <QDate>
#include <QDesktopServices>
#include <QDir>
#include <QListWidget>
@@ -47,10 +48,6 @@
#include <QUrl>
#include <QWidget>
-#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
-#include <QGraphicsBlurEffect>
-#endif
-
#ifndef VERSION_FLAVOR
#define VERSION_FLAVOR ""
#endif
@@ -200,12 +197,6 @@ MainWelcome::MainWelcome(QWidget *parent) :
connect(recent_files_, SIGNAL(itemActivated(QListWidgetItem *)), this, SLOT(openRecentItem(QListWidgetItem *)));
updateRecentCaptures();
-#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
- QGraphicsBlurEffect *blur = new QGraphicsBlurEffect(welcome_ui_->childContainer);
- blur->setBlurRadius(2);
- welcome_ui_->childContainer->setGraphicsEffect(blur);
-#endif
-
splash_overlay_ = new SplashOverlay(this);
}
@@ -247,7 +238,13 @@ void MainWelcome::interfaceListChanged()
void MainWelcome::appInitialized()
{
// XXX Add a "check for updates" link?
- QString full_release = tr("You are running Wireshark ");
+ QString full_release;
+ QDate today = QDate::currentDate();
+ if ((today.month() == 4 && today.day() == 1) || (today.month() == 7 && today.day() == 14)) {
+ full_release = tr("You are sniffing the glue that holds the Internet together using Wireshark ");
+ } else {
+ full_release = tr("You are running Wireshark ");
+ }
full_release += get_ws_vcs_version_info();
full_release += tr(".");
#ifdef HAVE_SOFTWARE_UPDATE
@@ -263,10 +260,6 @@ void MainWelcome::appInitialized()
#endif
welcome_ui_->fullReleaseLabel->setText(full_release);
-#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
- welcome_ui_->childContainer->setGraphicsEffect(NULL);
-#endif
-
#ifdef HAVE_LIBPCAP
welcome_ui_->captureFilterComboBox->lineEdit()->setText(global_capture_opts.default_options.cfilter);
#endif // HAVE_LIBPCAP
diff --git a/ui/qt/splash_overlay.cpp b/ui/qt/splash_overlay.cpp
index 3399bea6d8..a8d7a4d33d 100644
--- a/ui/qt/splash_overlay.cpp
+++ b/ui/qt/splash_overlay.cpp
@@ -47,7 +47,6 @@ void splash_update(register_action_e action, const char *message, void *) {
SplashOverlay::SplashOverlay(QWidget *parent) :
QWidget(parent),
so_ui_(new Ui::SplashOverlay),
- blurred_(false),
last_action_(RA_NONE),
register_cur_(0)
{
@@ -64,16 +63,19 @@ SplashOverlay::SplashOverlay(QWidget *parent) :
elapsed_timer_.start();
QColor bg = QColor(tango_aluminium_6);
- bg.setAlphaF(0.4);
+ bg.setAlphaF(0.2);
QPalette pal;
pal.setColor(QPalette::Background, bg);
setPalette(pal);
setAutoFillBackground(true);
setStyleSheet(QString(
+ "QFrame#progressBand {"
+ " background: %1;"
+ "}"
"QLabel {"
" color: white;"
- " background: rgba(0,0,0,0);"
+ " background: transparent;"
"}"
"QProgressBar {"
" height: 1em;"
@@ -81,13 +83,14 @@ SplashOverlay::SplashOverlay(QWidget *parent) :
" border: 0.1em solid white;"
" border-radius: 0.2em;"
" color: white;"
- " background: rgba(0,0,0,0);"
+ " background: transparent;"
"}"
"QProgressBar::chunk {"
" width: 0.1em;"
" background: rgba(255, 255, 255, 50%);"
"}"
- ));
+ )
+ .arg(QColor(tango_aluminium_4).name()));
connect(wsApp, SIGNAL(splashUpdate(register_action_e,const char*)),
this, SLOT(splashUpdate(register_action_e,const char*)));
diff --git a/ui/qt/splash_overlay.h b/ui/qt/splash_overlay.h
index 03c06d9ed2..ba667ad19d 100644
--- a/ui/qt/splash_overlay.h
+++ b/ui/qt/splash_overlay.h
@@ -47,7 +47,6 @@ public:
private:
Ui::SplashOverlay *so_ui_;
- bool blurred_;
register_action_e last_action_;
int register_cur_;
QElapsedTimer elapsed_timer_;
diff --git a/ui/qt/splash_overlay.ui b/ui/qt/splash_overlay.ui
index ab043c7703..657daefdfb 100644
--- a/ui/qt/splash_overlay.ui
+++ b/ui/qt/splash_overlay.ui
@@ -13,84 +13,103 @@
<height>300</height>
</rect>
</property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
+ <layout class="QVBoxLayout" name="verticalLayout_2" stretch="3,0,6">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
<item>
- <spacer name="horizontalSpacer">
+ <spacer name="verticalSpacer_2">
<property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
- <width>116</width>
- <height>50</height>
+ <width>20</width>
+ <height>53</height>
</size>
</property>
</spacer>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <spacer name="verticalSpacer_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="actionLabel">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QProgressBar" name="progressBar">
- <property name="value">
- <number>24</number>
- </property>
- <property name="textVisible">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
+ <widget class="QFrame" name="progressBand">
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>116</width>
+ <height>50</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="actionLabel">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QProgressBar" name="progressBar">
+ <property name="value">
+ <number>24</number>
+ </property>
+ <property name="textVisible">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>116</width>
+ <height>50</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
</item>
<item>
- <spacer name="horizontalSpacer_2">
+ <spacer name="verticalSpacer">
<property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
- <width>116</width>
- <height>50</height>
+ <width>20</width>
+ <height>108</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
+ <resources/>
<connections/>
</ui>