this function is only called when the theme is changed. Otherwise the color is coded in the html text. when the theme changes, the whole text should change color regardless of the color it has
| 1297 | // this function is only called when the theme is changed. Otherwise the color is coded in the html text. |
| 1298 | // when the theme changes, the whole text should change color regardless of the color it has |
| 1299 | void LabelWidget::labelBackgroundColorChanged(const QColor& color) { |
| 1300 | QDEBUG(Q_FUNC_INFO << ", color =" << color) |
| 1301 | CONDITIONAL_LOCK_RETURN; |
| 1302 | ui.kcbBackgroundColor->setColor(color); |
| 1303 | |
| 1304 | auto mode = static_cast<TextLabel::Mode>(ui.cbMode->currentIndex()); |
| 1305 | if (mode != TextLabel::Mode::Text) |
| 1306 | return; |
| 1307 | |
| 1308 | ui.teLabel->selectAll(); |
| 1309 | ui.teLabel->setTextBackgroundColor(color); |
| 1310 | } |
| 1311 | |
| 1312 | void LabelWidget::labelOffsetXChanged(qreal offset) { |
| 1313 | CONDITIONAL_LOCK_RETURN; |
nothing calls this directly
no test coverage detected