Skip to content
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

Widget height inconsistency #150

Open
PabloLec opened this issue Oct 9, 2021 · 1 comment
Open

Widget height inconsistency #150

PabloLec opened this issue Oct 9, 2021 · 1 comment
Labels
Feature Request Add for a new feature request

Comments

@PabloLec
Copy link
Contributor

PabloLec commented Oct 9, 2021

I just noticed something some "style inconsistency" regarding widget heights.
Let's say I want to create a form, and add these widgets:

self.master.add_text_box(
    title="Save Path",
    row=0,
    column=1,
    row_span=1,
    column_span=8,
    padx=0,
    pady=0,
)
self.master.add_button(
    "Save",
    row=1,
    column=8,
    row_span=1,
    column_span=1,
    padx=0,
    pady=0,
    command=None,
)

Result looks like:

recoverpy_example

Which obviously does not look right. Tinkering with size and padding can't solve it.

I opened an issue because I'm not quite sure about how to solve this.
I've not experienced this with other widgets, but here clearly this has to do with button height, which takes the the whole row height and other widgets, like Button, does not.
Maybe we could find a way to take float height params, or just make another narrower button widget. Any thoughts?

@PabloLec PabloLec added the Feature Request Add for a new feature request label Oct 9, 2021
@jwlodek
Copy link
Owner

jwlodek commented Oct 10, 2021

This issue is actually related to #91 . Basically, the way the textbox is currently drawn is that it starts with the textbox title in the center and draws down. This causes the whole widget to appear to be a line lower than it should. The slider has been adjusted to allow for alignment to top/middle/bottom, we just need to do the same for the textbox widget

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Add for a new feature request
Projects
None yet
Development

No branches or pull requests

2 participants