Center text within region #577
Unanswered
manuel-koch
asked this question in
Q&A
Replies: 1 comment 1 reply
-
tStr is a internal method to build font altas and it has nothing to do with size calculation. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to build a custom widget that looks like a gauge with a label and the current value as text.
As a starting point I looked at
ProgressIndicator.go:98
.labeled_gauge.go
main.go
Looking at the two texts, it looks like they are not centered horizontally, but shifted slightly to the left.
It seems like the
CalcTextSize()
function returns wrong size of text.Additionally the original code uses
tStr()
around the string that needs to be examined - buttStr
is not accessible outside of giu package ( as far as I understand go ).Any hint appreciated !
Beta Was this translation helpful? Give feedback.
All reactions