1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-29 02:56:11 +00:00
transmission/qt/StyleHelper.cc

25 lines
464 B
C++
Raw Normal View History

/*
* This file Copyright (C) 2017 Mnemosyne LLC
*
* It may be used under the GNU GPL versions 2 or 3
* or any future license endorsed by Mnemosyne LLC.
*
*/
#include "StyleHelper.h"
QIcon::Mode StyleHelper::getIconMode(QStyle::State state)
{
if (!state.testFlag(QStyle::State_Enabled))
{
return QIcon::Disabled;
}
if (state.testFlag(QStyle::State_Selected))
{
return QIcon::Selected;
}
return QIcon::Normal;
}