View Single Post
Old 11-11-2019, 04:57 AM   #34
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 846
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
An annoying aesthetic problem in the Preview pane

1. Open any epub with svg cover (or use attached file).
2. Look at xhtml with svg container (any cover created by Sigil).
3. Open the preview window (F10) if it is not open by default.
4. Look at the bottom right corner of the Preview window.
Hmmm… Scrollbars? Why?

Use a small image, use a large image... Always a scrollbar?

I suppose adding a toolbar at the bottom of the preview window caused the available height to be calculated incorrectly and we always see scrollars.

I found a workaround for this problem, but it's not perfect because it applies to all svgs.

Spoiler:

Add to custom_preview_style.css file:
Code:
svg {height: 99%!important;width: 99%!important}


Will it be possible to code a better solution?
Code:
height = original_height – toolbar_height?
Attached Files
File Type: epub svg_image_in_preview_window.epub (321.7 KB, 149 views)
BeckyEbook is offline   Reply With Quote