1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge pull request #5584

TriKriSta (2):
      style: edit colors for transfer widget
      refactor: delete unused files
This commit is contained in:
Anthony Bilinski 2019-03-24 15:14:51 -07:00
commit ca02dcefaa
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
10 changed files with 30 additions and 79 deletions

View File

@ -80,7 +80,6 @@
<file>themes/dark/emoticonWidget/dot_page_current.svg</file> <file>themes/dark/emoticonWidget/dot_page_current.svg</file>
<file>themes/dark/emoticonWidget/dot_page_hover.svg</file> <file>themes/dark/emoticonWidget/dot_page_hover.svg</file>
<file>themes/dark/emoticonWidget/emoticonWidget.css</file> <file>themes/dark/emoticonWidget/emoticonWidget.css</file>
<file>themes/dark/fileTransferWidget/fileTransferWidget.css</file>
<file>themes/dark/friendList/friendList.css</file> <file>themes/dark/friendList/friendList.css</file>
<file>themes/dark/msgEdit/msgEdit.css</file> <file>themes/dark/msgEdit/msgEdit.css</file>
<file>themes/dark/settings/mainContent.css</file> <file>themes/dark/settings/mainContent.css</file>
@ -145,7 +144,6 @@
<file>themes/default/emoticonWidget/dot_page_current.svg</file> <file>themes/default/emoticonWidget/dot_page_current.svg</file>
<file>themes/default/emoticonWidget/dot_page_hover.svg</file> <file>themes/default/emoticonWidget/dot_page_hover.svg</file>
<file>themes/default/emoticonWidget/emoticonWidget.css</file> <file>themes/default/emoticonWidget/emoticonWidget.css</file>
<file>themes/default/fileTransferWidget/fileTransferWidget.css</file>
<file>themes/default/friendList/friendList.css</file> <file>themes/default/friendList/friendList.css</file>
<file>themes/default/msgEdit/msgEdit.css</file> <file>themes/default/msgEdit/msgEdit.css</file>
<file>themes/default/settings/mainContent.css</file> <file>themes/default/settings/mainContent.css</file>

View File

@ -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:

View File

@ -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()},

View File

@ -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,

View File

@ -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;
} }

View File

@ -1,26 +0,0 @@
#default {
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
background-color: rgb(209,209,209);
}
#error {
border-radius: 6px;
background-color: rgb(200,78,78);
}
#success {
background-color: rgb(107,194,96);
border-radius: 6px;
}
QProgressBar {
background-color: transparent;
border: 1px solid rgb(150,150,150);
height: 11px;
}
QProgressBar::chunk {
background-color: rgb(150,150,150);
width: 2px;
}

View File

@ -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"

View File

@ -22,6 +22,6 @@ QProgressBar {
} }
QProgressBar::chunk { QProgressBar::chunk {
background-color: @groundExtra; background-color: @transferMiddle;
width: 1px; width: 1px;
} }

View File

@ -1,26 +0,0 @@
#default {
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
background-color: rgb(209,209,209);
}
#error {
border-radius: 6px;
background-color: rgb(200,78,78);
}
#success {
background-color: rgb(107,194,96);
border-radius: 6px;
}
QProgressBar {
background-color: transparent;
border: 1px solid rgb(150,150,150);
height: 11px;
}
QProgressBar::chunk {
background-color: rgb(150,150,150);
width: 2px;
}

View File

@ -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"