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:
commit
ca02dcefaa
2
res.qrc
2
res.qrc
|
@ -80,7 +80,6 @@
|
|||
<file>themes/dark/emoticonWidget/dot_page_current.svg</file>
|
||||
<file>themes/dark/emoticonWidget/dot_page_hover.svg</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/msgEdit/msgEdit.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_hover.svg</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/msgEdit/msgEdit.css</file>
|
||||
<file>themes/default/settings/mainContent.css</file>
|
||||
|
|
|
@ -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,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;
|
||||
}
|
|
@ -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,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;
|
||||
}
|
|
@ -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