diff --git a/img/add.png b/img/add.png deleted file mode 100644 index ec775c74e..000000000 Binary files a/img/add.png and /dev/null differ diff --git a/img/add.svg b/img/add.svg new file mode 100644 index 000000000..e9159a2a5 --- /dev/null +++ b/img/add.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/img/avatar_mask.png b/img/avatar_mask.png deleted file mode 100644 index 2527e3365..000000000 Binary files a/img/avatar_mask.png and /dev/null differ diff --git a/img/avatar_mask.svg b/img/avatar_mask.svg new file mode 100644 index 000000000..2fb24720e --- /dev/null +++ b/img/avatar_mask.svg @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/img/contact.png b/img/contact.png deleted file mode 100644 index 3b4950144..000000000 Binary files a/img/contact.png and /dev/null differ diff --git a/img/contact.svg b/img/contact.svg new file mode 100644 index 000000000..724b06497 --- /dev/null +++ b/img/contact.svg @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/img/contact_dark.png b/img/contact_dark.png deleted file mode 100644 index a1c77479a..000000000 Binary files a/img/contact_dark.png and /dev/null differ diff --git a/img/contact_dark.svg b/img/contact_dark.svg new file mode 100644 index 000000000..428cd3390 --- /dev/null +++ b/img/contact_dark.svg @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/img/group.png b/img/group.png deleted file mode 100644 index 3afec19c0..000000000 Binary files a/img/group.png and /dev/null differ diff --git a/img/group.svg b/img/group.svg new file mode 100644 index 000000000..f1b06522c --- /dev/null +++ b/img/group.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + diff --git a/img/group_2x.png b/img/group_2x.png deleted file mode 100644 index eadc7487b..000000000 Binary files a/img/group_2x.png and /dev/null differ diff --git a/img/group_button.png b/img/group_button.png deleted file mode 100644 index 88aa77d35..000000000 Binary files a/img/group_button.png and /dev/null differ diff --git a/img/group_dark.png b/img/group_dark.png deleted file mode 100644 index b5875a234..000000000 Binary files a/img/group_dark.png and /dev/null differ diff --git a/img/group_dark.svg b/img/group_dark.svg new file mode 100644 index 000000000..0fa6c7ddc --- /dev/null +++ b/img/group_dark.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + diff --git a/img/icon.png b/img/icon.png deleted file mode 100644 index b9cbe71bf..000000000 Binary files a/img/icon.png and /dev/null differ diff --git a/img/settings.png b/img/settings.png deleted file mode 100644 index ed82f2886..000000000 Binary files a/img/settings.png and /dev/null differ diff --git a/img/settings.svg b/img/settings.svg new file mode 100644 index 000000000..fc0aba07d --- /dev/null +++ b/img/settings.svg @@ -0,0 +1,19 @@ + + + + + + diff --git a/img/status/dot_away.png b/img/status/dot_away.png deleted file mode 100644 index a4c75723e..000000000 Binary files a/img/status/dot_away.png and /dev/null differ diff --git a/img/status/dot_away.svg b/img/status/dot_away.svg new file mode 100644 index 000000000..241f9a318 --- /dev/null +++ b/img/status/dot_away.svg @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/img/status/dot_away_2x.png b/img/status/dot_away_2x.png deleted file mode 100644 index c5e4d81c2..000000000 Binary files a/img/status/dot_away_2x.png and /dev/null differ diff --git a/img/status/dot_away_notification.png b/img/status/dot_away_notification.png deleted file mode 100644 index 2e62cb511..000000000 Binary files a/img/status/dot_away_notification.png and /dev/null differ diff --git a/img/status/dot_away_notification.svg b/img/status/dot_away_notification.svg new file mode 100644 index 000000000..640810a61 --- /dev/null +++ b/img/status/dot_away_notification.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/img/status/dot_busy.png b/img/status/dot_busy.png deleted file mode 100644 index 7207a884c..000000000 Binary files a/img/status/dot_busy.png and /dev/null differ diff --git a/img/status/dot_busy.svg b/img/status/dot_busy.svg new file mode 100644 index 000000000..39f6919a3 --- /dev/null +++ b/img/status/dot_busy.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/img/status/dot_busy_2x.png b/img/status/dot_busy_2x.png deleted file mode 100644 index a9aaf6ad3..000000000 Binary files a/img/status/dot_busy_2x.png and /dev/null differ diff --git a/img/status/dot_busy_notification.png b/img/status/dot_busy_notification.png deleted file mode 100644 index 7d57d0de3..000000000 Binary files a/img/status/dot_busy_notification.png and /dev/null differ diff --git a/img/status/dot_busy_notification.svg b/img/status/dot_busy_notification.svg new file mode 100644 index 000000000..f939423b7 --- /dev/null +++ b/img/status/dot_busy_notification.svg @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/img/status/dot_groupchat.png b/img/status/dot_groupchat.png deleted file mode 100644 index 0b902dd8e..000000000 Binary files a/img/status/dot_groupchat.png and /dev/null differ diff --git a/img/status/dot_groupchat.svg b/img/status/dot_groupchat.svg new file mode 100644 index 000000000..6dd2cf6a1 --- /dev/null +++ b/img/status/dot_groupchat.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/img/status/dot_groupchat_newmessages.png b/img/status/dot_groupchat_newmessages.png deleted file mode 100644 index 65aa3d030..000000000 Binary files a/img/status/dot_groupchat_newmessages.png and /dev/null differ diff --git a/img/status/dot_groupchat_newmessages.svg b/img/status/dot_groupchat_newmessages.svg new file mode 100644 index 000000000..926540845 --- /dev/null +++ b/img/status/dot_groupchat_newmessages.svg @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/img/status/dot_groupchat_notification.png b/img/status/dot_groupchat_notification.png deleted file mode 100644 index 9bdc3dff3..000000000 Binary files a/img/status/dot_groupchat_notification.png and /dev/null differ diff --git a/img/status/dot_groupchat_notification.svg b/img/status/dot_groupchat_notification.svg new file mode 100644 index 000000000..762d324bc --- /dev/null +++ b/img/status/dot_groupchat_notification.svg @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/img/status/dot_idle.png b/img/status/dot_idle.png deleted file mode 100644 index 1b38b4339..000000000 Binary files a/img/status/dot_idle.png and /dev/null differ diff --git a/img/status/dot_idle_2x.png b/img/status/dot_idle_2x.png deleted file mode 100644 index 0693bb21a..000000000 Binary files a/img/status/dot_idle_2x.png and /dev/null differ diff --git a/img/status/dot_idle_notification.png b/img/status/dot_idle_notification.png deleted file mode 100644 index 9ddf5623f..000000000 Binary files a/img/status/dot_idle_notification.png and /dev/null differ diff --git a/img/status/dot_invisible.svg b/img/status/dot_invisible.svg new file mode 100644 index 000000000..2bec7e773 --- /dev/null +++ b/img/status/dot_invisible.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/img/status/dot_offline.svg b/img/status/dot_offline.svg new file mode 100644 index 000000000..7d17422f5 --- /dev/null +++ b/img/status/dot_offline.svg @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/img/status/dot_offline_notification.svg b/img/status/dot_offline_notification.svg new file mode 100644 index 000000000..24eb6cdd4 --- /dev/null +++ b/img/status/dot_offline_notification.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/img/status/dot_online.png b/img/status/dot_online.png deleted file mode 100644 index d96b35d4a..000000000 Binary files a/img/status/dot_online.png and /dev/null differ diff --git a/img/status/dot_online.svg b/img/status/dot_online.svg new file mode 100644 index 000000000..07d63fac6 --- /dev/null +++ b/img/status/dot_online.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/img/status/dot_online_2x.png b/img/status/dot_online_2x.png deleted file mode 100644 index 43f0dee2d..000000000 Binary files a/img/status/dot_online_2x.png and /dev/null differ diff --git a/img/status/dot_online_notification.png b/img/status/dot_online_notification.png deleted file mode 100644 index 2e213e43f..000000000 Binary files a/img/status/dot_online_notification.png and /dev/null differ diff --git a/img/status/dot_online_notification.svg b/img/status/dot_online_notification.svg new file mode 100644 index 000000000..9d1549817 --- /dev/null +++ b/img/status/dot_online_notification.svg @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/img/taskbar/dark/taskbar_offline.svg b/img/taskbar/dark/taskbar_offline.svg index c1c144149..a21dab3cc 100644 --- a/img/taskbar/dark/taskbar_offline.svg +++ b/img/taskbar/dark/taskbar_offline.svg @@ -1,22 +1,27 @@ - - - - - - - - - + + + +image/svg+xml \ No newline at end of file diff --git a/img/transfer.png b/img/transfer.png deleted file mode 100644 index 13b4af62d..000000000 Binary files a/img/transfer.png and /dev/null differ diff --git a/img/transfer.svg b/img/transfer.svg new file mode 100644 index 000000000..12c60859e --- /dev/null +++ b/img/transfer.svg @@ -0,0 +1,18 @@ + + + + + + + + + diff --git a/res.qrc b/res.qrc index 760e0e265..06bd0f8cb 100644 --- a/res.qrc +++ b/res.qrc @@ -8,35 +8,29 @@ audio/notification.pcm audio/ToxicIncomingCall.pcm - img/add.png - img/avatar_mask.png - img/contact.png - img/contact_dark.png - img/group.png - img/group_2x.png - img/group_button.png - img/group_dark.png - img/icon.png - img/settings.png + img/add.svg + img/avatar_mask.svg + img/contact.svg + img/contact_dark.svg + img/group.svg + img/group_dark.svg + img/icons/qtox.svg + img/settings.svg img/settings/av.png img/settings/general.png img/settings/identity.png img/settings/privacy.png - img/status/dot_away.png - img/status/dot_away_2x.png - img/status/dot_away_notification.png - img/status/dot_busy.png - img/status/dot_busy_2x.png - img/status/dot_busy_notification.png - img/status/dot_groupchat.png - img/status/dot_groupchat_newmessages.png - img/status/dot_groupchat_notification.png - img/status/dot_idle.png - img/status/dot_idle_2x.png - img/status/dot_idle_notification.png - img/status/dot_online.png - img/status/dot_online_2x.png - img/status/dot_online_notification.png + img/status/dot_away.svg + img/status/dot_away_notification.svg + img/status/dot_busy.svg + img/status/dot_busy_notification.svg + img/status/dot_groupchat.svg + img/status/dot_groupchat_newmessages.svg + img/status/dot_groupchat_notification.svg + img/status/dot_offline.svg + img/status/dot_offline_notification.svg + img/status/dot_online.svg + img/status/dot_online_notification.svg img/taskbar/dark/taskbar_online.svg img/taskbar/dark/taskbar_away.svg img/taskbar/dark/taskbar_busy.svg @@ -47,7 +41,7 @@ img/taskbar/light/taskbar_busy.svg img/taskbar/light/taskbar_offline.svg img/taskbar/light/taskbar_event.svg - img/transfer.png + img/transfer.svg translations/bg.qm translations/de.qm translations/es.qm @@ -66,45 +60,25 @@ translations/sv.qm translations/uk.qm translations/zh.qm - ui/acceptFileButton/default.png - ui/acceptFileButton/hover.png - ui/acceptFileButton/pressed.png - ui/acceptFileButton/style.css + ui/fileTransferWidget/fileDone.svg ui/callButton/callButton.css - ui/callButton/callButton.png - ui/callButton/callButtonDisabled.png - ui/callButton/callButtonHover.png - ui/callButton/callButtonPressed.png - ui/callButton/callButtonRed.png - ui/callButton/callButtonRedHover.png - ui/callButton/callButtonRedPressed.png - ui/callButton/callButtonYellow.png - ui/callButton/callButtonYellowHover.png - ui/callButton/callButtonYellowPressed.png + ui/callButton/callButton.svg ui/chatArea/chatArea.css ui/chatArea/chatHead.css ui/chatArea/innerStyle.css - ui/chatArea/scrollBarDownArrow.png - ui/chatArea/scrollBarDownArrowHover.png - ui/chatArea/scrollBarDownArrowPressed.png - ui/chatArea/scrollBarHandle.png - ui/chatArea/scrollBarUpArrow.png - ui/chatArea/scrollBarUpArrowHover.png - ui/chatArea/scrollBarUpArrowPressed.png + ui/chatArea/scrollBarUpArrow.svg + ui/chatArea/scrollBarDownArrow.svg + ui/chatArea/scrollBarLeftArrow.svg + ui/chatArea/scrollBarRightArrow.svg ui/chatroomWidgets/genericChatroomWidget.css ui/emoteButton/emoteButton.css - ui/emoteButton/emoteButton.png - ui/emoteButton/emoteButtonHover.png - ui/emoteButton/emoteButtonPressed.png - ui/emoticonWidget/dot_page.png - ui/emoticonWidget/dot_page_current.png - ui/emoticonWidget/dot_page_hover.png + ui/emoteButton/emoteButton.svg + ui/emoticonWidget/dot_page.svg + ui/emoticonWidget/dot_page_current.svg + ui/emoticonWidget/dot_page_hover.svg ui/emoticonWidget/emoticonWidget.css ui/fileButton/fileButton.css - ui/fileButton/fileButton.png - ui/fileButton/fileButtonHover.png - ui/fileButton/fileButtonPressed.png - ui/fileButton/fileButtonDisabled.png + ui/fileButton/fileButton.svg ui/fileTransferWidget/fileTransferWidget.css ui/friendList/friendList.css ui/micButton/micButton.css @@ -113,38 +87,18 @@ ui/micButton/micButtonHover.png ui/micButton/micButtonPressed.png ui/msgEdit/msgEdit.css - ui/pauseFileButton/default.png - ui/pauseFileButton/hover.png - ui/pauseFileButton/pressed.png - ui/pauseFileButton/style.css ui/sendButton/sendButton.css - ui/sendButton/sendButton.png - ui/sendButton/sendButtonHover.png - ui/sendButton/sendButtonPressed.png + ui/sendButton/sendButton.svg ui/settings/mainContent.css ui/settings/mainHead.css - ui/statusButton/menu_indicator.png ui/statusButton/statusButton.css - ui/stopFileButton/default.png - ui/stopFileButton/hover.png - ui/stopFileButton/pressed.png - ui/stopFileButton/style.css + ui/statusButton/menu_indicator.svg ui/videoButton/videoButton.css - ui/videoButton/videoButton.png - ui/videoButton/videoButtonDisabled.png - ui/videoButton/videoButtonHover.png - ui/videoButton/videoButtonPressed.png - ui/videoButton/videoButtonRed.png - ui/videoButton/videoButtonRedHover.png - ui/videoButton/videoButtonRedPressed.png - ui/videoButton/videoButtonYellow.png - ui/videoButton/videoButtonYellowHover.png - ui/videoButton/videoButtonYellowPressed.png + ui/videoButton/videoButton.svg ui/volButton/volButton.png ui/volButton/volButtonHover.png ui/volButton/volButtonPressed.png ui/volButton/volButton.css - ui/window/applicationIcon.png ui/window/statusPanel.css ui/window/window.css ui/chatArea/info.svg @@ -158,8 +112,8 @@ ui/fileTransferInstance/arrow_white.svg ui/fileTransferInstance/browse.svg ui/fileTransferInstance/filetransferWidget.css - ui/acceptCall/acceptCall.png - ui/rejectCall/rejectCall.png + ui/acceptCall/acceptCall.svg + ui/rejectCall/rejectCall.svg ui/volButton/volButtonDisabled.png diff --git a/src/core.cpp b/src/core.cpp index 38726c44a..b15e38d25 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -1307,7 +1307,7 @@ void Core::switchConfiguration(const QString& profile) toxTimer->stop(); deadifyTox(); - emit selfAvatarChanged(QPixmap(":/img/contact_dark.png")); + emit selfAvatarChanged(QPixmap(":/img/contact_dark.svg")); emit blockingClearContacts(); // we need this to block, but signals are required for thread safety if (profile.isEmpty()) diff --git a/src/mainwindow.ui b/src/mainwindow.ui index b7a79f566..daa685c5d 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -21,7 +21,7 @@ - :/img/icon.png:/img/icon.png + :/img/icons/qtox.svg:/img/icons/qtox.svg @@ -983,10 +983,6 @@ QSplitter:handle{ - - - :/img/status/dot_away_2x.png:/img/status/dot_away_2x.png - 10 @@ -1109,7 +1105,13 @@ QSplitter:handle{ - :/img/add.png:/img/add.png + :/img/add.svg:/img/add.svg + + + + 15 + 15 + false @@ -1144,7 +1146,13 @@ QSplitter:handle{ - :/img/group_button.png:/img/group_button.png + :/img/group.svg:/img/group.svg + + + + 15 + 15 + true @@ -1176,7 +1184,13 @@ QSplitter:handle{ - :/img/transfer.png:/img/transfer.png + :/img/transfer.svg:/img/transfer.svg + + + + 15 + 15 + true @@ -1208,7 +1222,13 @@ QSplitter:handle{ - :/img/settings.png:/img/settings.png + :/img/settings.svg:/img/settings.svg + + + + 15 + 15 + true diff --git a/src/misc/style.cpp b/src/misc/style.cpp index ea1318fd7..4a03148cf 100644 --- a/src/misc/style.cpp +++ b/src/misc/style.cpp @@ -25,6 +25,8 @@ #include #include #include +#include +#include // helper functions QFont appFont(int pixelSize, int weight) @@ -201,3 +203,13 @@ void Style::applyTheme() { GUI::reloadTheme(); } + +QPixmap Style::scaleSvgImage(const QString& path, uint32_t width, uint32_t height) +{ + QSvgRenderer render(path); + QPixmap pixmap(width, height); + pixmap.fill(QColor(0, 0, 0, 0)); + QPainter painter(&pixmap); + render.render(&painter, pixmap.rect()); + return pixmap; +} diff --git a/src/misc/style.h b/src/misc/style.h index 87412387c..984927645 100644 --- a/src/misc/style.h +++ b/src/misc/style.h @@ -63,6 +63,7 @@ public: static void setThemeColor(int color); static void setThemeColor(QColor color); ///< Pass an invalid QColor to reset to defaults static void applyTheme(); ///< Reloads some CCS + static QPixmap scaleSvgImage(const QString& path, uint32_t width, uint32_t height); static QStringList themeColorNames; static QList themeColorColors; diff --git a/src/widget/callconfirmwidget.cpp b/src/widget/callconfirmwidget.cpp index 5de8855f3..73d312f35 100644 --- a/src/widget/callconfirmwidget.cpp +++ b/src/widget/callconfirmwidget.cpp @@ -34,8 +34,8 @@ CallConfirmWidget::CallConfirmWidget(const QWidget *Anchor) : reject->setFlat(true); accept->setStyleSheet("QPushButton{border:none;}"); reject->setStyleSheet("QPushButton{border:none;}"); - accept->setIcon(QIcon(":/ui/acceptCall/acceptCall.png")); - reject->setIcon(QIcon(":/ui/rejectCall/rejectCall.png")); + accept->setIcon(QIcon(":/ui/acceptCall/acceptCall.svg")); + reject->setIcon(QIcon(":/ui/rejectCall/rejectCall.svg")); accept->setIconSize(accept->size()); reject->setIconSize(reject->size()); diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp index 7a74391e5..14388f735 100644 --- a/src/widget/form/chatform.cpp +++ b/src/widget/form/chatform.cpp @@ -51,7 +51,7 @@ ChatForm::ChatForm(Friend* chatFriend) { nameLabel->setText(f->getDisplayedName()); - avatar->setPixmap(QPixmap(":/img/contact_dark.png"), Qt::transparent); + avatar->setPixmap(QPixmap(":/img/contact_dark.svg"), Qt::transparent); statusMessageLabel = new CroppingLabel(); statusMessageLabel->setObjectName("statusLabel"); @@ -792,7 +792,7 @@ void ChatForm::onAvatarRemoved(int FriendId) if (FriendId != f->getFriendID()) return; - avatar->setPixmap(QPixmap(":/img/contact_dark.png"), Qt::transparent); + avatar->setPixmap(QPixmap(":/img/contact_dark.svg"), Qt::transparent); } void ChatForm::loadHistory(QDateTime since, bool processUndelivered) diff --git a/src/widget/form/filesform.cpp b/src/widget/form/filesform.cpp index 5a108fcf6..b1c875ee9 100644 --- a/src/widget/form/filesform.cpp +++ b/src/widget/form/filesform.cpp @@ -20,6 +20,7 @@ #include #include #include +#include FilesForm::FilesForm() : QObject() @@ -60,14 +61,14 @@ void FilesForm::show(Ui::MainWindow& ui) void FilesForm::onFileDownloadComplete(const QString& path) { - ListWidgetItem* tmp = new ListWidgetItem(QIcon(":/ui/acceptFileButton/default.png"), QFileInfo(path).fileName()); + ListWidgetItem* tmp = new ListWidgetItem(QIcon(":/ui/fileTransferWidget/fileDone.svg"), QFileInfo(path).fileName()); tmp->path = path; recvd->addItem(tmp); } void FilesForm::onFileUploadComplete(const QString& path) { - ListWidgetItem* tmp = new ListWidgetItem(QIcon(":/ui/acceptFileButton/default.png"), QFileInfo(path).fileName()); + ListWidgetItem* tmp = new ListWidgetItem(QIcon(":/ui/fileTransferWidget/fileDone.svg"), QFileInfo(path).fileName()); tmp->path = path; sent->addItem(tmp); } diff --git a/src/widget/form/genericchatform.cpp b/src/widget/form/genericchatform.cpp index 387335693..760c028e4 100644 --- a/src/widget/form/genericchatform.cpp +++ b/src/widget/form/genericchatform.cpp @@ -51,7 +51,7 @@ GenericChatForm::GenericChatForm(QWidget *parent) nameLabel->setEditable(true); nameLabel->setTextFormat(Qt::PlainText); - avatar = new MaskablePixmapWidget(this, QSize(40,40), ":/img/avatar_mask.png"); + avatar = new MaskablePixmapWidget(this, QSize(40,40), ":/img/avatar_mask.svg"); QHBoxLayout *mainFootLayout = new QHBoxLayout(), *headLayout = new QHBoxLayout(); diff --git a/src/widget/form/groupchatform.cpp b/src/widget/form/groupchatform.cpp index 32bed5cc5..503fe3064 100644 --- a/src/widget/form/groupchatform.cpp +++ b/src/widget/form/groupchatform.cpp @@ -57,7 +57,7 @@ GroupChatForm::GroupChatForm(Group* chatGroup) nusersLabel->setText(GroupChatForm::tr("%1 users in chat","Number of users in chat").arg(group->getPeersCount())); nusersLabel->setObjectName("statusLabel"); - avatar->setPixmap(QPixmap(":/img/group_dark.png"), Qt::transparent); + avatar->setPixmap(Style::scaleSvgImage(":/img/group_dark.svg", avatar->width(), avatar->height()), Qt::transparent); msgEdit->setObjectName("group"); diff --git a/src/widget/form/profileform.cpp b/src/widget/form/profileform.cpp index 5bf2d4d7d..1d5048f1d 100644 --- a/src/widget/form/profileform.cpp +++ b/src/widget/form/profileform.cpp @@ -79,7 +79,7 @@ ProfileForm::ProfileForm(QWidget *parent) : bodyUI->toxGroup->layout()->addWidget(toxId); - profilePicture = new MaskablePixmapWidget(this, QSize(64, 64), ":/img/avatar_mask.png"); + profilePicture = new MaskablePixmapWidget(this, QSize(64, 64), ":/img/avatar_mask.svg"); profilePicture->setPixmap(QPixmap(":/img/contact_dark.png")); profilePicture->setClickable(true); connect(profilePicture, SIGNAL(clicked()), this, SLOT(onAvatarClicked())); diff --git a/src/widget/friendwidget.cpp b/src/widget/friendwidget.cpp index 4883f6cc4..9717273c4 100644 --- a/src/widget/friendwidget.cpp +++ b/src/widget/friendwidget.cpp @@ -42,8 +42,8 @@ FriendWidget::FriendWidget(int FriendId, QString id) , isDefaultAvatar{true} , historyLoaded{false} { - avatar->setPixmap(QPixmap(":img/contact.png"), Qt::transparent); - statusPic.setPixmap(QPixmap(":img/status/dot_away.png")); + avatar->setPixmap(QPixmap(":img/contact.svg"), Qt::transparent); + statusPic.setPixmap(QPixmap(":img/status/dot_offline.svg")); nameLabel->setText(id); nameLabel->setTextFormat(Qt::PlainText); statusMessageLabel->setTextFormat(Qt::PlainText); @@ -128,7 +128,7 @@ void FriendWidget::setAsActiveChatroom() setActive(true); if (isDefaultAvatar) - avatar->setPixmap(QPixmap(":img/contact_dark.png"), Qt::transparent); + avatar->setPixmap(QPixmap(":img/contact_dark.svg"), Qt::transparent); if(!historyLoaded) { @@ -146,7 +146,7 @@ void FriendWidget::setAsInactiveChatroom() setActive(false); if (isDefaultAvatar) - avatar->setPixmap(QPixmap(":img/contact.png"), Qt::transparent); + avatar->setPixmap(QPixmap(":img/contact.svg"), Qt::transparent); } void FriendWidget::updateStatusLight() @@ -155,21 +155,21 @@ void FriendWidget::updateStatusLight() Status status = f->getStatus(); if (status == Status::Online && f->getEventFlag() == 0) - statusPic.setPixmap(QPixmap(":img/status/dot_online.png")); + statusPic.setPixmap(QPixmap(":img/status/dot_online.svg")); else if (status == Status::Online && f->getEventFlag() == 1) - statusPic.setPixmap(QPixmap(":img/status/dot_online_notification.png")); + statusPic.setPixmap(QPixmap(":img/status/dot_online_notification.svg")); else if (status == Status::Away && f->getEventFlag() == 0) - statusPic.setPixmap(QPixmap(":img/status/dot_idle.png")); + statusPic.setPixmap(QPixmap(":img/status/dot_away.svg")); else if (status == Status::Away && f->getEventFlag() == 1) - statusPic.setPixmap(QPixmap(":img/status/dot_idle_notification.png")); + statusPic.setPixmap(QPixmap(":img/status/dot_away_notification.svg")); else if (status == Status::Busy && f->getEventFlag() == 0) - statusPic.setPixmap(QPixmap(":img/status/dot_busy.png")); + statusPic.setPixmap(QPixmap(":img/status/dot_busy.svg")); else if (status == Status::Busy && f->getEventFlag() == 1) - statusPic.setPixmap(QPixmap(":img/status/dot_busy_notification.png")); + statusPic.setPixmap(QPixmap(":img/status/dot_busy_notification.svg")); else if (status == Status::Offline && f->getEventFlag() == 0) - statusPic.setPixmap(QPixmap(":img/status/dot_away.png")); + statusPic.setPixmap(QPixmap(":img/status/dot_offline.svg")); else if (status == Status::Offline && f->getEventFlag() == 1) - statusPic.setPixmap(QPixmap(":img/status/dot_away_notification.png")); + statusPic.setPixmap(QPixmap(":img/status/dot_offline_notification.svg")); } void FriendWidget::setChatForm(Ui::MainWindow &ui) @@ -202,9 +202,9 @@ void FriendWidget::onAvatarRemoved(int FriendId) isDefaultAvatar = true; if (isActive()) - avatar->setPixmap(QPixmap(":img/contact_dark.png"), Qt::transparent); + avatar->setPixmap(QPixmap(":img/contact_dark.svg"), Qt::transparent); else - avatar->setPixmap(QPixmap(":img/contact.png"), Qt::transparent); + avatar->setPixmap(QPixmap(":img/contact.svg"), Qt::transparent); } void FriendWidget::mousePressEvent(QMouseEvent *ev) diff --git a/src/widget/genericchatroomwidget.cpp b/src/widget/genericchatroomwidget.cpp index 84def4083..1b394234f 100644 --- a/src/widget/genericchatroomwidget.cpp +++ b/src/widget/genericchatroomwidget.cpp @@ -30,11 +30,11 @@ GenericChatroomWidget::GenericChatroomWidget(QWidget *parent) // avatar if (property("compact").toBool()) { - avatar = new MaskablePixmapWidget(this, QSize(20,20), ":/img/avatar_mask.png"); + avatar = new MaskablePixmapWidget(this, QSize(20,20), ":/img/avatar_mask.svg"); } else { - avatar = new MaskablePixmapWidget(this, QSize(40,40), ":/img/avatar_mask.png"); + avatar = new MaskablePixmapWidget(this, QSize(40,40), ":/img/avatar_mask.svg"); } // status text diff --git a/src/widget/groupwidget.cpp b/src/widget/groupwidget.cpp index b180fc3c0..95d288d6d 100644 --- a/src/widget/groupwidget.cpp +++ b/src/widget/groupwidget.cpp @@ -31,11 +31,12 @@ #include "ui_mainwindow.h" + GroupWidget::GroupWidget(int GroupId, QString Name) : groupId{GroupId} { - avatar->setPixmap(QPixmap(":img/group.png"), Qt::transparent); - statusPic.setPixmap(QPixmap(":img/status/dot_online.png")); + avatar->setPixmap(Style::scaleSvgImage(":img/group.svg", avatar->width(), avatar->height()), Qt::transparent); + statusPic.setPixmap(QPixmap(":img/status/dot_online.svg")); nameLabel->setText(Name); Group* g = GroupList::findGroup(groupId); @@ -86,13 +87,13 @@ void GroupWidget::onUserListChanged() void GroupWidget::setAsActiveChatroom() { setActive(true); - avatar->setPixmap(QPixmap(":img/group_dark.png"), Qt::transparent); + avatar->setPixmap(Style::scaleSvgImage(":img/group_dark.svg", avatar->width(), avatar->height()), Qt::transparent); } void GroupWidget::setAsInactiveChatroom() { setActive(false); - avatar->setPixmap(QPixmap(":img/group.png"), Qt::transparent); + avatar->setPixmap(Style::scaleSvgImage(":img/group.svg", avatar->width(), avatar->height()), Qt::transparent); } void GroupWidget::updateStatusLight() @@ -100,9 +101,9 @@ void GroupWidget::updateStatusLight() Group *g = GroupList::findGroup(groupId); if (!g->getEventFlag()) - statusPic.setPixmap(QPixmap(":img/status/dot_online.png")); + statusPic.setPixmap(QPixmap(":img/status/dot_online.svg")); else - statusPic.setPixmap(QPixmap(":img/status/dot_online_notification.png")); + statusPic.setPixmap(QPixmap(":img/status/dot_online_notification.svg")); } void GroupWidget::setChatForm(Ui::MainWindow &ui) diff --git a/src/widget/maskablepixmapwidget.cpp b/src/widget/maskablepixmapwidget.cpp index 282ff9e27..acd975dfd 100644 --- a/src/widget/maskablepixmapwidget.cpp +++ b/src/widget/maskablepixmapwidget.cpp @@ -78,7 +78,7 @@ void MaskablePixmapWidget::setPixmap(const QPixmap &pmap, QColor background) if (!pmap.isNull()) { unscaled = pmap; - pixmap = pmap.scaled(width(), height(), Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation); + pixmap = pmap.scaled(width() - 2, height() - 2, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation); backgroundColor = background; manualColor = true; update(); @@ -90,7 +90,7 @@ void MaskablePixmapWidget::setPixmap(const QPixmap &pmap) if (!pmap.isNull()) { unscaled = pmap; - pixmap = pmap.scaled(width(), height(), Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation); + pixmap = pmap.scaled(width() - 2, height() - 2, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation); autopickBackground(); update(); } @@ -113,7 +113,7 @@ void MaskablePixmapWidget::setSize(QSize size) if (!unscaled.isNull()) { - pixmap = unscaled.scaled(width(), height(), Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation); + pixmap = unscaled.scaled(width() - 2, height() - 2, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation); if (!manualColor) autopickBackground(); update(); diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 33fa2e8bc..07468722b 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -103,13 +103,13 @@ void Widget::init() ui->mainSplitter->restoreState(Settings::getInstance().getSplitterState()); statusOnline = new QAction(tr("Online", "Button to set your status to 'Online'"), this); - statusOnline->setIcon(QIcon(":img/status/dot_online.png")); + statusOnline->setIcon(getStatusIcon(Status::Online, 10, 10)); connect(statusOnline, SIGNAL(triggered()), this, SLOT(setStatusOnline())); statusAway = new QAction(tr("Away", "Button to set your status to 'Away'"), this); - statusAway->setIcon(QIcon(":img/status/dot_idle.png")); + statusAway->setIcon(getStatusIcon(Status::Away, 10, 10)); connect(statusAway, SIGNAL(triggered()), this, SLOT(setStatusAway())); statusBusy = new QAction(tr("Busy", "Button to set your status to 'Busy'"), this); - statusBusy->setIcon(QIcon(":img/status/dot_busy.png")); + statusBusy->setIcon(getStatusIcon(Status::Busy, 10, 10)); connect(statusBusy, SIGNAL(triggered()), this, SLOT(setStatusBusy())); ui->statusbar->hide(); @@ -118,8 +118,8 @@ void Widget::init() layout()->setContentsMargins(0, 0, 0, 0); ui->friendList->setStyleSheet(Style::resolve(Style::getStylesheet(":ui/friendList/friendList.css"))); - profilePicture = new MaskablePixmapWidget(this, QSize(40, 40), ":/img/avatar_mask.png"); - profilePicture->setPixmap(QPixmap(":/img/contact_dark.png")); + profilePicture = new MaskablePixmapWidget(this, QSize(40, 40), ":/img/avatar_mask.svg"); + profilePicture->setPixmap(QPixmap(":/img/contact_dark.svg")); profilePicture->setClickable(true); ui->myProfile->insertWidget(0, profilePicture); ui->myProfile->insertSpacing(1, 7); @@ -161,8 +161,7 @@ void Widget::init() ui->mainSplitter->setStretchFactor(0,0); ui->mainSplitter->setStretchFactor(1,1); - ui->statusButton->setProperty("status", "offline"); - Style::repolish(ui->statusButton); + onStatusSet(Status::Offline); // Disable some widgets until we're connected to the DHT ui->statusButton->setEnabled(false); @@ -225,6 +224,9 @@ void Widget::setTranslation() void Widget::updateIcons() { + if (!icon) + return; + QString status; if (eventIcon) status = "event"; @@ -334,16 +336,7 @@ void Widget::onConnected() void Widget::onDisconnected() { - QString stat = ui->statusButton->property("status").toString(); - if (stat == "online") - beforeDisconnect = Status::Online; - else if (stat == "busy") - beforeDisconnect = Status::Busy; - else if (stat == "away") - beforeDisconnect = Status::Away; - else - beforeDisconnect = Status::Offline; - + beforeDisconnect = getStatusFromString(ui->statusButton->property("status").toString()); ui->statusButton->setEnabled(false); emit statusSet(Status::Offline); } @@ -369,27 +362,8 @@ void Widget::onBadProxyCore() void Widget::onStatusSet(Status status) { - //We have to use stylesheets here, there's no way to - //prevent the button icon from moving when pressed otherwise - switch (status) - { - case Status::Online: - ui->statusButton->setProperty("status" ,"online"); - ui->statusButton->setIcon(QIcon(":img/status/dot_online_2x.png")); - break; - case Status::Away: - ui->statusButton->setProperty("status" ,"away"); - ui->statusButton->setIcon(QIcon(":img/status/dot_idle_2x.png")); - break; - case Status::Busy: - ui->statusButton->setProperty("status" ,"busy"); - ui->statusButton->setIcon(QIcon(":img/status/dot_busy_2x.png")); - break; - case Status::Offline: - ui->statusButton->setProperty("status" ,"offline"); - ui->statusButton->setIcon(QIcon(":img/status/dot_away_2x.png")); - break; - } + ui->statusButton->setProperty("status", getStatusTitle(status)); + ui->statusButton->setIcon(getStatusIcon(status, 10, 10)); updateIcons(); } @@ -1190,3 +1164,62 @@ void Widget::previousContact() { qDebug() << "previous contact"; } + +QString Widget::getStatusIconPath(Status status) +{ + switch (status) + { + case Status::Online: + return ":img/status/dot_online.svg"; + case Status::Away: + return ":img/status/dot_away.svg"; + case Status::Busy: + return ":img/status/dot_busy.svg"; + case Status::Offline: + default: + return ":img/status/dot_offline.svg"; + } +} + +inline QIcon Widget::getStatusIcon(Status status, uint32_t w/*=0*/, uint32_t h/*=0*/) +{ + if (w > 0 && h > 0) + return getStatusIconPixmap(status, w, h); + else + return QIcon(getStatusIconPath(status)); +} + +QPixmap Widget::getStatusIconPixmap(Status status, uint32_t w, uint32_t h) +{ + QPixmap pix(w, h); + pix.load(getStatusIconPath(status)); + return pix; +} + +QString Widget::getStatusTitle(Status status) +{ + switch (status) + { + case Status::Online: + return "online"; + case Status::Away: + return "away"; + case Status::Busy: + return "busy"; + case Status::Offline: + default: + return "offline"; + } +} + +Status Widget::getStatusFromString(QString status) +{ + if (status == "online") + return Status::Online; + else if (status == "busy") + return Status::Busy; + else if (status == "away") + return Status::Away; + else + return Status::Offline; +} diff --git a/src/widget/widget.h b/src/widget/widget.h index 9be484659..90688d195 100644 --- a/src/widget/widget.h +++ b/src/widget/widget.h @@ -76,6 +76,11 @@ public: void reloadHistory(); void reloadTheme(); + static QString getStatusIconPath(Status status); + static inline QIcon getStatusIcon(Status status, uint32_t w=0, uint32_t h=0); + static QPixmap getStatusIconPixmap(Status status, uint32_t w, uint32_t h); + static QString getStatusTitle(Status status); + static Status getStatusFromString(QString status); public slots: void onSettingsClicked(); diff --git a/ui/acceptCall/acceptCall.png b/ui/acceptCall/acceptCall.png deleted file mode 100644 index c892aba9b..000000000 Binary files a/ui/acceptCall/acceptCall.png and /dev/null differ diff --git a/ui/acceptFileButton/default.png b/ui/acceptFileButton/default.png deleted file mode 100644 index 59c6bbefc..000000000 Binary files a/ui/acceptFileButton/default.png and /dev/null differ diff --git a/ui/acceptFileButton/hover.png b/ui/acceptFileButton/hover.png deleted file mode 100644 index af4a66e34..000000000 Binary files a/ui/acceptFileButton/hover.png and /dev/null differ diff --git a/ui/acceptFileButton/pressed.png b/ui/acceptFileButton/pressed.png deleted file mode 100644 index 571103b31..000000000 Binary files a/ui/acceptFileButton/pressed.png and /dev/null differ diff --git a/ui/acceptFileButton/style.css b/ui/acceptFileButton/style.css deleted file mode 100644 index ed55c86d6..000000000 --- a/ui/acceptFileButton/style.css +++ /dev/null @@ -1,22 +0,0 @@ -QPushButton -{ - background-color: transparent; - background-image: url(":/ui/acceptFileButton/default.png"); - background-repeat: none; - border: none; - width: 24px; - height: 24px; -} -QPushButton:hover -{ - background-image: url(":/ui/acceptFileButton/hover.png"); -} - -QPushButton:pressed -{ - background-image: url(":/ui/acceptFileButton/pressed.png"); -} - -QPushButton:focus { - outline: none; -} diff --git a/ui/callButton/callButton.css b/ui/callButton/callButton.css index 9af99cf77..4aaf2fddb 100644 --- a/ui/callButton/callButton.css +++ b/ui/callButton/callButton.css @@ -1,72 +1,83 @@ QPushButton#green { - background-color: transparent; - background-image: url(":/ui/callButton/callButton.png"); - background-repeat: none; + background-color: #6bc260; + background-image: url(":/ui/callButton/callButton.svg"); + background-repeat: none; + background-position: center; border: none; + border-radius: 5px; width: 50px; height: 40px; } QPushButton#green:hover { - background-image: url(":/ui/callButton/callButtonHover.png"); + background-color: #79c76f; } QPushButton#green:pressed { - background-image: url(":/ui/callButton/callButtonPressed.png"); + background-color: #51b244; } QPushButton#red { - background-color: transparent; - background-image: url(":/ui/callButton/callButtonRed.png"); - background-repeat: none; + background-color: #c84e4e; + background-image: url(":/ui/callButton/callButton.svg"); + background-repeat: none; + background-position: center; border: none; + border-radius: 5px; width: 50px; height: 40px; } + QPushButton#red:hover { - background-image: url(":/ui/callButton/callButtonRedHover.png"); + background-color: #e87474; } QPushButton#red:pressed { - background-image: url(":/ui/callButton/callButtonRedPressed.png"); + background-color: #df3b3b; } QPushButton#yellow { - background-color: transparent; - background-image: url(":/ui/callButton/callButtonYellow.png"); - background-repeat: none; + background-color: #e6e465; + background-image: url(":/ui/callButton/callButton.svg"); + background-repeat: none; + background-position: center; border: none; + border-radius: 5px; width: 50px; height: 40px; } + QPushButton#yellow:hover { - background-image: url(":/ui/callButton/callButtonYellowHover.png"); + background-color: #e8e774; } QPushButton#yellow:pressed { - background-image: url(":/ui/callButton/callButtonYellowPressed.png"); + background-color: #e3e155; } QPushButton#grey { - background-color: transparent; - background-image: url(":/ui/callButton/callButtonDisabled.png"); - background-repeat: none; + background-color: #919191; + background-image: url(":/ui/callButton/callButton.svg"); + background-repeat: none; + background-position: center; border: none; + border-radius: 5px; width: 50px; height: 40px; } -QPushButton:focus { +QPushButton:focus +{ outline: none; } diff --git a/ui/callButton/callButton.png b/ui/callButton/callButton.png deleted file mode 100644 index 8e06507c5..000000000 Binary files a/ui/callButton/callButton.png and /dev/null differ diff --git a/ui/callButton/callButton.svg b/ui/callButton/callButton.svg new file mode 100644 index 000000000..ce48974b7 --- /dev/null +++ b/ui/callButton/callButton.svg @@ -0,0 +1,22 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/ui/callButton/callButtonDisabled.png b/ui/callButton/callButtonDisabled.png deleted file mode 100644 index bf540a170..000000000 Binary files a/ui/callButton/callButtonDisabled.png and /dev/null differ diff --git a/ui/callButton/callButtonHover.png b/ui/callButton/callButtonHover.png deleted file mode 100644 index 2e9953ea3..000000000 Binary files a/ui/callButton/callButtonHover.png and /dev/null differ diff --git a/ui/callButton/callButtonPressed.png b/ui/callButton/callButtonPressed.png deleted file mode 100644 index 45f3d0f4a..000000000 Binary files a/ui/callButton/callButtonPressed.png and /dev/null differ diff --git a/ui/callButton/callButtonRed.png b/ui/callButton/callButtonRed.png deleted file mode 100644 index 9f306f16b..000000000 Binary files a/ui/callButton/callButtonRed.png and /dev/null differ diff --git a/ui/callButton/callButtonRedHover.png b/ui/callButton/callButtonRedHover.png deleted file mode 100644 index 835325d50..000000000 Binary files a/ui/callButton/callButtonRedHover.png and /dev/null differ diff --git a/ui/callButton/callButtonRedPressed.png b/ui/callButton/callButtonRedPressed.png deleted file mode 100644 index 3beac4e2b..000000000 Binary files a/ui/callButton/callButtonRedPressed.png and /dev/null differ diff --git a/ui/callButton/callButtonYellow.png b/ui/callButton/callButtonYellow.png deleted file mode 100644 index 1fde0c461..000000000 Binary files a/ui/callButton/callButtonYellow.png and /dev/null differ diff --git a/ui/callButton/callButtonYellowHover.png b/ui/callButton/callButtonYellowHover.png deleted file mode 100644 index 0c19c09dc..000000000 Binary files a/ui/callButton/callButtonYellowHover.png and /dev/null differ diff --git a/ui/callButton/callButtonYellowPressed.png b/ui/callButton/callButtonYellowPressed.png deleted file mode 100644 index 8200b1f2f..000000000 Binary files a/ui/callButton/callButtonYellowPressed.png and /dev/null differ diff --git a/ui/chatArea/scrollBarDownArrow.png b/ui/chatArea/scrollBarDownArrow.png deleted file mode 100644 index 0650e7944..000000000 Binary files a/ui/chatArea/scrollBarDownArrow.png and /dev/null differ diff --git a/ui/chatArea/scrollBarDownArrow.svg b/ui/chatArea/scrollBarDownArrow.svg new file mode 100644 index 000000000..6c1713ffc --- /dev/null +++ b/ui/chatArea/scrollBarDownArrow.svg @@ -0,0 +1,23 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/ui/chatArea/scrollBarDownArrowHover.png b/ui/chatArea/scrollBarDownArrowHover.png deleted file mode 100644 index 54ae2cf6a..000000000 Binary files a/ui/chatArea/scrollBarDownArrowHover.png and /dev/null differ diff --git a/ui/chatArea/scrollBarDownArrowPressed.png b/ui/chatArea/scrollBarDownArrowPressed.png deleted file mode 100644 index 986e4ab70..000000000 Binary files a/ui/chatArea/scrollBarDownArrowPressed.png and /dev/null differ diff --git a/ui/chatArea/scrollBarHandle.png b/ui/chatArea/scrollBarHandle.png deleted file mode 100644 index fe755bb00..000000000 Binary files a/ui/chatArea/scrollBarHandle.png and /dev/null differ diff --git a/ui/chatArea/scrollBarLeftArrow.svg b/ui/chatArea/scrollBarLeftArrow.svg new file mode 100644 index 000000000..90406d516 --- /dev/null +++ b/ui/chatArea/scrollBarLeftArrow.svg @@ -0,0 +1,23 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/ui/chatArea/scrollBarRightArrow.svg b/ui/chatArea/scrollBarRightArrow.svg new file mode 100644 index 000000000..4d63e65cb --- /dev/null +++ b/ui/chatArea/scrollBarRightArrow.svg @@ -0,0 +1,23 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/ui/chatArea/scrollBarUpArrow.png b/ui/chatArea/scrollBarUpArrow.png deleted file mode 100644 index fcf1b9fad..000000000 Binary files a/ui/chatArea/scrollBarUpArrow.png and /dev/null differ diff --git a/ui/chatArea/scrollBarUpArrow.svg b/ui/chatArea/scrollBarUpArrow.svg new file mode 100644 index 000000000..da4930657 --- /dev/null +++ b/ui/chatArea/scrollBarUpArrow.svg @@ -0,0 +1,23 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/ui/chatArea/scrollBarUpArrowHover.png b/ui/chatArea/scrollBarUpArrowHover.png deleted file mode 100644 index b6f9ce109..000000000 Binary files a/ui/chatArea/scrollBarUpArrowHover.png and /dev/null differ diff --git a/ui/chatArea/scrollBarUpArrowPressed.png b/ui/chatArea/scrollBarUpArrowPressed.png deleted file mode 100644 index 401f903ce..000000000 Binary files a/ui/chatArea/scrollBarUpArrowPressed.png and /dev/null differ diff --git a/ui/emoteButton/emoteButton.css b/ui/emoteButton/emoteButton.css index 6ca825094..237e3cc31 100644 --- a/ui/emoteButton/emoteButton.css +++ b/ui/emoteButton/emoteButton.css @@ -1,22 +1,26 @@ QPushButton { - background-color: transparent; - background-image: url(":/ui/emoteButton/emoteButton.png"); - background-repeat: none; + background-color: #6bc260; + background-image: url(":/ui/emoteButton/emoteButton.svg"); + background-repeat: none; + background-position: center; + border-top-right-radius: 5px; border: none; width: 24px; height: 24px; } + QPushButton:hover { - background-image: url(":/ui/emoteButton/emoteButtonHover.png"); + background-color: #79c76f; } QPushButton:pressed { - background-image: url(":/ui/emoteButton/emoteButtonPressed.png"); + background-color: #51b244; } -QPushButton:focus { +QPushButton:focus +{ outline: none; } diff --git a/ui/emoteButton/emoteButton.png b/ui/emoteButton/emoteButton.png deleted file mode 100644 index 390c92a26..000000000 Binary files a/ui/emoteButton/emoteButton.png and /dev/null differ diff --git a/ui/emoteButton/emoteButton.svg b/ui/emoteButton/emoteButton.svg new file mode 100644 index 000000000..d5844c42c --- /dev/null +++ b/ui/emoteButton/emoteButton.svg @@ -0,0 +1,28 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/ui/emoteButton/emoteButtonHover.png b/ui/emoteButton/emoteButtonHover.png deleted file mode 100644 index 16c355bd1..000000000 Binary files a/ui/emoteButton/emoteButtonHover.png and /dev/null differ diff --git a/ui/emoteButton/emoteButtonPressed.png b/ui/emoteButton/emoteButtonPressed.png deleted file mode 100644 index 28b4208f7..000000000 Binary files a/ui/emoteButton/emoteButtonPressed.png and /dev/null differ diff --git a/ui/emoticonWidget/dot_page.png b/ui/emoticonWidget/dot_page.png deleted file mode 100644 index e74d514e2..000000000 Binary files a/ui/emoticonWidget/dot_page.png and /dev/null differ diff --git a/ui/emoticonWidget/dot_page.svg b/ui/emoticonWidget/dot_page.svg new file mode 100644 index 000000000..470860765 --- /dev/null +++ b/ui/emoticonWidget/dot_page.svg @@ -0,0 +1,40 @@ + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/ui/emoticonWidget/dot_page_current.png b/ui/emoticonWidget/dot_page_current.png deleted file mode 100644 index 7b18c42c2..000000000 Binary files a/ui/emoticonWidget/dot_page_current.png and /dev/null differ diff --git a/ui/emoticonWidget/dot_page_current.svg b/ui/emoticonWidget/dot_page_current.svg new file mode 100644 index 000000000..c0a960492 --- /dev/null +++ b/ui/emoticonWidget/dot_page_current.svg @@ -0,0 +1,40 @@ + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/ui/emoticonWidget/dot_page_hover.png b/ui/emoticonWidget/dot_page_hover.png deleted file mode 100644 index 822dbb6c6..000000000 Binary files a/ui/emoticonWidget/dot_page_hover.png and /dev/null differ diff --git a/ui/emoticonWidget/dot_page_hover.svg b/ui/emoticonWidget/dot_page_hover.svg new file mode 100644 index 000000000..09d9e56ac --- /dev/null +++ b/ui/emoticonWidget/dot_page_hover.svg @@ -0,0 +1,40 @@ + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/ui/emoticonWidget/emoticonWidget.css b/ui/emoticonWidget/emoticonWidget.css index a36a616a7..703cee370 100644 --- a/ui/emoticonWidget/emoticonWidget.css +++ b/ui/emoticonWidget/emoticonWidget.css @@ -15,22 +15,22 @@ QRadioButton::indicator QRadioButton::indicator::unchecked { - image: url(:/ui/emoticonWidget/dot_page.png); + image: url(:/ui/emoticonWidget/dot_page.svg); } QRadioButton::indicator:unchecked:hover { - image: url(:/ui/emoticonWidget/dot_page_hover.png); + image: url(:/ui/emoticonWidget/dot_page_hover.svg); } QRadioButton::indicator:unchecked:pressed { - image: url(:/ui/emoticonWidget/dot_page_hover.png); + image: url(:/ui/emoticonWidget/dot_page_hover.svg); } QRadioButton::indicator::checked { - image: url(:/ui/emoticonWidget/dot_page_current.png); + image: url(:/ui/emoticonWidget/dot_page_current.svg); } QMenu diff --git a/ui/fileButton/fileButton.css b/ui/fileButton/fileButton.css index fd06c6f0e..32d9c9ee2 100644 --- a/ui/fileButton/fileButton.css +++ b/ui/fileButton/fileButton.css @@ -1,27 +1,31 @@ QPushButton { - background-color: transparent; - background-image: url(":/ui/fileButton/fileButton.png"); - background-repeat: none; + background-color: #6bc260; + background-image: url(":/ui/fileButton/fileButton.svg"); + background-repeat: none; + background-position: center; + border-bottom-right-radius: 5px; border: none; width: 24px; height: 24px; } + QPushButton:hover { - background-image: url(":/ui/fileButton/fileButtonHover.png"); + background-color: #79c76f; } QPushButton:pressed { - background-image: url(":/ui/fileButton/fileButtonPressed.png"); + background-color: #51b244; } QPushButton[enabled="false"] { - background-image: url(":/ui/fileButton/fileButtonDisabled.png"); + background-color: #919191; } -QPushButton:focus { +QPushButton:focus +{ outline: none; } diff --git a/ui/fileButton/fileButton.png b/ui/fileButton/fileButton.png deleted file mode 100644 index edf0043ab..000000000 Binary files a/ui/fileButton/fileButton.png and /dev/null differ diff --git a/ui/fileButton/fileButton.svg b/ui/fileButton/fileButton.svg new file mode 100644 index 000000000..284cd5cdd --- /dev/null +++ b/ui/fileButton/fileButton.svg @@ -0,0 +1,27 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/ui/fileButton/fileButtonDisabled.png b/ui/fileButton/fileButtonDisabled.png deleted file mode 100644 index ed024e2df..000000000 Binary files a/ui/fileButton/fileButtonDisabled.png and /dev/null differ diff --git a/ui/fileButton/fileButtonHover.png b/ui/fileButton/fileButtonHover.png deleted file mode 100644 index e0efb229d..000000000 Binary files a/ui/fileButton/fileButtonHover.png and /dev/null differ diff --git a/ui/fileButton/fileButtonPressed.png b/ui/fileButton/fileButtonPressed.png deleted file mode 100644 index 51ae12fd2..000000000 Binary files a/ui/fileButton/fileButtonPressed.png and /dev/null differ diff --git a/ui/fileTransferWidget/fileDone.svg b/ui/fileTransferWidget/fileDone.svg new file mode 100644 index 000000000..5bc56410a --- /dev/null +++ b/ui/fileTransferWidget/fileDone.svg @@ -0,0 +1,30 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/ui/pauseFileButton/default.png b/ui/pauseFileButton/default.png deleted file mode 100644 index 4faa47e52..000000000 Binary files a/ui/pauseFileButton/default.png and /dev/null differ diff --git a/ui/pauseFileButton/hover.png b/ui/pauseFileButton/hover.png deleted file mode 100644 index e7941eb75..000000000 Binary files a/ui/pauseFileButton/hover.png and /dev/null differ diff --git a/ui/pauseFileButton/pressed.png b/ui/pauseFileButton/pressed.png deleted file mode 100644 index 39de23b1d..000000000 Binary files a/ui/pauseFileButton/pressed.png and /dev/null differ diff --git a/ui/pauseFileButton/style.css b/ui/pauseFileButton/style.css deleted file mode 100644 index 9e501c2b6..000000000 --- a/ui/pauseFileButton/style.css +++ /dev/null @@ -1,22 +0,0 @@ -QPushButton -{ - background-color: transparent; - background-image: url(":/ui/pauseFileButton/default.png"); - background-repeat: none; - border: none; - width: 24px; - height: 24px; -} -QPushButton:hover -{ - background-image: url(":/ui/pauseFileButton/hover.png"); -} - -QPushButton:pressed -{ - background-image: url(":/ui/pauseFileButton/pressed.png"); -} - -QPushButton:focus { - outline: none; -} diff --git a/ui/rejectCall/rejectCall.png b/ui/rejectCall/rejectCall.png deleted file mode 100644 index a0480be5c..000000000 Binary files a/ui/rejectCall/rejectCall.png and /dev/null differ diff --git a/ui/sendButton/sendButton.css b/ui/sendButton/sendButton.css index 087b182c9..d3b9998a8 100644 --- a/ui/sendButton/sendButton.css +++ b/ui/sendButton/sendButton.css @@ -1,22 +1,26 @@ QPushButton { - background-color: transparent; - background-image: url(":/ui/sendButton/sendButton.png"); - background-repeat: none; + background-color: #6bc260; + background-image: url(":/ui/sendButton/sendButton.svg"); + background-repeat: none; + background-position: center; border: none; + border-radius: 5px; width: 50px; height: 50px; } + QPushButton:hover { - background-image: url(":/ui/sendButton/sendButtonHover.png"); + background-color: #79c76f; } QPushButton:pressed { - background-image: url(":/ui/sendButton/sendButtonPressed.png"); + background-color: #51b244; } -QPushButton:focus { +QPushButton:focus +{ outline: none; } diff --git a/ui/sendButton/sendButton.png b/ui/sendButton/sendButton.png deleted file mode 100644 index 4a1b87a47..000000000 Binary files a/ui/sendButton/sendButton.png and /dev/null differ diff --git a/ui/sendButton/sendButton.svg b/ui/sendButton/sendButton.svg new file mode 100644 index 000000000..3699eb11b --- /dev/null +++ b/ui/sendButton/sendButton.svg @@ -0,0 +1,22 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/ui/sendButton/sendButtonHover.png b/ui/sendButton/sendButtonHover.png deleted file mode 100644 index bdeb81217..000000000 Binary files a/ui/sendButton/sendButtonHover.png and /dev/null differ diff --git a/ui/sendButton/sendButtonPressed.png b/ui/sendButton/sendButtonPressed.png deleted file mode 100644 index 791218571..000000000 Binary files a/ui/sendButton/sendButtonPressed.png and /dev/null differ diff --git a/ui/settings/mainContent.css b/ui/settings/mainContent.css index 76fcef3b4..49fdff15d 100644 --- a/ui/settings/mainContent.css +++ b/ui/settings/mainContent.css @@ -110,14 +110,14 @@ QScrollBar::handle:vertical:pressed { } QScrollBar::add-line:vertical { - background: url(":ui/chatArea/scrollBarDownArrow.png") center; + background: url(":ui/chatArea/scrollBarDownArrow.svg") center; height: 0px; subcontrol-position: bottom; subcontrol-origin: margin; } QScrollBar::sub-line:vertical { - background: url(":ui/chatArea/scrollBarUpArrow.png") center; + background: url(":ui/chatArea/scrollBarUpArrow.svg") center; height: 0px; subcontrol-position: top; subcontrol-origin: margin; @@ -161,14 +161,14 @@ QScrollBar::handle:horizontal:pressed { } QScrollBar::add-line:horizontal { - background: url(":ui/chatArea/scrollBarRightArrow.png") center; + background: url(":ui/chatArea/scrollBarRightArrow.svg") center; width: 0px; subcontrol-position: right; subcontrol-origin: margin; } QScrollBar::sub-line:horizontal { - background: url(":ui/chatArea/scrollBarLeftArrow.png") center; + background: url(":ui/chatArea/scrollBarLeftArrow.svg") center; width: 0px; subcontrol-position: left; subcontrol-origin: margin; diff --git a/ui/statusButton/menu_indicator.png b/ui/statusButton/menu_indicator.png deleted file mode 100644 index 92abefa55..000000000 Binary files a/ui/statusButton/menu_indicator.png and /dev/null differ diff --git a/ui/statusButton/menu_indicator.svg b/ui/statusButton/menu_indicator.svg new file mode 100644 index 000000000..36d6c3cd7 --- /dev/null +++ b/ui/statusButton/menu_indicator.svg @@ -0,0 +1,23 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/ui/statusButton/statusButton.css b/ui/statusButton/statusButton.css index 03c1377c3..ddb0653f2 100644 --- a/ui/statusButton/statusButton.css +++ b/ui/statusButton/statusButton.css @@ -32,7 +32,7 @@ QPushButton::menu-indicator {image: none;} QPushButton::menu-indicator:pressed, QPushButton::menu-indicator:open { - image: url(":ui/statusButton/menu_indicator.png"); + image: url(":ui/statusButton/menu_indicator.svg"); subcontrol-origin: padding; subcontrol-position: bottom center; position: relative; diff --git a/ui/stopFileButton/default.png b/ui/stopFileButton/default.png deleted file mode 100644 index 950fd3b17..000000000 Binary files a/ui/stopFileButton/default.png and /dev/null differ diff --git a/ui/stopFileButton/hover.png b/ui/stopFileButton/hover.png deleted file mode 100644 index 023822a5b..000000000 Binary files a/ui/stopFileButton/hover.png and /dev/null differ diff --git a/ui/stopFileButton/pressed.png b/ui/stopFileButton/pressed.png deleted file mode 100644 index bb18f999a..000000000 Binary files a/ui/stopFileButton/pressed.png and /dev/null differ diff --git a/ui/stopFileButton/style.css b/ui/stopFileButton/style.css deleted file mode 100644 index 7cb6abfc6..000000000 --- a/ui/stopFileButton/style.css +++ /dev/null @@ -1,22 +0,0 @@ -QPushButton -{ - background-color: transparent; - background-image: url(":/ui/stopFileButton/default.png"); - background-repeat: none; - border: none; - width: 24px; - height: 24px; -} -QPushButton:hover -{ - background-image: url(":/ui/stopFileButton/hover.png"); -} - -QPushButton:pressed -{ - background-image: url(":/ui/stopFileButton/pressed.png"); -} - -QPushButton:focus { - outline: none; -} diff --git a/ui/videoButton/videoButton.css b/ui/videoButton/videoButton.css index 7bcfe93d0..6b7c95972 100644 --- a/ui/videoButton/videoButton.css +++ b/ui/videoButton/videoButton.css @@ -1,71 +1,82 @@ QPushButton#green { - background-color: transparent; - background-image: url(":/ui/videoButton/videoButton.png"); - background-repeat: none; + background-color: #6bc260; + background-image: url(":/ui/videoButton/videoButton.svg"); + background-repeat: none; + background-position: center; border: none; + border-radius: 5px; width: 50px; height: 40px; } QPushButton#green:hover { - background-image: url(":/ui/videoButton/videoButtonHover.png"); + background-color: #79c76f; } QPushButton#green:pressed { - background-image: url(":/ui/videoButton/videoButtonPressed.png"); + background-color: #51b244; } QPushButton#red { - background-color: transparent; - background-image: url(":/ui/videoButton/videoButtonRed.png"); - background-repeat: none; + background-color: #c84e4e; + background-image: url(":/ui/videoButton/videoButton.svg"); + background-repeat: none; + background-position: center; border: none; + border-radius: 5px; width: 50px; height: 40px; } + QPushButton#red:hover { - background-image: url(":/ui/videoButton/videoButtonRedHover.png"); + background-color: #e87474; } QPushButton#red:pressed { - background-image: url(":/ui/videoButton/videoButtonRedPressed.png"); + background-color: #df3b3b; } QPushButton#yellow { - background-color: transparent; - background-image: url(":/ui/videoButton/videoButtonYellow.png"); - background-repeat: none; + background-color: #e6e465; + background-image: url(":/ui/videoButton/videoButton.svg"); + background-repeat: none; + background-position: center; border: none; + border-radius: 5px; width: 50px; height: 40px; } + QPushButton#yellow:hover { - background-image: url(":/ui/videoButton/videoButtonYellowHover.png"); + background-color: #e8e774; } QPushButton#yellow:pressed { - background-image: url(":/ui/videoButton/videoButtonYellowPressed.png"); + background-color: #e3e155; } QPushButton#grey { - background-color: transparent; - background-image: url(":/ui/videoButton/videoButtonDisabled.png"); - background-repeat: none; + background-color: #919191; + background-image: url(":/ui/videoButton/videoButton.svg"); + background-repeat: none; + background-position: center; border: none; + border-radius: 5px; width: 50px; height: 40px; } -QPushButton:focus { +QPushButton:focus +{ outline: none; } diff --git a/ui/videoButton/videoButton.png b/ui/videoButton/videoButton.png deleted file mode 100644 index 1003411f4..000000000 Binary files a/ui/videoButton/videoButton.png and /dev/null differ diff --git a/ui/videoButton/videoButton.svg b/ui/videoButton/videoButton.svg new file mode 100644 index 000000000..9d243f378 --- /dev/null +++ b/ui/videoButton/videoButton.svg @@ -0,0 +1,27 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/ui/videoButton/videoButtonDisabled.png b/ui/videoButton/videoButtonDisabled.png deleted file mode 100644 index af801d302..000000000 Binary files a/ui/videoButton/videoButtonDisabled.png and /dev/null differ diff --git a/ui/videoButton/videoButtonHover.png b/ui/videoButton/videoButtonHover.png deleted file mode 100644 index aeb364120..000000000 Binary files a/ui/videoButton/videoButtonHover.png and /dev/null differ diff --git a/ui/videoButton/videoButtonPressed.png b/ui/videoButton/videoButtonPressed.png deleted file mode 100644 index 64bf78c39..000000000 Binary files a/ui/videoButton/videoButtonPressed.png and /dev/null differ diff --git a/ui/videoButton/videoButtonRed.png b/ui/videoButton/videoButtonRed.png deleted file mode 100644 index 0599d252f..000000000 Binary files a/ui/videoButton/videoButtonRed.png and /dev/null differ diff --git a/ui/videoButton/videoButtonRedHover.png b/ui/videoButton/videoButtonRedHover.png deleted file mode 100644 index e535a8cf2..000000000 Binary files a/ui/videoButton/videoButtonRedHover.png and /dev/null differ diff --git a/ui/videoButton/videoButtonRedPressed.png b/ui/videoButton/videoButtonRedPressed.png deleted file mode 100644 index 4fbaac701..000000000 Binary files a/ui/videoButton/videoButtonRedPressed.png and /dev/null differ diff --git a/ui/videoButton/videoButtonYellow.png b/ui/videoButton/videoButtonYellow.png deleted file mode 100644 index 71b5410b4..000000000 Binary files a/ui/videoButton/videoButtonYellow.png and /dev/null differ diff --git a/ui/videoButton/videoButtonYellowHover.png b/ui/videoButton/videoButtonYellowHover.png deleted file mode 100644 index f1bd79884..000000000 Binary files a/ui/videoButton/videoButtonYellowHover.png and /dev/null differ diff --git a/ui/videoButton/videoButtonYellowPressed.png b/ui/videoButton/videoButtonYellowPressed.png deleted file mode 100644 index 8c92af789..000000000 Binary files a/ui/videoButton/videoButtonYellowPressed.png and /dev/null differ diff --git a/ui/window/applicationIcon.png b/ui/window/applicationIcon.png deleted file mode 100644 index b9cbe71bf..000000000 Binary files a/ui/window/applicationIcon.png and /dev/null differ diff --git a/ui/window/statusPanel.css b/ui/window/statusPanel.css index 536c50918..158eae70e 100644 --- a/ui/window/statusPanel.css +++ b/ui/window/statusPanel.css @@ -39,26 +39,6 @@ QLineEdit height: 40px; } -#statusPanel > #statusHead > #statusButton[status="online"] -{ - image: url(":ui/statusButton/dot_online.png") center center; -} - -#statusPanel > #statusHead > #statusButton[status="away"] -{ - image: url(":ui/statusButton/dot_idle.png") center center; -} - -#statusPanel > #statusHead > #statusButton[status="busy"] -{ - image: url(":ui/statusButton/dot_busy.png") center center; -} - -#statusPanel > #statusHead > #statusButton[status="offline"] -{ - image: url(":ui/statusButton/dot_away.png") center center; -} - /*Bugged in Qt, but it's probably better to leave enabled so that users can tell it's clickable*/ #statusPanel > #statusHead > #statusButton:hover {