<commit_before>#include <legui/PushButton.h>
#include <legui/Config.h>

namespace legui
{
    PushButton::PushButton(Container *parent)
        : Clickable(parent)
    {
        m_label = new Label(parent);
        m_frame = new Frame(parent);
    }
    PushButton::~PushButton()
    {
        delete m_label;
        delete m_frame;
    }

    void PushButton::onUpdate(float frametime)
    {
        Clickable::onUpdate(frametime);
        m_frame->onUpdate(frametime);
        m_label->onUpdate(frametime);
    }
    bool PushButton::onEvent(const sf::Event &e)
    {
        bool block = false;
        block = Clickable::onEvent(e);
        if(!block)
            block = m_frame->onEvent(e);<commit_msg>The button now sets its style at initialization.<commit_after>#include <legui/PushButton.h>
#include <legui/Config.h>

namespace legui
{
    PushButton::PushButton(Container *parent)
        : Clickable(parent)
    {
        m_label = new Label(parent);
        m_frame = new Frame(parent);
        m_frame->setOutlineColor(Config::getColor("BUTTON_OUTLINE"));
        m_frame->setFillColor(Config::getColor("BUTTON_FILL"));
    }
    PushButton::~PushButton()
    {
        delete m_label;
        delete m_frame;
    }

    void PushButton::onUpdate(float frametime)
    {
        Clickable::onUpdate(frametime);
        m_frame->onUpdate(frametime);
        m_label->onUpdate(frametime);
    }
    bool PushButton::onEvent(const sf::Event &e)
    {
        bool block = false;
        block = Clickable::onEvent(e);
        if(!block)
            block = m_frame->onEvent(e);
{'fraction_non_alphanumeric': 0.12413358538122243, 'fraction_numerical': 0.0, 'mean_word_length': 2.6338672768878717, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '612778', 'n_tokens_mistral': 513, 'n_tokens_neox': 506, 'n_words': 84}