Sync zwidget upstream changes

This commit is contained in:
Magnus Norddahl 2024-01-07 11:48:17 +01:00
commit b2ba110df9
4 changed files with 5 additions and 5 deletions

View file

@ -1548,7 +1548,7 @@ render_outline(Outline *outl, double transform[6], SFT_Image image)
numPixels = (unsigned int) image.width * (unsigned int) image.height;
STACK_ALLOC(cells, Cell, 128 * 128, numPixels);
STACK_ALLOC(cells, Cell, 32 * 32, numPixels);
if (!cells) {
return -1;
}

View file

@ -5,6 +5,7 @@
#include <vector>
#include <stdexcept>
#include <memory>
#include <cstring>
typedef uint8_t ttf_uint8;
typedef uint16_t ttf_uint16;

View file

@ -24,7 +24,6 @@ void ImageBox::SetImage(std::shared_ptr<Image> newImage)
void ImageBox::OnPaint(Canvas* canvas)
{
canvas->fillRect(Rect::xywh(0.0, 0.0, GetWidth(), GetHeight()), Colorf::fromRgba8(0, 0, 0));
if (image)
{
canvas->drawImage(image, Point((GetWidth() - (double)image->GetWidth()) * 0.5, (GetHeight() - (double)image->GetHeight()) * 0.5));

View file

@ -123,11 +123,11 @@ void LineEdit::SetReadOnly(bool enable)
}
}
void LineEdit::SetAlignment(Alignment alignment)
void LineEdit::SetAlignment(Alignment newalignment)
{
if (alignment != alignment)
if (alignment != newalignment)
{
alignment = alignment;
alignment = newalignment;
Update();
}
}