Cut off strings too long to show in ugfx.List#221
Closed
DigitalBrains1 wants to merge 1 commit intoSHA2017-badge:masterfrom
Closed
Cut off strings too long to show in ugfx.List#221DigitalBrains1 wants to merge 1 commit intoSHA2017-badge:masterfrom
DigitalBrains1 wants to merge 1 commit intoSHA2017-badge:masterfrom
Conversation
Author
|
Oh, by the way, the MIN() macro does double evaluation of its arguments, but that's not a problem here. I'm not too fond of it though, which is why I'm mentioning it. |
basvs
reviewed
Aug 13, 2017
| } | ||
| } | ||
| #endif | ||
| gdispGFillStringBox(gw->g.display, gw->g.x+x+LST_HORIZ_PAD, gw->g.y+y, iwidth-LST_HORIZ_PAD, iheight, qi2li->text, gw->g.font, text, fill, justifyLeft); |
There was a problem hiding this comment.
why not justifyLeft | justifyTop ? That seems to work.
Author
There was a problem hiding this comment.
It does?!
I just read the API docs and they say that text is always vertically centered and justify only adjusts horizontal. So either you're getting unintended correctness or the docs need to be updated :-).
There was a problem hiding this comment.
I read the header file and found this constant. Tried it and it seemed to work. Haven't done further testing. :)
|
I've added my alternative pull-request here: #222 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This relates to pull request #216. @basvs wrote:
This patch does exactly that. Since this patch is already very useful on its own, I created a new pull request for it.
I'm not too sure about the #ifdef GDISP_NEED_CLIP, though it will compile without it defined, it will render very wrongly. Maybe compilation should fail, perhaps with an error pragma?