unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Tabulated list image collapsing
@ 2022-01-24 16:27 Thuna
  2022-01-25 10:37 ` Stefan Kangas
  0 siblings, 1 reply; 5+ messages in thread
From: Thuna @ 2022-01-24 16:27 UTC (permalink / raw)
  To: emacs-devel

Tabulated list collapses buttons and string appropriately when the width
of the column is smaller than the width of the text.  The same can be
done with images, where if an image is wider than the column width it
can be replaced by an ellipsis to indicate collapsing (although this is
currently not the case).  The problem with this approach is that if the
image is taller than the normal text height everything jumps as the
image is collapsed.  Are there any preferred methods of dealing with
this issue or is it acceptable the way it is.



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

* Re: Tabulated list image collapsing
  2022-01-24 16:27 Tabulated list image collapsing Thuna
@ 2022-01-25 10:37 ` Stefan Kangas
  2022-01-25 11:24   ` Thuna
  2022-01-25 12:40   ` Robert Pluim
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Kangas @ 2022-01-25 10:37 UTC (permalink / raw)
  To: Thuna, emacs-devel

Thuna <thuna.cing@gmail.com> writes:

> Tabulated list collapses buttons and string appropriately when the width
> of the column is smaller than the width of the text.  The same can be
> done with images, where if an image is wider than the column width it
> can be replaced by an ellipsis to indicate collapsing (although this is
> currently not the case).

Instead of replacing the image with an ellipsis, how about just cropping
or resizing the image to fit?  I would think a small thumbnail is more
useful than an ellipsis in many cases.

> The problem with this approach is that if the
> image is taller than the normal text height everything jumps as the
> image is collapsed.  Are there any preferred methods of dealing with
> this issue or is it acceptable the way it is.

AFAIK at least, the only way to increase the line height is to have some
tall glyph on that line.

Whether the jumping is acceptable or not will depend a lot on your use
case, I think.



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

* Re: Tabulated list image collapsing
  2022-01-25 10:37 ` Stefan Kangas
@ 2022-01-25 11:24   ` Thuna
  2022-01-25 12:40     ` Stefan Kangas
  2022-01-25 12:40   ` Robert Pluim
  1 sibling, 1 reply; 5+ messages in thread
From: Thuna @ 2022-01-25 11:24 UTC (permalink / raw)
  To: Stefan Kangas, emacs-devel


> Instead of replacing the image with an ellipsis, how about just cropping
> or resizing the image to fit?  I would think a small thumbnail is more
> useful than an ellipsis in many cases.

I have recently sent out a patch for (bug#53520) which crops the image's
width so that it fits.  An addition to it with the introduction of an
`image-resize-strategy' variable can be made with ['hide 'crop 'resize]
as the available options.



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

* Re: Tabulated list image collapsing
  2022-01-25 11:24   ` Thuna
@ 2022-01-25 12:40     ` Stefan Kangas
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Kangas @ 2022-01-25 12:40 UTC (permalink / raw)
  To: Thuna, emacs-devel

Thuna <thuna.cing@gmail.com> writes:

> I have recently sent out a patch for (bug#53520) which crops the image's
> width so that it fits.

Without having looked at your patch, the idea basic sounds good to me.

>   An addition to it with the introduction of an
> `image-resize-strategy' variable can be made with ['hide 'crop
> 'resize] as the available options.

Adding a buffer local `tabulated-list-image-resize-strategy' variable
sounds even better.



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

* Re: Tabulated list image collapsing
  2022-01-25 10:37 ` Stefan Kangas
  2022-01-25 11:24   ` Thuna
@ 2022-01-25 12:40   ` Robert Pluim
  1 sibling, 0 replies; 5+ messages in thread
From: Robert Pluim @ 2022-01-25 12:40 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Thuna, emacs-devel

>>>>> On Tue, 25 Jan 2022 04:37:21 -0600, Stefan Kangas <stefankangas@gmail.com> said:


    >> The problem with this approach is that if the
    >> image is taller than the normal text height everything jumps as the
    >> image is collapsed.  Are there any preferred methods of dealing with
    >> this issue or is it acceptable the way it is.

    Stefan> AFAIK at least, the only way to increase the line height is to have some
    Stefan> tall glyph on that line.

Or by using `line-height' or `line-spacing'. (info "(elisp) Line Height")

Robert
-- 



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

end of thread, other threads:[~2022-01-25 12:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 16:27 Tabulated list image collapsing Thuna
2022-01-25 10:37 ` Stefan Kangas
2022-01-25 11:24   ` Thuna
2022-01-25 12:40     ` Stefan Kangas
2022-01-25 12:40   ` Robert Pluim

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).