diff --git a/src/chatlog/content/filetransferwidget.cpp b/src/chatlog/content/filetransferwidget.cpp index fc43bce04..60eaad726 100644 --- a/src/chatlog/content/filetransferwidget.cpp +++ b/src/chatlog/content/filetransferwidget.cpp @@ -52,8 +52,8 @@ FileTransferWidget::FileTransferWidget(QWidget* parent, ToxFile file) : QWidget(parent) , ui(new Ui::FileTransferWidget) , fileInfo(file) - , backgroundColor(Style::getColor(Style::GroundExtra)) - , buttonColor(Style::getColor(Style::Yellow)) + , backgroundColor(Style::getColor(Style::TransferMiddle)) + , buttonColor(Style::getColor(Style::TransferWait)) , buttonBackgroundColor(Style::getColor(Style::GroundBase)) , active(true) { @@ -329,14 +329,14 @@ void FileTransferWidget::updateWidgetColor(ToxFile const& file) case ToxFile::INITIALIZING: case ToxFile::PAUSED: case ToxFile::TRANSMITTING: - setBackgroundColor(Style::getColor(Style::GroundExtra), false); + setBackgroundColor(Style::getColor(Style::TransferMiddle), false); break; case ToxFile::BROKEN: case ToxFile::CANCELED: - setBackgroundColor(Style::getColor(Style::Red), true); + setBackgroundColor(Style::getColor(Style::TransferBad), true); break; case ToxFile::FINISHED: - setBackgroundColor(Style::getColor(Style::Green), true); + setBackgroundColor(Style::getColor(Style::TransferGood), true); break; default: qCritical() << "Invalid file status"; @@ -492,7 +492,7 @@ void FileTransferWidget::setupButtons(ToxFile const& file) ui->rightButton->setObjectName("cancel"); ui->rightButton->setToolTip(tr("Cancel transfer")); - setButtonColor(Style::getColor(Style::Green)); + setButtonColor(Style::getColor(Style::TransferGood)); break; case ToxFile::PAUSED: @@ -510,7 +510,7 @@ void FileTransferWidget::setupButtons(ToxFile const& file) ui->rightButton->setObjectName("cancel"); ui->rightButton->setToolTip(tr("Cancel transfer")); - setButtonColor(Style::getColor(Style::GroundExtra)); + setButtonColor(Style::getColor(Style::TransferMiddle)); break; case ToxFile::INITIALIZING: diff --git a/src/widget/style.cpp b/src/widget/style.cpp index f298a0e96..c7ef5b313 100644 --- a/src/widget/style.cpp +++ b/src/widget/style.cpp @@ -136,9 +136,10 @@ QString Style::getThemeFolder() } -QMap Style::aliasColors = {{Green, "green"}, - {Yellow, "yellow"}, - {Red, "red"}, +QMap Style::aliasColors = {{TransferGood, "transferGood"}, + {TransferWait, "transferWait"}, + {TransferBad, "transferBad"}, + {TransferMiddle, "transferMiddle"}, {MainText,"mainText"}, {NameActive, "nameActive"}, {StatusActive,"statusActive"}, @@ -404,9 +405,10 @@ void Style::initPalette() void Style::initDictColor() { dictColor = { - {"@green", Style::getColor(Style::Green).name()}, - {"@yellow", Style::getColor(Style::Yellow).name()}, - {"@red", Style::getColor(Style::Red).name()}, + {"@transferGood", Style::getColor(Style::TransferGood).name()}, + {"@transferWait", Style::getColor(Style::TransferWait).name()}, + {"@transferBad", Style::getColor(Style::TransferBad).name()}, + {"@transferMiddle", Style::getColor(Style::TransferMiddle).name()}, {"@mainText", Style::getColor(Style::MainText).name()}, {"@nameActive", Style::getColor(Style::NameActive).name()}, {"@statusActive", Style::getColor(Style::StatusActive).name()}, diff --git a/src/widget/style.h b/src/widget/style.h index fd0e9dae2..fa9a0b0c3 100644 --- a/src/widget/style.h +++ b/src/widget/style.h @@ -31,9 +31,10 @@ class Style public: enum ColorPalette { - Green, - Yellow, - Red, + TransferGood, + TransferWait, + TransferBad, + TransferMiddle, MainText, NameActive, StatusActive, diff --git a/themes/dark/fileTransferInstance/filetransferWidget.css b/themes/dark/fileTransferInstance/filetransferWidget.css index 499c095d8..95090aeb8 100644 --- a/themes/dark/fileTransferInstance/filetransferWidget.css +++ b/themes/dark/fileTransferInstance/filetransferWidget.css @@ -1,5 +1,5 @@ [fontColor="white"] QLabel { - color: white; + color: @mainText; font: @big; } @@ -22,6 +22,6 @@ QProgressBar { } QProgressBar::chunk { - background-color: @groundExtra; + background-color: @transferMiddle; width: 1px; } diff --git a/themes/dark/palette.ini b/themes/dark/palette.ini index bac0297a2..07b36d2f2 100644 --- a/themes/dark/palette.ini +++ b/themes/dark/palette.ini @@ -1,7 +1,8 @@ [colors] -green="#6bc260" -yellow="#cebf44" -red="#c84e4e" +transferGood="#42783b" +transferWait="#958931" +transferBad="#963a3a" +transferMiddle="#707070" mainText="#c3c3c3" nameActive="#c3c3c3" statusActive="#d1d1d1" diff --git a/themes/default/fileTransferInstance/filetransferWidget.css b/themes/default/fileTransferInstance/filetransferWidget.css index 5a0a37a0e..8c24fe12a 100644 --- a/themes/default/fileTransferInstance/filetransferWidget.css +++ b/themes/default/fileTransferInstance/filetransferWidget.css @@ -22,6 +22,6 @@ QProgressBar { } QProgressBar::chunk { - background-color: @groundExtra; + background-color: @transferMiddle; width: 1px; } diff --git a/themes/default/palette.ini b/themes/default/palette.ini index 59b3b6d4b..8d7171caf 100644 --- a/themes/default/palette.ini +++ b/themes/default/palette.ini @@ -1,7 +1,8 @@ [colors] -green="#6bc260" -yellow="#cebf44" -red="#c84e4e" +transferGood="#6bc260" +transferWait="#cebf44" +transferBad="#c84e4e" +transferMiddle="#d1d1d1" mainText="#000000" nameActive="#1c1c1c" statusActive="#414141"