View Single Post
Old 04-06-2024, 07:25 PM   #15
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by m_pluto View Post
90% was really more of an arbitrary number I tossed out there to say it was a lot better than it was before I guess really. But yes, I did modify the line spacing size, font size, and increase the synopsis area size. Really all I want to be able to do at this point is just modify the margin for the <p> tag, trying to figure out how to do that, but I'm still parsing out how the lines height is changed exactly.
Try replacing in its entirety nickel.yaml patch Custom synopsis details line spacing with the following replacement:
Spoiler:
Code:
Custom synopsis details line spacing:
  - Enabled: no
  - Description: Sets the line spacing for Book details synopsis & <p> margins/indent
  - FindZlib: "body[qApp_deviceIsTrilogy=true] {\n  line-height: 1.45em;" # qss/BookDetails.qss
  - ReplaceZlibGroup:
      Replacements:
        # m_pluto - add style to reduce inter-paragraph margins for <p> tags
        - Find:    "body {\n  font-family: Georgia;\n  margin: 0px;\n  padding: 0px;\n}"
          Replace: "body {font-family:Georgia; margin:0; padding:0;}\np {margin:0.5em 0 0 0; text-indent:1.5em;}"

        # m_pluto - remove line-height code for oldest Trilogy/Phoenix devices to create space for above code
        - {Find: "body[qApp_deviceIsTrilogy=true] {\n  line-height: 1.45em;\n}\n", Replace: "\n"}
        - {Find: "body[qApp_deviceIsPhoenix=true] {\n  line-height: 1.4em;\n}\n", Replace: "\n"}
          
        # AuraHD/AuraH2O/AuraH2O2/GloHD/ClaraHD/Clara2E (Dragon) and
        # LibraH2O/Libra2 (Storm) and
        # AuraOne/Forma/Sage/Elipsa/Elipsa2E (Daylight) 
        - {Find: "line-height: 1.35em;", Replace: "line-height: 1.3em;"}

It should work as you wish on your Sage once you enable it.

Your new requirements are handled by the last half of the 1st Replace (in red). Change those margin and text-indent values as you see fit.

You can customise line-height as you've done previously using the last Find/Replace.

Please note that the additional code for <p> tags made the Replace code longer than the Find code. So it was necessary to free up some space elsewhere by removing code that will never be used by your Sage. Hence the need for the two blue Find/Replace lines.

N.B.: If anyone other than @m_pluto is reading this, please don't use it on any of these older Kobo devices:
  • Touch/Mini (Trilogy)
  • Glo/Aura/Aura2E (Phoenix)

ETA: I tested this myself on an old AuraOne 7.8" device which is equivalent to a Sage for nickel.yaml patches.

Last edited by jackie_w; 04-06-2024 at 07:29 PM. Reason: ETA
jackie_w is offline   Reply With Quote