Forgot to save some of the changed files *sigh* new_panels_with_context_buttons
authorPekka Nissinen <pekka.nissinen@ixonos.com>
Tue, 31 Aug 2010 13:49:33 +0000 (16:49 +0300)
committerPekka Nissinen <pekka.nissinen@ixonos.com>
Tue, 31 Aug 2010 13:49:33 +0000 (16:49 +0300)
src/ui/panelcommon.h
src/ui/paneltab.cpp
src/ui/paneltabbar.cpp
src/ui/tabbedpanel.cpp
src/ui/tabbedpanel.h

index ccafaa3..d721628 100644 (file)
@@ -38,22 +38,22 @@ const int MAEMO5_SCROLLBAR_WIDTH = 8; ///< Width of the Maemo scrollbar
 const int PANEL_TOP_PADDING = 0;    ///< Amount of padding in top of panels
 const int PANEL_BOTTOM_PADDING = 0; ///< Amount of padding in bottom of panels
 
-const int PANEL_BAR_WIDTH = 5;                                          ///< Width of the slider bar
-const int PANEL_TAB_WIDTH = 74;                                         ///< Panel tab (maximum) width
-const int PANEL_BAR_TABBED_WIDTH = PANEL_BAR_WIDTH + PANEL_TAB_WIDTH;   ///< Width of the tabbed bar
-const int PANEL_WIDTH  = 384;                                           ///< Width of the panel
+const int PANEL_BAR_WIDTH = 5;                                              ///< Width of the slider bar
+const int PANEL_TAB_BAR_WIDTH = 74;                                         ///< Panel tab bar total width
+const int PANEL_BAR_TABBED_WIDTH = PANEL_BAR_WIDTH + PANEL_TAB_BAR_WIDTH;   ///< Width of the tabbed bar
+const int PANEL_WIDTH  = 384;                                               ///< Width of the panel
 const int PANEL_HEIGHT = DEFAULT_SCREEN_HEIGHT - PANEL_TOP_PADDING
-                         - PANEL_BOTTOM_PADDING;                        ///< Height of the panel
+                         - PANEL_BOTTOM_PADDING;                            ///< Height of the panel
 
 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)
 
-const int PANEL_CLOSED_X = DEFAULT_SCREEN_WIDTH - PANEL_TAB_WIDTH
+const int PANEL_CLOSED_X = DEFAULT_SCREEN_WIDTH - PANEL_TAB_BAR_WIDTH
                                  - PANEL_BAR_WIDTH; ///< Horizontal position of a closed panel
 
-const int PANEL_OPENED_X = DEFAULT_SCREEN_WIDTH - PANEL_TAB_WIDTH - PANEL_BAR_WIDTH
+const int PANEL_OPENED_X = DEFAULT_SCREEN_WIDTH - PANEL_TAB_BAR_WIDTH - PANEL_BAR_WIDTH
                                  - PANEL_WIDTH;     ///< Horizontal position of a open panel
 
 // Zoom button panel settings
index d18e911..19b1240 100644 (file)
@@ -24,6 +24,7 @@
 #include <QPainter>
 #include <QRect>
 
+#include "panelcommon.h"
 #include "paneltab.h"
 
 const int TAB_HEIGHT = 66;
index 2c97ba8..7b7cdd5 100644 (file)
@@ -36,7 +36,7 @@ PanelTabBar::PanelTabBar(QWidget *parent)
 {
     qDebug() << __PRETTY_FUNCTION__;
 
-    setFixedWidth(PANEL_TAB_WIDTH);
+    setFixedWidth(PANEL_TAB_BAR_WIDTH);
 
     m_tabButtonGroup = new QButtonGroup(this);
 
index 44a3fd0..582066d 100644 (file)
@@ -69,7 +69,7 @@ TabbedPanel::TabbedPanel(QWidget *parent)
 
     // --- BAR ---
     m_panelBar = new PanelBar(this);
-    m_panelBar->move(PANEL_TAB_WIDTH, PANEL_TOP_Y);
+    m_panelBar->move(PANEL_TAB_BAR_WIDTH, PANEL_TOP_Y);
 
     // --- CONTEXT BUTTON BAR ---
     m_panelContextButtonBar = new PanelContextButtonBar(this);
@@ -83,7 +83,7 @@ TabbedPanel::TabbedPanel(QWidget *parent)
 
     // --- PANEL CONTENT ---
     m_panelContentStack = new PanelContentStack(this);
-    m_panelContentStack->move(PANEL_TAB_WIDTH + PANEL_BAR_WIDTH, PANEL_TOP_Y);
+    m_panelContentStack->move(PANEL_TAB_BAR_WIDTH + PANEL_BAR_WIDTH, PANEL_TOP_Y);
 
     // --- PANEL ANIMATION ---
     QStateMachine *panelStateMachine = new QStateMachine(this);
@@ -219,9 +219,9 @@ void TabbedPanel::resizePanel(const QSize &size)
            size.height() - PANEL_TOP_PADDING - PANEL_BOTTOM_PADDING);
 
     if (!m_open)
-        move(size.width() - PANEL_TAB_WIDTH - PANEL_BAR_WIDTH, PANEL_TOP_PADDING);
+        move(size.width() - PANEL_TAB_BAR_WIDTH - PANEL_BAR_WIDTH, PANEL_TOP_PADDING);
     else
-        move(size.width() - PANEL_TAB_WIDTH - PANEL_BAR_WIDTH - PANEL_WIDTH, PANEL_TOP_PADDING);
+        move(size.width() - PANEL_TAB_BAR_WIDTH - PANEL_BAR_WIDTH - PANEL_WIDTH, PANEL_TOP_PADDING);
 
     m_panelBar->resizeBar(size);
 
@@ -229,10 +229,10 @@ void TabbedPanel::resizePanel(const QSize &size)
 
     m_panelContentStack->resizeContentStack(size);
 
-    QPoint closedPosition(size.width() - PANEL_TAB_WIDTH - PANEL_BAR_WIDTH, PANEL_TOP_PADDING);
+    QPoint closedPosition(size.width() - PANEL_TAB_BAR_WIDTH - PANEL_BAR_WIDTH, PANEL_TOP_PADDING);
     m_stateClosed->assignProperty(this, "pos", closedPosition);
 
-    QPoint openedPosition(size.width() - PANEL_TAB_WIDTH - PANEL_BAR_WIDTH - PANEL_WIDTH,
+    QPoint openedPosition(size.width() - PANEL_TAB_BAR_WIDTH - PANEL_BAR_WIDTH - PANEL_WIDTH,
                           PANEL_TOP_PADDING);
     m_stateOpened->assignProperty(this, "pos", openedPosition);
 
index 4c1146e..d3e1f16 100644 (file)
@@ -121,7 +121,7 @@ private slots:
     /**
      * @brief Calculates mask for tabbed panel
      *
-     * Mask is constructed from PanelTabBar, PanelContextButtonBar and panel content sizes.
+     * Mask is constructed from PanelTabBar, PanelContextButtonBar and panel content sizes
      */
     void calculateMask();