From: Eunki, Hong Date: Mon, 5 Feb 2024 04:48:16 +0000 (+0900) Subject: [Tizen] Fix wrong order of linear enumeration X-Git-Tag: accepted/tizen/8.0/unified/20240208.163212~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F43%2F305743%2F1;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git [Tizen] Fix wrong order of linear enumeration Since Fitting mode have FIT_HEIGHT = 4 and FIT_WIDTH = 5, we need to follow up the order of enum Change-Id: I63be4fdb114be28c20716fd3eaad01f061049f92 Signed-off-by: Eunki, Hong --- diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp index 60d1551..c92f4c3 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp @@ -2220,6 +2220,10 @@ int UtcDaliImageViewFittingModesFitHeight01(void) DALI_TEST_CHECK(value); DALI_TEST_EQUALS(value->Get(), Vector2(0, 0), TEST_LOCATION); // OFFSET is zero + value = returnedMap.Find(DevelVisual::Property::VISUAL_FITTING_MODE); + DALI_TEST_CHECK(value); + DALI_TEST_EQUALS(value->Get(), "FIT_HEIGHT", TEST_LOCATION); // OFFSET is zero + END_TEST; } @@ -2310,6 +2314,10 @@ int UtcDaliImageViewFittingModesFitWidth01(void) DALI_TEST_CHECK(value); DALI_TEST_EQUALS(value->Get(), Vector2(0, 50), TEST_LOCATION); + value = returnedMap.Find(DevelVisual::Property::VISUAL_FITTING_MODE); + DALI_TEST_CHECK(value); + DALI_TEST_EQUALS(value->Get(), "FIT_WIDTH", TEST_LOCATION); // OFFSET is zero + END_TEST; } diff --git a/dali-toolkit/internal/visuals/visual-base-impl.cpp b/dali-toolkit/internal/visuals/visual-base-impl.cpp index a61519f..3d8e79e 100644 --- a/dali-toolkit/internal/visuals/visual-base-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-base-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,8 +62,8 @@ DALI_ENUM_TO_STRING_TABLE_BEGIN(VISUAL_FITTING_MODE) DALI_ENUM_TO_STRING_WITH_SCOPE(Visual::FittingMode, FILL) DALI_ENUM_TO_STRING_WITH_SCOPE(Visual::FittingMode, OVER_FIT_KEEP_ASPECT_RATIO) DALI_ENUM_TO_STRING_WITH_SCOPE(Visual::FittingMode, CENTER) - DALI_ENUM_TO_STRING_WITH_SCOPE(Visual::FittingMode, FIT_WIDTH) DALI_ENUM_TO_STRING_WITH_SCOPE(Visual::FittingMode, FIT_HEIGHT) + DALI_ENUM_TO_STRING_WITH_SCOPE(Visual::FittingMode, FIT_WIDTH) DALI_ENUM_TO_STRING_TABLE_END(VISUAL_FITTING_MODE) /**