Browse Source

style: edit styles for myltiple windows

reviewable/pr5601/r1
TriKriSta 6 years ago
parent
commit
db962690bd
  1. 2
      res.qrc
  2. 1
      src/widget/form/genericchatform.cpp
  3. 2
      src/widget/widget.cpp
  4. 24
      themes/dark/centralWidget/centralWidget.css
  5. 1
      themes/dark/contentDialog/contentDialog.css
  6. 30
      themes/dark/window/general.css
  7. 24
      themes/default/centralWidget/centralWidget.css
  8. 6
      themes/default/contentDialog/contentDialog.css
  9. 25
      themes/default/window/general.css

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

1
src/widget/form/genericchatform.cpp

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

2
src/widget/widget.cpp

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

24
themes/dark/centralWidget/centralWidget.css

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

1
themes/dark/contentDialog/contentDialog.css

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

30
themes/dark/window/general.css

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

24
themes/default/centralWidget/centralWidget.css

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

6
themes/default/contentDialog/contentDialog.css

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

25
themes/default/window/general.css

@ -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…
Cancel
Save