Salome HOME
Merge branch 'master' of newgeom:newgeom.git
authorsbh <sergey.belash@opencascade.com>
Wed, 13 Aug 2014 09:27:08 +0000 (13:27 +0400)
committersbh <sergey.belash@opencascade.com>
Wed, 13 Aug 2014 09:27:08 +0000 (13:27 +0400)
1  2 
src/XGUI/XGUI_MainMenu.cpp
src/XGUI/XGUI_MainMenu.h
src/XGUI/XGUI_Workshop.cpp

index a558cdb36f052c09ef5327f80022683aea9c3e99,4e64c9e6eec6d317d9cd753afafd2ea5e462e84f..273e248dfccfc7c9e36e3f5dabdc3b06a89dea5c
@@@ -115,11 -118,23 +118,11 @@@ QList<XGUI_Command*> XGUI_MainMenu::fea
    return aList;
  }
  
 -QList<XGUI_Workbench*> XGUI_MainMenu::workbenches() const
 -{
 -  QList<XGUI_Workbench*> aList;
 -  for (int aTabIdx = 0; aTabIdx < myMenuTabs->count(); ++aTabIdx) {
 -    XGUI_Workbench* aWb = dynamic_cast<XGUI_Workbench*>(myMenuTabs->widget(aTabIdx));
 -    if (aWb) {
 -      aList.append(aWb);
 -    }
 -  }
 -  return aList;
 -}
 -
  int XGUI_MainMenu::menuItemSize() const
  {
-   //TODO(sbh, vsv): get this value from the preferences
-   static const ItemSize DEFAULT_ITEM_SIZE = Medium;
-   return (int) DEFAULT_ITEM_SIZE;
+   int DEFAULT_ITEM_SIZE = XGUI_Preferences::resourceMgr()->integerValue(
+     XGUI_Preferences::MENU_SECTION, "item_size");
+   return DEFAULT_ITEM_SIZE;
  }
  
  int XGUI_MainMenu::menuHeight() const
index 718bd50a7b59197df2e47a28e31f5bb86c5a4acd,b583bf02cc0d415f7769d153f39c53b7915065be..29b87063f602f1289d15ce4e23851c7e1086be77
@@@ -63,15 -65,12 +63,17 @@@ public
    //! Removes already created tab with python console
    void removeConsole();
  
 +  //! Defines size of menu item.
 +  //! In the future this value should be extracted from the preferences.
    int menuItemSize() const;
 +  //! Defines number of menu item rows.
 +  //! In the future this value should be extracted from the preferences.
    int menuItemRowsCount() const;
 +  //! Defines height of the main menu. (Number of rows * row height)
    int menuHeight() const;
  
+   void updateFromResources();
  private:
    XGUI_MainWindow* myDesktop;
    QTabWidget* myMenuTabs;
Simple merge