aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/color_utils.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@zing.org>2014-10-25 12:36:32 -0700
committerGerald Combs <gerald@wireshark.org>2014-10-25 19:39:36 +0000
commit3d2ec1613b826faf6d10702147cea96286e44516 (patch)
tree05c80a73c1f255dfe5e861c0d162e4c7267468ad /ui/qt/color_utils.h
parent41f6923b3049dfb57bef544a4c580f256f807e85 (diff)
Qt: ByteViewText fixups.
Calculate our X coordinate using floating point arithmetic. This should hopefully fix the wierd subpixel text shifting for some font sizes. Add alpha blending convenience routines to ColorUtils. Use them to create the offset colors. The button color palette wasn't working very well under Ubuntu. Use QFontMetricsF::lineSpacing for our line height. Note that we don't support the BOLD gui.hex_dump_highlight_style preference. Leave a hint for anyone wishing to do so. Comment out related code for now. Change-Id: Ief77c9c8d00e05560cae6ecd781bd309027f6f5a Reviewed-on: https://code.wireshark.org/review/4927 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/color_utils.h')
-rw-r--r--ui/qt/color_utils.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/qt/color_utils.h b/ui/qt/color_utils.h
index 484001ddf4..abbd4497a2 100644
--- a/ui/qt/color_utils.h
+++ b/ui/qt/color_utils.h
@@ -28,8 +28,9 @@
#include "color.h"
-#include <QObject>
+#include <QBrush>
#include <QColor>
+#include <QObject>
class ColorUtils : public QObject
{
@@ -39,6 +40,8 @@ public:
static QColor fromColorT(color_t *color);
static QColor fromColorT(color_t color);
+ static QRgb alphaBlend(const QColor &color1, const QColor &color2, qreal alpha);
+ static QRgb alphaBlend(const QBrush &brush1, const QBrush &brush2, qreal alpha);
signals: