aboutsummaryrefslogtreecommitdiff
path: root/src/ResponsivePaned.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-11-17 15:20:49 +0100
committerdec05eba <dec05eba@protonmail.com>2018-11-17 15:20:52 +0100
commit64ab3253562be80e726b3d69e4c3e556b055c965 (patch)
tree97d5b68f90ca8176fc58ec16eb79dbbef2920abd /src/ResponsivePaned.cpp
parent7873b7555f1f8fe72732f64b35a8116390b981b3 (diff)
Auto reload css on modify, improve design
Diffstat (limited to 'src/ResponsivePaned.cpp')
-rw-r--r--src/ResponsivePaned.cpp36
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