From 8d38ab074b1f402465722a1d8ead3a03e1ab9f2e Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Mon, 20 Jun 2022 23:49:15 -0400 Subject: [PATCH] misc: change image slice scale to 200% of style's specified Want to circle back and find a better pattern for this as it enlarges the slice window (which doesn't clamp the preview window) and it unnecessarily upscales small images which bloats storage a bit. There's probably also something smarter to do with just saving "as large as possible" rather than strictly template size. --- src/gui/value/image.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/value/image.cpp b/src/gui/value/image.cpp index 9e32eaf2..f13e6a37 100644 --- a/src/gui/value/image.cpp +++ b/src/gui/value/image.cpp @@ -41,7 +41,8 @@ void ImageValueEditor::sliceImage(const Image& image) { AlphaMask mask; style().mask.getNoCache(options,mask); // slice - ImageSliceWindow s(wxGetTopLevelParent(&editor()), image, style().getSize(), mask); + RealSize desiredSliceSize = RealSize(style().getSize().width * 2, style().getSize().height * 2); + ImageSliceWindow s(wxGetTopLevelParent(&editor()), image, desiredSliceSize, mask); // clicked ok? if (s.ShowModal() == wxID_OK) { // store the image into the set