| 126 | } |
| 127 | |
| 128 | void YACReaderTranslator::applyTheme(const Theme &theme) |
| 129 | { |
| 130 | const auto &tr = theme.translator; |
| 131 | |
| 132 | QPalette p(this->palette()); |
| 133 | p.setColor(QPalette::Window, tr.backgroundColor); |
| 134 | this->setPalette(p); |
| 135 | |
| 136 | text->setStyleSheet(tr.textEditQSS + tr.scrollBarQSS); |
| 137 | from->setStyleSheet(tr.comboBoxQSS + tr.scrollBarQSS); |
| 138 | to->setStyleSheet(tr.comboBoxQSS + tr.scrollBarQSS); |
| 139 | |
| 140 | titleLabel->setStyleSheet(tr.titleQSS); |
| 141 | resultsTitle->setStyleSheet(tr.resultsTitleQSS); |
| 142 | resultText->setStyleSheet(tr.resultTextQSS); |
| 143 | clearButton->setStyleSheet(tr.clearButtonQSS); |
| 144 | |
| 145 | searchButton->setStyleSheet( |
| 146 | QString("QPushButton {border:none; background:%1;}").arg(tr.inputBackgroundColor.name())); |
| 147 | |
| 148 | closeButton->setIcon(tr.closeIcon); |
| 149 | speakButton->setIcon(tr.speakerIcon); |
| 150 | searchButton->setIcon(tr.searchIcon); |
| 151 | arrowLabel->setPixmap(tr.fromToPixmap); |
| 152 | } |
| 153 | |
| 154 | void YACReaderTranslator::hideResults() |
| 155 | { |