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

Merge pull request #5601

TriKriSta (2):
      style: use css files for toxId
      style: edit styles for myltiple windows
This commit is contained in:
Anthony Bilinski 2019-04-01 11:44:29 -07:00
commit 1997d1187e
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
12 changed files with 73 additions and 53 deletions

View File

@ -46,7 +46,6 @@
<file>img/transfer.svg</file>
<file>themes/dark/palette.ini</file>
<file>themes/dark/fileTransferWidget/fileDone.svg</file>
<file>themes/dark/centralWidget/centralWidget.css</file>
<file>themes/dark/chatArea/chatArea.css</file>
<file>themes/dark/chatArea/chatHead.css</file>
<file>themes/dark/chatArea/innerStyle.css</file>
@ -105,6 +104,7 @@
<file>themes/dark/fileTransferInstance/filetransferWidget.css</file>
<file>themes/dark/genericChatForm/genericChatForm.css</file>
<file>themes/dark/acceptCall/acceptCall.svg</file>
<file>themes/dark/addFriendForm/toxId.css</file>
<file>themes/dark/rejectCall/rejectCall.svg</file>
<file>themes/dark/notificationEdge/notificationEdge.css</file>
<file>themes/dark/loginScreen/loginScreen.css</file>
@ -112,7 +112,6 @@
<file>themes/dark/tooliconsZone/tooliconsZone.css</file>
<file>themes/default/palette.ini</file>
<file>themes/default/fileTransferWidget/fileDone.svg</file>
<file>themes/default/centralWidget/centralWidget.css</file>
<file>themes/default/chatArea/chatArea.css</file>
<file>themes/default/chatArea/chatHead.css</file>
<file>themes/default/chatArea/innerStyle.css</file>
@ -169,6 +168,7 @@
<file>themes/default/fileTransferInstance/filetransferWidget.css</file>
<file>themes/default/genericChatForm/genericChatForm.css</file>
<file>themes/default/acceptCall/acceptCall.svg</file>
<file>themes/default/addFriendForm/toxId.css</file>
<file>themes/default/rejectCall/rejectCall.svg</file>
<file>img/login_logo.svg</file>
<file>themes/default/notificationEdge/notificationEdge.css</file>

View File

@ -25,6 +25,7 @@
#include "src/widget/contentlayout.h"
#include "src/widget/gui.h"
#include "src/widget/tool/croppinglabel.h"
#include "src/widget/style.h"
#include "src/widget/translator.h"
#include <QApplication>
#include <QClipboard>
@ -294,7 +295,7 @@ void AddFriendForm::onIdChanged(const QString& id)
isValidId ? QStringLiteral("%1 (%2)") : QStringLiteral("%1 <font color='red'>(%2)</font>");
toxIdLabel.setText(labelText.arg(toxIdText, toxIdComment));
toxId.setStyleSheet(isValidOrEmpty ? QStringLiteral("")
: QStringLiteral("QLineEdit { background-color: #FFC1C1; }"));
: Style::getStylesheet("addFriendForm/toxId.css"));
toxId.setToolTip(isValidOrEmpty ? QStringLiteral("") : tr("Invalid Tox ID format"));
sendButton.setEnabled(isValidId);

View File

@ -299,7 +299,6 @@ void GenericChatForm::reloadTheme()
{
const Settings& s = Settings::getInstance();
setStyleSheet(Style::getStylesheet("genericChatForm/genericChatForm.css"));
msgEdit->setStyleSheet(Style::getStylesheet("msgEdit/msgEdit.css")
+ fontToCss(s.getChatMessageFont(), "QTextEdit"));

View File

@ -1634,6 +1634,7 @@ ContentLayout* Widget::createContentDialog(DialogType type) const
Translator::registerHandler(std::bind(&Dialog::retranslateUi, this), this);
retranslateUi();
setWindowIcon(QIcon(":/img/icons/qtox.svg"));
setStyleSheet(Style::getStylesheet("window/general.css"));
connect(Core::getInstance(), &Core::usernameSet, this, &Dialog::retranslateUi);
}
@ -2185,7 +2186,6 @@ void Widget::reloadTheme()
{
this->setStyleSheet(Style::getStylesheet("window/general.css"));
QString statusPanelStyle = Style::getStylesheet("window/statusPanel.css");
ui->centralwidget->setStyleSheet(Style::getStylesheet(QStringLiteral("centralWidget/centralWidget.css")));
ui->tooliconsZone->setStyleSheet(Style::getStylesheet("tooliconsZone/tooliconsZone.css"));
ui->statusPanel->setStyleSheet(statusPanelStyle);
ui->statusHead->setStyleSheet(statusPanelStyle);

View File

@ -0,0 +1,3 @@
QLineEdit {
background-color: #8a3f3a;
}

View File

@ -1,24 +0,0 @@
QLabel
{
color: @mainText;
}
QLineEdit
{
color: @mainText;
}
QTextEdit
{
color: @mainText;
}
QSpinBox, QDoubleSpinBox
{
color: @mainText;
}
QListView
{
color: @mainText;
}

View File

@ -18,4 +18,5 @@ QSplitter:handle
QWidget
{
background: @groundBase;
color: @mainText;
}

View File

@ -6,6 +6,11 @@ QToolTip
background: #ffffdc;
}
QDialog
{
background: @groundBase;
}
QWidget#contentWidget
{
background: @groundBase;
@ -27,3 +32,28 @@ QTabBar::tab:!selected
background: #444242;
color: #8e8e8e;
}
QLabel
{
color: @mainText;
}
QLineEdit
{
color: @mainText;
}
QTextEdit
{
color: @mainText;
}
QSpinBox, QDoubleSpinBox
{
color: @mainText;
}
QListView
{
color: @mainText;
}

View File

@ -0,0 +1,3 @@
QLineEdit {
background-color: #FFC1C1;
}

View File

@ -1,24 +0,0 @@
QLabel
{
color: @mainText;
}
QLineEdit
{
color: @mainText;
}
QTextEdit
{
color: @mainText;
}
QSpinBox, QDoubleSpinBox
{
color: @mainText;
}
QListView
{
color: @mainText;
}

View File

@ -14,3 +14,9 @@ QSplitter:handle
color: white;
background-color: white;
}
QWidget
{
background: @groundBase;
color: @mainText;
}

View File

@ -22,3 +22,28 @@ QTabBar::tab:!selected
background: #d0d1d1;
color: #5e5e5e;
}
QLabel
{
color: @mainText;
}
QLineEdit
{
color: @mainText;
}
QTextEdit
{
color: @mainText;
}
QSpinBox, QDoubleSpinBox
{
color: @mainText;
}
QListView
{
color: @mainText;
}