View Single Post
Old 11-27-2018, 10:23 AM   #269
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,246
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
@geek1011,

Re: ReplaceZlibGroup

Please can you also show an example of how to use this for the occasions when I prefer to have the Find: and Replace: statements on separate lines to facilitate comparing the find/replace strings.

ETA: Ideally, I'd like to be able to mix and match Find/Replace one-liners and multi-liners in the same ReplaceZlibGroup

Here's an extract from a very large patch that I have. How would I use ReplaceZlibGroup to group these 4 find/replace together without losing the last 2 as multi-liners?

Spoiler:
Code:
jackie_w General GUI:
  - Enabled: no
  - Description: General GUI
  - FindZlib: "HeaderSmallElidedLabel"
  #
  # popup footnote header (HeaderMediumElidedLabel,HeaderMediumTouchLabel,HeaderMediumLabel ???)
  # free some space
  - ReplaceZlib: {Offset: 0, Find: "HeaderMediumElidedLabel[qApp_localeName=\"ja_JP\"],\nHeaderMediumTouchLabel[qApp_localeName=\"ja_JP\"],\nHeaderMediumLabel[qApp_localeName=\"ja_JP\"] {\n  font-family: Sans-SerifJP, sans-serif;\n  font-style: normal;\n}\nHeaderSmallLabel", Replace: "HeaderSmallLabel"}
  - ReplaceZlib: {Offset: 0, Find: "HeaderSmallLabel[qApp_localeName=\"ja_JP\"] {\n  font-family: Sans-SerifJP, sans-serif;\n  font-style: normal;\n}\nHeaderSmallElidedLabel", Replace: "HeaderSmallElidedLabel"}
  #
  # Book Title in Book list (HeaderSmallElidedLabel): reduce font-size and to sans-serif, bold
  - ReplaceZlib:
      Offset: 0
      Find:    "HeaderSmallElidedLabel,\nHeaderSmallItalicLabel {\n  font-family: Georgia;\n  font-style: italic;\n  font-size: 23px;\n  padding-left: 12px;\n  padding-right: 12px;\n  qproperty-alignment: 'AlignLeft|AlignVCenter';\n}"
      Replace: "HeaderSmallElidedLabel,\nHeaderSmallItalicLabel {\n  font-family: Trebuchet, Avenir;\n  font-weight: bold;\n  font-size: 23px;\n  padding-left: 12px;\n  padding-right: 12px;\n  qproperty-alignment: 'AlignLeft|AlignVCenter';\n}"
  - ReplaceZlib:
      Offset: 0
      Find:    "HeaderSmallElidedLabel[qApp_deviceIsDragon=true],\nHeaderSmallItalicLabel[qApp_deviceIsDragon=true] {\n  font-size: 36px;\n  padding-left: 20px;\n  padding-right: 20px;\n}\nHeaderSmallElidedLabel[qApp_deviceIsAlyssum=true],\nHeaderSmallItalicLabel[qApp_deviceIsAlyssum=true] {\n  font-size: 39px;\n}\nHeaderSmallElidedLabel[qApp_deviceIsNova=true],\nHeaderSmallItalicLabel[qApp_deviceIsNova=true] {\n  font-size: 39px;\n}\nHeaderSmallElidedLabel[qApp_deviceIsDaylight=true],\nHeaderSmallItalicLabel[qApp_deviceIsDaylight=true] {\n  font-size: 47px;\n  padding-left: 26px;\n  padding-right: 26px;\n}\nHeaderSmallElidedLabel[qApp_localeName=\"ja_JP\"],\nHeaderSmallItalicLabel[qApp_localeName=\"ja_JP\"] {\n  font-family: Sans-SerifJP, sans-serif;\n  font-style: normal;\n  qproperty-forceLeading: 5;\n}"
      Replace: "HeaderSmallElidedLabel[qApp_deviceIsDragon=true],\nHeaderSmallItalicLabel[qApp_deviceIsDragon=true] {\n  font-size: 32px;\n  padding-left: 20px;\n  padding-right: 20px;\n}\nHeaderSmallElidedLabel[qApp_deviceIsAlyssum=true],\nHeaderSmallItalicLabel[qApp_deviceIsAlyssum=true] {\n  font-size: 36px;\n}\nHeaderSmallElidedLabel[qApp_deviceIsNova=true],\nHeaderSmallItalicLabel[qApp_deviceIsNova=true] {\n  font-size: 36px;\n}\nHeaderSmallElidedLabel[qApp_deviceIsDaylight=true],\nHeaderSmallItalicLabel[qApp_deviceIsDaylight=true] {\n  font-size: 40px;\n  padding-left: 26px;\n  padding-right: 26px;\n}"
  #

Last edited by jackie_w; 11-27-2018 at 11:02 AM. Reason: ETA
jackie_w is offline   Reply With Quote