Size does not work
ejmorgan55 opened this issue · 11 comments
Basic clock works fine; as does compact. Size will not adjust though. size: large produces a blank screen (as does any input i.e. small or large). Can you advise of what the problem might be? I would like to use the large size for the display. Thanks.
Hi @ejmorgan55,
Thanks for raising this issue!
I've just tried configuring the size myself and I do not seem to have any problems.
Let's try to find out why it doesn't work in your case.
- Can you check for error messages in the console when MagicMirror is running?
- Can you comment your
MMM-text-clock
config here so I can have a look if I see any problems there?
Having the same issue here. My module config:
{
module: "MMM-text-clock",
config: {
size: "large",
language: "Swiss German",
fullscreen: true
},
position: "middle_center"
},
There was no error message; however, I went into the module and the program did not change the size. I did the change manually within the module; and it worked fine. Appears the program does not make the change from the config file. I have no other information. Looks like you have another person who also verifies that config is not working for size. As indicated; going into the module and making the change manually works.
@sebikolon I've tried your configuration and it seems there is something wrong with the positioning there. I guess I didn't take the combination of fullscreen
and position: "middle_center"
into account properly. If you want to use the module full screen could you try to use position: "top_left"
instead of position: "middle_center"
for now?
Also, I see you use "Swiss German"
as value for the language config. This is not a supported value and the module is probably falling back to English in your case. To set is to Swiss German please use it like this: language: "ch"
. I'll add what values can be used in the language
config to the README.
@ejmorgan55 what manual changes did you do to make it work? For me, the size config seems to work fine.
These are the lines where the size is read from the config and applied in the module:
- https://github.com/ngnijland/MMM-text-clock/blob/master/MMM-text-clock.js#L24
- https://github.com/ngnijland/MMM-text-clock/blob/master/MMM-text-clock.js#L198
- https://github.com/ngnijland/MMM-text-clock/blob/master/MMM-text-clock.js#L204
What it does is it assigns the config value to this.size
. Then checks if that value is a valid value ("small"
, "medium"
or "large"
). If it is not valid it will fall back to "medium"
. After that, the value is applied to an HTML element as a class. I use the styles that MagicMirror makes available to use. Do you use any custom CSS by any chance that overwrites any of the following classes: .small
, .medium
or .large
?
Just to make sure we're on the same line regarding what the size
config is responsible for. It only changes the font size and the gap between the letters. Maybe the configuration key or description does not make this clear enough? Let me hear what you guys think or what you want to achieve that is not possible right now. I'll try to help as much as I can :)
I simply went into the text-lock-js file and changed the default line to large. I do have a custom CSS file; simply to change the font color. I added this after I changed the default. I tried changing the font size in the config file to both large and small; neither worked. Rather than trying to find the fault in the program; it was easier for me to just change the default value in your program. For some reason, the program was not taking the new config value and simply defaulting to the default medium. I am currently running the text clock in conjunction with a modified compliments file so the program provides the time and a statement. I am using the text clock in an old radio with a 5 in display replacing the old tuning bar. It looks good; however, I may eventually take a look at modifying the text so that is make a statement such as "its about ten o'clock; or it is somewhere around nine o'clock" to give it a more folksy look. Any advice on this modification?
Hmm, strange that the config value is not coming through as it is supposed to do. 🤔 I'm afraid I can't do much about that until I can reproduce it. Hopefully, your solution is sufficient for now!
You've intrigued my interest here. 😲 Can you share a photo of the radio you're talking about?
I may eventually take a look at modifying the text so that is make a statement such as "its about ten o'clock; or it is somewhere around nine o'clock" to give it a more folksy look. Any advice on this modification?
You might be able to approach this as a new language, e.g. en-ish
😂. I've added a how-to in the contribution guide on how to add a new language: https://github.com/ngnijland/MMM-text-clock/blob/master/CONTRIBUTING.md#add-a-new-language.
Sure; a couple of examples attached with my current modifications. Still working on the project. Also have an arduino nano with a SD player that I programmed to play music via the radio controls. Doing the change as a new language is a good idea. I will take a look and give it a try. I am still playing with the font and the color. I will probably also use a module scheduler to rotate to different modules to present other information. Currently, I just have it dimming between 10 pm and 7 am. Work in progress. Thanks for the input; it is appreciated!
That's awesome! Maybe try to mimic an old digital radio display look like one of these:
- https://duckduckgo.com/?q=old+digital+radio+text+interface&t=ffab&iar=images&iax=images&ia=images&iai=https%3A%2F%2Fwww.digitalradiochoice.com%2Fwp-content%2Fuploads%2F2015%2F12%2Fsony-xdr-s40dbp-1-1024x683.jpg
- https://duckduckgo.com/?q=old+digital+radio+text+interface&t=ffab&iar=images&iax=images&ia=images&iai=https%3A%2F%2Fcdn.rohde-schwarz.com%2Fpws%2Fproduct%2Fm_1%2Fmr300xh_u%2FMR300xH-U_front_lightbox_landscape.jpg
Good luck with the further progress on the project! I'll close this issue for now and create a new one for the position middle_center bug.