baudren / NoteOrganiser

Scientific Note Taking
MIT License
13 stars 6 forks source link

New Entry dialog has a bad layout #57

Closed baudren closed 9 years ago

baudren commented 9 years ago

When resized, the New Entry dialog does not scale properly the body entry vertically: it does not reach to the bottom.

baudren commented 9 years ago

This lets me think that the culprit is definitely the QFormLayout. I will replace it by a GridLayout, as picture there. I already tested the sample in this page, and the QTextEdit resizes completely.

I am still not sure what is the purpose of the FormLayout, then...

egolus commented 9 years ago

but the Grid layout then resizes every cell in the grid, right? So if you have the QTextEdit span over 5 rows like the last example, it's just 4 times bigger than the other cells. It's just the only widget that can actually use the space it gets.

I think, the FormLayout would be the right layout, it just doesn't work properly. There is the sizehint maximize(?) that should force the behaviour we want, it just doesn't work properly.

I think, a form is a special layout that differs from a grid. SAP for example has a nice feature that rearranges fields automatically to use the space more efficiently.

but in our case, if the grid layout works, it's ok for us to use it

baudren commented 9 years ago

I just tested it quickly, actually, and had the same behaviour: wrong vertical resizing. This time the buttons are going up... why is it such a mess?

egolus commented 9 years ago

looks like you need to nest layouts .. but I'm not sure what would be the right way

egolus commented 9 years ago

I was thinking about this. Without checking it yet: I think, you can use a vbox as main layout and add hbox layouts for the rows (label + input field) this way, the QTextEdit should be able to grow vertically.

baudren commented 9 years ago

You were right, it works. I opened #71 for discussing the integration.

baudren commented 9 years ago

Solved with the merging of #71