#include "font_twin_button_group.h"
#include "ukui_settings_monitor.h"

FontTwinButtonGroup::FontTwinButtonGroup(QWidget *parent)
    : CustomPushButtonGroup(parent)
{
    initUi();
    initConnect();
}

FontTwinButtonGroup::~FontTwinButtonGroup()
{
}

void FontTwinButtonGroup::initUi()
{
    fontSizeBtn = new FontSizePushButton(this);
    fontColorBtn = new FontColorPushButton(this);
    fontSizeBtn->setTabletModeButtonSize(QSize(36, 36), QSize(48, 48));
    fontColorBtn->setTabletModeButtonSize(QSize(36, 36), QSize(48, 48));
    fontSizeBtn->setToolTip(tr("Font Size"));
    fontColorBtn->setToolTip(tr("Font Color"));
    addButton(fontSizeBtn, CustomPushButtonGroup::BtnState::Left);
    addButton(fontColorBtn, CustomPushButtonGroup::BtnState::Right);
}

void FontTwinButtonGroup::initConnect()
{
    QObject::connect(&UkuiSettingsMonitor::instance(), &UkuiSettingsMonitor::tabletModeUpdate,  [=](){

    });
}

FontSizePushButton *FontTwinButtonGroup::getFontSizeBtn()
{
    return fontSizeBtn;
}
FontColorPushButton *FontTwinButtonGroup::getFontColorBtn()
{
    return fontColorBtn;
}