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

Label and SpinBox widgets do not align #506

Open
occoder opened this issue Dec 9, 2022 · 2 comments
Open

Label and SpinBox widgets do not align #506

occoder opened this issue Dec 9, 2022 · 2 comments

Comments

@occoder
Copy link

occoder commented Dec 9, 2022

I tried to apply style="text-align: right; vertical-align: middle" to both Label and SpinBox objects that are arranged side by side with the same height setting. But it seems the "vertical-align: middle" does not have any effect. These two objects always misaligned vertically even within the same HBox. Why does it work this way?

@dddomodossola
Copy link
Collaborator

Hello, can you please send me an image and a simple example script? I will try to fix it

@occoder
Copy link
Author

occoder commented Dec 11, 2022

Hi @dddomodossola , thanks for your timely feedback.
The relevant code snippet looks like

self.lbl_start = gui.Label("Start: ", width=80, height=30, style="text-align: right; vertical-align: middle")
self.spin_start = gui.SpinBox(self.start, LL, UL, STEP, width=50, height=30, style="margin-left: 10px; vertical-align: middle")
hbox = gui.HBox(width=1200, height=100, style="position: relative; left: 20px; top: 20px; justify-content: left")
hbox.append({"lbl_start": self.lbl_start, "spin_start": self.spin_start})

The UI effect looks like
Brave
You can see that vertically they are misaligned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants