alejandro-du / crudui

Automatically generate CRUD-like Vaadin views for any Java Bean
https://vaadin.com/directory#!addon/crud-ui-add-on
Apache License 2.0
86 stars 54 forks source link

Needless scrollbars appear (w/ fix) #44

Closed jflamy closed 5 years ago

jflamy commented 5 years ago

In version 3.7, there are extra scrollbars that appear when a toolbar is present because the grid is set to the full size of the parent, and so there is not enough room for the toolbar and the grid.

The fix is simple -- in WindowsBasedCrudLayout(), replace mainComponentLayoutsetSizeFull() with setWidth("100%"). The setExpand() a few lines below will do the rest (using all the vertical space)

        mainComponentLayout.setWidth("100%");
        mainComponentLayout.setMargin(false);
        mainComponentLayout.setPadding(false);
        mainLayout.add(mainComponentLayout);
        mainLayout.expand(mainComponentLayout);
alejandro-du commented 5 years ago

Thanks for reporting. Would you be able to do a PR with the fix?

jflamy commented 5 years ago

Done. Learning github and fancy git/gitflow as I go.

alejandro-du commented 5 years ago

Merged and published(version 3.7.3). Thanks!