Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 02:29 PM   #301
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: 9,663
Karma: 6774048
Join Date: Nov 2009
Device: many
I will look into auto resizing that column to width. Qt should be able to do that easily unless you make the dialog too small to begin with.

Update: this change has been pushed to master. That Delete Unused Styles, QTableView columns will now be resized to contents. A similar change was added to Delete Unused Media Files.

Last edited by KevinH; Yesterday at 03:40 PM.
KevinH is offline   Reply With Quote
Old Yesterday, 05:03 PM   #302
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 51,803
Karma: 180002898
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Here's a link to a 2026-May-12 Windows build: Sigil-2.8.0-Windows-x64-Setup.exe for anyone interested in testing.
DNSB is offline   Reply With Quote
Old Yesterday, 08:05 PM   #303
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: 174
Karma: 474196
Join Date: Jan 2011
Location: Canada
Device: Kobo Libra 2
Looks good. The "Delete" and "File" columns shrink to fit the content (or the header in the "Delete" case), while the "Style" column takes up the rest of the dialog's width, which is persistent. The column widths themselves don't remember any manual change, but I think what you have is ideal. Thanks for the fast turnaround - great job as usual!

One thing I noticed while checking this is that the "Delete Unused Styles" function won't target empty styles. For example:

Code:
.banana {
banana-size: plantain;
}
is shown, while

Code:
.banana {

}
does not appear on the list. Is this by design? I don't really see it being harmful but I would have expected it to be flagged for removal.
Attached Thumbnails
Click image for larger version

Name:	Untitled-1.jpg
Views:	14
Size:	15.5 KB
ID:	223285  
Vanguard3000 is offline   Reply With Quote
Old Yesterday, 08:41 PM   #304
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: 174
Karma: 474196
Join Date: Jan 2011
Location: Canada
Device: Kobo Libra 2
Oh, also, I just noticed the new image editor. It'll take some getting used to, but it looks really good. I would like a "Zoom Actual Size" button in addition to the "zoom to fit" one. And it'd be nice if opening a new image would clamp to fit (or actual size) rather than using the zoom level of the previously viewed image.
Vanguard3000 is offline   Reply With Quote
Old Yesterday, 08:42 PM   #305
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: 9,663
Karma: 6774048
Join Date: Nov 2009
Device: many
Interesting, so it will not target empty styles even if that class is not used anyplace in the code.

That's a new one to me. I will take a look.
KevinH is offline   Reply With Quote
Old Yesterday, 08:46 PM   #306
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: 9,663
Karma: 6774048
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by Vanguard3000 View Post
Oh, also, I just noticed the new image editor. It'll take some getting used to, but it looks really good. I would like a "Zoom Actual Size" button in addition to the "zoom to fit" one. And it'd be nice if opening a new image would clamp to fit (or actual size) rather than using the zoom level of the previously viewed image.
The Zoom controls are tied to the Sigil zoom bar, and so it is also tied to the Sigil main menu, which already has a Zoom Reset menu item which returns the zoom to 1.0.

Just click in the Image editor, then use Sigil's Zoom Reset menu or its assigned shortcut.
KevinH is offline   Reply With Quote
Old Today, 12:05 AM   #307
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 51,803
Karma: 180002898
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by KevinH View Post
Interesting, so it will not target empty styles even if that class is not used anyplace in the code.

That's a new one to me. I will take a look.
I find that empty styles disappear when I use either reformat to single line or reformat to multiple lines.

When I use the Remove Unused Stylesheet Selectors tool, it does not show the empty selector in the list but it does remove it if any changes are made. Probably when the stylesheet is reformatted after the deletion.

See attached images for both cases.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2026-05-12 210112.png
Views:	8
Size:	34.4 KB
ID:	223289   Click image for larger version

Name:	Screenshot 2026-05-12 210210.png
Views:	7
Size:	16.1 KB
ID:	223290   Click image for larger version

Name:	Screenshot 2026-05-12 210234.png
Views:	6
Size:	22.3 KB
ID:	223291   Click image for larger version

Name:	Screenshot 2026-05-12 210320.png
Views:	5
Size:	68.7 KB
ID:	223292   Click image for larger version

Name:	Screenshot 2026-05-12 210342.png
Views:	4
Size:	32.8 KB
ID:	223293  

Last edited by DNSB; Today at 12:07 AM.
DNSB is offline   Reply With Quote
Old Today, 07:15 AM   #308
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: 9,663
Karma: 6774048
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by DNSB View Post
I find that empty styles disappear when I use either reformat to single line or reformat to multiple lines.

When I use the Remove Unused Stylesheet Selectors tool, it does not show the empty selector in the list but it does remove it if any changes are made. Probably when the stylesheet is reformatted after the deletion.

See attached images for both cases.
Okay, that tells me that it is our own parser that is ignoring any empty class. And if the parser can't detect an empty class, then of course it will not be reported as unused by Sigil's routines.

When reformatting the css to single or multi line, since it can not be detected, it can not be reformmatted.

Thanks! That tells me where to start looking!
KevinH is offline   Reply With Quote
Old Today, 07:48 AM   #309
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: 9,663
Karma: 6774048
Join Date: Nov 2009
Device: many
And, yes it is the parser, as a parser that never reaches the "has property" state when parsing a potential selector or @ statement is treated as an @ statement not a selector.

I will have to think about if this is worth tracking down and fixing as the css parsing code is very tricky to work with and changing one thing in the parser state transfer conditions can have disastrous results.

The workaround that DNSB pointed out (simply reformatting the css) will happily remove them making the problem of empty selectors go away.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestions for Sigil Improvements or New Features KevinH Sigil 241 03-02-2026 01:09 PM
Suggestions for Sigil Improvements or New Features KevinH Sigil 168 11-18-2025 12:23 PM
Ideas for New Improvements or Features KevinH Sigil 97 04-09-2025 09:45 AM
What Features or Tools does Sigil Still Need Yet? KevinH Sigil 175 03-06-2021 09:11 PM
Improvements/bugs/features dontcrash KOReader 10 10-23-2019 10:05 AM


All times are GMT -4. The time now is 08:49 AM.


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