summaryrefslogtreecommitdiff
path: root/src/ui/widget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-05 10:11:10 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-05 10:11:10 +0300
commit8e2828efc6d9c88f39592f4ae1c709937b8b9f46 (patch)
tree81594e6be5ae4fe5f55ec6bcb4f1fe9c4c3c4603 /src/ui/widget.c
parentaa50c1e0028c6cb08524dcdfb7188906c817e46f (diff)
Refactor: ListWidget for a general purpose list
The sidebar uses a ListWidget now, but the layout needs fixing.
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r--src/ui/widget.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c
index b5ea3b0f..cd02d5e4 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -207,6 +207,12 @@ iLocalDef iRect innerRect_Widget_(const iWidget *d) {
207 height_Rect(d->rect) - d->padding[1] - d->padding[3]); 207 height_Rect(d->rect) - d->padding[1] - d->padding[3]);
208} 208}
209 209
210iRect innerBounds_Widget(const iWidget *d) {
211 return adjusted_Rect(bounds_Widget(d),
212 init_I2(d->padding[0], d->padding[1]),
213 init_I2(-d->padding[2], -d->padding[3]));
214}
215
210void arrange_Widget(iWidget *d) { 216void arrange_Widget(iWidget *d) {
211 if (isCollapsed_Widget_(d)) { 217 if (isCollapsed_Widget_(d)) {
212 setFlags_Widget(d, wasCollapsed_WidgetFlag, iTrue); 218 setFlags_Widget(d, wasCollapsed_WidgetFlag, iTrue);