From 915fb430e960e5601de70002cd831477e33f8acf Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 15 Apr 2019 20:23:48 +0000 Subject: refactoring git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8777 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Ui/skinned/button.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/plugins/Ui/skinned/button.cpp') diff --git a/src/plugins/Ui/skinned/button.cpp b/src/plugins/Ui/skinned/button.cpp index d38346ad6..bb4b8b2e3 100644 --- a/src/plugins/Ui/skinned/button.cpp +++ b/src/plugins/Ui/skinned/button.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2012 by Ilya Kotov * + * Copyright (C) 2007-2019 by Ilya Kotov * * forkotov02@ya.ru * * * * Based on Promoe, an XMMS2 Client * @@ -31,11 +31,10 @@ Button::Button (QWidget *parent, uint normal, uint pressed, uint cursor) name_normal = normal; name_pressed = pressed; name_cursor = cursor; - m_pressed = false; - skin = Skin::instance(); + m_skin = Skin::instance(); setON (false); - setCursor (skin->getCursor (name_cursor)); - connect (skin, SIGNAL (skinChanged()), this, SLOT (updateSkin())); + setCursor (m_skin->getCursor (name_cursor)); + connect (m_skin, SIGNAL (skinChanged()), this, SLOT (updateSkin())); } @@ -44,16 +43,16 @@ Button::~Button() void Button::updateSkin() { - setPixmap (skin->getButton (name_normal)); - setCursor (skin->getCursor (name_cursor)); + setPixmap (m_skin->getButton (name_normal)); + setCursor (m_skin->getCursor (name_cursor)); } void Button::setON (bool on) { if (on) - setPixmap (skin->getButton (name_pressed)); + setPixmap (m_skin->getButton (name_pressed)); else - setPixmap (skin->getButton (name_normal)); + setPixmap (m_skin->getButton (name_normal)); } void Button::mousePressEvent (QMouseEvent *e) { -- cgit v1.2.3-13-gbd6f