Qt: Convert the list management icons to templates.

Move the rest of the list management icons (remove, copy, clear, up, and
down) to the stock_icons directory. Convert them to templates by adding
".template" to their name.

Switch the UAT dialog to the "new" icons.

Convert the image README to .adoc.

To do:
- Make sure the icons are actually black.
- Convert the rest of the preference dialogs and other consumers.

Ping-Bug: 15511
Change-Id: Ie39afd52585ecbb644812be9f2762fede6e449ba
Reviewed-on: https://code.wireshark.org/review/33687
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2019-06-20 09:53:51 -07:00
parent 0c45cefab2
commit 0d150d241f
14 changed files with 101 additions and 115 deletions

47
image/README.adoc Normal file
View File

@ -0,0 +1,47 @@
= Introduction
This directory contains a set of images and icons for the Wireshark
suite of applications. Of particular note for people creating packages
for distribution are the files wireshark.ico, wiresharkdoc.ico,
wsicon*.png, and WiresharkDoc-*.png
File descriptions:
wsicon.svg::
Old vector source for the wireshark icon.
wsiconcap.svg::
Old vector source for the "capture" icon.
wsicondoc.svg::
Old vector source for the "document" icon.
wsicon16.png ... wsicon1024.png::
Wireshark application icons in various sizes
wsiconcap16.png ... wsiconcap1024.png::
“Capture in progress” application icon in various sizes
wsiconinst16.png ... wsiconinst1024.png::
Wireshark installer icons in various sizes
WiresharkDoc-16.png ... WiresharkDoc-256.png
Capture document icon in various sizes
wireshark.ico::
Windows application icon file with 16 and 32 pixel 3D logo icons, high and low color.
wiresharkdoc.ico::
Windows document icon file with 16 and 32 pixel 3D logo icons, high and low color.
*.rc.in::
MSVC++ resource templates
stock_icons::
Various stock icons. Names _mostly_ conform to the freedesktop.org
https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html[Icon Naming Specification].
For example, the INS specifies “list-add” and “list-remove”. and we've added “list-copy”, “list-move-up“, “list-move-down”, and “list-clear”.
The Wireshark application icon, document icon, and several toolbar icons were created by Elliott Aldrich.
The list-add and list-remove images were created by by Peter Hosey and released under CC-PD.
The list-clear images were created by Freepik, http://www.freepik.com from https://www.flaticon.com.

View File

@ -1,50 +0,0 @@
This directory contains a set of images and icons for the Wireshark
suite of applications. Of particular note for people creating packages
for distribution are the files wireshark.ico, wiresharkdoc.ico,
wsicon*.png, and WiresharkDoc-*.png
File descriptions:
File Description
wsicon.svg Old vector source for the wireshark icon.
wsiconcap.svg Old vector source for the "capture" icon.
wsicondoc.svg Old vector source for the "document" icon.
wsicon16.png Wireshark icons in various sizes
wsicon24.png
wsicon32.png
wsicon48.png
wsicon64.png
wsicon128.png
wsicon256.png
wsicon512.png
wsicon1024.png
wireshark.ico Windows application icon file with 16 and 32
pixel 3D logo icons, high and low color
wiresharkdoc.ico Windows document icon file with 16 and 32
pixel 3D logo icons, high and low color
wireshark.rc.in MSVC++ resource templates
editcap.rc.in
mergecap.rc.in
rawshark.rc.in
tshark.rc.in
tfshark.rc.in
text2pcap.rc.in
image/capture_comment.svg Capture comment (annotation) icons
image/capture_comment_add.png created from elements in
image/capture_comment_disabled.png accessories-text-editor.svg and
image/capture_comment_update.png paper-sheets.svg
list-add.png macOS style add / remove icons. Created by Peter Hosey.
minus-8.png Released under CC-PD.
copy-8.png macOS style copy icon.
delete_list.png by Freepik, http://www.freepik.com from https://www.flaticon.com
delete_list@2x.png

View File

@ -4,18 +4,26 @@
<file>wsicon-ask.png</file>
</qresource>
<qresource prefix="/stock">
<file>minus-8.png</file>
<file alias="plus-8.png">stock_icons/8x8/list-add.template.png</file>
<file>copy-8.png</file>
<file>delete_list.png</file>
<file>delete_list@2x.png</file>
<file>arrow_up.png</file>
<file>arrow_up@2x.png</file>
<file>arrow_down.png</file>
<file>arrow_down@2x.png</file>
<file alias="minus-8.png">stock_icons/8x8/list-remove.template.png</file>
<file alias="copy-8.png">stock_icons/8x8/list-copy.template.png</file>
<file alias="delete_list.png">stock_icons/8x8/list-clear.template.png</file>
<file alias="delete_list@2x.png">stock_icons/8x8/list-clear.template@2x.png</file>
<file alias="arrow_up.png">stock_icons/8x8/list-move-up.template.png</file>
<file alias="arrow_up@2x.png">stock_icons/8x8/list-move-up.template@2x.png</file>
<file alias="arrow_down.png">stock_icons/8x8/list-move-down.template.png</file>
<file alias="arrow_down@2x.png">stock_icons/8x8/list-move-down.template@2x.png</file>
</qresource>
<qresource prefix="">
<file>stock_icons/8x8/list-add.template.png</file>
<file>stock_icons/8x8/list-remove.template.png</file>
<file>stock_icons/8x8/list-copy.template.png</file>
<file>stock_icons/8x8/list-clear.template.png</file>
<file>stock_icons/8x8/list-clear.template@2x.png</file>
<file>stock_icons/8x8/list-move-up.template.png</file>
<file>stock_icons/8x8/list-move-up.template@2x.png</file>
<file>stock_icons/8x8/list-move-down.template.png</file>
<file>stock_icons/8x8/list-move-down.template@2x.png</file>
<file>stock_icons/14x14/x-capture-comment-update.png</file>
<file>stock_icons/14x14/x-capture-comment-update@2x.png</file>
<file>stock_icons/14x14/x-capture-filter-bookmark.png</file>

