-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: label text wrapping inside flexbox layout (#5781)
- Loading branch information
1 parent
7edf561
commit 481043f
Showing
5 changed files
with
109 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
image { | ||
width: 40; | ||
height: 40; | ||
flex-grow: 0; | ||
flex-shrink: 0; | ||
} | ||
|
||
Label { | ||
border-width: 1; | ||
border-color: black; | ||
padding: 0; | ||
flex-grow: 1; | ||
flex-shrink: 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" class="page"> | ||
|
||
<StackLayout width="200" class="p-20"> | ||
|
||
<!-- Android --> | ||
<FlexboxLayout> | ||
<Label textWrap="true" text="a b c d e f g h i j k l m n o p q r s t" /> | ||
</FlexboxLayout> | ||
|
||
<FlexboxLayout> | ||
<Image src="https://placehold.it/40x40" /> | ||
<Label textWrap="true" text="a b c d e f g h i j k l m n o p" /> | ||
</FlexboxLayout> | ||
|
||
<FlexboxLayout flexWrap="wrap"> | ||
<Label textWrap="true" text="a b c d e f g h i j k l m n o p q r s t" /> | ||
<Label textWrap="true" text="a b c d e f g h i j k l m n o p q r s t" /> | ||
</FlexboxLayout> | ||
|
||
|
||
<!-- iOS --> | ||
<FlexboxLayout> | ||
<Label textWrap="true" text="a b c d e f g h i j k l m n o p" /> | ||
</FlexboxLayout> | ||
|
||
<FlexboxLayout> | ||
<Label textWrap="true" text="a b c d e f g h i j k l m n o p q" /> | ||
</FlexboxLayout> | ||
|
||
<FlexboxLayout> | ||
<Image src="https://placehold.it/40x40" /> | ||
<Label textWrap="true" text="a b c d e f g h i j k l m" /> | ||
</FlexboxLayout> | ||
|
||
<FlexboxLayout> | ||
<Image src="https://placehold.it/40x40" /> | ||
<Label textWrap="true" text="a b c d e f g h i j k l m n" /> | ||
</FlexboxLayout> | ||
|
||
<FlexboxLayout flexWrap="wrap"> | ||
<Label textWrap="true" text="a b c d e f g h i j k l m n o p" /> | ||
<Label textWrap="true" text="a b c d e f g h i j k l m n o p q" /> | ||
</FlexboxLayout> | ||
|
||
|
||
<!-- Common --> | ||
<FlexboxLayout alignItems="flex-start"> | ||
<Label textWrap="true" text="a b" style="flex-shrink:0;" /> | ||
<Label textWrap="true" text="a b c d e f g h i" /> | ||
<Label textWrap="true" text="a b c d e f g h i j" /> | ||
<Label textWrap="true" text="a b c d e f g h i j k" /> | ||
</FlexboxLayout> | ||
|
||
</StackLayout> | ||
</Page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters