From c050d775d578b1fa0fd6f6747c1356af79b24b0f Mon Sep 17 00:00:00 2001 From: yorhel <yorhel@ce56bc8d-f834-0410-b703-f827bd498a76> Date: Thu, 11 Dec 2008 17:07:55 +0000 Subject: [PATCH] Size graph uses the apparent size if that is displayed git-svn-id: svn://blicky.net/ncdu/trunk@45 ce56bc8d-f834-0410-b703-f827bd498a76 --- ChangeLog | 1 + src/browser.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b69e77a..6d93283 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ svn - ? - Fixed incorrect apparent size on directory refresh - Browsing keys now work while file info window is displayed - Current directory is assumed when no directory is specified + - Size graph uses the apparent size if that is displayed 1.4 - 2008-09-10 - Removed the startup window diff --git a/src/browser.c b/src/browser.c index 1db9ef4..be95cd5 100644 --- a/src/browser.c +++ b/src/browser.c @@ -197,8 +197,8 @@ void drawBrowser(int change) { exlhid(n) if(n->flags & FF_BSEL) selected = i; - if(n->size > max) - max = n->size; + if((bflags & BF_AS ? n->asize : n->size) > max) + max = bflags & BF_AS ? n->asize : n->size; } if(selected+change < 0) @@ -280,7 +280,7 @@ void drawBrowser(int change) { break; case 1: mvprintw(i+2, 0, tmp, ct, size, - graph(max, n->size), + graph(max, bflags & BF_AS ? n->asize : n->size), dt, cropdir(n->name, wincols-24) ); break; @@ -292,7 +292,7 @@ void drawBrowser(int change) { break; case 3: mvprintw(i+2, 0, tmp, ct, size, - ((float) n->size / (float) n->parent->size) * 100.0f, graph(max, n->size), + ((float) n->size / (float) n->parent->size) * 100.0f, graph(max, bflags & BF_AS ? n->asize : n->size), dt, cropdir(n->name, wincols-30) ); } -- GitLab