From c7518539bc33201f3c380df48e54ed2ca7969885 Mon Sep 17 00:00:00 2001 From: Sergey BELASH Date: Thu, 14 Aug 2014 16:53:53 +0400 Subject: [PATCH] Default menu size from preferences --- src/XGUI/XGUI_MainMenu.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/XGUI/XGUI_MainMenu.cpp b/src/XGUI/XGUI_MainMenu.cpp index 273e248df..e35b94a56 100644 --- a/src/XGUI/XGUI_MainMenu.cpp +++ b/src/XGUI/XGUI_MainMenu.cpp @@ -120,9 +120,10 @@ QList XGUI_MainMenu::features() const int XGUI_MainMenu::menuItemSize() const { - int DEFAULT_ITEM_SIZE = XGUI_Preferences::resourceMgr()->integerValue( - XGUI_Preferences::MENU_SECTION, "item_size"); - return DEFAULT_ITEM_SIZE; + const int kDefaultItemSize = 25; + int anItemSize = XGUI_Preferences::resourceMgr()->integerValue( + XGUI_Preferences::MENU_SECTION, "item_size", kDefaultItemSize); + return anItemSize; } int XGUI_MainMenu::menuHeight() const @@ -135,9 +136,10 @@ int XGUI_MainMenu::menuHeight() const int XGUI_MainMenu::menuItemRowsCount() const { - int DEFAULT_ITEM_ROWS_COUNT = XGUI_Preferences::resourceMgr()->integerValue( - XGUI_Preferences::MENU_SECTION, "rows_number"); - return DEFAULT_ITEM_ROWS_COUNT; + const int kDefaultRowsCount = 3; + int aRowsCount = XGUI_Preferences::resourceMgr()->integerValue( + XGUI_Preferences::MENU_SECTION, "rows_number", kDefaultRowsCount); + return aRowsCount; } void XGUI_MainMenu::updateFromResources() -- 2.39.2