SettingMainForm::SettingMainForm(void)
: __pList(null)
, __pPresentationModel(null)
+ , __contentUpdated(false)
{
AppLogDebug("ENTER");
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
{
AppLogDebug("ENTER");
__pPresentationModel = SettingPresentationModel::GetInstance();
+ SettingInfo::AddSettingEventListener(*this);
InitializeSettingValues();
effectiveIndex = effectiveIndex + itemIndex;
AppLogDebug("SettingMainForm::CreateItem --> groupIndex : %d, itemIndex: %d itemWidth: %d effectiveIndex %d", groupIndex, itemIndex, itemWidth, effectiveIndex);
+ String fontSizeStr;
+ int fontSize = 0;
+ int itemHeight = 0;
+ int defaultHeight = 112 ;
+ int defaultFontSize = 44 ;
+
+ SettingInfo::GetValue("http://tizen.org/setting/font.size", fontSizeStr);
+ AppLog("the font value is %S",fontSizeStr.GetPointer());
+
+ if(fontSizeStr == "medium")
+ {
+ fontSize = 44;
+ itemHeight = defaultHeight + ( fontSize - defaultFontSize);
+ }
+ else if(fontSizeStr == "huge")
+ {
+ fontSize = 81;
+ itemHeight = defaultHeight + ( fontSize - defaultFontSize);
+ }
+ else if(fontSizeStr == "giant")
+ {
+ fontSize = 98;
+ itemHeight = defaultHeight + ( fontSize - defaultFontSize);
+ }
+ else if(fontSizeStr == "small")
+ {
+ fontSize = 36;
+ itemHeight = defaultHeight + ( fontSize - defaultFontSize);
+ }
+ else if(fontSizeStr == "large")
+ {
+ fontSize = 64;
+ itemHeight = defaultHeight + ( fontSize - defaultFontSize);
+ }
+ else
+ {
+ fontSize = 44;
+ }
+
+
if (settingInfo[effectiveIndex].itemType == ITEM_TYPE_TOGGLE)
{
SettingToggleCustomItem* pItem = new (std::nothrow) SettingToggleCustomItem();
- r = pItem->Construct(itemWidth, 112);
+ r = pItem->Construct(itemWidth, itemHeight);
if (IsFailed(r))
{
}
pItem->SetText(settingInfo[effectiveIndex].titleText);
- pItem->Make();
+ pItem->Make(fontSize);
return pItem;
}
else if (settingInfo[effectiveIndex].itemType == ITEM_TYPE_DROPDOWN)
{
DropDownCustomItem* pItem = new (std::nothrow) DropDownCustomItem();
- r = pItem->Construct(itemWidth);
+ r = pItem->Construct(itemWidth,itemHeight);
if (IsFailed(r))
{
delete pItem;
pItem->SetCurState(DROP_DOWN_ITEM_STATE_CLOSED);
}
- r = pItem->Make();
+ r = pItem->Make(fontSize,itemHeight);
if (IsFailed(r))
{
}
else
{
- pItem->Construct(itemWidth, 112);
+ pItem->Construct(itemWidth, itemHeight);
}
pItem->SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_NORMAL, ITEM_RADIO_ITEM_BACKGROUND_COLOR);
AppLogDebug("effectiveIndex %d SettingInfo[effectiveIndex].isSelected %d", effectiveIndex, settingInfo[effectiveIndex].isSelected);
pItem->SetSelected(settingInfo[effectiveIndex].isSelected);
- pItem->Make();
+ pItem->Make(fontSize);
return pItem;
}
, isSelected(false)
{
}
+
+
+void
+SettingMainForm::OnSettingChanged(String& key)
+{
+ AppLogDebug("ENTER");
+ if (key == L"http://tizen.org/setting/font.size")
+ {
+ __pList->UpdateList();
+ }
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}