Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-05-2025, 12:00 PM   #31
Vanguard3000
Groupie
Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.
 
Posts: 169
Karma: 474196
Join Date: Jan 2011
Location: Canada
Device: Kobo Libra 2
I'm okay with the new dialog overall, despite a bit of getting used to; if it means a more consistent experience cross-platform then that's excellent. And the quick access bar is a lot nicer feature over Window's pinned folders in a Sigil/epub editing context.

As Stasia mentioned earlier, the big issue is that there doesn't seem to be an option to view thumbnails for images. I often find myself editing image-heavy books, where the images aren't really named anything recognizable, so it often helps to see a preview of the image.
Vanguard3000 is offline   Reply With Quote
Old 08-05-2025, 02:36 PM   #32
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,836
Karma: 6120478
Join Date: Nov 2009
Device: many
I already have a new PreviewFileDialog class that inherits from QFileDialog and adds a thumbnail side panel for images. I am thinking of how best for it to default to full native filedialogs if that option is set or creating a non-native one with the extra panel otherwise. Still very much in development and on the drawing board.
KevinH is online now   Reply With Quote
Old Yesterday, 10:56 AM   #33
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,836
Karma: 6120478
Join Date: Nov 2009
Device: many
Okay, I have pushed to master a test of the new PreviewFileDialog class that replaces just the Add Existing file dialog and only on those platforms that use non-native dialogs such as Windows, MacOS and maybe AppImage Linux builds. Repo based Linux builds and self-builds should still use their own native file dialog here if one exists with their choice of desktop.

I will post a test beta for people to try and see if the added thumbnail pane helps.

If so, I will try to modify this new class to disable custom icon providers to speed up its use when working with networked drives/disks with lots of files. I will post a followup test beta when that feature is ready to be tested.
KevinH is online now   Reply With Quote
Old Yesterday, 12:06 PM   #34
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,836
Karma: 6120478
Join Date: Nov 2009
Device: many
Sigil Testing Beta for new PreviewFileDialog and speed

Okay, I have created testing builds with the new PreviewFileDialog used for Sigil's Add Existing.

It adds a thumbnail pane to the normal non-native QFileDialog that shows both image and text file preview thumbnails of the selected file.

Also, to kill two birds with one stone so to speak, I have added in a new environment variable called:

SIGIL_NO_CUSTOM_DIRECTORY_ICONS


If this environment variable is set, no Custom file icons are used which should help speed up things when networked drives with lots of files are used.

It is only useful when non-native file dialogs are used.

I have posted these testing builds (the macOS ones are signed but not notarized) to my personal github repo here:

https://github.com/kevinhendricks/Bu...nMac/releases/

The files you want are called:

Sigil-testing-Windows-x64-Setup.exe
Sigil-testing-x86_64.AppImage
Sigil.app-testing-Mac-arm64.tar.xz
Sigil.app-testing-Mac-x86_64.tar.xz


If you use Windows or Mac or the AppImage, please try Sigil with Add Existing to exercise this new Dialog and see if you like the new Thumbnail Preview (you may have to resize the dialog once).

If you use network drives with lots of files, please try setting the new environment variable:

export SIGIL_NO_CUSTOM_DIRECTORY_ICONS=1

and see if using this option helps speed up access to your network drive if it has lots of files.

If you build your own on Linux, you should see no changes. All should work as before. But I would love to have that confirmed.

Please let me know what you think?

Last edited by KevinH; Yesterday at 12:10 PM.
KevinH is online now   Reply With Quote
Old Yesterday, 12:56 PM   #35
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: 849
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
It's not bad
I only have minor comments to make:
1. if the image is smaller than the preview window, then please display it in its original size (without stretching)
Click image for larger version

Name:	sigil-preview-file-no-strech-small-images.png
Views:	11
Size:	48.3 KB
ID:	217342

2. add svg file preview (now is only white background)
Click image for larger version

Name:	sigil-preview-file-no-svg.png
Views:	8
Size:	41.3 KB
ID:	217341

Use the same mechanism that is in the file \src\Dialogs\SelectFiles.cpp if possible.
BeckyEbook is offline   Reply With Quote
Old Yesterday, 01:17 PM   #36
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,836
Karma: 6120478
Join Date: Nov 2009
Device: many
Hi BeckyEbook,

Thanks for testing and reporting back so fast!

For 1. I thought the scaling of the QPixmap kept the aspect ratio. I will take another look at the code. But the thumbnail pane is a fixed 300 by 300 px size so that the dialog is not constantly resizing when different images are selected. It messes with the file list Window if it resizes automatically sometimes.

For 2. Agreed svg should work. But I can't easily use the technique from src/Dialogs/SelectFiles as it would require embedding a QWebEngineView instead of a simple QPixmap stored in a QLabel. I was hoping to not need to add something that takes up so much memory and its own QWebProcess just to show a thumbnail. It is needed in SelectFiles as it can show audio and video previews which only a QWebEngineView can do.

I will look into it.

Last edited by KevinH; Yesterday at 01:46 PM.
KevinH is online now   Reply With Quote
Old Yesterday, 01:41 PM   #37
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,836
Karma: 6120478
Join Date: Nov 2009
Device: many
Hi BeckEbook,
I pushed a change in "if" order so Previewing SVG should now work. The problem was that svg files are xml files and image files so they were picked up by the wrong thumbnail generator. That should now be fixed. At least it works on macOS now.

I also tried to leave images whose width < 300px and height < 300 pixels to set the label pixmap directly without scaling. Hope that does what you want.

Please pull from master and rebuild and retest when you get a free moment.

Thanks for the feedback!
KevinH is online now   Reply With Quote
Old Yesterday, 05:20 PM   #38
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: 849
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
It's great!
Click image for larger version

