doodle icon indicating copy to clipboard operation
doodle copied to clipboard

Add Landmark support for margin and size in Layout

Open Glitch-On opened this issue 9 months ago • 2 comments

This PR extends the Doodle Layout system to support Landmark-based dimensions for the margin and size methods, enabling percentage-based sizing and margins relative to bounding boxes. #169

Changes Core Implementation

  • Layout trait: Added new margin and size method overloads that accept Landmark parameters instead of just Double values

  • GenericLayout: Implemented the logic to calculate actual dimensions based on landmark percentages relative to bounding box dimensions

  • LayoutSyntax: Extended the syntax to expose the new landmark-based methods to end users

Examples & Documentation

  • LandmarkLayoutExamples: Added comprehensive examples demonstrating percentage-based layouts, including:

      1. Proportional sizing using landmarks
    
      2. Responsive margins based on bounding box dimensions
    
      3.Practical use cases for percentage-based layout
    

Glitch-On avatar Feb 16 '26 10:02 Glitch-On

Thanks for doing this. Some CI tasks are failing. Can you run the build command from sbt, and fix all the problems it shows? This should then get CI passing.

noelwelsh avatar Feb 20 '26 11:02 noelwelsh

Thank's for appreciation I will look into the matter fix the problem asap.

Glitch-On avatar Feb 20 '26 11:02 Glitch-On