Removed a bunch of unnecessary constants
authorPekka Nissinen <pekka.nissinen@ixonos.com>
Wed, 11 Aug 2010 08:00:26 +0000 (11:00 +0300)
committerPekka Nissinen <pekka.nissinen@ixonos.com>
Wed, 11 Aug 2010 08:00:26 +0000 (11:00 +0300)
src/ui/friendlistpanel.cpp
src/ui/panelcommon.h
src/ui/userinfopanel.cpp

index 4b705be..9c7adc7 100644 (file)
@@ -37,7 +37,7 @@ FriendListPanel::FriendListPanel(QWidget *parent)
     QVBoxLayout *friendListPanelLayout = new QVBoxLayout();
     friendListPanelLayout->setMargin(0);
     friendListPanelLayout->setSpacing(0);
-    friendListPanelLayout->setContentsMargins(USERPANEL_MARGIN_LEFT, 0, USERPANEL_MARGIN_RIGHT, 0);
+    friendListPanelLayout->setContentsMargins(PANEL_MARGIN_LEFT, 0, PANEL_MARGIN_RIGHT, 0);
     setLayout(friendListPanelLayout);
 
     QHBoxLayout *filterLayout = new QHBoxLayout();
index 4289313..b97d3a9 100644 (file)
@@ -45,26 +45,24 @@ const int PANEL_WIDTH  = 384;                                           ///< Wid
 const int PANEL_HEIGHT = DEFAULT_SCREEN_HEIGHT - PANEL_TOP_PADDING
                          - PANEL_BOTTOM_PADDING;                        ///< Height of the panel
 
-// Friend list panel settings
-const int FRIENDPANEL_MARGIN_LEFT = MAEMO5_SCROLLBAR_WIDTH; ///< Friend list panel inner margin (left)
-const int FRIENDPANEL_MARGIN_RIGHT = 0;                     ///< Friend list panel inner margin (right)
-const int FRIENDPANEL_MARGIN_TOP = 0;                       ///< Friend list panel inner margin (top)
-const int FRIENDPANEL_MARGIN_BOTTOM = 0;                    ///< Friend list panel inner margin (bottom)
+const int PANEL_MARGIN_LEFT = MAEMO5_SCROLLBAR_WIDTH; ///< Panel inner margin (left)
+const int PANEL_MARGIN_RIGHT = 0;                     ///< Panel inner margin (right)
+const int PANEL_MARGIN_TOP = 0;                       ///< Panel inner margin (top)
+const int PANEL_MARGIN_BOTTOM = 0;                    ///< Panel inner margin (bottom)
 
 /**
  * @brief Friend list filter bar margin (left)
  *
  * @var FRIENDPANEL_FILTER_MARGIN_LEFT
  */
-const int FRIENDPANEL_FILTER_MARGIN_LEFT = FRIENDPANEL_MARGIN_LEFT + 4;
+const int FRIENDPANEL_FILTER_MARGIN_LEFT = PANEL_MARGIN_LEFT + 4;
 
 /**
  * @brief Friend list filter bar margin (right)
  *
  * @var FRIENDPANEL_FILTER_MARGIN_RIGHT
  */
-const int FRIENDPANEL_FILTER_MARGIN_RIGHT = FRIENDPANEL_MARGIN_RIGHT
-                                            + MAEMO5_SCROLLBAR_WIDTH + 4;
+const int FRIENDPANEL_FILTER_MARGIN_RIGHT = PANEL_MARGIN_RIGHT + MAEMO5_SCROLLBAR_WIDTH + 4;
 
 const int SHOW_ALL_BUTTON_RIGHT_MARGIN = 39; ///< Show all button right margin
 
@@ -74,20 +72,6 @@ const int PANEL_CLOSED_X = DEFAULT_SCREEN_WIDTH - PANEL_TAB_WIDTH
 const int PANEL_OPENED_X = DEFAULT_SCREEN_WIDTH - PANEL_TAB_WIDTH - PANEL_BAR_WIDTH
                                  - PANEL_WIDTH;     ///< Horizontal position of a open panel
 
-// User info panel settings
-const int USERPANEL_WIDTH  = PANEL_WIDTH;         ///< Width of the user panel
-const int USERPANEL_HEIGHT = DEFAULT_SCREEN_HEIGHT - PANEL_TOP_PADDING
-                             - PANEL_BOTTOM_PADDING;    ///< Height of the user panel
-
-const int USERPANEL_MARGIN_LEFT = FRIENDPANEL_MARGIN_LEFT;      ///< User info panel inner margin (left)
-const int USERPANEL_MARGIN_RIGHT = FRIENDPANEL_MARGIN_RIGHT;    ///< User info panel inner margin (right)
-const int USERPANEL_MARGIN_TOP = FRIENDPANEL_MARGIN_TOP;        ///< User info panel inner margin (top)
-const int USERPANEL_MARGIN_BOTTOM = FRIENDPANEL_MARGIN_BOTTOM;  ///< User info panel inner margin (bottom)
-
-const int USERPANEL_CLOSED_X = - USERPANEL_WIDTH + PANEL_BAR_WIDTH
-                               - PANEL_BAR_WIDTH;   ///< Horizontal position of a closed user info panel
-const int USERPANEL_OPENED_X = 0;                   ///< Horizontal position of a open user info panel
-
 // Zoom button panel settings
 const int ZOOM_BUTTON_PANEL_POSITION_X = 10; ///< Horizontal position of zoom panel
 const int ZOOM_BUTTON_PANEL_POSITION_Y = 10; ///< Vertical position of zoom panel
index d10e4b9..ac9dc4f 100644 (file)
@@ -34,7 +34,7 @@ UserInfoPanel::UserInfoPanel(QWidget *parent)
     QVBoxLayout *userInfoPanelLayout = new QVBoxLayout;
     userInfoPanelLayout->setMargin(0);
     userInfoPanelLayout->setSpacing(0);
-    userInfoPanelLayout->setContentsMargins(USERPANEL_MARGIN_LEFT, 0, USERPANEL_MARGIN_RIGHT, 0);
+    userInfoPanelLayout->setContentsMargins(PANEL_MARGIN_LEFT, 0, PANEL_MARGIN_RIGHT, 0);
     setLayout(userInfoPanelLayout);
 
     m_userInfo = new UserInfo(this);