#include "theme_util.h"
ThemeHelper::ThemeHelper(){}
ThemeHelper::~ThemeHelper(){}
void ThemeHelper::setTheme(QWidget *widget)
{
    if(widget!=nullptr){
        MotifWmHints hints;
        hints.flags = MWM_HINTS_FUNCTIONS|MWM_HINTS_DECORATIONS;
        hints.functions = MWM_FUNC_ALL;
        hints.decorations = MWM_DECOR_BORDER;
        XAtomHelper::getInstance()->setWindowMotifHint(widget->winId(), hints);
    }
}

void ThemeHelper::setBaseColor(QWidget *widget)
{
    if(widget != nullptr){
        widget->setAutoFillBackground(true);
        widget->setBackgroundRole(QPalette::Base);
    }
}
void ThemeHelper::setBackgroundColor(QWidget *widget)
{
    if(widget != nullptr){
        widget->setAutoFillBackground(true);
        widget->setBackgroundRole(QPalette::Background);
    }
}
