From: Thuna <thuna.cing@gmail.com>
To: 53520@debbugs.gnu.org
Subject: bug#53520: [PATCH] tabulated-list gradually truncate image
Date: Tue, 25 Jan 2022 12:08:18 +0300 [thread overview]
Message-ID: <87sftc2nel.fsf@gmail.com> (raw)
[-- 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)))
next reply other threads:[~2022-01-25 9:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-25 9:08 Thuna [this message]
2022-01-25 13:36 ` bug#53520: [PATCH] tabulated-list gradually truncate image 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sftc2nel.fsf@gmail.com \
--to=thuna.cing@gmail.com \
--cc=53520@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.