Name:	sigil-preview-file-svg-ok.png
Views:	13
Size:	40.8 KB
ID:	217343
BeckyEbook is offline   Reply With Quote
Old Yesterday, 05:38 PM   #39
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,643
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Okay, I have pushed to master a test of the new PreviewFileDialog class that replaces just the Add Existing file dialog and only on those platforms that use non-native dialogs such as Windows, MacOS and maybe AppImage Linux builds. Repo based Linux builds and self-builds should still use their own native file dialog here if one exists with their choice of desktop.
My newest self build of Sigil on Arch is using the non-native dialog for Add Existing. It seems to work OK, but I read the above to mean that regular builds would behave like before (native dialog). Did I get that wrong? Or perhaps Linux was always using a non-native for Add Existing?

I've not yet found the code where (or if) you've attempted to limit the use of the non-native dialog to only the Linux AppImage to see why that may be.

It works fine, for the record! The image preview is great (and fast). The text preview isn't very useful for me on Linux or Windows as it stands, however. The text is very, very tiny, and when using a dark theme, the font looks very muted. The text is more legible (darker) in a light theme, but it's still tiny very tiny. I can basically see the shape of the paragraphs.

The white background of the text preview is also bit jarring in a dark setting. But as you already mentioned somewhere, I'm not sure a full-blown QWebEngineView is the way to go here (to have better/more control over how the preview looks). Perhaps a setting to opt out of the text preview would be simpler/more appropriate if nothing can be done about the text preview background?

Thanks!

EDIT: just confirmed that earlier builds of Sigil on Linux were definitely using a native dialog for Add Existing. I'm not opposed to switching; I just wanted to be sure I was understanding how it should be working right now in a regular (or repo) Linux build.

Last edited by DiapDealer; Yesterday at 06:44 PM.
DiapDealer is online now   Reply With Quote
Old Yesterday, 06:33 PM   #40
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,836
Karma: 6120478
Join Date: Nov 2009
Device: many
Linux builds should use their native dialogs if one exists for your Desktop.

Nothing should have changed with it. If it did, then it is a bug. I will test my own Linux build on Manjaro with KDE to see if I see the same thing.

I can easily remove the text Previews if people feel they do not add anything.

Thanks for testing.
KevinH is online now   Reply With Quote
Old Yesterday, 06:53 PM   #41
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,643
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Linux builds should use their native dialogs if one exists for your Desktop.
Your "only on those platforms that use non-native dialogs such as Windows, MacOS and maybe AppImage Linux builds." comment made me think you might have done something specific to try and get the AppImage build to use the non-native here. Is that not the case? I can definitely confirm that both the AppImage and normal build were using native dialogs previously (they still do if I use older builds). But both the AppImage and the regular builds are now using the new non-native dialog (with Preview) as of the current master HEAD.

You don't have to get rid of text preview on my account! See what others have to say about it.
DiapDealer is online now   Reply With Quote
Old Yesterday, 07:19 PM   #42
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,643
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Isn't line 98 in getOpenFileName() in PreviewFileDialog.cpp (and each subsequent function after) forcing the non-native issue?

Code:
    options = options | QFileDialog::DontUseNativeDialog;
    if (!(options & QFileDialog::DontUseNativeDialog)) {
        return QFileDialog::getOpenFileName(parent, caption, dir, filter, selectedFilter, options);
    }
We're setting the QFileDialog::DontUseNativeDialog option and then immediately checking to see if the option isn't set aren't we?

Code:
return QFileDialog::getOpenFileName()
looks like it will never happen to me.
DiapDealer is online now   Reply With Quote
Old Yesterday, 07:23 PM   #43
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,836
Karma: 6120478
Join Date: Nov 2009
Device: many
You are right! I had hard coded things in every routine when trying to debug it under MacOS and just forgot I had done that.

I have removed the hard coded lines in each static routine and pushed it to master.

I will work on making the text thumbnails more readable. I think I can actually handle dark and light mode too.

But that is for tomorrow.

Thanks!

KevinH
KevinH is online now   Reply With Quote
Old Yesterday, 07:36 PM   #44
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,643
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Happy to help. This is great stuff!
DiapDealer is online now   Reply With Quote
Old Today, 01:06 PM   #45
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,836
Karma: 6120478
Join Date: Nov 2009
Device: many
Okay, I have tried to make the text previews much more legible but still show enough text to be useful.

I have also converted the text thumbnailer to use QPalette::Base for the background colour and QPalette::Text for the foreground text colour.

So under dark mode this should show white text on a dark background and visa-versa on a light mode.

I tested this under macOS and the text shows nicely under both light and dark modes but I will have to figure something out to make it actively switch when the theme is changed in the middl;e of opeing a file (a possibility on MacOS that can auto change theme based on time of day).

I have pushed this to master.

So when you get a free moment, please give this a try and let me know if the changes help. If so, I will start work on detecting the palette change and reloading the current preview so auto theme changes are better handled.

Thanks,
KevinH is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with add existing files 2.6.0 jwes Sigil 5 07-28-2025 03:05 PM
calibre - Not using existing metadata from *.opf files when Add books rolandt99 Library Management 19 06-15-2020 04:43 PM
File name syntax change, existing files? martienne Library Management 5 02-09-2014 08:48 AM
Crashes when attempting to add existing files to images BooksToGo Sigil 3 10-01-2013 06:17 AM
Sigil crashes when Add Existing Files. frichrdsn Sigil 2 05-28-2013 06:35 PM


All times are GMT -4. The time now is 08:37 PM.


MobileRead.com is a privately owned, operated and funded community.