Skip to content

Commit 11f0c50

Browse files
philterphilter
andcommitted
Add NestedArtboardLayout hug
Add hug overrides for nested artboards. There is one caveat. Since the Artboard is a special type of layout where children can exist in regular transform space OR inside a layout, in order for nested artboard hug to work, the nested artboard must be in AutoLayout mode (ie has at least 1 relative layout child) and when you set hug on the nested artboard (inside the parent artboard) it will hug to whatever the size of the layout children are. It will not currently hug to components in the Artboard that exist in regular transform space. https://github.com/user-attachments/assets/eee4568e-c5d3-4987-b852-a52cbd2af563 Diffs= 95cad5c60 Add NestedArtboardLayout hug (#8137) edc91a599 Initial refactor to simplfigy class structure (#8122) e9918f249 d3d11 simplifications (#8134) 84f332761 Optimize draw to avoid creating when clip is empty (#8128) c67b67083 Updates to layout hug (#8132) 30f5778b1 revisit sync between flutter and c++ runtime (#8101) eb4c9d36b Fix intrinsically sizeable bug (#8131) bc6010b6e bump premake (#8120) 06f13b3d8 Fix default target id for ListenerAlignTarget (#8110) a4e15fb7b Add fallback font support for iOS and macOS (#7690) 24bb958f1 Fix dstreadshuffle gm (#8100) Co-authored-by: Philip Chung <philterdesign@gmail.com>
1 parent 93c1280 commit 11f0c50

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.rive_head

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a84aea792f208119fbea5c0fe0704c9d484aaa2c
1+
95cad5c6055750ff6b1c033f903967e6b9c22bb6

lib/src/rive_core/nested_artboard.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ abstract class MountedArtboard {
6060
double get originalArtboardHeight;
6161
void artboardWidthOverride(double width, int widthUnitValue, bool isRow);
6262
void artboardHeightOverride(double height, int heightUnitValue, bool isRow);
63+
void artboardWidthIntrinsicallySizeOverride(bool intrinsic);
64+
void artboardHeightIntrinsicallySizeOverride(bool intrinsic);
6365
void dispose();
6466
void dataContextFromInstance(ViewModelInstance viewModelInstance,
6567
DataContext? dataContextValue, bool isRoot);

lib/src/runtime_mounted_artboard.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ class RuntimeMountedArtboard extends MountedArtboard {
9393
@override
9494
void artboardHeightOverride(double height, int heightUnitValue, bool isRow) {}
9595

96+
@override
97+
void artboardWidthIntrinsicallySizeOverride(bool intrinsic) {}
98+
99+
@override
100+
void artboardHeightIntrinsicallySizeOverride(bool intrinsic) {}
101+
96102
@override
97103
double get originalArtboardWidth => originalArtboardInstanceSize.width;
98104

0 commit comments

Comments
 (0)