Question about the patches because I'm trying to understand how Find/Replace works.
I'll use one of jackie_'w's custom patches in post
#844 as an example (NOT to pick on it).
One of the parts goes like this:
Code:
# Part 1: Customise font-size of book Title
- FindZlib: "HeaderSmallElidedLabel[localeName=\"zh-HK\"]," # default.qss (HeaderSmallElidedLabel)
- ReplaceZlibGroup:
Replacements:
# Customise Title font-size from default 42px
# add Storm-specific code by commandeering some code used only by Chinese-HK locale users
- Find: "HeaderSmallElidedLabel[localeName=\"zh-HK\"],\nHeaderSmallItalicLabel[localeName=\"zh-HK\"] {\n font-family: Sans-SerifZH-Traditional, sans-serif;\n font-style: normal;\n qproperty-forceLeading: 5;\n}"
Replace: "HeaderSmallElidedLabel[qApp_deviceIsStorm=true] {font-size:35px;}"
So my understanding is that it overwrites everything under the
HeaderSmallElidedLabel[localeName=\"zh-HK\"] section on line 1386 in
default.qss with
HeaderSmallElidedLabel[qApp_deviceIsStorm=true] {font-size:35px;}.
But I noticed that there is already a
HeaderSmallElidedLabel[qApp_deviceIsStorm=true] section in the file on line 1368. Specifically, it looks like this:
Code:
HeaderSmallElidedLabel[qApp_deviceIsStorm=true],
HeaderSmallItalicLabel[qApp_deviceIsStorm=true] {
font-size: 42px;
padding-left: 23px;
padding-right: 23px;
}
and it's the only one.
If
font-size is the value being targeted to be changed to 35px, would something like this:
Code:
# Part 1: Customise font-size of book Title
- FindZlib: "HeaderSmallElidedLabel[qApp_deviceIsStorm=true]," # default.qss (HeaderSmallElidedLabel)
- ReplaceZlibGroup:
Replacements:
- Find: "HeaderSmallElidedLabel[qApp_deviceIsStorm=true],\nHeaderSmallItalicLabel[qApp_deviceIsStorm=true] {\n font-size: 42px;"
Replace: "HeaderSmallElidedLabel[qApp_deviceIsStorm=true],\nHeaderSmallItalicLabel[qApp_deviceIsStorm=true] {\n font-size: 35px;"
also work? That way, one wouldn't need to overwrite that entire zh-HK section.