| 247 | } |
| 248 | |
| 249 | void ThemeEditorDialog::applyColorToItem(QTreeWidgetItem *item, const QColor &color) |
| 250 | { |
| 251 | const QString hexStr = color.alpha() < 255 |
| 252 | ? color.name(QColor::HexArgb) |
| 253 | : color.name(QColor::HexRgb); |
| 254 | const QString normalizedHexStr = hexStr.toUpper(); |
| 255 | item->setText(1, normalizedHexStr); |
| 256 | item->setIcon(1, colorIcon(color)); |
| 257 | |
| 258 | const QStringList path = item->data(0, PathRole).toStringList(); |
| 259 | setJsonPath(params, path, normalizedHexStr); |
| 260 | } |
| 261 | |
| 262 | void ThemeEditorDialog::toggleBoolItem(QTreeWidgetItem *item) |
| 263 | { |