-
Notifications
You must be signed in to change notification settings - Fork 0
1.3.1
Released: 08.07.2025
Deskit 1.3.1 🚀 introduces a comprehensive Dialog Color Defaults System, making dialog customization cleaner and more intuitive for Compose for Desktop applications.
Previously, customizing dialog colors required specifying numerous individual color parameters in each dialog constructor. Now, each dialog has its own Defaults
object with a colors()
function that allows selective customization.
Benefits:
- Cleaner API: No more cluttered constructors with dozens of color parameters
- Selective Customization: Only specify the colors you want to change
- Better Maintainability: Centralized color management for each dialog type
- Consistent Theming: Automatic Material3 theme integration
All file dialogs and utility dialogs now support the new defaults system:
-
FileChooserDefaults.colors()
- File selection dialog colors -
FileSaverDefaults.colors()
- File saving dialog colors -
FolderChooserDefaults.colors()
- Folder selection dialog colors -
ConfirmationDialogDefaults.colors()
- Confirmation dialog colors -
InfoDialogDefaults.colors()
- Information dialog colors
Basic Usage (Default Colors):
FileChooserDialog(
title = "Select File",
allowedExtensions = listOf("txt", "pdf", "md"),
onFileSelected = { file ->
println("Selected: ${file.name}")
},
onCancel = { /* Handle cancellation */ }
)
Custom Colors (Selective):
FileChooserDialog(
title = "Select File",
colors = FileChooserDefaults.colors(
folderIconColor = Color.Blue,
badgeColor = MaterialTheme.colorScheme.secondary,
fileAndFolderListBG = MaterialTheme.colorScheme.surface
),
onFileSelected = { file ->
println("Selected: ${file.name}")
},
onCancel = { /* Handle cancellation */ }
)
Confirmation Dialog with Custom Theme:
ConfirmationDialog(
title = "Delete File",
message = "Are you sure you want to delete this file?",
colors = ConfirmationDialogDefaults.colors(
iconTint = MaterialTheme.colorScheme.error,
confirmButtonColor = MaterialTheme.colorScheme.errorContainer,
cancelButtonColor = MaterialTheme.colorScheme.outline
),
onConfirm = { /* Delete file */ },
onCancel = { /* Cancel action */ }
)
To use Deskit 1.3.1, update your build.gradle.kts
or settings.gradle.kts
as described in the Installation guide, ensuring the dependency is set to:
implementation("com.github.zahid4kh:deskit:1.3.1")
I value your feedback! Please report issues or suggest improvements on the GitHub Issues page.
Made with ❤️ | Free stuff is the best stuff