Delubear / GlucoseTray

Tray Icon for displaying current BG information in taskbar.
MIT License
35 stars 21 forks source link

mmol/L display mode cuts off decimal number #26

Closed jk1993 closed 4 years ago

jk1993 commented 4 years ago

Describe the bug When the current value has 2 digits as well as a decimal point e.g. 11.4, the decimal number is cut off

To Reproduce Steps to reproduce the behavior:

  1. Raise your blood glucose level to above 10 mmol/L (don't actually if you can avoid it 😄)
  2. Set GlucoseUnit appsettings.json to "1" (mmol/L)
  3. See that the decimal number is cut off

Expected behavior The full number should be displayed

Screenshots image

Desktop (please complete the following information):

Delubear commented 4 years ago

Hi @jk1993, can you see if the new version here fixes your issue?

https://github.com/Delubear/GlucoseTray/releases/tag/5.2

jk1993 commented 4 years ago

image

This is what I'm seeing now (current value is 13) so looks like it is much smaller. The two values on the left are a separate app (CoreTemp for displaying CPU temperature and load) but thought I'd leave them in the screenshot for comparison

jk1993 commented 4 years ago

image This is how it looks now with a decimal (13.2)

Delubear commented 4 years ago

@jk1993 can you see if this helps any more? Lowered the position as it looks like it's getting clipped.

https://github.com/Delubear/GlucoseTray/releases/tag/v5.2.1-pre

jk1993 commented 4 years ago

image

Definitely better (this is 13.8) but still looking quite squished and difficult to read vs the CPU temperatures but this may just be a limitation of the available pixels I guess - I'm assuming it has to scale down to 32x32?

Delubear commented 4 years ago

16x16 is scaled back down to actually. I will have one more build for you to try where the . is replaced by a ' which takes up a lot less room.

If we only had 2 digits to render, it would look a lot better. 3 is pushing it. 3 + a period is kind of tough to fit it all in.

Here is an article I found with someone facing a similar issue. I've incorporated most of what he found and hope it will help.

Please stand by for the newest build.

Delubear commented 4 years ago

@jk1993 https://github.com/Delubear/GlucoseTray/releases/tag/v5.2.2-pre

jk1993 commented 4 years ago

image Not too sure about that - this is supposedly 12.6 but hard to tell from looking at it. I'm not too sure about how it's working behind the scenes but it seems to be possible to have it readable at 16x16. If you look at a favicon generator e.g. favicon.io and generate the string "12.6" from text with a font of Roboto and a font size of 65 or 70 it seems to be readable at 16x16, unless it's doing something clever with the scaling that I'm missing

Delubear commented 4 years ago

it's also going to depend on your resolution and display scaling for your windows. I've tested it on 1080p and 4k displays so far. What is your resolution at?

jk1993 commented 4 years ago

My display resolution is 1920x1080 and scaling set to 100%. I have two identical monitors with the same resolution and config but doubt that would affect it.

Delubear commented 4 years ago

@jk1993 Can you try this build? https://github.com/Delubear/GlucoseTray/releases/tag/v5.2.3-pre

It dynamically sets the padding and font-size to better support the different reading scenarios.

Delubear commented 4 years ago

At least this is what I'm getting with the different scenarios at 1920x1080 with 100% display scaling: image

MG / under 10 MMOL / over 10 and under 20 MMOL / over 20 MMOL

jk1993 commented 4 years ago

image Yeah looking much better! This is how it looks at 11.8. I wonder if it would make sense to use a font that doesn't have the tops on the 1s, since the first one is cut off and the second one isn't so looks a bit odd. Easy to see what the value is though without hovering which is a huge improvement, and this would only affect values between 11 and 12.

Thanks for the work you've put in making this easier to use. It's a really good app and really helps me to keep an eye on the value throughout the day without having to open the full nightscout site.

Delubear commented 4 years ago

Just checked with those specific values and I can the same result. Trying to nudge it over just cuts off the 9. So the other option would be to scale the text down for all values over 10 for a better fit.

jk1993 commented 4 years ago

I'd be happy with that

Delubear commented 4 years ago

So here is an example with the change: image

12.9 with smaller font / 12.9 normal font / 11.9 normal font / 11.9 smaller font.

Delubear commented 4 years ago

@jk1993 https://github.com/Delubear/GlucoseTray/releases/tag/v5.3

This build should be good to go now.

jk1993 commented 4 years ago

Yeah looks much better