<file>res/images/list_item_bottom.png</file>
<file>res/images/list_item_middle.png</file>
<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>
+ <file>res/images/gps_pos_accurate.png</file>
+ <file>res/images/gps_pos_coarse.png</file>
+ <file>res/images/friend_group.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);
++ m_panelBase = new QWidget(this);
++ m_panelBase->setLayout(m_friendsPanelVBox);
++ m_panelBase->move(TOP_CORNER_X + SLIDINGBAR_WIDTH,PANEL_TOP_Y);
++ m_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_panelBase->setPalette(pal);
++ m_panelBase->setAutoFillBackground(true);
+
m_friendListView = new FriendListView(this);
QScrollArea *friendListScroll = new QScrollArea(this);
friendListScroll->setWidgetResizable(false);
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_panelBase->resize(FRIENDPANEL_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);
}
******************************************************************************/
private:
FriendListView *m_friendListView; ///< Friend list view
-- QVBoxLayout *m_friendsPanelVBox; ///< Vertical layout inside the panel
PanelSliderBar *m_friendsPanelSlidingBar; ///< Widget for sidebar tab item
QStateMachine *m_friendsPanelStateMachine; ///< State machine for sliding the panel
QState *m_friendsPanelStateOpened; ///< State of the opened panel
QSignalTransition *m_friendsPanelTransitionClose; ///< Transition signal for closing the panel
QSignalTransition *m_friendsPanelTransitionOpen; ///< Transition signal for opening the panel
++ QVBoxLayout *m_friendsPanelVBox; ///< Vertical layout inside the panel
++ QWidget *m_panelBase; ///< Widget for panel base
};
#endif // FRIENDLISTPANEL_H
else {
qFatal("Illegal PanelSliderBar 2nd argument");
}
- resize(48, SLIDINGBAR_HEIGHT);
- resize(SLIDINGBAR_WIDTH, SLIDINGBAR_HEIGHT);
++ resize(SLIDINGBAR_WIDTH*2, SLIDINGBAR_HEIGHT);
}
void PanelSliderBar::paintEvent(QPaintEvent *)
: QWidget(parent)
{
qDebug() << __PRETTY_FUNCTION__;
+
m_userPanelVBox = new QVBoxLayout(this);
- QWidget *panelBase = new QWidget(this);
- panelBase->setLayout(m_userPanelVBox);
- panelBase->move(TOP_CORNER_X,PANEL_TOP_Y);
- panelBase->resize(USERPANEL_WIDTH, USERPANEL_HEIGHT);
- setLayout(m_userPanelVBox);
++ m_panelBase = new QWidget(this);
++ m_panelBase->setLayout(m_userPanelVBox);
++ m_panelBase->move(TOP_CORNER_X,PANEL_TOP_Y);
++ m_panelBase->resize(USERPANEL_WIDTH, USERPANEL_HEIGHT);
- setAutoFillBackground(true);
QPalette pal = palette();
pal.setColor(QPalette::Background, QColor(0, 0, 0, 128));
- panelBase->setPalette(pal);
- panelBase->setAutoFillBackground(true);
- setPalette(pal);
++ m_panelBase->setPalette(pal);
++ m_panelBase->setAutoFillBackground(true);
PanelSliderBar *m_userPanelSlidingBar = new PanelSliderBar(this, LEFT);
m_userPanelSlidingBar->move(USERPANEL_WIDTH - SLIDINGBAR_WIDTH, PANEL_TOP_Y);
++ // set mask to allow clicking zoom button at their default position
+ setMask(QPixmap(":/res/images/userpanel_mask.png").mask());
+
- // setAttribute(Qt::WA_TransparentForMouseEvents, true);
- // panelBase->setAttribute(Qt::WA_TransparentForMouseEvents, false);
-
m_userPanelStateMachine = new QStateMachine(this);
m_userPanelStateClosed = new QState(m_userPanelStateMachine);
m_userPanelStateClosed->assignProperty(this, "pos", QPoint(
private:
QVBoxLayout *m_userPanelVBox; ///< Vertical layout inside the panel
PanelSliderBar *m_userPanelSlidingBar; ///< Widget for sidebar tab item
++ QWidget *m_panelBase; ///< Widget for panel base
QStateMachine *m_userPanelStateMachine; ///< State machine for sliding the panel
QState *m_userPanelStateClosed; ///< State of the closed panel