5007 Commits

Author SHA1 Message Date
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
7283c99271 Enable automatic release for Maven Central publishing (#1286)
Sets 'automaticRelease' to true in the publishToMavenCentral configuration to automate the release process when publishing to Maven Central.
2025-10-15 16:56:23 -04:00
Raphaël de Courville
38143079c1 Update the warning message for pixelDensity
Made the warning message more helpful
2025-09-12 14:42:36 +02:00
Stef Tervelde
906ab17264 Add warning for default pixelDensity behavior
Introduces a warning message when pixelDensity defaults to 2x to match the display's pixel density. The warning prompts users to explicitly set pixelDensity in settings() to avoid the message.
2025-09-04 10:34:45 +02:00
Raphaël de Courville
2de754af8f Merge pull request #1107 from pnngocdoan/fix-mask
Add error check for pixelDensity in mask()
2025-07-11 12:33:16 +02:00
Raphaël de Courville
489c7e98c3 Merge pull request #1057 from jSdCool/interpilate
Add the ability to choose the interpolation mode when resizing an image
2025-07-11 12:29:12 +02:00
Stef Tervelde
30bc274e36 Merge pull request #1033 from Rishab87/shift-page-keys
Fixed `SHIFT` and `PAGE_UP` keys using the same keyCode
2025-07-11 12:23:27 +02:00
Raphaël de Courville
96d6392d47 Merge pull request #959 from Stefterv/gradle-cleanup
Cleanup pass
2025-07-11 12:11:01 +02:00
Raphaël de Courville
4fc1c5d4d4 Merge pull request #1015 from babaissarkar/update_set_heading
Update docs for setHeading
2025-07-11 12:03:12 +02:00
Ngoc Doan
bf58dc198e Remove an extra line 2025-05-27 22:17:10 -07:00
jSdCool
5d67bfd8a6 use the constant 2025-05-26 19:33:00 -04:00
Ngoc Doan
a201a71442 Add error check for pixelDesity in mask() 2025-05-17 04:01:48 -07:00
Stef Tervelde
7bb7662c0c Merge branch 'main' into gradle-cleanup 2025-05-05 12:39:59 +02:00
jSdCool
06453b801b Reapply clean changes for PR 2025-04-27 12:57:16 -04:00
Stef Tervelde
c83f44c9d8 Update PGraphicsOpenGL.java 2025-04-25 13:57:18 +02:00
Raphaël de Courville
637997c336 Merge pull request #1050 from Stefterv/feat-command-line
Setup a Command Line Interface
2025-04-25 11:42:06 +02:00
Raphaël de Courville
732b20c94a Merge pull request #1038 from Stefterv/default-display-density
Change the default display density
2025-04-25 11:23:40 +02:00
Raphaël de Courville
6f5e5ba78a Merge pull request #1034 from Konsl/patch-1
Update PGraphics.java: fix typos in documentation
2025-04-25 11:06:50 +02:00
Stef Tervelde
fd571d13d5 Initial Command Line structure 2025-04-18 17:42:31 +02:00
Stef Tervelde
9b34964ff6 Merge pull request #987 from Rishab87/PVector-unit-tests
Added Unit Tests for `PVector` in `processing:core`
2025-04-15 18:19:55 +02:00
Stef Tervelde
73d3aeb050 Change the default display density 2025-04-15 18:05:52 +02:00
Konsl
056b88b671 Update PGraphics.java: fix swapped html tags 2025-04-14 18:31:37 +02:00
Konsl
b342feba9a Update PApplet.java: remove unmatched closing tag 2025-04-14 18:26:44 +02:00
Konsl
4924605c8d Update PGraphics.java: fix more typos 2025-04-14 18:18:54 +02:00
Konsl
36945e71e3 Update PGraphics.java: fix typos in documentation 2025-04-14 18:09:15 +02:00
rishab
abc39e935e fixed page-up key code and added tests 2025-04-13 23:25:14 +05:30
rishab
5751b50c41 Revert "added unit tests for Pmatrix 3D"
This reverts commit 105bc9603e.
2025-04-05 17:01:46 +05:30
rishab
105bc9603e added unit tests for Pmatrix 3D 2025-04-05 16:59:03 +05:30
Subhraman Sarkar
5c1278a91b PVector doc update 2025-03-26 09:48:17 +05:30
rishab
1a0e52a8d8 added unit tests for PMatrix2D 2025-03-25 19:53:52 +05:30
Stef Tervelde
9cd63b6c80 Merge pull request #954 from Rishab87/unexpected-y-axis
Fixed unexpected Y-axis translation when using ```ortho()``` and ```resetMatrix()```
2025-03-24 18:36:31 +01:00
Raphaël de Courville
0ace79650c Merge pull request #966 from Rishab87/unit-tests-key-event
Added unit tests for handling key events in ```processing:core```
2025-03-21 11:55:15 +01:00
Raphaël de Courville
ff78d909c2 Merge pull request #972 from Rishab87/blur-filter-exception
Fixed blur filter throwing exception for too large values relative to image
2025-03-21 11:53:24 +01:00
rishab
df8b732c3f added unit tests for PVector 2025-03-20 11:40:22 +05:30
Stef Tervelde
c5c35334ed Merge branch 'main' into main 2025-03-14 14:52:20 +01:00
rishab
bafcd54dce minor changes 2025-03-14 14:34:09 +05:30
rishab
e6ac72b2cc fixes 779 2025-03-14 00:20:33 +05:30
rishab
3e6d159fa7 Merge branch 'main' of https://github.com/processing/processing4 into HEAD 2025-03-13 23:23:17 +05:30
Stef Tervelde
b67f9707c4 Enable tests on core 2025-03-13 13:06:52 +01:00
rishab
7c42504a95 clamping radius and added a safeDivide check 2025-03-13 13:04:45 +05:30
Stef Tervelde
0674c247e0 Workflow improvements 2025-03-12 09:47:46 +01:00
Stef Tervelde
448ee16e1f Merge branch 'processing:main' into main 2025-03-11 12:15:11 +01:00
Raphaël de Courville
dacc37539a Fix typo in core/README.md
Remove that sad and lonely "In"
2025-03-10 21:30:19 +01:00
Stef Tervelde
34b90c7cbe Windows Packaging 2025-03-09 23:58:43 +01:00
rishab
be9e6b8fac minor changes 2025-03-08 21:08:33 +05:30
rishab
801b02b52b added keyEvent tests 2025-03-08 20:40:09 +05:30
Stef Tervelde
8de4575c6d Merge branch 'processing:main' into gradle-cleanup 2025-03-07 15:05:18 +01:00
Stef Tervelde
fe152b752d Merge pull request #888 from Stefterv/main-gradle
Adding a Gradle Build system to the Processing IDE
2025-03-07 09:35:05 +01:00
rishab
bebf792699 pre multiplied projection matrix 2025-03-06 20:51:44 +05:30
Stef Tervelde
dccf16a00c Improved Simplification 2025-02-05 21:33:57 +01:00