From a2c73db9ab3e9fe96befcacea482b96b3c3ee410 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Wed, 24 Aug 2016 11:20:37 +0200 Subject: Improve readability of message receipt icons This changes the icons for delivery success and delivery failure to vector graphics in SVG format. Added a slight white circle around the graphics for better readability on backgrounds with low contrast. Test-Information: Tested with Qt 5.4.2 and Qt 5.5.1 on OS X 10.11.6 on retina and non-retina systems. Noticeable better rendering due to SVG over PNG. Noticeable but not attracting attention white circle. Change-Id: I3c9be99854a300a4e40161a74964514aa47d292a diff --git a/Swift/QtUI/QtWebKitChatView.cpp b/Swift/QtUI/QtWebKitChatView.cpp index f8ced92..c3320d8 100644 --- a/Swift/QtUI/QtWebKitChatView.cpp +++ b/Swift/QtUI/QtWebKitChatView.cpp @@ -954,13 +954,13 @@ void QtWebKitChatView::setMessageReceiptState(const std::string& id, ChatWindow: QString xml; switch (state) { case ChatWindow::ReceiptReceived: - xml = ""; + xml = ""; break; case ChatWindow::ReceiptRequested: xml = ""; break; case ChatWindow::ReceiptFailed: - xml = ""; + xml = ""; } setReceiptXML(P2QSTRING(id), xml); } diff --git a/Swift/QtUI/Swift.qrc b/Swift/QtUI/Swift.qrc index 4c8fd55..6865d8e 100644 --- a/Swift/QtUI/Swift.qrc +++ b/Swift/QtUI/Swift.qrc @@ -44,7 +44,7 @@ ../resources/icons/star-unchecked2.png ../resources/icons/zzz.png ../resources/icons/stop.png - ../resources/icons/delivery-successful.png - ../resources/icons/delivery-failure.png + ../resources/icons/delivery-success.svg + ../resources/icons/delivery-failure.svg diff --git a/Swift/resources/icons/delivery-failure.png b/Swift/resources/icons/delivery-failure.png deleted file mode 100755 index fb59276..0000000 Binary files a/Swift/resources/icons/delivery-failure.png and /dev/null differ diff --git a/Swift/resources/icons/delivery-failure.svg b/Swift/resources/icons/delivery-failure.svg new file mode 100644 index 0000000..f0eeb46 --- /dev/null +++ b/Swift/resources/icons/delivery-failure.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/Swift/resources/icons/delivery-success.svg b/Swift/resources/icons/delivery-success.svg new file mode 100644 index 0000000..c37db99 --- /dev/null +++ b/Swift/resources/icons/delivery-success.svg @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/Swift/resources/icons/delivery-successful.png b/Swift/resources/icons/delivery-successful.png deleted file mode 100755 index b8ad992..0000000 Binary files a/Swift/resources/icons/delivery-successful.png and /dev/null differ diff --git a/Swift/resources/themes/Default/main.css b/Swift/resources/themes/Default/main.css index 05e7a04..d759ced 100644 --- a/Swift/resources/themes/Default/main.css +++ b/Swift/resources/themes/Default/main.css @@ -253,3 +253,8 @@ body { color: #aaa; font-style: italic; } + +/* receipt */ +span.swift_receipt > img { + height: 12px; +} -- cgit v0.10.2-6-g49f6