Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 04:25 AM   #1
quocsan
Enthusiast
quocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it is
 
Posts: 32
Karma: 2204
Join Date: Jul 2009
Device: none
How to change style of Code View

Dear All,

I want to change height of lines in Code View so that lines will be easier to read. But I do not know how to do that with ‘qt_styles.qss’ file.
Could you please show me what to do?
Thanks for your help.
quocsan is offline   Reply With Quote
Old Today, 07:34 AM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,153
Karma: 18843349
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Go to: Edit/Preferences/Appearance...then make sure you select the 'Code View' tab on the right pane.

That will change things like Font, Special Characters, and Color.

At the bottom right of the main ui window you can see the zoom bar that will change the font size.

If you right click on the CV window you can select 'Reformat HTML/Mend and Prettify Code' to rearrange and put a line space between each tag. You can also get there from 'Tools/Reformat HTML/Mend and Prettify Code'.

I haven't messed with the ‘qt_styles.qss’ file as I haven't needed to with the above options. There will likely be others that pop in with suggestions there.
Turtle91 is offline   Reply With Quote
Old Today, 07:58 AM   #3
quocsan
Enthusiast
quocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it is
 
Posts: 32
Karma: 2204
Join Date: Jul 2009
Device: none
Quote:
Originally Posted by Turtle91 View Post
Go to: Edit/Preferences/Appearance...then make sure you select the 'Code View' tab on the right pane.
That will change things like Font, Special Characters, and Color.
Thank you for your reply, Turtle91!
I've known the settings you mentioned. But I want to change line height in Code View, i.e. 105% and so.
quocsan is offline   Reply With Quote
Old Today, 08:18 AM   #4
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: 7,984
Karma: 5449552
Join Date: Nov 2009
Device: many
Sigil Preferences allow you to set both the CodeView interface font and default font size, but I find clicking on CodeView and then using the zoom bar of the bottom right of Sigil to go to 110% makes CodeView much easier to see and work in. Just make sure the cursor is in CodeView before playing with the zoom bar settings, as they work on Preview as well.

Last edited by KevinH; Today at 09:33 AM.
KevinH is online now   Reply With Quote
Old Today, 09:59 AM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,800
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'm not sure the line-height of an entire document can be changed with qss. @BeckyEbook will probably know better.

In C++ code, QTextBlockFormat would be used to set line height.

Last edited by DiapDealer; Today at 11:06 AM.
DiapDealer is offline   Reply With Quote
Old Today, 11:23 AM   #6
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 735
Karma: 2296998
Join Date: Jan 2017
Location: Poland
Device: Various
This cannot be done through a qss file.
Line height is sewn inside the font and depends on the size of the font offset.
I don't know if I'm using the right vocabulary, but it's simply a font metric that stores the height for the entire font and font family to maintain consistency.

In this exceptional case, for use in Sigil's Code View and without changing the program code (which is unnecessary, by the way) I think the best solution would be to edit the font and, for example, add 100 points ascender and 100 points descender.

An example below using the IBM Plex Mono font as an example.
One screenshot shows the original font and the other the modified one.

As you can see, in Sigil itself there is no control over this parameter of the Code View window.
Attached Thumbnails
Click image for larger version

Name:	sigil-ibm-plex-mono-standard.png
Views:	1
Size:	56.4 KB
ID:	210401   Click image for larger version

Name:	sigil-ibm-plex-mono-modified.png
Views:	1
Size:	53.7 KB
ID:	210402  
BeckyEbook is online now   Reply With Quote
Reply

Tags
code view, qt_styles.qss


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change background color in Code View window philja Sigil 13 10-06-2022 11:27 AM
replace in book view changes view to code view cybmole Sigil 4 10-28-2012 01:20 PM
Sigil highlight Book View No Longer Shows in Code View Themus Sigil 4 10-04-2012 07:54 PM
How do I change the syntax colouring and increase the font size in the Code View? nicciglen Sigil 5 02-08-2012 09:34 AM
lock book view & code view windows into synch cybmole Sigil 5 01-19-2011 10:30 PM


All times are GMT -4. The time now is 11:34 AM.


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