From cbe6eaf4be28a35a907a0d5c06406885437121ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Tue, 26 Oct 2010 20:13:34 +0200 Subject: Create a 'connecting' icon. diff --git a/Swift/QtUI/QtStatusWidget.cpp b/Swift/QtUI/QtStatusWidget.cpp index 6971b33..db6d6c5 100644 --- a/Swift/QtUI/QtStatusWidget.cpp +++ b/Swift/QtUI/QtStatusWidget.cpp @@ -32,7 +32,7 @@ QtStatusWidget::QtStatusWidget(QWidget *parent) : QWidget(parent), editCursor_(Q connecting_ = false; setMaximumHeight(24); - connectingMovie_ = new QMovie(":/icons/throbber.gif"); + connectingMovie_ = new QMovie(":/icons/connecting.mng"); QHBoxLayout* mainLayout = new QHBoxLayout(this); mainLayout->setSpacing(0); diff --git a/Swift/QtUI/QtSystemTray.cpp b/Swift/QtUI/QtSystemTray.cpp index 4393c74..d6180e6 100644 --- a/Swift/QtUI/QtSystemTray.cpp +++ b/Swift/QtUI/QtSystemTray.cpp @@ -11,7 +11,7 @@ #include namespace Swift { -QtSystemTray::QtSystemTray() : QObject(), onlineIcon_(":icons/online.png"), awayIcon_(":icons/away.png"), dndIcon_(":icons/dnd.png"), offlineIcon_(":icons/offline.png"), newMessageIcon_(":icons/new-chat.png"), throbberMovie_(":/icons/throbber.gif"), unreadMessages_(false), connecting_(false) { +QtSystemTray::QtSystemTray() : QObject(), onlineIcon_(":icons/online.png"), awayIcon_(":icons/away.png"), dndIcon_(":icons/dnd.png"), offlineIcon_(":icons/offline.png"), newMessageIcon_(":icons/new-chat.png"), throbberMovie_(":/icons/connecting.mng"), unreadMessages_(false), connecting_(false) { trayIcon_ = new QSystemTrayIcon(offlineIcon_); connect(trayIcon_, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(handleIconActivated(QSystemTrayIcon::ActivationReason))); connect(&throbberMovie_, SIGNAL(frameChanged(int)), this, SLOT(handleThrobberFrameChanged(int))); diff --git a/Swift/QtUI/Swift.qrc b/Swift/QtUI/Swift.qrc index 6c8e027..9a80339 100644 --- a/Swift/QtUI/Swift.qrc +++ b/Swift/QtUI/Swift.qrc @@ -5,6 +5,7 @@ ../resources/logo/logo-chat-16.png ../resources/logo/logo-shaded-text.256.png ../resources/icons/online.png + ../resources/icons/connecting.mng ../resources/icons/away.png ../resources/icons/dnd.png ../resources/icons/offline.png diff --git a/Swift/resources/icons/connecting.mng b/Swift/resources/icons/connecting.mng new file mode 100644 index 0000000..7ab0539 Binary files /dev/null and b/Swift/resources/icons/connecting.mng differ diff --git a/Swift/resources/icons/create_connecting_icon.sh b/Swift/resources/icons/create_connecting_icon.sh new file mode 100755 index 0000000..940a1df --- /dev/null +++ b/Swift/resources/icons/create_connecting_icon.sh @@ -0,0 +1,16 @@ +set -x + +all_files= +for i in 0 10 20 30 40 50 60 70 80 90 100; do + target=connecting.$i.png + if [[ "$i" != "0" ]]; then + all_files="$all_files $target" + fi + if [[ "$i" != "100" ]]; then + all_files_inv="$target $all_files_inv" + fi + cp online.png $target + mogrify -modulate 100,$i $target +done +convert -delay 8 -background none $all_files $all_files_inv connecting.mng +rm connecting.*.png -- cgit v0.10.2-6-g49f6