Skip to content

Layout is not vertically stretching when the window is resized #243

Closed

Description

@neosarchizo

Describe the bug
When nodegui window is resized, the root layout can be stretched horizontally but not vertically. But I wanna it to be stretched vertically too.

To Reproduce
Steps to reproduce the behavior:

  1. Just resize nodegui window

Expected behavior
The root layout also have to be stretched vertically.

Screenshots
Imgur

Desktop (please complete the following information):

  • OS: Mac
  • NodeGUI version : 0.5.1
  • OS Version : macOS Catalina 10.15.1

Additional context
Nope

Activity

  1. changed the title [-]Layout is not stretching when the window is resized[/-] [+]Layout is not vertically stretching when the window is resized[/+] on Dec 4, 2019
  2. a7ul commented on Dec 4, 2019

    @a7ul
    Collaborator

    Could you try by upgrading nodegui and react-nodegui to latest version @neosarchizo

  3. a7ul commented on Dec 4, 2019

    @a7ul
    Collaborator

    Also, I did push another fix yesterday. Will do a release soon :)
    #241

  4. neosarchizo commented on Dec 4, 2019

    @neosarchizo
    Author

    I upgraded the packages like followings, but the layout is still not stretched.

    • @nodegui/nodegui : 0.7.0
    • @nodegui/react-nodegui : 0.3.1
  5. a7ul commented on Dec 4, 2019

    @a7ul
    Collaborator

    NodeGui v0.8.0 should fix this. @neosarchizo
    You will need to update then rebuild the app.

  6. neosarchizo commented on Dec 5, 2019

    @neosarchizo
    Author

    I upgraded it to v0.8.0. But the layout is still not stretched. But the layout of your default example is stretched well. So weird!! I recloned the example repo and built it and started it. It worked!.

    This is my repo.
    neosarchizo/react-nodegui-flow

  7. a7ul commented on Dec 5, 2019

    @a7ul
    Collaborator

    Hi @neosarchizo

    Just apply this patch:

    --- a/src/app.js
    +++ b/src/app.js
    @@ -34,6 +34,7 @@ const styleSheet = `
    
     const containerStyle = `
       flex: 1;
    +  justify-content: 'space-around';
     `
    
     class App extends Component<Props> {
  8. a7ul commented on Dec 5, 2019

    @a7ul
    Collaborator

    One trick I use to understand the layout is by just adding

    border: 1px solid green; to the styles and that will just show me where the layout boxes are .

  9. neosarchizo commented on Dec 5, 2019

    @neosarchizo
    Author

    Good! But why didn't it work? Because there is not justify-content: 'space-around'; in codes of react-nodegui-starter.

  10. a7ul commented on Dec 5, 2019

    @a7ul
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions