diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-29 13:40:54 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-29 13:41:35 +0300 |
commit | f9117532955f0d8935971eb1053f13f9ecab7662 (patch) | |
tree | 843914f355dc8da3cadaa6bd450075c7dc501054 /src/ui/listwidget.c | |
parent | 6074a467110bfb4e40c3e659cc674d7bbaa82d5a (diff) |
Preferences: Collapse preformatted blocks on page load
IssueID #180
Diffstat (limited to 'src/ui/listwidget.c')
-rw-r--r-- | src/ui/listwidget.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/listwidget.c b/src/ui/listwidget.c index ac64091f..942c46dd 100644 --- a/src/ui/listwidget.c +++ b/src/ui/listwidget.c | |||
@@ -199,6 +199,7 @@ int visCount_ListWidget(const iListWidget *d) { | |||
199 | (int) size_PtrArray(&d->items)); | 199 | (int) size_PtrArray(&d->items)); |
200 | } | 200 | } |
201 | 201 | ||
202 | #if 0 | ||
202 | static iRanges visRange_ListWidget_(const iListWidget *d) { | 203 | static iRanges visRange_ListWidget_(const iListWidget *d) { |
203 | if (d->itemHeight == 0) { | 204 | if (d->itemHeight == 0) { |
204 | return (iRanges){ 0, 0 }; | 205 | return (iRanges){ 0, 0 }; |
@@ -207,6 +208,7 @@ static iRanges visRange_ListWidget_(const iListWidget *d) { | |||
207 | vis.end = iMin(size_PtrArray(&d->items), vis.start + visCount_ListWidget(d) + 1); | 208 | vis.end = iMin(size_PtrArray(&d->items), vis.start + visCount_ListWidget(d) + 1); |
208 | return vis; | 209 | return vis; |
209 | } | 210 | } |
211 | #endif | ||
210 | 212 | ||
211 | size_t itemIndex_ListWidget(const iListWidget *d, iInt2 pos) { | 213 | size_t itemIndex_ListWidget(const iListWidget *d, iInt2 pos) { |
212 | const iRect bounds = innerBounds_Widget(constAs_Widget(d)); | 214 | const iRect bounds = innerBounds_Widget(constAs_Widget(d)); |
@@ -339,11 +341,11 @@ static void drawItem_ListWidget_(const iListWidget *d, iPaint *p, size_t index, | |||
339 | const iRect itemRect = { pos, init_I2(width_Rect(bounds), d->itemHeight) }; | 341 | const iRect itemRect = { pos, init_I2(width_Rect(bounds), d->itemHeight) }; |
340 | class_ListItem(item)->draw(item, p, itemRect, d); | 342 | class_ListItem(item)->draw(item, p, itemRect, d); |
341 | } | 343 | } |
342 | #endif | ||
343 | 344 | ||
344 | static const iListItem *item_ListWidget_(const iListWidget *d, size_t pos) { | 345 | static const iListItem *item_ListWidget_(const iListWidget *d, size_t pos) { |
345 | return constAt_PtrArray(&d->items, pos); | 346 | return constAt_PtrArray(&d->items, pos); |
346 | } | 347 | } |
348 | #endif | ||
347 | 349 | ||
348 | static void draw_ListWidget_(const iListWidget *d) { | 350 | static void draw_ListWidget_(const iListWidget *d) { |
349 | const iWidget *w = constAs_Widget(d); | 351 | const iWidget *w = constAs_Widget(d); |