~feng-kylin/youker-assistant/youker-assistant

« back to all changes in this revision

Viewing changes to component/kylintoolbutton.cpp

  • Committer: lixiang
  • Date: 2018-03-06 03:13:06 UTC
  • Revision ID: lixiang@kylinos.cn-20180306031306-fd7qnru3vm4a1xjd
Rewrite with Qt5, and add system monitor

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
        setAutoRaise(true);
51
51
    this->setObjectName("transparentToolButton");
52
52
        mouse_over = false;
53
 
        mouse_press = false;
 
53
        m_mousePressed = false;
54
54
    pressed = false;
55
55
}
56
56
 
103
103
 
104
104
void KylinToolButton::setMousePress(bool is_press)
105
105
{
106
 
    this->mouse_press = is_press;
 
106
    this->m_mousePressed = is_press;
107
107
 
108
 
    if(this->mouse_press)
 
108
    if(this->m_mousePressed)
109
109
    {
110
110
        this->setIcon(QIcon(press_icon));
111
111
        pressed = true;
122
122
//    }
123
123
//    else
124
124
//    {
125
 
//        if(this->mouse_press)
 
125
//        if(this->m_mousePressed)
126
126
//        {
127
127
//            this->setIcon(QIcon(press_icon));
128
128
//        }