aboutsummaryrefslogtreecommitdiff
path: root/src/ImageButton.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-11-03 01:10:08 +0100
committerdec05eba <dec05eba@protonmail.com>2018-11-03 01:10:11 +0100
commit8cc8853c3c1e5dfd7681bc0c31bc0eb88a4ef959 (patch)
tree844cb300de80e41aac38a1b481368c6ae6eb6c58 /src/ImageButton.cpp
parent3c5eb7000709606eccd34114e8bf4e851dcacd6a (diff)
Add room name change event, create new room button, multiple rooms
Diffstat (limited to 'src/ImageButton.cpp')
-rw-r--r--src/ImageButton.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ImageButton.cpp b/src/ImageButton.cpp
new file mode 100644
index 0000000..17939f7
--- /dev/null
+++ b/src/ImageButton.cpp
@@ -0,0 +1,14 @@
+#include "../include/ImageButton.hpp"
+#include <gtkmm/image.h>
+
+namespace dchat
+{
+ ImageButton::ImageButton(const char *filepath, const char *text) :
+ Gtk::Button(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");
+ }
+} \ No newline at end of file