From e4aa58484a3fac477dae1f3c84703f592b88d746 Mon Sep 17 00:00:00 2001 From: Urban Wallasch Date: Tue, 4 May 2021 13:11:11 +0200 Subject: [PATCH] * Implemented mouse-over background highlighting for thumbnail labels. --- ffpreview.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ffpreview.py b/ffpreview.py index b06f9e3..d407ffb 100755 --- a/ffpreview.py +++ b/ffpreview.py @@ -102,6 +102,7 @@ cfg.tmpdir = None cfg.idxfile = '' cfg.grid_columns = 5 cfg.thumb_width = 128 +cfg.hightlightcolor="lightsteelblue1" cfg.force = False cfg.method = 'iframe' cfg.frame_skip = None @@ -431,6 +432,8 @@ try: thumbs.append(thumb) tlabel = Label(scrollframe, text=s2hms(th[2]), image=thumb, compound='top', relief='solid') tlabel.bind('', click_thumb) + tlabel.bind("", lambda event: event.widget.config(bg=cfg.hightlightcolor)) + tlabel.bind("", lambda event: event.widget.config(bg=scrollframe["background"])) tlabels.append(tlabel) root.title(root.title() + ' [%d]' % thinfo["count"]) except Exception as e: -- 2.30.2