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:
commit
1997d1187e
4
res.qrc
4
res.qrc
@ -46,7 +46,6 @@
|
|||||||
<file>img/transfer.svg</file>
|
<file>img/transfer.svg</file>
|
||||||
<file>themes/dark/palette.ini</file>
|
<file>themes/dark/palette.ini</file>
|
||||||
<file>themes/dark/fileTransferWidget/fileDone.svg</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/chatArea.css</file>
|
||||||
<file>themes/dark/chatArea/chatHead.css</file>
|
<file>themes/dark/chatArea/chatHead.css</file>
|
||||||
<file>themes/dark/chatArea/innerStyle.css</file>
|
<file>themes/dark/chatArea/innerStyle.css</file>
|
||||||
@ -105,6 +104,7 @@
|
|||||||
<file>themes/dark/fileTransferInstance/filetransferWidget.css</file>
|
<file>themes/dark/fileTransferInstance/filetransferWidget.css</file>
|
||||||
<file>themes/dark/genericChatForm/genericChatForm.css</file>
|
<file>themes/dark/genericChatForm/genericChatForm.css</file>
|
||||||
<file>themes/dark/acceptCall/acceptCall.svg</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/rejectCall/rejectCall.svg</file>
|
||||||
<file>themes/dark/notificationEdge/notificationEdge.css</file>
|
<file>themes/dark/notificationEdge/notificationEdge.css</file>
|
||||||
<file>themes/dark/loginScreen/loginScreen.css</file>
|
<file>themes/dark/loginScreen/loginScreen.css</file>
|
||||||
@ -112,7 +112,6 @@
|
|||||||
<file>themes/dark/tooliconsZone/tooliconsZone.css</file>
|
<file>themes/dark/tooliconsZone/tooliconsZone.css</file>
|
||||||
<file>themes/default/palette.ini</file>
|
<file>themes/default/palette.ini</file>
|
||||||
<file>themes/default/fileTransferWidget/fileDone.svg</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/chatArea.css</file>
|
||||||
<file>themes/default/chatArea/chatHead.css</file>
|
<file>themes/default/chatArea/chatHead.css</file>
|
||||||
<file>themes/default/chatArea/innerStyle.css</file>
|
<file>themes/default/chatArea/innerStyle.css</file>
|
||||||
@ -169,6 +168,7 @@
|
|||||||
<file>themes/default/fileTransferInstance/filetransferWidget.css</file>
|
<file>themes/default/fileTransferInstance/filetransferWidget.css</file>
|
||||||
<file>themes/default/genericChatForm/genericChatForm.css</file>
|
<file>themes/default/genericChatForm/genericChatForm.css</file>
|
||||||
<file>themes/default/acceptCall/acceptCall.svg</file>
|
<file>themes/default/acceptCall/acceptCall.svg</file>
|
||||||
|
<file>themes/default/addFriendForm/toxId.css</file>
|
||||||
<file>themes/default/rejectCall/rejectCall.svg</file>
|
<file>themes/default/rejectCall/rejectCall.svg</file>
|
||||||
<file>img/login_logo.svg</file>
|
<file>img/login_logo.svg</file>
|
||||||
<file>themes/default/notificationEdge/notificationEdge.css</file>
|
<file>themes/default/notificationEdge/notificationEdge.css</file>
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "src/widget/contentlayout.h"
|
#include "src/widget/contentlayout.h"
|
||||||
#include "src/widget/gui.h"
|
#include "src/widget/gui.h"
|
||||||
#include "src/widget/tool/croppinglabel.h"
|
#include "src/widget/tool/croppinglabel.h"
|
||||||
|
#include "src/widget/style.h"
|
||||||
#include "src/widget/translator.h"
|
#include "src/widget/translator.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
@ -294,7 +295,7 @@ void AddFriendForm::onIdChanged(const QString& id)
|
|||||||
isValidId ? QStringLiteral("%1 (%2)") : QStringLiteral("%1 <font color='red'>(%2)</font>");
|
isValidId ? QStringLiteral("%1 (%2)") : QStringLiteral("%1 <font color='red'>(%2)</font>");
|
||||||
toxIdLabel.setText(labelText.arg(toxIdText, toxIdComment));
|
toxIdLabel.setText(labelText.arg(toxIdText, toxIdComment));
|
||||||
toxId.setStyleSheet(isValidOrEmpty ? QStringLiteral("")
|
toxId.setStyleSheet(isValidOrEmpty ? QStringLiteral("")
|
||||||
: QStringLiteral("QLineEdit { background-color: #FFC1C1; }"));
|
: Style::getStylesheet("addFriendForm/toxId.css"));
|
||||||
toxId.setToolTip(isValidOrEmpty ? QStringLiteral("") : tr("Invalid Tox ID format"));
|
toxId.setToolTip(isValidOrEmpty ? QStringLiteral("") : tr("Invalid Tox ID format"));
|
||||||
|
|
||||||
sendButton.setEnabled(isValidId);
|
sendButton.setEnabled(isValidId);
|
||||||
|
@ -299,7 +299,6 @@ void GenericChatForm::reloadTheme()
|
|||||||
{
|
{
|
||||||
const Settings& s = Settings::getInstance();
|
const Settings& s = Settings::getInstance();
|
||||||
setStyleSheet(Style::getStylesheet("genericChatForm/genericChatForm.css"));
|
setStyleSheet(Style::getStylesheet("genericChatForm/genericChatForm.css"));
|
||||||
|
|
||||||
msgEdit->setStyleSheet(Style::getStylesheet("msgEdit/msgEdit.css")
|
msgEdit->setStyleSheet(Style::getStylesheet("msgEdit/msgEdit.css")
|
||||||
+ fontToCss(s.getChatMessageFont(), "QTextEdit"));
|
+ fontToCss(s.getChatMessageFont(), "QTextEdit"));
|
||||||
|
|
||||||
|
@ -1634,6 +1634,7 @@ ContentLayout* Widget::createContentDialog(DialogType type) const
|
|||||||
Translator::registerHandler(std::bind(&Dialog::retranslateUi, this), this);
|
Translator::registerHandler(std::bind(&Dialog::retranslateUi, this), this);
|
||||||
retranslateUi();
|
retranslateUi();
|
||||||
setWindowIcon(QIcon(":/img/icons/qtox.svg"));
|
setWindowIcon(QIcon(":/img/icons/qtox.svg"));
|
||||||
|
setStyleSheet(Style::getStylesheet("window/general.css"));
|
||||||
|
|
||||||
connect(Core::getInstance(), &Core::usernameSet, this, &Dialog::retranslateUi);
|
connect(Core::getInstance(), &Core::usernameSet, this, &Dialog::retranslateUi);
|
||||||
}
|
}
|
||||||
@ -2185,7 +2186,6 @@ void Widget::reloadTheme()
|
|||||||
{
|
{
|
||||||
this->setStyleSheet(Style::getStylesheet("window/general.css"));
|
this->setStyleSheet(Style::getStylesheet("window/general.css"));
|
||||||
QString statusPanelStyle = Style::getStylesheet("window/statusPanel.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->tooliconsZone->setStyleSheet(Style::getStylesheet("tooliconsZone/tooliconsZone.css"));
|
||||||
ui->statusPanel->setStyleSheet(statusPanelStyle);
|
ui->statusPanel->setStyleSheet(statusPanelStyle);
|
||||||
ui->statusHead->setStyleSheet(statusPanelStyle);
|
ui->statusHead->setStyleSheet(statusPanelStyle);
|
||||||
|
3
themes/dark/addFriendForm/toxId.css
Normal file
3
themes/dark/addFriendForm/toxId.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
QLineEdit {
|
||||||
|
background-color: #8a3f3a;
|
||||||
|
}
|
@ -1,24 +0,0 @@
|
|||||||
QLabel
|
|
||||||
{
|
|
||||||
color: @mainText;
|
|
||||||
}
|
|
||||||
|
|
||||||
QLineEdit
|
|
||||||
{
|
|
||||||
color: @mainText;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTextEdit
|
|
||||||
{
|
|
||||||
color: @mainText;
|
|
||||||
}
|
|
||||||
|
|
||||||
QSpinBox, QDoubleSpinBox
|
|
||||||
{
|
|
||||||
color: @mainText;
|
|
||||||
}
|
|
||||||
|
|
||||||
QListView
|
|
||||||
{
|
|
||||||
color: @mainText;
|
|
||||||
}
|
|
@ -18,4 +18,5 @@ QSplitter:handle
|
|||||||
QWidget
|
QWidget
|
||||||
{
|
{
|
||||||
background: @groundBase;
|
background: @groundBase;
|
||||||
|
color: @mainText;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,11 @@ QToolTip
|
|||||||
background: #ffffdc;
|
background: #ffffdc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDialog
|
||||||
|
{
|
||||||
|
background: @groundBase;
|
||||||
|
}
|
||||||
|
|
||||||
QWidget#contentWidget
|
QWidget#contentWidget
|
||||||
{
|
{
|
||||||
background: @groundBase;
|
background: @groundBase;
|
||||||
@ -27,3 +32,28 @@ QTabBar::tab:!selected
|
|||||||
background: #444242;
|
background: #444242;
|
||||||
color: #8e8e8e;
|
color: #8e8e8e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QLabel
|
||||||
|
{
|
||||||
|
color: @mainText;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLineEdit
|
||||||
|
{
|
||||||
|
color: @mainText;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTextEdit
|
||||||
|
{
|
||||||
|
color: @mainText;
|
||||||
|
}
|
||||||
|
|
||||||
|
QSpinBox, QDoubleSpinBox
|
||||||
|
{
|
||||||
|
color: @mainText;
|
||||||
|
}
|
||||||
|
|
||||||
|
QListView
|
||||||
|
{
|
||||||
|
color: @mainText;
|
||||||
|
}
|
||||||
|
3
themes/default/addFriendForm/toxId.css
Normal file
3
themes/default/addFriendForm/toxId.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
QLineEdit {
|
||||||
|
background-color: #FFC1C1;
|
||||||
|
}
|
@ -1,24 +0,0 @@
|
|||||||
QLabel
|
|
||||||
{
|
|
||||||
color: @mainText;
|
|
||||||
}
|
|
||||||
|
|
||||||
QLineEdit
|
|
||||||
{
|
|
||||||
color: @mainText;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTextEdit
|
|
||||||
{
|
|
||||||
color: @mainText;
|
|
||||||
}
|
|
||||||
|
|
||||||
QSpinBox, QDoubleSpinBox
|
|
||||||
{
|
|
||||||
color: @mainText;
|
|
||||||
}
|
|
||||||
|
|
||||||
QListView
|
|
||||||
{
|
|
||||||
color: @mainText;
|
|
||||||
}
|
|
@ -14,3 +14,9 @@ QSplitter:handle
|
|||||||
color: white;
|
color: white;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QWidget
|
||||||
|
{
|
||||||
|
background: @groundBase;
|
||||||
|
color: @mainText;
|
||||||
|
}
|
||||||
|
@ -22,3 +22,28 @@ QTabBar::tab:!selected
|
|||||||
background: #d0d1d1;
|
background: #d0d1d1;
|
||||||
color: #5e5e5e;
|
color: #5e5e5e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QLabel
|
||||||
|
{
|
||||||
|
color: @mainText;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLineEdit
|
||||||
|
{
|
||||||
|
color: @mainText;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTextEdit
|
||||||
|
{
|
||||||
|
color: @mainText;
|
||||||
|
}
|
||||||
|
|
||||||
|
QSpinBox, QDoubleSpinBox
|
||||||
|
{
|
||||||
|
color: @mainText;
|
||||||
|
}
|
||||||
|
|
||||||
|
QListView
|
||||||
|
{
|
||||||
|
color: @mainText;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user