-
-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SizeBox .w & .h percentage of their Containing box. #67
Comments
Did you try using context.screenWidth or context.percentWidth and all
MediaQuery related operations? Does that help?
…On Thu, 28 Jan 2021 at 11:57 PM, natgross ***@***.***> wrote:
It's great to have percentage sizes of the screen for VxBox. BUT, what
good is it for nested boxes? Say if I have two boxes in an HStack,
.wOneFourth and .wThreeFourths, and in those boxes I have of course more
boxes/containers. I need to specify the inner boxes as percentages of their
outer box, not a percentage of the entire screen.
Can we do this with the current version?
Or, am I being silly and there is a simple formula/function to do this,
based on percentage of entire screen?
tnx
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#67>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADAI5HGSILNIBWNUX7VJJTTS4GUB5ANCNFSM4WXQUDNA>
.
|
I don't see how that will help.
|
Ohh I got it now. Vx doesn’t restrict you for doing that. It uses the same
mechanism. You can easily do that though. You can watch my video for that
about how to get the size of a widget on MTECHVIRAL youtube channel.
…On Fri, 29 Jan 2021 at 12:11 AM, natgross ***@***.***> wrote:
I don't see how that will help.
MediaQuery gives me Size of the screen, but I need size of container of
inner boxes, in order to set relative size of inner boxes.
body:VxBox( //the outermost box
child:HStack([
//left side hold 2 vertical boxes
VxBox(
child: VStack([
VxBox().make(), //this box should a percentage of VxBox holding it
VxBox().make(), //this box should a percentage of VxBox holding it
])
).purple300 .make().wThreeForth(context),
//right side 1 box, top to bottom.
VxBox(
child: Container(),
).green300.make().wOneForth(context)
]),
).blue300.make()
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#67 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADAI5HBDROLPQSLGQ2AYMXTS4GVVVANCNFSM4WXQUDNA>
.
|
Earlier this week, I watched the entire VelocityX playlist! Hope this info is in the sizedbox video. If not I need to wait for the new docs:) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's great to have percentage sizes of the screen for VxBox. BUT, what good is it for nested boxes? Say if I have two boxes in an HStack, .wOneFourth and .wThreeFourths, and in those boxes I have of course more boxes/containers. I need to specify the inner boxes as percentages of their outer box, not a percentage of the entire screen.
Can we do this with the current version?
Or, am I being silly and there is a simple formula/function to do this, based on percentage of entire screen?
tnx
The text was updated successfully, but these errors were encountered: