From ccccc78f9159645154be3ed1f854672154680303 Mon Sep 17 00:00:00 2001 From: Matt Lowe Date: Fri, 23 Jan 2015 14:34:20 +0100 Subject: [PATCH] Updated colors and alignment + star is now gold with black outline + aligned for users who are not buddies --- cockatrice/cockatrice.qrc | 1 + cockatrice/resources/buddy_icon.svg | 67 ++++++++++++++++-- cockatrice/resources/empty_icon.svg | 105 ++++++++++++++++++++++++++++ cockatrice/src/chatview.cpp | 2 + 4 files changed, 171 insertions(+), 4 deletions(-) create mode 100644 cockatrice/resources/empty_icon.svg diff --git a/cockatrice/cockatrice.qrc b/cockatrice/cockatrice.qrc index 73fa3f87e..5fb8ed399 100644 --- a/cockatrice/cockatrice.qrc +++ b/cockatrice/cockatrice.qrc @@ -56,6 +56,7 @@ resources/genders/unknown.svg resources/buddy_icon.svg + resources/empty_icon.svg resources/countries/ar.svg resources/countries/at.svg diff --git a/cockatrice/resources/buddy_icon.svg b/cockatrice/resources/buddy_icon.svg index e487714aa..fa32b8c37 100644 --- a/cockatrice/resources/buddy_icon.svg +++ b/cockatrice/resources/buddy_icon.svg @@ -5,6 +5,7 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" viewBox="0 0 64 64" @@ -27,7 +28,60 @@ + id="defs10"> + + + + + + + + + + + + + + + + diff --git a/cockatrice/resources/empty_icon.svg b/cockatrice/resources/empty_icon.svg new file mode 100644 index 000000000..ff4027a8f --- /dev/null +++ b/cockatrice/resources/empty_icon.svg @@ -0,0 +1,105 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/cockatrice/src/chatview.cpp b/cockatrice/src/chatview.cpp index 8daed9b80..e99df633f 100644 --- a/cockatrice/src/chatview.cpp +++ b/cockatrice/src/chatview.cpp @@ -137,6 +137,8 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use QMap buddyList = tabSupervisor->getUserListsTab()->getBuddyList()->getUsers(); if (buddyList.contains(sender)) cursor.insertImage(PixmapGenerator::generatePixmap(pixelSize, ":/resources/buddy_icon.svg").toImage()); + else + cursor.insertImage(PixmapGenerator::generatePixmap(pixelSize, ":/resources/empty_icon.svg").toImage()); } cursor.insertText(" "); }