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

A way to set fontsizes in the ui-gauge? #1395

Closed
houser42 opened this issue Oct 13, 2024 · 4 comments
Closed

A way to set fontsizes in the ui-gauge? #1395

houser42 opened this issue Oct 13, 2024 · 4 comments
Labels
feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do

Comments

@houser42
Copy link

houser42 commented Oct 13, 2024

Description

Ideally a way to set the various text instances in the ui-gauge in GUI would be nice.
By far most importantly obviously the actual text value inside the gauge in the GUI.
If that is not on the cards, is there a way to set fontsizes in the ui-gauge by CSS?
..and If so, is there an instruction somewhere? Many thanks.

Have you provided an initial effort estimate for this issue?

I am no FlowFuse team member

@houser42 houser42 added feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do labels Oct 13, 2024
@m-schaeffler
Copy link
Contributor

m-schaeffler commented Oct 13, 2024

you can set the font sizes with this CSS commands:

/* Gauge */
.nrdb-ui-gauge-size-lg .nrdb-ui-gauge-value span {
  font-size: 2.5rem !important;
}
.nrdb-ui-gauge-size-md .nrdb-ui-gauge-value span {
  font-size: 2rem !important;
}
.nrdb-ui-gauge-size-sm .nrdb-ui-gauge-value span {
  font-size: 1.5rem !important;
}
.nrdb-ui-gauge-size-xs .nrdb-ui-gauge-value span {
  font-size: 1.25rem !important;
}
.nrdb-ui-gauge-size-xss .nrdb-ui-gauge-value span {
  font-size: 1.1rem !important;
}

@houser42
Copy link
Author

houser42 commented Oct 13, 2024

Many thanks @m-schaeffler !
Would it be too much to ask where this goes? Is there an example?
I assume into either the css styling in the GUI of the ui.gauge node or in a template node?
I tried in the obvious ways but my skillset on this is not what it should be.
Would certainly appreciate an example if that is a possibility.

@m-schaeffler
Copy link
Contributor

just add a 'ui-template' node:
Bildschirmfoto vom 2024-10-13 14-08-05

[{"id":"e7dad5fbea401e4e","type":"ui-template","z":"bf934c281a6f35c0","group":"","page":"","ui":"fd06eabec55c4e5d","name":"CSS classes 2.0","order":0,"width":0,"height":0,"head":"","format":"/* Gauge */\n.nrdb-ui-gauge-size-lg .nrdb-ui-gauge-value span {\n  font-size: 2.5rem !important;\n}\n.nrdb-ui-gauge-size-md .nrdb-ui-gauge-value span {\n  font-size: 2rem !important;\n}\n.nrdb-ui-gauge-size-sm .nrdb-ui-gauge-value span {\n  font-size: 1.5rem !important;\n}\n.nrdb-ui-gauge-size-xs .nrdb-ui-gauge-value span {\n  font-size: 1.25rem !important;\n}\n.nrdb-ui-gauge-size-xss .nrdb-ui-gauge-value span {\n  font-size: 1.1rem !important;\n}","storeOutMessages":true,"passthru":false,"resendOnRefresh":true,"templateScope":"site:style","className":"","x":540,"y":620,"wires":[[]]},{"id":"fd06eabec55c4e5d","type":"ui-base","name":"Dashboard 2.0","path":"/dashboard","appIcon":"","includeClientData":false,"acceptsClientConfig":["ui-notification","ui-control"],"showPathInSidebar":false,"showPageTitle":true,"navigationStyle":"default","titleBarStyle":"fixed"}]

@houser42
Copy link
Author

Many thanks @m-schaeffler
Truly appreciated! Easy when you know where the code goes ;)
That looks good and does the job.

@github-project-automation github-project-automation bot moved this from Backlog to Done in Dashboard Backlog Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do
Projects
Status: Done
Development

No branches or pull requests

2 participants