From 6889cff096d30e76cc5379ee68da42b555895eed Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Fri, 17 Feb 2023 08:32:27 +0100 Subject: info tile update and port data loading --- tagit/tiles/info.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tagit/tiles') diff --git a/tagit/tiles/info.py b/tagit/tiles/info.py index 725e098..a5eacdf 100644 --- a/tagit/tiles/info.py +++ b/tagit/tiles/info.py @@ -11,7 +11,7 @@ from collections import OrderedDict from kivy.lang import Builder # tagit imports -from tagit.utils import ttime, ns +from tagit.utils import ttime, ns, magnitude_fmt from tagit.widgets.browser import BrowserAwareMixin # inner-module imports @@ -30,7 +30,7 @@ Builder.load_string(''' tooltip: 'Key properties of the cursor item' # assuming 7 info items default_size: None, 7*self.font_size + 6*5 - keywidth: min(65, self.width * 0.4) + keywidth: min(75, self.width * 0.4) ''') @@ -64,16 +64,16 @@ class Info(TileTabular, BrowserAwareMixin): ns.bsm.t_created, ns.bse.filesize, ns.bse.filename, - ns.bse.comment, + (ns.bse.tag, ns.bst.label), ) self.tabledata = OrderedDict({ 'Date' : ttime.from_timestamp_utc( preds.get(ns.bsm.t_created, ttime.timestamp_min)).strftime('%d.%m.%y %H:%M'), #'Size' : f'{preds.get(ns.bse.width, "?")} x {preds.get(ns.bse.height, "?")}', #'ISO' : preds.get(ns.bse.iso, '?'), - 'Filesize' : preds.get(ns.bse.filesize, 'n/a'), + 'Filesize' : magnitude_fmt(preds.get(ns.bse.filesize, 0)), 'Filename' : preds.get(ns.bse.filename, 'n/a'), - 'Comment' : '; '.join(preds.get(ns.bse.comment, [])), + 'Tags' : ', '.join(sorted(preds.get((ns.bse.tag, ns.bst.label), []))), #'Exposure' : f'1 / {preds.get(ns.bse.exposure, 0):0.2f}', #'Aperture' : preds.get(ns.bse.aperture, '?'), #'Fx' : preds.get(ns.bse.focal_length_35, '?'), -- cgit v1.2.3