unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#53520: [PATCH] tabulated-list gradually truncate image
@ 2022-01-25  9:08 Thuna
  2022-01-25 13:36 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Thuna @ 2022-01-25  9:08 UTC (permalink / raw)
  To: 53520

[-- Attachment #1: Type: text/plain, Size: 257 bytes --]


Previously images were displayed as is which would potentially cause
misalignment if the column width were less than the image width.  Image
is now cropped width-wise to fit the column width.  This patch, however,
does not affect the height of the image.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-tabulated-list-gradually-collapse-images.patch --]
[-- Type: text/x-diff, Size: 908 bytes --]

diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index 2ace7ebb35..b964dd56e9 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -577,7 +577,11 @@ tabulated-list-print-col
                      (propertize label 'help-echo help-echo))))
           ((eq (car col-desc) 'image)
            (insert (propertize " "
-                               'display col-desc
+                               'display `(,col-desc
+                                          (slice 0.0 0.0
+                                                 ,(* (frame-char-width)
+                                                     available-space)
+                                                 1.0))
                                'help-echo help-echo)))
           ((apply 'insert-text-button label (cdr col-desc))))
     (let ((next-x (+ x pad-right width)))

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-09-08 13:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25  9:08 bug#53520: [PATCH] tabulated-list gradually truncate image Thuna
2022-01-25 13:36 ` Lars Ingebrigtsen
2022-01-25 14:02   ` Thuna
2022-01-25 14:37     ` Lars Ingebrigtsen
2022-01-25 16:04       ` Thuna
2022-01-26 13:11         ` Lars Ingebrigtsen
2022-09-08 13:38           ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).