Skip to content

Svg Icons and UI Customization#974

Merged
jadeandtea merged 40 commits into
Bram-Hub:devfrom
Mystin:svg
Apr 23, 2026
Merged

Svg Icons and UI Customization#974
jadeandtea merged 40 commits into
Bram-Hub:devfrom
Mystin:svg

Conversation

@Mystin
Copy link
Copy Markdown
Collaborator

@Mystin Mystin commented Apr 19, 2026

Description

Pulls all styling for the UI into LookAndFeel properties which are accessed via UIManager and are synchronized across the UI and across LAF changes. This allows for colorblind support across the whole UI with just a few properties and custom color theming by users with their own .properties files. These properties are also applied to the new SVG icons which look significantly nicer and have a unified look across all the new toolbar icons, in addition to having red/green colorblind support.

Closes #467
Closes #460

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (improvement to an already existing feature)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

These changes have been tested on my Windows 11 machine and are successful with all existing color themes.

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

FisherLuba and others added 30 commits March 19, 2024 16:28
…dits the current FlatLaf color scheme to add any colors that are in the color theme txt file.
…Also hid color theme file option if custom color theme is not selected.
# Conflicts:
#	src/main/java/edu/rpi/legup/ui/ProofEditorPanel.java
#	src/main/java/edu/rpi/legup/ui/PuzzleEditorPanel.java
Added a new SVGNamedColors class which provides a method to lookup the Color value of any named SVG color.
Added support for the A, a, T, t, S, and s path operators. Used math from the SVG specs for making Arc2D objects that match the arc command.
Added arcs instead of quadratic bezier curves on corners and grew the folds to fill a gap
Make more classes for svg implementation to more closely match the DOM model of the base SVG.
Moving away from unnecessary custom SVG implementation and instead using dedicated library.
Make SVGIcon class that uses Batik to load and draw SVG files. Also provides IconColorManager class to dynamically change color palettes for these icons.
Remove rarely-used MaterialLaf files and start using exclusively FlatPropertiesLaf, which allows for the definition of UI colors in .properties files, meaning colors, fonts, and other values can be pulled from the LAF with UIManager.get___() at any time for easy and unified color theming and other styling.
Mystin added 10 commits April 2, 2026 20:56
Took the colors and fonts and border widths associated with the rendering of every puzzle and moved it into the .properties file which will be accessible via UIManager and the LAF.
Made a new function in ElementView for drawing the border around an element and had it be called last for drawing. Then went to every puzzle and moved border rendering into this function. Also added graphics create and dispose calls in all functions that set a stroke, color, font, ect.
The svg feature requires dynamic styling from the LAF to display rule icons in accordance with the stling of the board.
Switched from Apache Batik to FlatLAF's own FlatSVGIcon, which provides its own functionality for theme-dependent SVG colors. Also switched several UI elements to use style classes for styling so that they will  not be reset when the LAF is switched.
Made the status message in DynamicView display over the zoomer in a legible manner, whereas before it was hard-to-read text with no background laid over the zoomer UI elements.
Pulled all toolbar icon images into a dedicated toolbar directory and replaced all of the proof editor's toolbar2 icons with new SVG icons.
Added the rest of the toolbar SVG icons.
Creating SvgIcon keys so Puzzle can have transparency and making new visual elements in ProofEditor and PuzzleEditor look more similar.
@jadeandtea jadeandtea merged commit dca9e93 into Bram-Hub:dev Apr 23, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants