remi icon indicating copy to clipboard operation
remi copied to clipboard

Label and SpinBox widgets do not align

Open occoder opened this issue 2 years ago • 2 comments

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?

occoder avatar Dec 09 '22 04:12 occoder

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

dddomodossola avatar Dec 09 '22 05:12 dddomodossola

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.

occoder avatar Dec 11 '22 06:12 occoder