diff options
Diffstat (limited to 'src/ResponsivePaned.cpp')
-rw-r--r-- | src/ResponsivePaned.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
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<Cairo::Context> &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 |