|
|
when the pane items or scrollbar are outside the window do not draw them - sfeed_curses - sfeed curses UI (now part of sfeed, development is in sfeed) |
|
|
 |
git clone git://git.codemadness.org/sfeed_curses (git://git.codemadness.org) |
|
|
 |
Log |
|
|
 |
Files |
|
|
 |
Refs |
|
|
 |
README |
|
|
 |
LICENSE |
|
|
|
--- |
|
|
 |
commit 551304948865eed4fe8402746a11f8b62757fdcc |
|
|
 |
parent 9c7de6a70d87fd2c7a73e68bf73e13d6ac103243 |
|
|
 |
Author: Hiltjo Posthuma <hiltjo@codemadness.org> (mailto://) |
application/vnd.lotus-organizer |
|
|
Date: Wed, 31 Mar 2021 18:17:28 +0200 |
|
|
|
|
|
|
|
when the pane items or scrollbar are outside the window do not draw them |
|
|
|
|
|
|
|
This is reproducable in a horizontal window layout when the height of the items |
|
|
|
is 0 or 1 height. It also makes sure to draw the scrollbar to the side in a |
|
|
|
vertical layout. |
|
|
|
|
|
|
|
Diffstat: |
|
|
|
M sfeed_curses.c | 10 +++++----- |
|
|
|
|
|
|
|
1 file changed, 5 insertions(+), 5 deletions(-) |
|
|
|
--- |
|
|
 |
diff --git a/sfeed_curses.c b/sfeed_curses.c |
|
|
|
@@ -959,10 +959,12 @@ updategeom(void) |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
- panes[PaneItems].width = MAX(w - 1, 0); |
|
|
|
- panes[PaneItems].height = MAX(h, 1); |
|
|
|
panes[PaneItems].x = x; |
|
|
|
panes[PaneItems].y = y; |
|
|
|
+ panes[PaneItems].width = MAX(w - 1, 0); |
|
|
|
+ panes[PaneItems].height = MAX(h, 1); |
|
|
|
+ if (x >= win.width || y + 1 >= win.height) |
|
|
|
+ panes[PaneItems].hidden = 1; |
|
|
|
|
|
|
|
scrollbars[PaneFeeds].x = panes[PaneFeeds].x + panes[PaneFeeds].width; |
|
|
|
scrollbars[PaneFeeds].y = panes[PaneFeeds].y; |
|
|
|
@@ -972,9 +974,7 @@ updategeom(void) |
|
|
|
scrollbars[PaneItems].x = panes[PaneItems].x + panes[PaneItems].width; |
|
|
|
scrollbars[PaneItems].y = panes[PaneItems].y; |
|
|
|
scrollbars[PaneItems].size = panes[PaneItems].height; |
|
|
|
- /* if the items don't fit on the screen then hide the scrollbar, |
|
|
|
- preventing it from overlapping with the feeds scrollbar */ |
|
|
|
- scrollbars[PaneItems].hidden = panes[PaneItems].width ? panes[PaneItems].hidden : 1; |
|
|
|
+ scrollbars[PaneItems].hidden = panes[PaneItems].hidden; |
|
|
|
|
|
|
|
statusbar.width = win.width; |
|
|
|
statusbar.x = 0; |
|