| 245 | } |
| 246 | |
| 247 | void BackgroundWidget::colorStyleChanged(int index) { |
| 248 | if (index == -1) |
| 249 | return; |
| 250 | |
| 251 | auto style = (Background::ColorStyle)index; |
| 252 | if (style == Background::ColorStyle::SingleColor) { |
| 253 | ui.lFirstColor->setText(i18n("Color:")); |
| 254 | ui.lSecondColor->hide(); |
| 255 | ui.kcbSecondColor->hide(); |
| 256 | } else { |
| 257 | ui.lFirstColor->setText(i18n("First color:")); |
| 258 | ui.lSecondColor->show(); |
| 259 | ui.kcbSecondColor->show(); |
| 260 | } |
| 261 | |
| 262 | CONDITIONAL_LOCK_RETURN; |
| 263 | |
| 264 | int size = m_backgrounds.size(); |
| 265 | if (size > 1) { |
| 266 | m_background->beginMacro(i18n("%1 elements: background color style changed", size)); |
| 267 | for (auto* background : m_backgrounds) |
| 268 | background->setColorStyle(style); |
| 269 | m_background->endMacro(); |
| 270 | } else |
| 271 | m_background->setColorStyle(style); |
| 272 | } |
| 273 | |
| 274 | void BackgroundWidget::imageStyleChanged(int index) { |
| 275 | CONDITIONAL_LOCK_RETURN; |
nothing calls this directly
no test coverage detected