#include "panelcommon.h"
+const int PANEL_BAR_RECT_X = 0;
+const int PANEL_BAR_RECT_Y = 0;
+
PanelBar::PanelBar(QWidget *parent)
: QWidget(parent)
{
qDebug() << __PRETTY_FUNCTION__;
- m_barTile.load(":/res/images/sliding_bar_tile.png");
+ m_barTile.load(":/res/images/panel_bar_tile.png");
m_menuDropShadowTile.load(":/res/images/menu_bar_drop_shadow.png");
- ///< @todo magic
- m_barRect.setRect(0, 0, PANEL_BAR_WIDTH, PANEL_HEIGHT);
+ m_barRect.setRect(PANEL_BAR_RECT_X, PANEL_BAR_RECT_Y, PANEL_BAR_WIDTH, PANEL_HEIGHT);
resize(PANEL_BAR_WIDTH, PANEL_HEIGHT);
}
Q_UNUSED(event);
+ const int MENU_DROP_SHADOW_RECT_X = 0;
+ const int MENU_DROP_SHADOW_RECT_Y = 0;
+
QPainter painter(this);
painter.drawTiledPixmap(m_barRect, m_barTile);
- ///< @todo magic
- painter.drawTiledPixmap(0, 0, PANEL_BAR_WIDTH, m_menuDropShadowTile.height(),
- m_menuDropShadowTile);
+ painter.drawTiledPixmap(MENU_DROP_SHADOW_RECT_X, MENU_DROP_SHADOW_RECT_Y, PANEL_BAR_WIDTH,
+ m_menuDropShadowTile.height(), m_menuDropShadowTile);
}
void PanelBar::resizeBar(const QSize &size)
{
qDebug() << __PRETTY_FUNCTION__;
- ///< @todo magic
- m_barRect.setRect(0, 0, PANEL_BAR_WIDTH, size.height());
+ m_barRect.setRect(PANEL_BAR_RECT_X, PANEL_BAR_RECT_Y, PANEL_BAR_WIDTH, size.height());
resize(PANEL_BAR_WIDTH, size.height() - PANEL_TOP_PADDING - PANEL_BOTTOM_PADDING);
}