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

Fixed font-size estimation #52

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

derickr
Copy link
Contributor

@derickr derickr commented Sep 17, 2023

In one of the commits that added support for the mini, and further commits, a new 'btnSize' parameter was introduced.

This however was not reflected in the algorithm that determines the size.

Without this fix, the text was always too wide (90px is more than the 72px my stream deck has), and also no longer virtually centred.

This commit should address both these issues.

I've only tested this with the v2.

In one of the commits that added support for the mini, and further commits, a
new 'btnSize' parameter was introduced.

This however was not reflected in the algorithm that determines the size.

Without this fix, the text was always too wide (90px is more than the 72px my
stream deck has), and also no longer virtually centered.

This commit should address both these issues.

I've only tested this with the v2.
@lornajane
Copy link
Collaborator

At least on mine (I have the XL), this makes the words a bit too wide, I think. Especially where there are borders, more of the edge letters get swallowed. The original setup intentionally had a little bit more breathing space around the edges, can we put something similar into this calculation?

@derickr
Copy link
Contributor Author

derickr commented Oct 17, 2023

I've just added a commit that creates two new functions, that allow you to set a margin to whatever you want. I like my text (in some cases) to use up the whole space.

Right now, for the existing functions I added a default margin of 6.

I think it would be better if the default was 0, but then that means that where text buttons are currently used, you'd have to replace NewTextButton with NewTextButtonWithMargins(…, 6) and NewTextButtonWithColours (really, Colours? :-) ) with NewTextButtonWithColoursAndMargin(…, 6). That is a BC break of course, but I don't know how much you care.

I don't really know whether 6 is the right default either. For me, it was totally fine with textual scene names for OBS, where the decorator is configured to be 4 — at least I my case, I think you've removed it in your streamdeck-tricks implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants