aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Oteiza <mvoteiza@udel.edu>2017-01-15 14:01:42 -0500
committerHarry Jeffery <harry@exec64.co.uk>2017-02-09 20:29:41 +0000
commitf489b0363b059aa7161d2a92a98c2dc8c067b8a8 (patch)
treedb54432b6d74561857ae91d29bee38a0c85e61f3 /src
parent9bf10aabad3aa5d8a466a0550d612a35f100d193 (diff)
downloadimv-f489b0363b059aa7161d2a92a98c2dc8c067b8a8.tar.gz
Show image scale in window title
Diffstat (limited to 'src')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index fefd1ff..a8396aa 100644
--- a/src/main.c
+++ b/src/main.c
@@ -585,8 +585,9 @@ int main(int argc, char** argv)
/* update window title */
int len;
const char *current_path = imv_navigator_selection(&nav);
- len = snprintf(title, sizeof(title), "imv - [%i/%i] [%ix%i] %s [%s]",
+ len = snprintf(title, sizeof(title), "imv - [%i/%i] [%ix%i] [%.2f%%] %s [%s]",
nav.cur_path + 1, nav.num_paths, tex.width, tex.height,
+ 100.0 * view.scale,
current_path, scaling_label[g_options.scaling]);
if(g_options.delay >= 1000) {
len += snprintf(title + len, sizeof(title) - len, "[%lu/%lus]",