Commit Graph

16473 Commits

Author SHA1 Message Date
Stef Tervelde
8382ec59b0 Merge branch 'welcome-screen-impl' into settings-screen 2025-11-11 13:51:33 +01:00
Stef Tervelde
f19b256a78 Rather than setting the decorations app wide, just modify the editor screen 2025-11-11 08:32:22 +01:00
Raphaël de Courville
ab9358f3d7 Tweak welcome actions naming and order
- Rename `Empty Sketch` to `New Sketch`
- Rename `Sketchbook` to `My Sketches`
- Move `Open Examples` below `My Sketches`
2025-11-07 17:56:27 +01:00
Stef Tervelde
0f1173f017 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.
2025-11-06 08:00:14 +01:00
Raphaël de Courville
6e8c1dba9b Move contributor list to CONTRIBUTORS.md (#1313)
Created CONTRIBUTORS.md and updated .all-contributorsrc to reference the new file instead of README.md. This will reduce the size of the README and improve loading times.
2025-11-05 17:01:27 -08:00
Stef Tervelde
bb0f531af6 Merge branch 'welcome-screen' into welcome-screen-impl 2025-11-04 11:54:41 +01:00
Stef Tervelde
1143547dd3 Removing the Preferences work to keep the PR clean 2025-11-04 11:53:57 +01:00
Stef Tervelde
65173d47ab 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.
2025-10-29 07:01:39 +01:00
Stef Tervelde
3bdd00ee53 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
2025-10-28 20:28:31 +01:00
Stef Tervelde
07e05be938 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.
2025-10-28 16:28:30 +01:00
Stef Tervelde
bef00f9045 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.
2025-10-28 15:05:36 +01:00
Stef Tervelde
3b5ea1dd33 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.
2025-10-28 14:45:42 +01:00
Stef Tervelde
2769a07637 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.
2025-10-28 13:20:16 +01:00
Stef Tervelde
8e32abf8ee 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.
2025-10-28 13:02:00 +01:00
Stef Tervelde
0ee8929a85 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.
2025-10-28 12:27:59 +01:00
Stef Tervelde
97ab23e8ff 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.
2025-10-28 12:20:45 +01:00
Stef Tervelde
d8f9d75c24 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.
2025-10-28 11:45:14 +01:00
Stef Tervelde
2955cb2f1d Merge pull request #1299 from Stefterv/base-vacuum 2025-10-28 08:34:09 +01:00
Stef Tervelde
e9b381ba9b 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
2025-10-28 00:12:58 -04:00
Stef Tervelde
e036cdf79d 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.
2025-10-27 14:15:54 +01:00
Stef Tervelde
20aac8164f 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.
2025-10-27 12:26:09 +01:00
Stef Tervelde
33ad602ebe 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.
2025-10-27 11:58:16 +01:00
Stef Tervelde
60372758e9 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.
2025-10-27 11:25:35 +01:00
Stef Tervelde
2fc56820fa Initial layout 2025-10-27 08:39:10 +01:00
Stef Tervelde
40a1188b1c Merge branch 'preferenceskt-update' into colors 2025-10-27 06:37:37 +01:00
Stef Tervelde
3fd4ea935f Merge branch 'welcome-screen' into preferenceskt-update 2025-10-27 06:36:58 +01:00
Stef Tervelde
7965931f58 Merge pull request #1304 from Stefterv/preferences-screen
Refactor preferences to Jetpack Compose UI
2025-10-24 11:32:49 +02:00
Stef Tervelde
5a6f7fa5bd Clean up handlePrefs method by removing comments
Removed commented-out code for preferences frame initialization.
2025-10-24 11:32:23 +02: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
ca298009e1 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.
2025-10-23 21:09:54 +02:00
Stef Tervelde
5ae8b84404 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.
2025-10-23 12:34:06 +02:00
Stef Tervelde
8fe0585277 Remove obsolete TODO for onClose callback 2025-10-23 09:00:59 +02:00
Stef Tervelde
1c26bab4c2 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.
2025-10-23 08:29:16 +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
830eceafc5 Switch from ProcessingTheme to PDETheme in window UI
Replaces the use of ProcessingTheme with PDETheme in the PDEWindowContent composable
2025-10-22 07:26:40 +02:00
Stef Tervelde
3e04faa3a3 Merge pull request #1284 from Stefterv/compose-windows
Add PDE window utilities for Compose and Swing
2025-10-22 07:20:15 +02:00
Stef Tervelde
4686345fb7 Merge branch 'welcome-screen' into compose-windows 2025-10-22 07:20:05 +02:00
Stef Tervelde
77eba30bb2 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.
2025-10-21 22:46:57 -04:00
Stef Tervelde
bf4d163c2e 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.
2025-10-16 21:56:35 -04:00
Stef Tervelde
d3681f38c6 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
2025-10-16 12:24:51 -04:00
Stef Tervelde
c1d631356b Fix duplicate include for app:utils module (#1285)
Removed redundant 'include("app:utils")' statement and added 'app:utils' to the main include block for consistency.
2025-10-15 16:57:46 -04: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
Stef Tervelde
db69773c43 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.
2025-10-15 13:36:17 +02:00
Stef Tervelde
58c746b291 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.
2025-10-15 13:22:18 +02:00
Stef Tervelde
d42fb2fe36 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.
2025-10-15 11:48:00 +02:00
Stef Tervelde
06e3094840 Add compose ui test to the deps 2025-10-15 11:45:24 +02:00
Stef Tervelde
643ec03090 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.
2025-10-15 11:42:36 +02:00
Stef Tervelde
4546a3878a Refactor Locale class and add LocaleProvider test 2025-10-15 11:39:03 +02:00
Stef Tervelde
2a5341b52f Rename output JARs in createLibrary tasks (#1278)
The createLibrary tasks in dxf, pdf, and serial modules now rename the output JAR files to dxf.jar, pdf.jar, and serial.jar respectively as Processing does not expect the version name to be in the library jar
processing-1310-4.4.10
2025-10-14 10:35:31 -04:00
Stef Tervelde
20fa9be3b8 Add compose ui test to the deps 2025-10-14 12:49:25 +02:00