<file>res/images/list_item_top.png</file>
<file>res/images/sliding_bar_left_test.png</file>
<file>res/images/userpanel_mask.png</file>
+ <file>res/images/sliding_bar_right_test.png</file>
</qresource>
</RCC>
m_friendsPanelVBox->setSpacing(0);
setLayout(m_friendsPanelVBox);
+ QWidget *panelBase = new QWidget(this);
+ panelBase->setLayout(m_friendsPanelVBox);
+ panelBase->move(TOP_CORNER_X + SLIDINGBAR_WIDTH,PANEL_TOP_Y);
+ panelBase->resize(FRIENDPANEL_WIDTH, FRIENDPANEL_HEIGHT);
+
+ QPalette pal = palette();
+ pal.setColor(QPalette::Background, QColor(0, 0, 0, 128));
+ panelBase->setPalette(pal);
+ panelBase->setAutoFillBackground(true);
+
m_friendListView = new FriendListView(this);
QScrollArea *friendListScroll = new QScrollArea(this);
friendListScroll->setWidgetResizable(false);
m_friendsPanelVBox->addWidget(friendListScroll);
- setAutoFillBackground(true);
- QPalette pal = palette();
- pal.setColor(QPalette::Background, QColor(0, 0, 0, 128));
- setPalette(pal);
-
m_friendsPanelSlidingBar = new PanelSliderBar(this, RIGHT);
m_friendsPanelSlidingBar->move(TOP_CORNER_X, PANEL_TOP_Y);
void FriendListPanel::reDrawFriendsPanel(int width, int height)
{
qDebug() << __PRETTY_FUNCTION__;
- resize(FRIENDPANEL_WIDTH,height + MARGIN_CORRECTION);
+ resize(FRIENDPANEL_WIDTH + SLIDINGBAR_WIDTH,height + MARGIN_CORRECTION);
m_friendsPanelStateClosed->assignProperty(this, "pos", QPoint(
- width - PANEL_PEEK_AMOUNT, PANEL_TOP_Y));
+ width - PANEL_PEEK_AMOUNT - SLIDINGBAR_WIDTH + MARGIN_CORRECTION, PANEL_TOP_Y));
m_friendsPanelStateOpened->assignProperty(this, "pos", QPoint(
- width - FRIENDPANEL_WIDTH + MARGIN_CORRECTION, PANEL_TOP_Y));
- move(width - PANEL_PEEK_AMOUNT, PANEL_TOP_Y);
+ width - FRIENDPANEL_WIDTH - SLIDINGBAR_WIDTH + MARGIN_CORRECTION, PANEL_TOP_Y));
+ move(width - PANEL_PEEK_AMOUNT - SLIDINGBAR_WIDTH + MARGIN_CORRECTION, PANEL_TOP_Y);
}
enum Side{LEFT, RIGHT}; ///< Enumerator for panel sideness
+const int SIDEBAR_WIDTH = 23;
+const int SIDEBAR_HEIGHT = 424;
+
+const int SLIDINGBAR_WIDTH = 24;
+const int SLIDINGBAR_HEIGHT = 424;
+
const int PANEL_PEEK_AMOUNT = 25; ///< Amount of pixels shown when panel is closed
const int FRIENDPANEL_WIDTH = 430; ///< Width of the friends list panel
const int TOP_CORNER_X = 0; ///< X coordinate for top left corner
const int FRIENDPANEL_CLOSED_X =
- DEFAULT_SCREEN_WIDTH-PANEL_PEEK_AMOUNT; ///< X location of the friend list panel when closed
+ DEFAULT_SCREEN_WIDTH - PANEL_PEEK_AMOUNT - SLIDINGBAR_WIDTH; ///< X location of the friend list panel when closed
const int FRIENDPANEL_OPENED_X =
- DEFAULT_SCREEN_WIDTH-FRIENDPANEL_WIDTH; ///< X location of the friend list panel when opened
+ DEFAULT_SCREEN_WIDTH - FRIENDPANEL_WIDTH - SLIDINGBAR_WIDTH; ///< X location of the friend list panel when opened
const int USERPANEL_CLOSED_X =
2 - USERPANEL_WIDTH + PANEL_PEEK_AMOUNT; ///< X location of the user panel when closed
const int USERPANEL_OPENED_X = 0; ///< X location of the user panel when opened
-const int SIDEBAR_WIDTH = 23;
-const int SIDEBAR_HEIGHT = 424;
-
-const int SLIDINGBAR_WIDTH = 24;
-const int SLIDINGBAR_HEIGHT = 424;
-
const int ZOOM_BUTTON_PANEL_POSITION_X = 10 + PANEL_PEEK_AMOUNT; ///< Horizontal position of zoom panel
const int ZOOM_BUTTON_PANEL_POSITION_Y = 10; ///< Vertical position of zoom panel
const int ZOOM_BUTTON_PANEL_BUTTON_SPACING = 4; ///< Size of a zoom button spacing
else if(side == RIGHT) {
setObjectName("FriendsPanelSlidingBar");
setStyleSheet(QString(
- "#FriendsPanelSlidingBar{background-image: url(:/res/images/sliding_bar_right.png)}"));
- setMask(QPixmap(":/res/images/sliding_bar_right.png").mask());
+ "#FriendsPanelSlidingBar{background-image: url(:/res/images/sliding_bar_right_test.png)}"));
+ setMask(QPixmap(":/res/images/sliding_bar_right_test.png").mask());
}
else {
qFatal("Illegal PanelSliderBar 2nd argument");
UserInfoPanel::UserInfoPanel(QWidget *parent)
: QWidget(parent)
{
- QWidget *panelBase = new QWidget(this);
qDebug() << __PRETTY_FUNCTION__;
+
m_userPanelVBox = new QVBoxLayout(this);
+ QWidget *panelBase = new QWidget(this);
panelBase->setLayout(m_userPanelVBox);
-
- panelBase->move(0,0);
+ panelBase->move(TOP_CORNER_X,PANEL_TOP_Y);
panelBase->resize(USERPANEL_WIDTH, USERPANEL_HEIGHT);
- PanelSliderBar *m_userPanelSlidingBar = new PanelSliderBar(this, LEFT);
- m_userPanelSlidingBar->move(USERPANEL_WIDTH - SLIDINGBAR_WIDTH, PANEL_TOP_Y);
-
- panelBase->setAutoFillBackground(true);
QPalette pal = palette();
pal.setColor(QPalette::Background, QColor(0, 0, 0, 128));
panelBase->setPalette(pal);
+ panelBase->setAutoFillBackground(true);
+
+ PanelSliderBar *m_userPanelSlidingBar = new PanelSliderBar(this, LEFT);
+ m_userPanelSlidingBar->move(USERPANEL_WIDTH - SLIDINGBAR_WIDTH, PANEL_TOP_Y);
setMask(QPixmap(":/res/images/userpanel_mask.png").mask());