From 64ab3253562be80e726b3d69e4c3e556b055c965 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 17 Nov 2018 15:20:49 +0100 Subject: Auto reload css on modify, improve design --- src/ResponsivePaned.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/ResponsivePaned.cpp (limited to 'src/ResponsivePaned.cpp') diff --git a/src/ResponsivePaned.cpp b/src/ResponsivePaned.cpp new file mode 100644 index 0000000..45991bc --- /dev/null +++ b/src/ResponsivePaned.cpp @@ -0,0 +1,36 @@ +#include "../include/ResponsivePaned.hpp" + +namespace Gtk +{ + ResponsivePaned::ResponsivePaned(Orientation orientation) : + Paned(orientation) + { + /* + signal_draw().connect_notify([this](const Cairo::RefPtr &context) + { + if(get_orientation() == Orientation::ORIENTATION_VERTICAL) + return; + + Widget *leftChild = get_child1(); + if(!leftChild) + return; + + int width = get_width(); + if(width > 720) + leftChild->show(); + else + leftChild->hide(); + }); + + signal_configure_event().connect_notify([this](GdkEventConfigure *event) + { + Widget *leftChild = get_child1(); + printf("width: %d\n", event->width); + if(get_orientation() == Orientation::ORIENTATION_VERTICAL) + return; + + return; + }, false); + */ + } +} \ No newline at end of file -- cgit v1.2.3