* @exception E_INVALID_ARG Either of the following conditions has occurred:
* - A specified input parameter is invalid.
* - The specified @c size must be greater than @c 0.
+ * @remarks The margin values must be greater than or equal to 0.
* @see GetTopMargin()
* @see GetLeftMargin()
*/
* @exception E_INVALID_ARG Either of the following conditions has occurred:
* - The specified input parameter is invalid.
* - The specified @c size must be greater than @c 0.
+ * @remarks The margin values must be greater than or equal to 0.0f
* @see GetTopMargin()
* @see GetLeftMargin()
*/
result
_LabelImpl::SetMargin(int topMargin, int leftMargin)
{
-// SysTryReturn(NID_UI_CTRL, (topMargin > 0 && leftMargin > 0), E_INVALID_ARG, E_INVALID_ARG, "The margin values should be greater than 0", GetErrorMessage(E_INVALID_ARG));
+ topMargin = topMargin < 0 ? 0 : topMargin;
+ leftMargin = leftMargin < 0 ? 0 : leftMargin;
+
result r = GetCore().SetMargin(topMargin, leftMargin);
SetLastResultReturn(r);
}
result
_LabelImpl::SetMargin(float topMargin, float leftMargin)
{
-// SysTryReturn(NID_UI_CTRL, (topMargin > 0.0f && leftMargin > 0.0f), E_INVALID_ARG, E_INVALID_ARG, "The margin values should be greater than 0.0f", GetErrorMessage(E_INVALID_ARG));
+ topMargin = topMargin < 0.0f ? 0.0f : topMargin;
+ leftMargin = leftMargin < 0.0f ? 0.0f : leftMargin;
+
result r = GetCore().SetMargin(topMargin, leftMargin);
SetLastResultReturn(r);
}