From 8221fd5451f094defa9866f98026b74a969f7693 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Mon, 8 Mar 2021 14:46:19 -0500 Subject: resizable widgets, default widget implementation for some functions, reimplementing meminfo in raleigh --- src/user/raleigh/w/padding.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/user/raleigh/w/padding.cpp') diff --git a/src/user/raleigh/w/padding.cpp b/src/user/raleigh/w/padding.cpp index 87167c3..c1f7b85 100644 --- a/src/user/raleigh/w/padding.cpp +++ b/src/user/raleigh/w/padding.cpp @@ -5,6 +5,7 @@ namespace raleigh { : inner(inner), pad_by(pad_by) { size = coord(inner.size.x + pad_by * 2, inner.size.y + pad_by * 2); closest_opaque = 0; + inner.parent = this; } void padding::notify_window_change() { @@ -30,7 +31,7 @@ namespace raleigh { inner.notify_has_opaque_parent(parent); } - void padding::handle_key(struct key_packet kp) {}; - void padding::on_focus() {}; - void padding::on_unfocus() {}; + void padding::notify_child_size_change(widget &child, coord old_size) { + set_size(coord(inner.size.x + pad_by * 2, inner.size.y + pad_by * 2)); + } } \ No newline at end of file -- cgit v1.2.3