06-30-2022, 11:51 AM | #31 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I guess my questions are: 1) if only the custom_preview_style.css is present, will the button then act as a binary toggle (between custom preview and nothing)? Or will their essentially be two "no custom css" states?
2) same for the opposite: if only the custom_preview_style_invert.css is present (I know there shouldn't be), will the button act as a binary toggle (between custom inverted preview and nothing)? 3) will the button do nothing when no custom css files are present, or will the button be disabled? There are no wrong answers that will be deal-breakers for me, I'd just like to know. Optimally, I would think there shouldn't be two states that were essentially identical (when only one custom preview css file is present). I'd also prefer that a user wouldn't potentially be flogging away at a button that does nothing (if none of the custom files are present). |
06-30-2022, 12:06 PM | #32 |
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Maybe would it be possible for Becky to gray-out (or disable) the button if none of the .css files are present so the feature only would be available in the proper cases.
|
06-30-2022, 12:34 PM | #33 | |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
It wouldn't technically need to be disabled when one or the other custom css files weren't present. Especially if it wouldn't take a ton of work to have it toggle between one, or both, custom css files (and the epub's default). The button would only need to be disabled if neither custom css file were present. Last edited by DiapDealer; 06-30-2022 at 12:38 PM. |
|
07-05-2022, 11:45 AM | #34 |
Sigil Developer
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Sigil master now has my first shot at adapting BeckEbook's approach to allow cycling through custom css stylesheets for Preview.
A few notes, the actual implementation had to be changed slightly: 1. Because file access and especially QFileInfo is painfully slow and because Preview needs to reload automatically many many times (so loading speed is very important), the building of the alternative custom urls is done in MainWindow once when Sigil is first opened. So if you manually create a "custom_preview_style.css" or "custom_preview_style_alt.css"; file after Sigil is open (ie behind Sigil's back so to speak) you will have to open a new MainWindow in order to activate the new css file in Preview. 2. Right now if there are no custom css style files, the icon is greyed out (that action is not enabled) but visually I can not see that in my testing so we probably need to handle that in a different way so when it is disabled it is more visually detectable. 3. The second css file name is based on _alt_ and not _invert_ as technically it can be used for other purposes. So please everyone thank BeckyEbook for her ingenious approach for implementing this requested feature and her wonderful svg icons! Feedback and ideas for improvements especially on when the button is disabled welcome. We may need to either remove the button completely or change its icon is a more visible way when no custom css stylesheets are available. |
07-05-2022, 02:03 PM | #37 | |||
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Quote:
Quote:
|
|||
07-05-2022, 02:17 PM | #38 |
Sigil Developer
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
|
I will wait in case others have feedback and create a CI build. Do you want Windows or macOS?
As for sub menus and editors for each custom preview css stylesheet, that is way way too much work for a feature many people will probably never use. Since the file names and locations are known and fixed, editing them can be done with any editor at the os level by almost any script. |
07-05-2022, 02:41 PM | #39 | ||
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Quote:
|
||
07-05-2022, 02:59 PM | #40 |
Sigil Developer
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
|
That will work. But please use a light theme for clarity when making replacement screenshots. The light theme seems to help the readability of screenshots when placed in the epub.
And please start with the version of the user guide from master here: https://github.com/Sigil-Ebook/sigil-user-guide Thanks, KevinH Last edited by KevinH; 07-05-2022 at 03:31 PM. |
07-05-2022, 05:06 PM | #41 | |||
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Quote:
Quote:
|
|||
09-04-2022, 01:36 PM | #42 |
Sigil Developer
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
|
@RbnJrg
Since Sigil-1.9.20 has now been released with your cycle css requested feature, would you please update the relevant sections of the Sigil User's guide with info on this new feature and of course update any images with Preview in them to be consistent. Thanks! |
09-04-2022, 03:57 PM | #43 | |
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
|
|
09-07-2022, 10:22 AM | #44 |
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Hi Kevin, what name do we give this new feature?
|
09-07-2022, 11:21 AM | #45 |
Sigil Developer
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Perhaps "Cycle CSS "? But really any name you deem appropriate.
In the Preview chapter, please add info on the new icon and explain what its purpose is, how it can be useful, the file names required, etc. Sample css code for each would help. The biggest job will be re-generating all the screenshots that include Preview in them someplace. Please make sure to use an out of copyright epub (now public domain) so that images and text are not an issue. Please use a light theme and png file formats as they are generally quite readable. I typically generate all the screen shots with identical filenames as the original first, and then use Add Existing and tell it to overwrite their namesakes. That way no need to play around with links. Thanks for all your help with this! Kevin |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Feature requested for Sigil 1.7 | RbnJrg | Sigil | 23 | 08-06-2021 08:44 AM |
Need Feedback on UserDictionaries feature of Sigil | KevinH | Sigil | 11 | 08-29-2020 02:19 PM |
A few Sigil Feature Requests | crankypants | Sigil | 6 | 11-03-2015 09:56 AM |
Parity feature with Sigil | roger64 | Editor | 8 | 03-17-2014 11:28 AM |
Is auto-relinking a Sigil feature? | dlw | Sigil | 2 | 06-27-2011 12:43 AM |