Removed support for the deprecated carousel type values horizontal_wheel and vertical_wheel.

This commit is contained in:
Leon Styhre 2023-01-29 12:41:54 +01:00
parent b2bfcf11f6
commit b617cc0f3b

View file

@ -1141,23 +1141,10 @@ void CarouselComponent<T>::applyTheme(const std::shared_ptr<ThemeData>& theme,
if (elem->has("type")) { if (elem->has("type")) {
std::string type {elem->get<std::string>("type")}; std::string type {elem->get<std::string>("type")};
if (type == "horizontal_wheel") { if (mLegacyMode && type == "horizontal_wheel")
type = "horizontalWheel"; type = "horizontalWheel";
if (!mLegacyMode) { else if (mLegacyMode && type == "vertical_wheel")
LOG(LogWarning)
<< "CarouselComponent: Property value \"horizontal_wheel\" has been "
"deprecated and will be removed in a future release, use "
"\"horizontalWheel\" instead";
}
}
else if (type == "vertical_wheel") {
type = "verticalWheel"; type = "verticalWheel";
if (!mLegacyMode) {
LOG(LogWarning) << "CarouselComponent: Property value \"vertical_wheel\" has been "
"deprecated and will be removed in a future release, use "
"\"verticalWheel\" instead";
}
}
if (type == "horizontal") { if (type == "horizontal") {
mType = CarouselType::HORIZONTAL; mType = CarouselType::HORIZONTAL;