aboutsummaryrefslogtreecommitdiffstats
path: root/tagit/tiles
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2023-02-17 08:32:27 +0100
committerMatthias Baumgartner <dev@igsor.net>2023-02-17 08:32:27 +0100
commit6889cff096d30e76cc5379ee68da42b555895eed (patch)
tree35b43597ce989ef714aeb361bd6e32e12ddc70e0 /tagit/tiles
parent906076a24fd3baca68e0381aca1953a05f5b45b7 (diff)
downloadtagit-6889cff096d30e76cc5379ee68da42b555895eed.tar.gz
tagit-6889cff096d30e76cc5379ee68da42b555895eed.tar.bz2
tagit-6889cff096d30e76cc5379ee68da42b555895eed.zip
info tile update and port data loading
Diffstat (limited to 'tagit/tiles')
-rw-r--r--tagit/tiles/info.py10
1 files changed, 5 insertions, 5 deletions
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, '?'),