/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
{
mImpl->mFontSizeScale = scale;
+ // No relayout is required
+ if(!mImpl->mFontSizeScaleEnabled) return;
+
// Update the cursor position if it's in editing mode
UpdateCursorPosition(mImpl->mEventData);
return mImpl->mFontDefaults ? mImpl->mFontSizeScale : 1.0f;
}
+void Controller::SetFontSizeScaleEnabled(bool enabled)
+{
+ mImpl->mFontSizeScaleEnabled = enabled;
+
+ // Update the cursor position if it's in editing mode
+ UpdateCursorPosition(mImpl->mEventData);
+
+ // Clear the font-specific data
+ mImpl->ClearFontData();
+
+ mImpl->RequestRelayout();
+}
+
+bool Controller::IsFontSizeScaleEnabled() const
+{
+ return mImpl->mFontSizeScaleEnabled;
+}
+
void Controller::SetDefaultFontSize(float fontSize, FontSizeType type)
{
EnsureCreated(mImpl->mFontDefaults);