hotNipi / node-red-contrib-ui-level

A linear level type widget to the Node-RED dashboard
MIT License
27 stars 6 forks source link

Font Color #14

Closed daveHounds closed 5 years ago

daveHounds commented 5 years ago

Describe the bug Font color default seems to be 'white'. How do I change/set "label", "Unit", "Value" font color, size, etc.?

To Reproduce na

Expected behavior Expected to use dashboard Theme and/or use of CSS settings (font size=1; font color= blue) as I do for node-red standard widgets.

Screenshots na

Environment and versions (please complete the following information):

ui-level version: 0.0.20

C:\Users\dave>node-red 22 May 09:03:45 - [info]

Welcome to Node-RED

22 May 09:03:45 - [info] Node-RED version: v0.19.5 22 May 09:03:45 - [info] Node.js version: v10.15.1 22 May 09:03:45 - [info] Windows_NT 10.0.17763 x64 LE 22 May 09:03:45 - [info] Loading palette nodes 22 May 09:03:48 - [warn] rpi-gpio : Raspberry Pi specific node set inactive 22 May 09:03:48 - [info] Dashboard version 2.14.0 started at /red/ui 22 May 09:03:49 - [warn] ------------------------------------------------------ 22 May 09:03:49 - [warn] [node-red/tail] Not currently supported on Windows. 22 May 09:03:49 - [warn] ------------------------------------------------------ 22 May 09:03:49 - [info] Settings file : \Users\dave.node-red\settings.js 22 May 09:03:49 - [info] HTTP Static : C:\Users\dave.node-red 22 May 09:03:49 - [info] Context store : 'default' [module=memory] 22 May 09:03:49 - [info] User directory : \Users\dave.node-red 22 May 09:03:49 - [info] Server now running at http://127.0.0.1:1880/red/ 22 May 09:03:49 - [info] Active project : Collection_Template_Widgets 22 May 09:03:49 - [info] Flows file : \Users\dave.node-red\projects\Collection_Template_Widgets\flow.json 22 May 09:03:49 - [info] Starting flows

Additional context na

hotNipi commented 5 years ago

First advise will be to update node-red-dashboard. Since version 2.15 the dashboard exposes site properties for custom ui nodes and ui-level node should get the theme colors as expected.

daveHounds commented 5 years ago

That partially worked. Thx. Theme color now working. Can I change/input "label", "Unit", "Value" font color, size, etc. as I do with other widgets? If so, how?

hotNipi commented 5 years ago

Do you mean with msg.ui_control or with CSS overrides?

daveHounds commented 5 years ago

CSS overrides.

hotNipi commented 5 years ago

Well it is complicated thing. Text rendering with svg is not same as with html. I did simplest one solution to cover as many use cases as possible and avoiding needs to create edge cases. Things go messy with different devices but it needs to be supported. So simplicity is the key rule I follow here and I try to keep it this way.

Of course if you have nice ideas how to wide up configuration and layout possibilities I am open to pull requests

daveHounds commented 5 years ago

OK. I understand. Still, thanks for getting my Theme colors working with your widget.

hotNipi commented 5 years ago

closed as agreed and solved

hotNipi commented 5 years ago

Things might be now a bit better for you in terms of widget text color: https://discourse.nodered.org/t/announce-node-red-contrib-ui-level-new-feature/9793

daveHounds commented 5 years ago

Thank you for the font color change.  Tried it and it worked.  However, it still is not quite what I needed because your solution changes the colors of ALL widgets within a tab (which is good for some applications.)  I needed single widget font color control as is available with the basic nr-ui-nodes.  I can add prior to a label or value to change the color of either or both; I can also change the font sizes though that can be trickier.

Again, thanks for the improvement and listening.  Much appreciated.

Dave

From: hotNipi notifications@github.com Reply-To: hotNipi/node-red-contrib-ui-level reply@reply.github.com Date: Friday, May 24, 2019 at 5:36 AM To: hotNipi/node-red-contrib-ui-level node-red-contrib-ui-level@noreply.github.com Cc: daveHounds dave@milehihounds.com, State change state_change@noreply.github.com Subject: Re: [hotNipi/node-red-contrib-ui-level] Font Color (#14)

Things might be now a bit better for you in terms of widget text color: https://discourse.nodered.org/t/announce-node-red-contrib-ui-level-new-feature/9793

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

hotNipi commented 5 years ago

Started to develop configuration options for texts in widget. Font color and size will be open to be customized from widget config page. I did reopen this issue to get more specific feedback from you as one sophisticated user. If you can more clearly describe your expectations how far you think the customizing may or should go. It will be cool if you can do some mock images what you are expecting the widget should be able to do. Just because of me arguing with myself does not create too much fancy stuff anymore. Thanks in advance.

hotNipi commented 5 years ago

version 0.0.24 released

daveHounds commented 5 years ago

@hotNipi Thank you for the improvements. I tested them and they work for me.

hotNipi commented 5 years ago

Very nice. Thank you.