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)
|
||||
, 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:
|
||||
|
|
|
@ -136,9 +136,10 @@ QString Style::getThemeFolder()
|
|||
}
|
||||
|
||||
|
||||
QMap<Style::ColorPalette, QString> Style::aliasColors = {{Green, "green"},
|
||||
{Yellow, "yellow"},
|
||||
{Red, "red"},
|
||||
QMap<Style::ColorPalette, QString> 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()},
|
||||
|
|
|
@ -31,9 +31,10 @@ class Style
|
|||
public:
|
||||
enum ColorPalette
|
||||
{
|
||||
Green,
|
||||
Yellow,
|
||||
Red,
|
||||
TransferGood,
|
||||
TransferWait,
|
||||
TransferBad,
|
||||
TransferMiddle,
|
||||
MainText,
|
||||
NameActive,
|
||||
StatusActive,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -22,6 +22,6 @@ QProgressBar {
|
|||
}
|
||||
|
||||
QProgressBar::chunk {
|
||||
background-color: @groundExtra;
|
||||
background-color: @transferMiddle;
|
||||
width: 1px;
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue
Block a user