From eddbc45d987abe6524715a25ed56e09e8c349300 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Tue, 21 Jun 2022 20:05:58 -0500 Subject: [PATCH] Use new BBitmap::ImportBits() Thanks to Humdinger: HaikuArchives/Calendar, 2ae7fb49 --- src/Util.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Util.cpp b/src/Util.cpp index 15f02b1..342f768 100644 --- a/src/Util.cpp +++ b/src/Util.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2020, Jaidyn Levesque + * Copyright 2020-2021, Jaidyn Levesque * Copyight 2017 Akshay Agarwal, agarwal.akshay.akshay8@gmail.com * All rights reserved. Distributed under the terms of the MIT license. */ @@ -252,8 +252,13 @@ loadVectorIcon(const char* name, int32 iconSize, int32 cropSize) if (data != NULL && BIconUtils::GetVectorIcon((uint8*)data, length, temp) == B_OK - && dest->ImportBits(temp, BPoint(0, 0), BPoint(0, 0), - cropSize, cropSize) == B_OK) { + && dest->ImportBits( +#if B_HAIKU_VERSION >= B_HAIKU_VERSION_1_PRE_BETA_4 + temp, BPoint(0, 0), BPoint(0, 0), BSize(cropSize, cropSize)) +#else + temp, BPoint(0, 0), BPoint(0, 0), cropSize, cropSize) +#endif + == B_OK) { delete temp; return dest; }