View File

Before

Width:  |  Height:  |  Size: 378 B

After

Width:  |  Height:  |  Size: 378 B

View File

Before

Width:  |  Height:  |  Size: 660 B

After

Width:  |  Height:  |  Size: 660 B

View File

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 147 B

View File

Before

Width:  |  Height:  |  Size: 294 B

After

Width:  |  Height:  |  Size: 294 B

View File

Before

Width:  |  Height:  |  Size: 445 B

After

Width:  |  Height:  |  Size: 445 B

View File

Before

Width:  |  Height:  |  Size: 294 B

After

Width:  |  Height:  |  Size: 294 B

View File

Before

Width:  |  Height:  |  Size: 412 B

After

Width:  |  Height:  |  Size: 412 B

View File

Before

Width:  |  Height:  |  Size: 74 B

After

Width:  |  Height:  |  Size: 74 B

View File

@ -17,6 +17,7 @@
#include <wsutil/report_message.h>
#include <ui/qt/widgets/copy_from_profile_menu.h>
#include <ui/qt/widgets/stock_icon_tool_button.h>
#include <ui/qt/utils/qt_ui_utils.h>
#include <QDesktopServices>
@ -40,6 +41,13 @@ UatDialog::UatDialog(QWidget *parent, epan_uat *uat) :
ok_button_ = ui->buttonBox->button(QDialogButtonBox::Ok);
help_button_ = ui->buttonBox->button(QDialogButtonBox::Help);
ui->newToolButton->setStockIcon("list-add");
ui->deleteToolButton->setStockIcon("list-remove");
ui->copyToolButton->setStockIcon("list-copy");
ui->moveUpToolButton->setStockIcon("list-move-up");
ui->moveDownToolButton->setStockIcon("list-move-down");
ui->clearToolButton->setStockIcon("list-clear");
#ifdef Q_OS_MAC
ui->newToolButton->setAttribute(Qt::WA_MacSmallSize, true);
ui->deleteToolButton->setAttribute(Qt::WA_MacSmallSize, true);

View File

@ -12,24 +12,18 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="TabnavTreeView" name="uatTreeView">
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
</widget>
<widget class="TabnavTreeView" name="uatTreeView"/>
</item>
<item>
<widget class="QLabel" name="hintLabel">
<property name="styleSheet">
<string notr="true">QLabel { color: red; }</string>
<string notr="true">QLabel { color: red; }</string>
</property>
<property name="text">
<string/>
</property>
<property name="textFormat">
<set>Qt::RichText</set>
<enum>Qt::RichText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
@ -39,99 +33,75 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,0,0,0,1">
<item>
<widget class="QToolButton" name="newToolButton">
<widget class="StockIconToolButton" name="newToolButton">
<property name="toolTip">
<string>Create a new entry.</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../image/stock_icons.qrc">
<normaloff>:/stock/plus-8.png</normaloff>:/stock/plus-8.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="deleteToolButton">
<property name="toolTip">
<string>Remove this entry.</string>
</property>
<property name="icon">
<iconset resource="../../image/stock_icons.qrc">
<normaloff>:/stock/minus-8.png</normaloff>:/stock/minus-8.png</iconset>
</property>
<widget class="StockIconToolButton" name="deleteToolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Remove this entry.</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="copyToolButton">
<widget class="StockIconToolButton" name="copyToolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Copy this entry.</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../image/stock_icons.qrc">
<normaloff>:/stock/copy-8.png</normaloff>:/stock/copy-8.png</iconset>
</property>
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="moveUpToolButton">
<widget class="StockIconToolButton" name="moveUpToolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Move entry up.</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../image/stock_icons.qrc">
<normaloff>:/stock/arrow_up.png</normaloff>:/stock/arrow_up.png</iconset>
</property>
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="moveDownToolButton">
<widget class="StockIconToolButton" name="moveDownToolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Move entry down.</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../image/stock_icons.qrc">
<normaloff>:/stock/arrow_down.png</normaloff>:/stock/arrow_down.png</iconset>
</property>
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="clearToolButton">
<widget class="StockIconToolButton" name="clearToolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Clear all entries.</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../image/stock_icons.qrc">
<normaloff>:/stock/delete_list.png</normaloff>:/stock/delete_list.png</iconset>
</property>
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item>
@ -178,10 +148,13 @@
<extends>QTreeView</extends>
<header>widgets/tabnav_tree_view.h</header>
</customwidget>
<customwidget>
<class>StockIconToolButton</class>
<extends>QToolButton</extends>
<header>widgets/stock_icon_tool_button.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../../image/stock_icons.qrc"/>
</resources>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>