Skip to content
Zahid edited this page Jul 8, 2025 · 1 revision

Deskit Version 1.3.1 Release Notes

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.

What's New in 1.3.1

🎨 Dialog Color Defaults System

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

📁 Supported Dialog Types

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

Code Examples

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 */ }
)

Upgrading to 1.3.1

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")

Feedback

I value your feedback! Please report issues or suggest improvements on the GitHub Issues page.

Clone this wiki locally