summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/main_welcome.cpp72
-rw-r--r--ui/qt/tango_colors.h58
2 files changed, 97 insertions, 33 deletions
diff --git a/ui/qt/main_welcome.cpp b/ui/qt/main_welcome.cpp
index 28040f6f80..74c5c0ff25 100644
--- a/ui/qt/main_welcome.cpp
+++ b/ui/qt/main_welcome.cpp
@@ -31,6 +31,7 @@
#include "main_welcome.h"
#include "ui_main_welcome.h"
+#include "tango_colors.h"
#include "wireshark_application.h"
#include "interface_tree.h"
@@ -66,7 +67,6 @@
// painter.drawRect(border);
//}
-
MainWelcome::MainWelcome(QWidget *parent) :
QFrame(parent),
welcome_ui_(new Ui::MainWelcome)
@@ -82,32 +82,42 @@ MainWelcome::MainWelcome(QWidget *parent) :
iface_tree = welcome_ui_->interfaceTree;
recent_files_ = welcome_ui_->recentList;
- setStyleSheet(
- "MainWelcome {"
- " background: palette(light);"
- " color: palette(dark);"
- " padding: 2em;"
- " }"
- "QListWidget {"
- " border: 0;"
-// " border: 1px dotted blue;"
- "}"
-// "QListWidget::focus {"
-// " border: 1px dotted palette(mid);"
-// " background-color: palette(midlight);"
-// "}"
- "QListWidget::item::hover {"
- " background-color: palette(highlight);"
- " color: palette(highlighted-text);"
- "}"
- "QTreeWidget {"
- " border: 0;"
-// " border: 1px dotted green;"
- "}"
-// "QTreeWidget::focus {"
-// " border: 1px dotted palette(mid);"
-// " background-color: palette(midlight);"
-// "}"
+ setStyleSheet(QString(
+ "MainWelcome {"
+ " padding: 2em;"
+ " }"
+ "QWidget {"
+ " background-color: white;"
+ " color: #%1;"
+ " }"
+ "QListWidget {"
+ " border: 0;"
+// " border: 1px dotted blue;"
+ "}"
+// "QListWidget::focus {"
+// " border: 1px dotted palette(mid);"
+// "}"
+ "QListWidget::item::hover {"
+ " background-color: #%3;"
+ " color: #%4;"
+ "}"
+ "QListWidget::item:selected {"
+ " background-color: #%2;"
+ " color: white;"
+ "}"
+ "QTreeWidget {"
+ " border: 0;"
+// " border: 1px dotted green;"
+ "}"
+// "QTreeWidget::focus {"
+// " border: 1px dotted palette(mid);"
+// " background-color: palette(midlight);"
+// "}"
+ )
+ .arg(tango_aluminium_6, 6, 16, QChar('0')) // Text color
+ .arg(tango_sky_blue_2, 6, 16, QChar('0')) // Selected background
+ .arg(tango_aluminium_2, 6, 16, QChar('0')) // Hover background
+ .arg(tango_aluminium_6, 6, 16, QChar('0')) // Hover foreground
);
#ifdef Q_WS_MAC
@@ -129,16 +139,12 @@ MainWelcome::MainWelcome(QWidget *parent) :
// " background-color: palette(midlight);"
// " background-color: palette(midlight);"
// "}"
- "QListWidget::item:selected {"
- " background-color: palette(mid);"
- " color: palette(light);"
- "}"
);
recent_files_->setStyleSheet(
"QListWidget::item {"
- " padding-top: 0.1em;"
- " padding-bottom: 0.1em;"
+ " padding-top: 0.2em;"
+ " padding-bottom: 0.2em;"
"}"
"QListWidget::item::first {"
" padding-top: 0;"
diff --git a/ui/qt/tango_colors.h b/ui/qt/tango_colors.h
new file mode 100644
index 0000000000..04c436e60d
--- /dev/null
+++ b/ui/qt/tango_colors.h
@@ -0,0 +1,58 @@
+/* qt_gui_utils.h
+ * Tango theme colors
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __TANGO_COLORS_H__
+#define __TANGO_COLORS_H__
+
+// http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines
+
+const uint tango_butter_1 = 0xfce94f;
+const uint tango_butter_2 = 0xedd400;
+const uint tango_butter_3 = 0xc4a000;
+const uint tango_chameleon_1 = 0x8ae234;
+const uint tango_chameleon_2 = 0x73d216;
+const uint tango_chameleon_3 = 0x4e9a06;
+const uint tango_orange_1 = 0xfcaf3e;
+const uint tango_orange_2 = 0xf57900;
+const uint tango_orange_3 = 0xce5c00;
+const uint tango_sky_blue_1 = 0x729fcf;
+const uint tango_sky_blue_2 = 0x3465a4;
+const uint tango_sky_blue_3 = 0x204a87;
+const uint tango_plum_1 = 0xad7fa8;
+const uint tango_plum_2 = 0x75507b;
+const uint tango_plum_3 = 0x5c3566;
+const uint tango_chocolate_1 = 0xe9b96e;
+const uint tango_chocolate_2 = 0xc17d11;
+const uint tango_chocolate_3 = 0x8f5902;
+const uint tango_scarlet_red_1 = 0xef2929;
+const uint tango_scarlet_red_2 = 0xcc0000;
+const uint tango_scarlet_red_3 = 0xa40000;
+const uint tango_aluminium_1 = 0xeeeeec;
+const uint tango_aluminium_2 = 0xd3d7cf;
+const uint tango_aluminium_3 = 0xbabdb6;
+const uint tango_aluminium_4 = 0x888a85;
+const uint tango_aluminium_5 = 0x555753;
+const uint tango_aluminium_6 = 0x2e3436;
+
+#endif // __TANGO_COLORS_H__