aboutsummaryrefslogtreecommitdiff
path: root/src/ImageButton.cpp
blob: 925e53870183ce1598b1eb714f5e959580af066f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "../include/ImageButton.hpp"
#include <gtkmm/image.h>

namespace dchat
{
    ImageButton::ImageButton(const char *filepath, const char *text)
    {
        if(text)
            set_label(text);
        Gtk::Image *image = Gtk::manage(new Gtk::Image(filepath));
        set_always_show_image(true);
        set_image(*image);
        get_style_context()->add_class("image-button");
    }
}