View Single Post
Old 09-21-2022, 05:45 PM   #883
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by rtiangha View Post
Question about the patches because I'm trying to understand how Find/Replace works.


If font-size is the value being targeted to be changed to 35px, would something like this:

<snip>

also work? That way, one wouldn't need to overwrite that entire zh-HK section.
Patching nickel CSS is not a particularly precise skill - lots of ways to skin a rabbit.

What you suggested would work, but you'd also be simultaneously changing the HeaderSmallItalicLabel item - which may, or may not, be a desirable thing. First you'd need to know where that item is used. There's no convenient documentation where you can find that out. Perhaps if you have decompilation skills (which I don't) ...

Your particular example is not too bad because there's only the potential for "unintended consequences" on one other item. If you look at Part 2, which customises Author and Subtitle using SmallElidedLabel, you'll see that a similar approach would simultaneously change font-size for 3 other items (PageLabel, SmallTouchLabel, SmallLabel).

Rightly or wrongly, I chose a consistent alternative approach which may inconvenience "zh-HK" locale users but no-one else. If this is a problem for someone I knew I'd easily be able to tweak the patch to change the target code to that used by locale "zh" or "zh-TW" or "ja".

Patching is often a struggle to find enough room to add extra code without breaking something else. The Chinese/Japanese code blocks are useful because they provide many characters to play with.

BTW I'm glad to see someone else taking an interest in the details of patching.
jackie_w is offline   Reply With Quote