|
|
#136 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44
Karma: 17648
Join Date: Jun 2011
Location: Lima, Peru
Device: Kindle 10Gen / Kobo Aura HD / Nook STR
|
Hi.
I don't know if the Suggestion Box is still open... but here are some ideas, just in case there's still a chance: — When opening large images in Book Browser, would it be possible for them to automatically adjust to the window height? Currently, there is no way to view them in full, because right-clicking > View Image also displays them 1:1. —— In both cases, to see the info line (size | weight | color), you have to scroll all the way down. If the above is too complicated, placing the info line at the top might help (as is done with Fonts). — Any change in a css (even a minor one like deleting extra space) causes the Preview window to redraw the entire xhtml, going back to the beginning. Only when switching to the xhtml tab, the Preview jumps back to the cursor position. Is it possible to pre-save this point and automatically reposition it when css-redrawing? — When the Preview window is open and you switch to a non-xhtml element (css, image, font, etc.), the last selected xhtml remains previewed. Is it possible to reactivate the corresponding xhtml tab when you click on its Preview? — In Light Mode, the active tab has a paler color and stands out quite a bit. But in Classic Sigil Dark Theme, it is only distinguished by its slight elevation. In dawn, my tired old eyes take a while to find it. Would it be possible to give a more prominent visual cue? If its name were, say, italicized or underlined, it would be more easily recognizable. (If there is a way to do this via qt_styles.qss, that would also work... but I think doing it “by default” would help a lot).
|
|
|
|
|
|
#137 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,326
Karma: 6686152
Join Date: Nov 2009
Device: many
|
Yes, since the release Beta is out and translations are in, these suggestions are really something for a future release. I will start a new suggestions thread after Sigil 2.7.5 has been officially released. Please post your suggestions again when that post is opened.
Some comments: - we could use svg to display that image but I personally want to see the actual image and not an enlarged or shrunk version. The Image Viewer should remember its last size. Given how much space really large images take up in an epub, and how small most e-reader screens are, I am surprised this is an issue. But moving the info line to the top should be doable. - Yes any time you are using Code editor to edit CSS, Preview must reload the most recently edited xhtml to show its impact. There is no "position" to return to (ie the top) unless that xhtml file was scrolled and Preview synced to it as that xhtml is from a cache string, and not from Code Editor tab. Click on the proper xhtml tab to start to edit that xhtml again. Clicking on Preview is not a tab selection method. - no clicking on a cached copy of the last xhtml viewed by clicking in Preview is probably not something I would accept as a way to select a Tab. Preview is only showing a cached copy of whatever xhtml was last shown, and clicking on Preview can only talk to the active tab being edited. Use BookBrowser to select the xhtml tab you want to edit or click on CodeView Tab bar. - the active tab highlighting is quite clear on MacOS, and Manjaro Linux under both Light and Dark modes on my machines. So this must only be an issue for Windows 11 using the classic dark mode which probably would require internal qss changes. If other Windows users report the same issue, we can treat it like a bug instead of a suggestion. Have you tried just using normal Windows light and dark mode? You know you can right click on any tab in the tab bar and remove the clutter by auto closing all other tabs with a single click. So please wait for the next open suggestion thread after Sigil 2.7.5 has been released and repost your ideas for changes. Last edited by KevinH; Yesterday at 01:10 PM. |
|
|
|
| Advert | |
|
|
|
|
#138 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,080
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
|
|
|
|
|
#139 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,326
Karma: 6686152
Join Date: Nov 2009
Device: many
|
@jugaor,
Please try the following for me. 1. open an epub and go to a longer xhtml chapter and open it. Scroll down in Preview to a place farther down the file and click on a line so that the current CodeView tab syncs to it. 2. Now use BookBrowser to open the main css file and edit it in CodeView by adding a space. 3. You should see Preview flash as it reloads but on my Mac with Sigil 2.7.0 or our Beta, Preview *does* return to its previous scrolled position in that cached xhtml file. This is because Preview's last scroll to location is stored too when that location was last loaded. But I thought you stated above that Preview after reloading did not scroll to where it was in the cached file? Or did I misunderstand what you wrote earlier? Perhaps you scrolled Preview and never clicked to sync the xhtml CodeView tab to Preview before opening the css file for editing? Or is this maybe a difference between platforms? Last edited by KevinH; Yesterday at 01:33 PM. |
|
|
|
|
|
#140 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,080
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
If I click on the xhtml tab, the cursor goes back to where it was previously. NOW if I switch to the open css tab, the cursor in Preview stays where it was. If however, I now edit the css file, Preview jumps back to the top of the file. Clicking back on the xhtml tab causes the cursor to sync back up again. Basically, any change to the open css file causes the Preview to jump back to the top. But clicking on the xhtml tab and then back to the css file allows it to maintain it's position. A bit weird, but I couldn't swear that it hasn't always been like this on Windows |
|
|
|
|
| Advert | |
|
|
|
|
#141 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,326
Karma: 6686152
Join Date: Nov 2009
Device: many
|
That is a platform difference between MacOS and Windows then.
If I make sure to click in Preview to sync the xhtml file in CodeView to Preview, then open the css file, that flash reload happens in Preview but it scrolls itself right back to where I had left it. Editing the css repeatedly does not change Preview (ie. it flashes again and again returns to the last position it was in). There is no need to click again on the open xhtml tab to get it to move to the correct position. By examining the code, this is how it is supposed to work. Once you first sync CodeView to Preview the location is stored and used for every reload of the now cached xhtml file when you are editing in the css. So that is something for post Sigil 2.7.5 official release we can look at to see if we can change that in Windows as well. It must be a sequence thing of some sort. I will test Linux under Manjaro to see how that behaves. |
|
|
|
|
|
#142 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,326
Karma: 6686152
Join Date: Nov 2009
Device: many
|
Okay, I just tested Manjaro Linux with the KDE Plasma desktop and if you run the test
Code:
1. open an epub and go to a longer xhtml chapter and open it. Scroll down in Preview to a place farther down the xhtml file and *important* click on a line so that the current CodeView tab syncs to it. 2. Now use BookBrowser to open the main css file and edit it in CodeView by adding a space. You can repeat these edits. 3. After every css file edit you should see Preview flash as it reloads (and on my Mac and Linux using our Beta and Sigil 2.7.0), Preview *does* return to its previous scrolled position in that cached xhtml file. So I have no idea why Windows is behaving differently than MacOS and Linux here. It must be somehow related to the sequence of signals not properly caching the the location when it caches an xhtml file that last time it was loaded. On MacOS and Linux, when you click down in a file in Preview, it tells the xhtml file in CodeView to sync to it which generates an UpdatePreview signal which caches the file and any associated location. Something to look at for the release after Sigil 2.7.5 unless it is easy to fix. Last edited by KevinH; Yesterday at 05:13 PM. |
|
|
|
|
|
#143 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,326
Karma: 6686152
Join Date: Nov 2009
Device: many
|
I have pushed a debug change to my personal repo master for Sigil (http://github.com/kevinhendricks/Sigil) if anyone who builds their own on Windows has the time to help collect debug output so we can see what is actually going on.
Do not forget to set Sigil's debug environment variable (SIGIL_DEBUG_LOGFILE) to the full path to an empty log file to collect the debug output to a file. Then open Sigil, load your epub, and follow the exact set of instructions provided above just once. Then close out of Sigil and post the debug output here. Thanks! For your reference, here is my annotated Linux debug output when editing the public domain Alice epub and going to chapter 7 and scrolling half way down and clicking in Preview to have CV sync up, then using BookBrowser to edit the main css file and then by adding spaces and removing them. Code:
Debug: Caching: "OEBPS/Text/Section0001.xhtml" Debug: name: "html" index: 1 Debug: name: "body" index: -1 Debug: Caching: "OEBPS/Text/Section0001.xhtml" Debug: name: "html" index: 1 Debug: name: "body" index: -1 Debug: Caching: "OEBPS/Text/Section0001.xhtml" Debug: name: "html" index: 1 Debug: name: "body" index: -1 # The above is opening a blank epub # then I asked it to load Alice in Wonderland Debug: Caching: "OEBPS/Cover.xhtml" Debug: name: "html" index: 1 Debug: name: "body" index: -1 # Then I picked chapter 7 at random and loaded it Debug: Caching: "OEBPS/Chapter-07.xhtml" Debug: name: "html" index: 1 Debug: name: "body" index: -1 # Then I moved down in Chapter 7 and clicked in Preview # And then used BookBrowser to open styles.css # and here is where the Preview location is first stored Debug: Caching: "OEBPS/Chapter-07.xhtml" Debug: name: "html" index: 1 Debug: name: "body" index: 35 Debug: name: "p" index: 0 Debug: name: "#text" index: -1 # The following is when adding and removing blanks in styles.css # notice Preview's location does not change. # It remains the p tag that is the 35th (starting from 0) non-text child of the body tag. Debug: Caching: "OEBPS/Chapter-07.xhtml" Debug: name: "html" index: 1 Debug: name: "body" index: 35 Debug: name: "p" index: -1 Debug: Caching: "OEBPS/Chapter-07.xhtml" Debug: name: "html" index: 1 Debug: name: "body" index: 35 Debug: name: "p" index: -1 Debug: Caching: "OEBPS/Chapter-07.xhtml" Debug: name: "html" index: 1 Debug: name: "body" index: 35 Debug: name: "p" index: -1 Last edited by KevinH; Yesterday at 06:13 PM. |
|
|
|
|
|
#144 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 939
Karma: 3501230
Join Date: Jan 2017
Location: Poland
Device: Various
|
Here my test:
Code:
Debug: 2026-02-12 23:21:22 Caching: "OEBPS/Cover.xhtml" Debug: 2026-02-12 23:21:22 name: "html" index: 1 Debug: 2026-02-12 23:21:22 name: "body" index: -1 Debug: 2026-02-12 23:21:25 Caching: "OEBPS/Chapter-07.xhtml" Debug: 2026-02-12 23:21:25 name: "html" index: 1 Debug: 2026-02-12 23:21:25 name: "body" index: -1 Debug: 2026-02-12 23:21:43 Caching: "OEBPS/Chapter-07.xhtml" Debug: 2026-02-12 23:21:43 name: "html" index: 1 Debug: 2026-02-12 23:21:43 name: "body" index: 107 Debug: 2026-02-12 23:21:43 name: "p" index: 0 Debug: 2026-02-12 23:21:43 name: "#text" index: -1 Debug: 2026-02-12 23:21:46 Caching: "OEBPS/Chapter-07.xhtml" Debug: 2026-02-12 23:21:46 Javascript error: QWebEnginePage::ErrorMessageLevel "Uncaught TypeError: Cannot read properties of null (reading 'scrollWidth') on line:7 Source:sigil:///C:/Users/Becky/AppData/Local/sigil-ebook/sigil/workspace/Sigil-xtwDuy/OEBPS/Chapter-07.xhtml" Debug: 2026-02-12 23:21:48 Caching: "OEBPS/Chapter-07.xhtml" Debug: 2026-02-12 23:21:48 Javascript error: QWebEnginePage::ErrorMessageLevel "Uncaught TypeError: Cannot read properties of null (reading 'scrollWidth') on line:7 Source:sigil:///C:/Users/Becky/AppData/Local/sigil-ebook/sigil/workspace/Sigil-xtwDuy/OEBPS/Chapter-07.xhtml" Debug: 2026-02-12 23:21:49 Caching: "OEBPS/Chapter-07.xhtml" Debug: 2026-02-12 23:21:49 Javascript error: QWebEnginePage::ErrorMessageLevel "Uncaught TypeError: Cannot read properties of null (reading 'scrollWidth') on line:7 Source:sigil:///C:/Users/Becky/AppData/Local/sigil-ebook/sigil/workspace/Sigil-xtwDuy/OEBPS/Chapter-07.xhtml" |
|
|
|
|
|
#145 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,334
Karma: 30621608
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Re the active tab highlighting in Dark mode: what works best for me is a change the colour of 'X' close button to red, I notice that more than italicising or bolding the text. Have that in a couple of applications.
|
|
|
|
|
|
#146 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,326
Karma: 6686152
Join Date: Nov 2009
Device: many
|
Wow a strange Windows only javascript error! That was unexpected.
Thank you. Now at least I have a lead. |
|
|
|
|
|
#147 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,326
Karma: 6686152
Join Date: Nov 2009
Device: many
|
@BeckyEbook,
Is scrollWidth used in the Dark Mode qss code or anyplace else? |
|
|
|
|
|
#148 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 939
Karma: 3501230
Join Date: Jan 2017
Location: Poland
Device: Various
|
No. I looked for it too. In the code and in the settings. scrollWidth appears in several plugins (BibiReader, EpubJSReader, and ReadiumReader) and in the binary code of the C:\Program Files\Sigil\Qt6WebEngineCore.dll file.
Full debug for dark and light mode with enabled debug in PreviewWindow.cpp |
|
|
|
|
|
#149 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,326
Karma: 6686152
Join Date: Nov 2009
Device: many
|
Yes I could not find it either anyplace in the Sigil source. It must be coming from QtWebEngine then.
I will take a look at the Qt 6.10.2 source to see if I can identify where it is used. |
|
|
|
|
|
#150 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,326
Karma: 6686152
Join Date: Nov 2009
Device: many
|
Does that error message about scrollWidth only come when opening the CSS file?
Your first debug log showed it did get the correct location once. So strange. The term "scrollWidth" happens a bunch in the QtWebEngine 3rdparty chromium code. So many places that it may be impossible to track down which is the culprit. |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Suggestions for Sigil Improvements or New Features | KevinH | Sigil | 168 | 11-18-2025 01:23 PM |
| Suggestions for New Plugins and Plugin Improvements | KevinH | Plugins | 0 | 09-22-2025 11:53 AM |
| Ideas for New Improvements or Features | KevinH | Sigil | 97 | 04-09-2025 10:45 AM |
| Improvements/bugs/features | dontcrash | KOReader | 10 | 10-23-2019 11:05 AM |
| Onyx M92: Suggestions for possible improvements | Lode | Onyx Boox | 3 | 02-11-2013 08:40 AM |