@@ -323,5 +323,33 @@ sealed class Theme : Parcelable {
323
323
genericActiveBackgroundColor = primary,
324
324
genericActiveForegroundColor = onPrimary
325
325
)
326
+
327
+ @OptIn(ExperimentalStdlibApi ::class )
328
+ fun toCustom () = Custom (
329
+ name = name + " #" + this .accentKeyBackgroundColor.toHexString(), // Use primary color as identifier
330
+ isDark = isDark,
331
+ backgroundImage = null ,
332
+ backgroundColor = backgroundColor,
333
+ barColor = barColor,
334
+ keyboardColor = keyboardColor,
335
+ keyBackgroundColor = keyBackgroundColor,
336
+ keyTextColor = keyTextColor,
337
+ candidateTextColor = candidateTextColor,
338
+ candidateLabelColor = candidateLabelColor,
339
+ candidateCommentColor = candidateCommentColor,
340
+ altKeyBackgroundColor = altKeyBackgroundColor,
341
+ altKeyTextColor = altKeyTextColor,
342
+ accentKeyBackgroundColor = accentKeyBackgroundColor,
343
+ accentKeyTextColor = accentKeyTextColor,
344
+ keyPressHighlightColor = keyPressHighlightColor,
345
+ keyShadowColor = keyShadowColor,
346
+ popupBackgroundColor = popupBackgroundColor,
347
+ popupTextColor = popupTextColor,
348
+ spaceBarColor = spaceBarColor,
349
+ dividerColor = dividerColor,
350
+ clipboardEntryColor = clipboardEntryColor,
351
+ genericActiveBackgroundColor = genericActiveBackgroundColor,
352
+ genericActiveForegroundColor = genericActiveForegroundColor
353
+ )
326
354
}
327
355
}
0 commit comments