MCPcopy Create free account
hub / github.com/KDE/labplot / labelBackgroundColorChanged

Method labelBackgroundColorChanged

src/frontend/widgets/LabelWidget.cpp:1299–1310  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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
1299void 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
1312void LabelWidget::labelOffsetXChanged(qreal offset) {
1313 CONDITIONAL_LOCK_RETURN;

Callers

nothing calls this directly

Calls 3

setColorMethod · 0.45
currentIndexMethod · 0.45
selectAllMethod · 0.45

Tested by

no test coverage detected