Adorkable / node-red-contrib-ui-led

A simple LED status indicator for the Node-RED Dashboard
MIT License
16 stars 12 forks source link

Left label margin should match right LED margin (margin for glow) #18

Closed Just-another-pleb closed 5 years ago

Just-another-pleb commented 5 years ago

There is the option for the "name" of the LED. This means (for instance) if you make it 3 wide...... It would be nice to control where/how the text is shown. "Left justified", "Centered", or "Right format". Maybe not having the LED so close to the edge? (See attached picture. Note red line.) And maybe even the option to put the text AFTER the LED, rather than before.

screenshot from 2019-02-06 21-09-20

yoiang commented 5 years ago

I like left, centered, and right text justification options as well as the option to have the text after the LED! I'm going to separate them out into different tasks.

Can you elaborate on your middle point, you feel the LED is too close to the border?

Just-another-pleb commented 5 years ago

I think I included a picture in the original post, but see attached anyway.

The text also is too close to the ends/edges of the box.

Looking at it now, the LED may be ok for distance, but if you look at the (now modified) picture you can see how close the text is to the left side of the "box". This may be because the text is (probably) left justified.

On Fri, 8 Feb 2019 at 03:42, Ian G notifications@github.com wrote:

I like left, centered, and right text justification options as well as the option to have the text after the LED! I'm going to separate them out into different tasks.

Can you elaborate on your middle point, you feel the LED is too close to the border?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Adorkable/node-red-contrib-ui-led/issues/18#issuecomment-461503985, or mute the thread https://github.com/notifications/unsubscribe-auth/AmClmJ6w7bcdJLPtcH_GQe0ekSIvtlEJks5vLFdbgaJpZM4ak6T4 .

yoiang commented 5 years ago

Oh you meant match the distance of the text from the edge with the distance of the LED from the edge or vice versa? I'll play with how that would look when I have a sec!

Just-another-pleb commented 5 years ago

Well, something like that.

Just that when there is text, it doesn't look nice if the text is (say) 2 pixels in from the left edge and the LED is (say) 10.

I've forgotten what the LED by itself looks like in a 1 x 1 cell.

I just tried that, and it is too early I think. But any way, I hope you get the idea of what I am saying.

On Fri, 8 Feb 2019 at 07:08, Ian G notifications@github.com wrote:

Oh you meant match the distance of the text from the edge with the distance of the LED from the edge or vice versa? I'll play with how that would look when I have a sec!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Adorkable/node-red-contrib-ui-led/issues/18#issuecomment-461577513, or mute the thread https://github.com/notifications/unsubscribe-auth/AmClmPEXAoGlU7-b4TOHUSqnXRLAX6kHks5vLIfHgaJpZM4ak6T4 .

yoiang commented 5 years ago

RE: title change, this issue represents the last part of the 3 requests @Just-another-pleb made above:

Per they're image the LED's right margin is larger than the label's left margin, and it would likely look better if they matched!

Either the LED's glow should overhang the right side of the container and the actual LED should be as close as the label or the label should moved in to match the LED's spacing.

yoiang commented 5 years ago

The former isn't possible without messing with styling higher up so fb27b9a8ceaf9266d223d8230371c7c8afcc7ad6 implements the latter (name matching LED's spacing)