mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
style: edit colors for transfer widget
This commit is contained in:
parent
18b52ce568
commit
5ed1065230
|
@ -52,8 +52,8 @@ FileTransferWidget::FileTransferWidget(QWidget* parent, ToxFile file)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
, ui(new Ui::FileTransferWidget)
|
, ui(new Ui::FileTransferWidget)
|
||||||
, fileInfo(file)
|
, fileInfo(file)
|
||||||
, backgroundColor(Style::getColor(Style::GroundExtra))
|
, backgroundColor(Style::getColor(Style::TransferMiddle))
|
||||||
, buttonColor(Style::getColor(Style::Yellow))
|
, buttonColor(Style::getColor(Style::TransferWait))
|
||||||
, buttonBackgroundColor(Style::getColor(Style::GroundBase))
|
, buttonBackgroundColor(Style::getColor(Style::GroundBase))
|
||||||
, active(true)
|
, active(true)
|
||||||
{
|
{
|
||||||
|
@ -329,14 +329,14 @@ void FileTransferWidget::updateWidgetColor(ToxFile const& file)
|
||||||
case ToxFile::INITIALIZING:
|
case ToxFile::INITIALIZING:
|
||||||
case ToxFile::PAUSED:
|
case ToxFile::PAUSED:
|
||||||
case ToxFile::TRANSMITTING:
|
case ToxFile::TRANSMITTING:
|
||||||
setBackgroundColor(Style::getColor(Style::GroundExtra), false);
|
setBackgroundColor(Style::getColor(Style::TransferMiddle), false);
|
||||||
break;
|
break;
|
||||||
case ToxFile::BROKEN:
|
case ToxFile::BROKEN:
|
||||||
case ToxFile::CANCELED:
|
case ToxFile::CANCELED:
|
||||||
setBackgroundColor(Style::getColor(Style::Red), true);
|
setBackgroundColor(Style::getColor(Style::TransferBad), true);
|
||||||
break;
|
break;
|
||||||
case ToxFile::FINISHED:
|
case ToxFile::FINISHED:
|
||||||
setBackgroundColor(Style::getColor(Style::Green), true);
|
setBackgroundColor(Style::getColor(Style::TransferGood), true);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
qCritical() << "Invalid file status";
|
qCritical() << "Invalid file status";
|
||||||
|
@ -492,7 +492,7 @@ void FileTransferWidget::setupButtons(ToxFile const& file)
|
||||||
ui->rightButton->setObjectName("cancel");
|
ui->rightButton->setObjectName("cancel");
|
||||||
ui->rightButton->setToolTip(tr("Cancel transfer"));
|
ui->rightButton->setToolTip(tr("Cancel transfer"));
|
||||||
|
|
||||||
setButtonColor(Style::getColor(Style::Green));
|
setButtonColor(Style::getColor(Style::TransferGood));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ToxFile::PAUSED:
|
case ToxFile::PAUSED:
|
||||||
|
@ -510,7 +510,7 @@ void FileTransferWidget::setupButtons(ToxFile const& file)
|
||||||
ui->rightButton->setObjectName("cancel");
|
ui->rightButton->setObjectName("cancel");
|
||||||
ui->rightButton->setToolTip(tr("Cancel transfer"));
|
ui->rightButton->setToolTip(tr("Cancel transfer"));
|
||||||
|
|
||||||
setButtonColor(Style::getColor(Style::GroundExtra));
|
setButtonColor(Style::getColor(Style::TransferMiddle));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ToxFile::INITIALIZING:
|
case ToxFile::INITIALIZING:
|
||||||
|
|
|
@ -136,9 +136,10 @@ QString Style::getThemeFolder()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QMap<Style::ColorPalette, QString> Style::aliasColors = {{Green, "green"},
|
QMap<Style::ColorPalette, QString> Style::aliasColors = {{TransferGood, "transferGood"},
|
||||||
{Yellow, "yellow"},
|
{TransferWait, "transferWait"},
|
||||||
{Red, "red"},
|
{TransferBad, "transferBad"},
|
||||||
|
{TransferMiddle, "transferMiddle"},
|
||||||
{MainText,"mainText"},
|
{MainText,"mainText"},
|
||||||
{NameActive, "nameActive"},
|
{NameActive, "nameActive"},
|
||||||
{StatusActive,"statusActive"},
|
{StatusActive,"statusActive"},
|
||||||
|
@ -404,9 +405,10 @@ void Style::initPalette()
|
||||||
void Style::initDictColor()
|
void Style::initDictColor()
|
||||||
{
|
{
|
||||||
dictColor = {
|
dictColor = {
|
||||||
{"@green", Style::getColor(Style::Green).name()},
|
{"@transferGood", Style::getColor(Style::TransferGood).name()},
|
||||||
{"@yellow", Style::getColor(Style::Yellow).name()},
|
{"@transferWait", Style::getColor(Style::TransferWait).name()},
|
||||||
{"@red", Style::getColor(Style::Red).name()},
|
{"@transferBad", Style::getColor(Style::TransferBad).name()},
|
||||||
|
{"@transferMiddle", Style::getColor(Style::TransferMiddle).name()},
|
||||||
{"@mainText", Style::getColor(Style::MainText).name()},
|
{"@mainText", Style::getColor(Style::MainText).name()},
|
||||||
{"@nameActive", Style::getColor(Style::NameActive).name()},
|
{"@nameActive", Style::getColor(Style::NameActive).name()},
|
||||||
{"@statusActive", Style::getColor(Style::StatusActive).name()},
|
{"@statusActive", Style::getColor(Style::StatusActive).name()},
|
||||||
|
|
|
@ -31,9 +31,10 @@ class Style
|
||||||
public:
|
public:
|
||||||
enum ColorPalette
|
enum ColorPalette
|
||||||
{
|
{
|
||||||
Green,
|
TransferGood,
|
||||||
Yellow,
|
TransferWait,
|
||||||
Red,
|
TransferBad,
|
||||||
|
TransferMiddle,
|
||||||
MainText,
|
MainText,
|
||||||
NameActive,
|
NameActive,
|
||||||
StatusActive,
|
StatusActive,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[fontColor="white"] QLabel {
|
[fontColor="white"] QLabel {
|
||||||
color: white;
|
color: @mainText;
|
||||||
font: @big;
|
font: @big;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,6 @@ QProgressBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
QProgressBar::chunk {
|
QProgressBar::chunk {
|
||||||
background-color: @groundExtra;
|
background-color: @transferMiddle;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
[colors]
|
[colors]
|
||||||
green="#6bc260"
|
transferGood="#42783b"
|
||||||
yellow="#cebf44"
|
transferWait="#958931"
|
||||||
red="#c84e4e"
|
transferBad="#963a3a"
|
||||||
|
transferMiddle="#707070"
|
||||||
mainText="#c3c3c3"
|
mainText="#c3c3c3"
|
||||||
nameActive="#c3c3c3"
|
nameActive="#c3c3c3"
|
||||||
statusActive="#d1d1d1"
|
statusActive="#d1d1d1"
|
||||||
|
|
|
@ -22,6 +22,6 @@ QProgressBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
QProgressBar::chunk {
|
QProgressBar::chunk {
|
||||||
background-color: @groundExtra;
|
background-color: @transferMiddle;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
[colors]
|
[colors]
|
||||||
green="#6bc260"
|
transferGood="#6bc260"
|
||||||
yellow="#cebf44"
|
transferWait="#cebf44"
|
||||||
red="#c84e4e"
|
transferBad="#c84e4e"
|
||||||
|
transferMiddle="#d1d1d1"
|
||||||
mainText="#000000"
|
mainText="#000000"
|
||||||
nameActive="#1c1c1c"
|
nameActive="#1c1c1c"
|
||||||
statusActive="#414141"
|
statusActive="#414141"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user