4799 Commits

Author SHA1 Message Date
Stef Tervelde
df585defc6 Added rebuildToolList() to fix nullpointer in contributions check (#1381) 2026-01-16 09:55:14 -05:00
Stef Tervelde
02f8b39c1c use starting to fully remove the window (#1382) 2026-01-16 09:53:44 -05:00
Stef Tervelde
1af2eb7348 Make CapturePreferences only keep track of changes (#1383)
Before `CapturePreferences` would override `LocalPreferences` and halt any changes upstream until `apply` was called, now it will let those changes slip through so we get immediate feedback on changes made in the preferences screen.
2026-01-16 09:53:16 -05:00
Stef Tervelde
aaa3f75362 Create PreferencesEvents to glue into base and other deps (#1386)
To avoid creating dependencies within Preferences.kt, create an event structure that will listen to changes triggered by saving the Preferences.
2026-01-16 09:52:40 -05:00
Stef Tervelde
8466ee1ee0 Instant Locale Updatee (#1384)
Keep track of locale updates within the Process so that when the user changes the locale, that is immediately reflected within the app and later within other instances of Processing when the watch file kicks off the reload
2026-01-16 09:51:52 -05:00
Stef Tervelde
4edb29ad10 Refactor Other preferences registration logic (#1379)
Made sure the logic for displaying experimental settings runs regardless of the visibility of the toggle
2026-01-14 16:57:39 -05:00
Stef Tervelde
ac09bfe79e Fixed an issue where the stream was left open (#1380) 2026-01-14 16:56:03 -05:00
Stef Tervelde
76b9bae923 Refactor locale resource loading logic (#1364)
Read the locale strings as UTF-8
2026-01-08 13:31:18 -05:00
Stef Tervelde
edaf153ba4 Fix tabbing issue with textfields (#1367) 2025-12-23 08:34:56 -08:00
Stef Tervelde
9290fe9cff Refactor splash screen launch logic in Start.kt (#1357)
Simplifies the splash screen logic by removing coroutine delays and instead using a LaunchedEffect to trigger Base.main after the splash animation completes. The splash window now closes automatically when a new window is opened, improving startup flow and reliability.
2025-12-20 09:14:41 -08:00
Stef Tervelde
26c53c9656 Welcome Screen + Prefs QA (#1362)
Set the default editor theme to automatic in defaults.txt. Added a slight delay in file watching to reduce CPU usage. Enhanced the WelcomeSurvey UI with a border for better visual feedback. Refactored zoom preference handling in Interface.kt to use lambdas for up-to-date values.
2025-12-18 06:59:56 -08:00
Stef Tervelde
f85e3bc73d Load supported locales from locales.txt file (#1360)
Refactors Language.listSupported() to read supported language codes from a new locales.txt resource file instead of scanning available locales.
2025-12-16 08:49:54 -08:00
Stef Tervelde
18066a8026 Reload legacy Preferences after saving
Calls Preferences.init() after saving preferences to ensure legacy Preferences are reloaded and kept in sync with the latest changes. Otherwise the new preferences state from compose would be overridden from the legacy system
2025-12-12 08:27:05 +01:00
Stef Tervelde
201cab606d New Preferences Screen (#1318)
* Remove ContributionManager and ContributionPane UI files

Deleted ContributionManager.kt and ContributionPane.kt from the contrib/ui directory. This removes the Compose-based contributions manager and its detail pane prototypes which got merged unnecessarily

* Enhance Preferences reactivity and test coverage

Refactored ReactiveProperties to use snapshotStateMap for Compose reactivity. Improved PreferencesProvider and watchFile composables with better file watching, override support via system properties, and added documentation. Updated PreferencesKtTest to use temporary files and verify file-to-UI reactivity.

* Small bugfix for removed function

* Add compose ui test to the deps

* Refactor Locale class and add LocaleProvider test

* Make setLocale parameter nullable in Locale class

Changed the setLocale parameter in the Locale class to be nullable and updated its usage to safely invoke it. This allows for more flexible instantiation when a setLocale function is not required.

* Add compose ui test to the deps

* Update locale change method in test

Replaces the call to locale.setLocale with locale.set in LocaleKtTest to match the updated API for changing the locale.

* Add PDE window utilities for Compose and Swing

Introduces PDESwingWindow and PDEComposeWindow classes to simplify creating themed and localized windows in Compose and Swing applications. Includes macOS-specific handling for full window content and localization support for window titles.

* Refactor beta welcome window handling

Replaces custom JFrame setup in WelcomeToBeta with PDESwingWindow and PDEComposeWindow, centralizing window logic and close handling. Adds onClose callback to PDESwingWindow for improved lifecycle management. Also ensures beta welcome preference is reset on forced update check.

* Remove ContributionManager and ContributionPane UI files (#1276)

Deleted ContributionManager.kt and ContributionPane.kt from the contrib/ui directory. This removes the Compose-based contributions manager and its detail pane prototypes which got merged unnecessarily

* Refactor Locale class and add LocaleProvider test (#1283)

* Refactor Locale class and add LocaleProvider test

* Make setLocale parameter nullable in Locale class

Changed the setLocale parameter in the Locale class to be nullable and updated its usage to safely invoke it. This allows for more flexible instantiation when a setLocale function is not required.

* Add compose ui test to the deps

* Update locale change method in test

Replaces the call to locale.setLocale with locale.set in LocaleKtTest to match the updated API for changing the locale.

* Theming (#1298)

* Add Material3-based Processing theme and typography

Introduces Colors.kt with custom color schemes for light and dark themes using Material3. Refactors Theme.kt to use Material3 theming, adds a PDETheme composable, and provides a desktop preview app for theme components. Updates Typography.kt to use Space Grotesk font family and defines new typography styles for Material3.

* Refactor to use Material3 and update theme usage

Replaces Material2 components with Material3 in WelcomeToBeta, removes custom PDEButton in favor of Material3 Button, and updates theme usage to PDETheme. Also simplifies background modifier in PDETheme and removes unused Kotlin Multiplatform plugin from build.gradle.kts.

* Add Space Grotesk font files and license

Includes SpaceGrotesk font variants (Bold, Light, Medium, Regular, SemiBold) and the associated SIL Open Font License. This enables usage of the Space Grotesk typeface in the project.

* Update markdown renderer to m3 and adjust UI

Switched markdown renderer imports from m2 to m3 and updated the dependency version to 0.37.0. Adjusted WelcomeToBeta window size, layout, and logo dimensions for improved appearance. Ensured Box in Theme.kt fills available space for better layout consistency.

* Switch from ProcessingTheme to PDETheme in window UI

Replaces the use of ProcessingTheme with PDETheme in the PDEWindowContent composable

* Refactor preferences to Jetpack Compose UI

Replaces the legacy PreferencesFrame with a new Jetpack Compose-based preferences UI. Adds reactive preferences management using a custom ReactiveProperties class, and introduces modular preference groups (General, Interface, Other) with composable controls. Updates Base.java to launch the new preferences window, and refactors theme and window code for Compose integration.

* Remove obsolete TODO for onClose callback

* Refactor theme system to Material 3 color schemes

Replaces legacy color definitions with Material 3 color schemes and introduces extended color support for warnings. Dialogs in Messages.kt are now implemented using Compose Material 3 components for a modern UI. Removes deprecated color sets and updates PDETheme to use new color schemes, improving consistency and maintainability.

* Add PDEWelcome Composable UI screen

Introduces a new PDEWelcome.kt file with a Composable UI for the Processing welcome screen. Includes layout with buttons for language selection, new sketch, examples, and sketchbook, as well as a placeholder for right-side content and a main entry point for launching the window.

* Clean up handlePrefs method by removing comments

Removed commented-out code for preferences frame initialization.

* Initial layout

* Revamp welcome screen UI and add social icons

Refactors the PDEWelcome screen to improve layout, update button icons, and add support for Discord, GitHub, and Instagram SVG icons. The welcome screen now receives a Base instance for proper action handling, and new methods replace deprecated ones in Base.java. Updates related menu actions to pass the Base instance as needed.

* Add example previews to welcome screen

Replaces placeholder text on the right side of the PDEWelcome screen with a LazyColumn displaying example sketches. Each example attempts to show a preview image if available, or a placeholder icon otherwise. Introduces an Example data class and related image loading logic.

* Add hover-activated play button to example previews

Introduced a hover effect on example preview images in the welcome screen, displaying a play button that opens the example when clicked. Refactored title key usage for consistency.

* Localize welcome screen UI strings

Replaced hardcoded strings in the PDEWelcome screen with localized values using the LocalLocale context. Added new keys for the welcome screen to the English and Dutch language property files to support internationalization.

* Composable Preferences rewrite (#1277)

* Remove ContributionManager and ContributionPane UI files

Deleted ContributionManager.kt and ContributionPane.kt from the contrib/ui directory. This removes the Compose-based contributions manager and its detail pane prototypes which got merged unnecessarily

* Enhance Preferences reactivity and test coverage

Refactored ReactiveProperties to use snapshotStateMap for Compose reactivity. Improved PreferencesProvider and watchFile composables with better file watching, override support via system properties, and added documentation. Updated PreferencesKtTest to use temporary files and verify file-to-UI reactivity.

* Small bugfix for removed function

* Add compose ui test to the deps

* Add language selector and UI improvements to welcome screen

Introduces a language selection dropdown to the PDE welcome screen using a shared composable from preferences. Refactors the layout for better spacing, updates example cards with animated overlays, and replaces the show-on-startup button with a checkbox. Also adds a new translation key for the open example button.

* Refactor example listing and randomize welcome sketches

Moved example folder listing logic in Contributions.ExamplesList to a companion object function for reuse. Updated PDEWelcome to display a randomized selection of sketches from all available examples, replacing the previous static list.

* Refactor example handling to use Sketch objects

Replaces Example objects with Sketch objects for managing example sketches in the welcome screen. Updates all relevant usages to reference Sketch properties, simplifying the code and improving clarity.

* Add vertical scrollbar to welcome screen examples

Introduces a VerticalScrollbar to the examples list in the PDEWelcome screen for improved navigation. Also adjusts spacing and arrangement in several UI components for better layout consistency, and updates the welcome screen title in the language properties.

* Add rounded corners to buttons in PDEWelcome

Introduced a RoundedCornerShape with 12.dp radius and applied it to various buttons in the PDEWelcome screen for improved UI consistency and aesthetics.

* Refactor PDEWelcome UI and add Sketch card composable

Refactored the PDEWelcome screen for improved structure and readability, including extracting the example preview into a reusable Sketch.card composable. Updated icon usage for RTL support, adjusted layout and padding, and improved the examples list initialization. Also, customized scrollbar style in PDETheme for a more consistent UI appearance.

* Add unique window handling to prevent duplicates

Introduces a 'unique' parameter to PDESwingWindow and PDEComposeWindow, allowing windows to be identified by a KClass and preventing multiple instances of the same window. If a window with the same unique identifier exists, it is brought to the front and the new one is disposed. This helps avoid duplicate welcome or other singleton windows.

* Refactor dialog handling and improve AlertDialog UI

Refactored the showDialog function to accept a modifier and updated all AlertDialog usages to use RectangleShape and the modifier parameter. Improved dialog sizing and positioning by dynamically adjusting the window size based on content, and set additional window properties for better integration on macOS.

* Set application window icon using Toolkit.setIcon

Added calls to Toolkit.setIcon(window) in Start.kt and Window.kt to ensure the application window icon is set consistent

* Simplify imports and update scrollbar colors in Theme.kt

Consolidated import statements for Compose libraries using wildcard imports to reduce verbosity. Updated scrollbar hover and unhover colors to use the default outlineVariant color without alpha modification.

* Preferences screen

Adds most of the options for the preferences screen based on the new design

* Replace Row with Column in sketch naming options

Changed the layout container from Row to Column for the sketch naming options in the General preferences UI. This improves vertical arrangement and removes unnecessary padding modifiers.

* Enhance preferences UI and add memory options

Refactored preferences UI to swap primary and tertiary colors, improved sidebar button color handling, and updated search bar logic. Added clickable folder icon for sketchbook location selection. Improved interface scale slider logic and display. Added new preferences for increasing available memory and max memory, with enable/disable logic. Updated experimental preferences to use localized description keys if available. Extended ShimAWT to support folder selection via callback and refactored file/folder selection logic for better composability. Updated language properties with new preference keys and descriptions.

* Fixed a color issue

* Improve preferences UI layout and window size

Increased the preferences window width from 800 to 850 pixels for better layout. Updated the General preferences to display FilterChip options in rows with spacing, improving visual organization and usability.

* Add theme selection and UI improvements to preferences

Introduces a theme selector for the editor in the Interface preferences, allowing users to choose between system, dark, and light themes. Updates Coding and General preferences with improved layout and feedback, including a copied state for diagnostics. Updates localization strings to support new features and labels.

* Added the ability to undo the changes + icon/language changes

* Update animation spec for slideInVertically

Changed the animationSpec for slideInVertically from a 500ms EaseOutBounce to a 300ms default tween for consistency and smoother transitions.

* Welcome screen implementation (#1307)

* Remove ContributionManager and ContributionPane UI files

Deleted ContributionManager.kt and ContributionPane.kt from the contrib/ui directory. This removes the Compose-based contributions manager and its detail pane prototypes which got merged unnecessarily

* Enhance Preferences reactivity and test coverage

Refactored ReactiveProperties to use snapshotStateMap for Compose reactivity. Improved PreferencesProvider and watchFile composables with better file watching, override support via system properties, and added documentation. Updated PreferencesKtTest to use temporary files and verify file-to-UI reactivity.

* Small bugfix for removed function

* Add compose ui test to the deps

* Refactor theme system to Material 3 color schemes

Replaces legacy color definitions with Material 3 color schemes and introduces extended color support for warnings. Dialogs in Messages.kt are now implemented using Compose Material 3 components for a modern UI. Removes deprecated color sets and updates PDETheme to use new color schemes, improving consistency and maintainability.

* Add PDEWelcome Composable UI screen

Introduces a new PDEWelcome.kt file with a Composable UI for the Processing welcome screen. Includes layout with buttons for language selection, new sketch, examples, and sketchbook, as well as a placeholder for right-side content and a main entry point for launching the window.

* Initial layout

* Revamp welcome screen UI and add social icons

Refactors the PDEWelcome screen to improve layout, update button icons, and add support for Discord, GitHub, and Instagram SVG icons. The welcome screen now receives a Base instance for proper action handling, and new methods replace deprecated ones in Base.java. Updates related menu actions to pass the Base instance as needed.

* Add example previews to welcome screen

Replaces placeholder text on the right side of the PDEWelcome screen with a LazyColumn displaying example sketches. Each example attempts to show a preview image if available, or a placeholder icon otherwise. Introduces an Example data class and related image loading logic.

* Add hover-activated play button to example previews

Introduced a hover effect on example preview images in the welcome screen, displaying a play button that opens the example when clicked. Refactored title key usage for consistency.

* Localize welcome screen UI strings

Replaced hardcoded strings in the PDEWelcome screen with localized values using the LocalLocale context. Added new keys for the welcome screen to the English and Dutch language property files to support internationalization.

* Add language selector and UI improvements to welcome screen

Introduces a language selection dropdown to the PDE welcome screen using a shared composable from preferences. Refactors the layout for better spacing, updates example cards with animated overlays, and replaces the show-on-startup button with a checkbox. Also adds a new translation key for the open example button.

* Refactor example listing and randomize welcome sketches

Moved example folder listing logic in Contributions.ExamplesList to a companion object function for reuse. Updated PDEWelcome to display a randomized selection of sketches from all available examples, replacing the previous static list.

* Refactor example handling to use Sketch objects

Replaces Example objects with Sketch objects for managing example sketches in the welcome screen. Updates all relevant usages to reference Sketch properties, simplifying the code and improving clarity.

* Add vertical scrollbar to welcome screen examples

Introduces a VerticalScrollbar to the examples list in the PDEWelcome screen for improved navigation. Also adjusts spacing and arrangement in several UI components for better layout consistency, and updates the welcome screen title in the language properties.

* Add rounded corners to buttons in PDEWelcome

Introduced a RoundedCornerShape with 12.dp radius and applied it to various buttons in the PDEWelcome screen for improved UI consistency and aesthetics.

* Refactor PDEWelcome UI and add Sketch card composable

Refactored the PDEWelcome screen for improved structure and readability, including extracting the example preview into a reusable Sketch.card composable. Updated icon usage for RTL support, adjusted layout and padding, and improved the examples list initialization. Also, customized scrollbar style in PDETheme for a more consistent UI appearance.

* Add unique window handling to prevent duplicates

Introduces a 'unique' parameter to PDESwingWindow and PDEComposeWindow, allowing windows to be identified by a KClass and preventing multiple instances of the same window. If a window with the same unique identifier exists, it is brought to the front and the new one is disposed. This helps avoid duplicate welcome or other singleton windows.

* Refactor dialog handling and improve AlertDialog UI

Refactored the showDialog function to accept a modifier and updated all AlertDialog usages to use RectangleShape and the modifier parameter. Improved dialog sizing and positioning by dynamically adjusting the window size based on content, and set additional window properties for better integration on macOS.

* Set application window icon using Toolkit.setIcon

Added calls to Toolkit.setIcon(window) in Start.kt and Window.kt to ensure the application window icon is set consistent

* Simplify imports and update scrollbar colors in Theme.kt

Consolidated import statements for Compose libraries using wildcard imports to reduce verbosity. Updated scrollbar hover and unhover colors to use the default outlineVariant color without alpha modification.

* Removing the Preferences work to keep the PR clean

* Update background color in PDEWelcome UI

Changed the background color from surfaceContainerLow to surfaceContainerLowest in the PDEWelcome composable for improved visual consistency with the MaterialTheme.

* Tweak welcome actions naming and order

- Rename `Empty Sketch` to `New Sketch`
- Rename `Sketchbook` to `My Sketches`
- Move `Open Examples` below `My Sketches`

* Rather than setting the decorations app wide, just modify the editor screen

---------

Co-authored-by: Raphaël de Courville <groupes.raphael@gmail.com>

* Replace ProcessingTheme with PDETheme in WelcomeSurvey

* Add Material Theme Builder file headers

Added autogenerated file headers to Color.kt and Theme.kt indicating they were generated by the Material Theme Builder tool and should not be edited directly. Also reordered imports in Theme.kt for consistency.

* Fix preferences file override and update test property

Corrects the logic for selecting the preferences file in PreferencesProvider to use the override if present. Updates the test to set the correct system property for the settings folder.

* Update Theme.kt

* Normalize backward slashes in preferences file

Added logic to replace backward slashes with forward slashes in the preferences file to ensure consistent path formatting. Updated tests to verify the normalization behavior.

* Add support for preferences file override and path normalization

Allows overriding the preferences file location via the 'processing.app.preferences.file' system property. Also normalizes slashes in preference values to forward slashes. Updates tests to verify path normalization and override behavior.

---------

Co-authored-by: Raphaël de Courville <groupes.raphael@gmail.com>
2025-12-10 19:33:09 -05:00
Stef Tervelde
1237c55ece Welcome screen (#1353)
* Refactor Locale class and add LocaleProvider test

* Make setLocale parameter nullable in Locale class

Changed the setLocale parameter in the Locale class to be nullable and updated its usage to safely invoke it. This allows for more flexible instantiation when a setLocale function is not required.

* Add compose ui test to the deps

* Update locale change method in test

Replaces the call to locale.setLocale with locale.set in LocaleKtTest to match the updated API for changing the locale.

* Add PDE window utilities for Compose and Swing

Introduces PDESwingWindow and PDEComposeWindow classes to simplify creating themed and localized windows in Compose and Swing applications. Includes macOS-specific handling for full window content and localization support for window titles.

* Refactor beta welcome window handling

Replaces custom JFrame setup in WelcomeToBeta with PDESwingWindow and PDEComposeWindow, centralizing window logic and close handling. Adds onClose callback to PDESwingWindow for improved lifecycle management. Also ensures beta welcome preference is reset on forced update check.

* Remove ContributionManager and ContributionPane UI files (#1276)

Deleted ContributionManager.kt and ContributionPane.kt from the contrib/ui directory. This removes the Compose-based contributions manager and its detail pane prototypes which got merged unnecessarily

* Refactor Locale class and add LocaleProvider test (#1283)

* Refactor Locale class and add LocaleProvider test

* Make setLocale parameter nullable in Locale class

Changed the setLocale parameter in the Locale class to be nullable and updated its usage to safely invoke it. This allows for more flexible instantiation when a setLocale function is not required.

* Add compose ui test to the deps

* Update locale change method in test

Replaces the call to locale.setLocale with locale.set in LocaleKtTest to match the updated API for changing the locale.

* Theming (#1298)

* Add Material3-based Processing theme and typography

Introduces Colors.kt with custom color schemes for light and dark themes using Material3. Refactors Theme.kt to use Material3 theming, adds a PDETheme composable, and provides a desktop preview app for theme components. Updates Typography.kt to use Space Grotesk font family and defines new typography styles for Material3.

* Refactor to use Material3 and update theme usage

Replaces Material2 components with Material3 in WelcomeToBeta, removes custom PDEButton in favor of Material3 Button, and updates theme usage to PDETheme. Also simplifies background modifier in PDETheme and removes unused Kotlin Multiplatform plugin from build.gradle.kts.

* Add Space Grotesk font files and license

Includes SpaceGrotesk font variants (Bold, Light, Medium, Regular, SemiBold) and the associated SIL Open Font License. This enables usage of the Space Grotesk typeface in the project.

* Update markdown renderer to m3 and adjust UI

Switched markdown renderer imports from m2 to m3 and updated the dependency version to 0.37.0. Adjusted WelcomeToBeta window size, layout, and logo dimensions for improved appearance. Ensured Box in Theme.kt fills available space for better layout consistency.

* Switch from ProcessingTheme to PDETheme in window UI

Replaces the use of ProcessingTheme with PDETheme in the PDEWindowContent composable

* Refactor preferences to Jetpack Compose UI

Replaces the legacy PreferencesFrame with a new Jetpack Compose-based preferences UI. Adds reactive preferences management using a custom ReactiveProperties class, and introduces modular preference groups (General, Interface, Other) with composable controls. Updates Base.java to launch the new preferences window, and refactors theme and window code for Compose integration.

* Remove obsolete TODO for onClose callback

* Clean up handlePrefs method by removing comments

Removed commented-out code for preferences frame initialization.

* Composable Preferences rewrite (#1277)

* Remove ContributionManager and ContributionPane UI files

Deleted ContributionManager.kt and ContributionPane.kt from the contrib/ui directory. This removes the Compose-based contributions manager and its detail pane prototypes which got merged unnecessarily

* Enhance Preferences reactivity and test coverage

Refactored ReactiveProperties to use snapshotStateMap for Compose reactivity. Improved PreferencesProvider and watchFile composables with better file watching, override support via system properties, and added documentation. Updated PreferencesKtTest to use temporary files and verify file-to-UI reactivity.

* Small bugfix for removed function

* Add compose ui test to the deps

* Welcome screen implementation (#1307)

* Remove ContributionManager and ContributionPane UI files

Deleted ContributionManager.kt and ContributionPane.kt from the contrib/ui directory. This removes the Compose-based contributions manager and its detail pane prototypes which got merged unnecessarily

* Enhance Preferences reactivity and test coverage

Refactored ReactiveProperties to use snapshotStateMap for Compose reactivity. Improved PreferencesProvider and watchFile composables with better file watching, override support via system properties, and added documentation. Updated PreferencesKtTest to use temporary files and verify file-to-UI reactivity.

* Small bugfix for removed function

* Add compose ui test to the deps

* Refactor theme system to Material 3 color schemes

Replaces legacy color definitions with Material 3 color schemes and introduces extended color support for warnings. Dialogs in Messages.kt are now implemented using Compose Material 3 components for a modern UI. Removes deprecated color sets and updates PDETheme to use new color schemes, improving consistency and maintainability.

* Add PDEWelcome Composable UI screen

Introduces a new PDEWelcome.kt file with a Composable UI for the Processing welcome screen. Includes layout with buttons for language selection, new sketch, examples, and sketchbook, as well as a placeholder for right-side content and a main entry point for launching the window.

* Initial layout

* Revamp welcome screen UI and add social icons

Refactors the PDEWelcome screen to improve layout, update button icons, and add support for Discord, GitHub, and Instagram SVG icons. The welcome screen now receives a Base instance for proper action handling, and new methods replace deprecated ones in Base.java. Updates related menu actions to pass the Base instance as needed.

* Add example previews to welcome screen

Replaces placeholder text on the right side of the PDEWelcome screen with a LazyColumn displaying example sketches. Each example attempts to show a preview image if available, or a placeholder icon otherwise. Introduces an Example data class and related image loading logic.

* Add hover-activated play button to example previews

Introduced a hover effect on example preview images in the welcome screen, displaying a play button that opens the example when clicked. Refactored title key usage for consistency.

* Localize welcome screen UI strings

Replaced hardcoded strings in the PDEWelcome screen with localized values using the LocalLocale context. Added new keys for the welcome screen to the English and Dutch language property files to support internationalization.

* Add language selector and UI improvements to welcome screen

Introduces a language selection dropdown to the PDE welcome screen using a shared composable from preferences. Refactors the layout for better spacing, updates example cards with animated overlays, and replaces the show-on-startup button with a checkbox. Also adds a new translation key for the open example button.

* Refactor example listing and randomize welcome sketches

Moved example folder listing logic in Contributions.ExamplesList to a companion object function for reuse. Updated PDEWelcome to display a randomized selection of sketches from all available examples, replacing the previous static list.

* Refactor example handling to use Sketch objects

Replaces Example objects with Sketch objects for managing example sketches in the welcome screen. Updates all relevant usages to reference Sketch properties, simplifying the code and improving clarity.

* Add vertical scrollbar to welcome screen examples

Introduces a VerticalScrollbar to the examples list in the PDEWelcome screen for improved navigation. Also adjusts spacing and arrangement in several UI components for better layout consistency, and updates the welcome screen title in the language properties.

* Add rounded corners to buttons in PDEWelcome

Introduced a RoundedCornerShape with 12.dp radius and applied it to various buttons in the PDEWelcome screen for improved UI consistency and aesthetics.

* Refactor PDEWelcome UI and add Sketch card composable

Refactored the PDEWelcome screen for improved structure and readability, including extracting the example preview into a reusable Sketch.card composable. Updated icon usage for RTL support, adjusted layout and padding, and improved the examples list initialization. Also, customized scrollbar style in PDETheme for a more consistent UI appearance.

* Add unique window handling to prevent duplicates

Introduces a 'unique' parameter to PDESwingWindow and PDEComposeWindow, allowing windows to be identified by a KClass and preventing multiple instances of the same window. If a window with the same unique identifier exists, it is brought to the front and the new one is disposed. This helps avoid duplicate welcome or other singleton windows.

* Refactor dialog handling and improve AlertDialog UI

Refactored the showDialog function to accept a modifier and updated all AlertDialog usages to use RectangleShape and the modifier parameter. Improved dialog sizing and positioning by dynamically adjusting the window size based on content, and set additional window properties for better integration on macOS.

* Set application window icon using Toolkit.setIcon

Added calls to Toolkit.setIcon(window) in Start.kt and Window.kt to ensure the application window icon is set consistent

* Simplify imports and update scrollbar colors in Theme.kt

Consolidated import statements for Compose libraries using wildcard imports to reduce verbosity. Updated scrollbar hover and unhover colors to use the default outlineVariant color without alpha modification.

* Removing the Preferences work to keep the PR clean

* Update background color in PDEWelcome UI

Changed the background color from surfaceContainerLow to surfaceContainerLowest in the PDEWelcome composable for improved visual consistency with the MaterialTheme.

* Tweak welcome actions naming and order

- Rename `Empty Sketch` to `New Sketch`
- Rename `Sketchbook` to `My Sketches`
- Move `Open Examples` below `My Sketches`

* Rather than setting the decorations app wide, just modify the editor screen

---------

Co-authored-by: Raphaël de Courville <groupes.raphael@gmail.com>

* Replace ProcessingTheme with PDETheme in WelcomeSurvey

* Add Material Theme Builder file headers

Added autogenerated file headers to Color.kt and Theme.kt indicating they were generated by the Material Theme Builder tool and should not be edited directly. Also reordered imports in Theme.kt for consistency.

* Fix preferences file override and update test property

Corrects the logic for selecting the preferences file in PreferencesProvider to use the override if present. Updates the test to set the correct system property for the settings folder.

* Added survey button to the new welcome screen

---------

Co-authored-by: Raphaël de Courville <groupes.raphael@gmail.com>
2025-12-09 10:14:01 -05:00
Stef Tervelde
467cee749b Rewrite of the Base.getSettingsFolder() and Platform.getSettingsFolder() (#1335)
* Rewrite of the `Base.getSettingsFolder()` and `Platform.getSettingsFolder()`

Rewrote both function so they fit into a single file, negating the need for hopping around when looking into what this functionality does.

Also rewrote it so it is no longer generates random awt windows through the `Messages` class

* Fixed issue with missing /

* Added both options for overrides

- Added the previous settings override in base again
- Added a system property to override the settings folder within tests

* Add support for portable settings detection

Introduces logic to detect a preferences.txt file in the same folder as the running executable or jar. If found, settings are loaded from this location, improving portability and allowing users to override default settings without modifying system directories.
2025-12-05 14:26:01 -05:00
Stef Tervelde
3e466386bb Survey indicator (#1348)
* Add welcome survey to Welcome screen

Introduces a new Compose-based survey component to the Welcome screen via WelcomeSurvey.kt. Refactors Welcome.java to include the survey, and updates PDEButton in WelcomeToBeta.kt to support a modifier and proper content color handling.

* Make survey card clickable and remove button

Replaces the separate 'Take Survey' button with a clickable survey card that opens the survey URL. Adds pointer hover icon for better UX and updates the survey message text.

* Localize welcome survey text and fix resource paths

Added localized strings for the welcome survey title and description in PDE.properties. Updated WelcomeSurvey.kt to use these localized strings. Fixed resource loading paths in Locale.kt to correctly reference the 'languages' directory.

* Add welcome survey translations to language files

Introduced 'welcome.survey.title' and 'welcome.survey.description' keys to multiple language property files, providing localized text for the community survey prompt in Arabic, German, French, Italian, Japanese, Dutch, and Chinese. This improves internationalization support for the welcome survey feature.
2025-12-02 15:13:46 -05:00
Stef Tervelde
023bfd2896 Decoupling Base.getSketchbookFolder() (#1334)
* Decoupling sketchbook

* Added settings override

* Revert "Added settings override"

This reverts commit 387aa8e9cf.

* Moved sketchbook override

* Using assertEquals

* Stop using the private field internally
2025-11-26 16:27:13 -05:00
Stef Tervelde
d1641a22a5 Also look into the modules folder for native jars (#1345) 2025-11-26 16:22:52 -05:00
Stef Tervelde
2955cb2f1d Merge pull request #1299 from Stefterv/base-vacuum 2025-10-28 08:34:09 +01:00
Raphaël de Courville
64c213fc9a Merge pull request #1012 from processing/textarea-research
More details surrounding `JEditTextArea`
2025-10-24 11:16:41 +02:00
Stef Tervelde
82a4429060 General cleanup of Base
I started cleaning up some of `Base`'s startup sequence for clarity of what is being started when. Nowhere near completion and I think a lot of this class will need to be refactored in the future.

Also removed some of the timing measurement comments

Added some comments to the Processing CLI class
2025-10-22 08:28:34 +02:00
Stef Tervelde
c51a8e4b87 Revise README for Jetpack Compose migration strategy
Updated README to reflect migration to Jetpack Compose and strategy for replacing JEditTextArea with RSyntaxTextArea. Added insights on LSP-based editor research and the need for user feedback on Tweak Mode and autocompletion features.
2025-09-24 04:45:10 +02:00
Suganthi Thomas
88b9e048ef Removed commented lines 2025-09-17 22:12:07 -05:00
Suganthi Thomas
014fd93cd1 DEBUG should be set to the actual value. 2025-09-16 17:43:01 -05:00
Stef Tervelde
d3f3611d38 Add 'Develop' menu for debug mode with update check
Introduces a new 'Develop' menu that appears when debug mode is enabled.
2025-09-11 16:02:49 +02:00
Stef Tervelde
7e109bd399 Adding the sketch format command 2025-09-05 14:28:03 +02:00
Moon
198f593971 Merge pull request #1196 from joshgiesbrecht/SketchException-refactor-redo
Refactoring `SketchException` to be available outside of `app`
2025-08-28 14:00:51 -04:00
Stef Tervelde
6533ea7977 Adding jdk.httpserver as it was not included for the local reference 2025-08-27 08:40:49 +02:00
josh giesbrecht
627eafb06c tagging old location as deprecated 2025-08-15 10:46:44 -07:00
josh giesbrecht
7512bc0d49 re-adding a processing.app.SketchException class that extends the newly refactored one, so alternate modes don't break. 2025-08-14 14:29:31 -07:00
Raphaël de Courville
1ba7269e09 Merge pull request #1203 from catilac/beta-welcome-logic
Display Welcome to Beta once per revision
2025-08-14 16:42:29 +02:00
Raphaël de Courville
15aba90a1d Merge pull request #1200 from Stefterv/snap-classic-support
Adding snap classic confinement support
2025-08-14 16:32:45 +02:00
Raphaël de Courville
02f79756b3 Merge pull request #1199 from Stefterv/fix-java-home
Set `java.home` and added some comments
2025-08-14 16:26:44 +02:00
Moon D.
673c2224ba Clean up and updating key name 2025-08-13 16:13:42 -04:00
Moon D.
511dd3a636 Display once per revision number 2025-08-13 15:29:04 -04:00
Stef Tervelde
8b0411095c Completed the examples & sketchbook scanning 2025-08-13 09:51:44 +02:00
Stef Tervelde
eece777e28 Adding classic confinment support + refactor for later flathub 2025-08-12 14:42:10 +02:00
Stef Tervelde
39a0432852 Set java.home and added some comments 2025-08-12 13:38:47 +02:00
josh giesbrecht
266e7a56b1 correcting build.gradle.kts files 2025-08-01 12:00:13 -07:00
josh giesbrecht
88ac3bb422 correcting build.gradle.kts files 2025-07-31 17:17:02 -07:00
josh giesbrecht
22dde0fb96 refactoring SketchException to app:utils 2025-07-31 16:02:48 -07:00
Stef Tervelde
95aec7fae3 Merge branch 'main' into lsp-fixes 2025-07-23 06:07:29 +02:00
Stef Tervelde
a8abe8ec1d Merge pull request #1172 from aj-m/fix-editorstatus-clear
Properly clear EditorStatus.message with empty()
2025-07-11 12:54:20 +02:00
Raphaël de Courville
17c54e8dfc Merge pull request #1162 from toniab/main
Legacy CLI to handle sketch paths with spaces.
2025-07-11 12:47:24 +02:00
Raphaël de Courville
6e4f078fbc Merge pull request #1161 from Stefterv/cli-tests
CLITest for testing CLI commands in Processing IDE
2025-07-11 12:46:03 +02:00
Raphaël de Courville
5a5f5402a0 Merge pull request #1136 from jdebou/jdb/path
Adds processing to path on windows.
2025-07-11 12:44:04 +02:00
Raphaël de Courville
a58a7a75ad Merge pull request #1114 from joshgiesbrecht/main
fixes error highlighting when selecting an error in another tab
2025-07-11 12:36:44 +02:00
Raphaël de Courville
29d8272f55 Merge pull request #1072 from AhmedMagedC/bug-fix
Terminate JVM of already running instances
2025-07-11 12:30:44 +02:00
Raphaël de Courville
ce3cb9ff6b Merge pull request #1026 from Vaivaswat2244/ReferenceServer
Tried writing a reference server using jdk httpServer
2025-07-11 12:17:12 +02:00