On Thursday 18 April 2024 at 21:09:51 UTC+1
Gonzalo wrote:
Ian MacArthur schrieb am Donnerstag, 18. April
2024 um 13:52:14 UTC+2:
BUT: It doesn't rescale when I resize the widget. So I
guess I do still need a resize() method to handle that
still?
I tried it and it works, but on Windows, with a certain .svg I got:
D:\a\mrv2\mrv2\BUILD-Msys-amd64\Release\mrv2\src\mrv2-build\lib\mrvWidgets\mrViewer.cxx(1529): error C2026: string too big, trailing characters truncated
I am attaching the .svg that I think is the issue.
Hmm, just dropped that SVG file into my little fluid test, and it seems to work OK. Is it possibly a different image that is causing the issue?
(I got a grey image showing a white outline, with a drop-shadow, of a stylised hand wiping a cloth over the surface; which seems like a credible image for a "scrub" icon, so I assume that is working OK.)
This was on Win10 with Msys, and gcc version 6.3.0 (MinGW.org GCC-6.3.0-1) - which is pretty ancient these days but still I use it...
What compiler are you using? That error message "C2026" looks a bit "lc"-ish to me, not like a gcc error, so maybe it's a compiler thing?
Hmm, OK, just checked - C2026 is a MS lc thing:
<quote>
Before adjacent strings get concatenated, a string can't be longer than 16380 single-byte characters.
A Unicode string of about one half this length would also generate this error.
</quote>
The solution apparently is to dice the string up into separate quoted chunks, i.e. instead of doing :-
"this is a \
very long \
string"
We need to do :-
"this is a "
"very long "
"string"