Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-24-2016, 01:15 PM   #16
KevinH
Wizard
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: 2,835
Karma: 1328806
Join Date: Nov 2009
Device: many
Okay I created a text file called qt_styles.qss with the following contents on my desktop:

Code:
QLabel { font-size: 16pt }
QLineEdit { font-size: 16pt }
QComboBox { font-size: 16pt }
Then I fired up Sigil using the following command line on my Mac:

Code:
cd /Applications/Sigil.app/Contents/MacOS
./Sigil -stylesheet /Users/kbhend/Desktop/qt_styles.qss
And this worked to increase the sizes of the text in the QComboBox that is used in the Find and Replace dialog.

So please try the same thing on Windows (adding the command line option):
-stylesheet=PATH_TO_YOUR_QT_STYLES.QSS

and see if it can be used to change those fields in the Find and Replace enough to make things better. Right now, I can increase things too much and mess things up so there are limits before the dialog itself has to grow in size but this should help.

If this does work well enough to use, I can modify Sigil to look in its own preferences for a qt_styles.qss file and if found try and load it. It would default to being empty.

KevinH

edit: @theducks, you should be able to use this same approach to change background and foreground elements colors as well.

Last edited by KevinH; 05-24-2016 at 01:17 PM. Reason: add response to theducks
KevinH is offline   Reply With Quote
Advert
Old 05-24-2016, 01:37 PM   #17
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 21,361
Karma: 20890066
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab 2(RIP)
Quote:
Originally Posted by KevinH View Post
Okay I created a text file called qt_styles.qss with the following contents on my desktop:


edit: @theducks, you should be able to use this same approach to change background and foreground elements colors as well.
Thanks for the tip
theducks is offline   Reply With Quote
Old 05-24-2016, 02:33 PM   #18
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 21,361
Karma: 20890066
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab 2(RIP)
Works from a BAT file

I could not get the shortcut icon 'correct'

A example QSS ( showing the defaults) that would be appropriate to Sigil sorta like how Tweaks was done in Calibre

NB I did download the QT 5 stylesheet reference
theducks is offline   Reply With Quote
Old 05-24-2016, 02:44 PM   #19
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 4,066
Karma: 12828160
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by theducks View Post
: I could not get the shortcut icon 'correct'
If you tried to modify the desktop shortcut target via Properties > Target, make sure to enclose the qt_styles.qss path in quotation marks. E.g.:

Code:
"C:\Program Files\Sigil\Sigil.exe" -stylesheet "C:\Users\doitsu\Desktop\qt_styles.qss"
(It worked on my Windows 10 machine.)
Doitsu is offline   Reply With Quote
Old 05-24-2016, 03:18 PM   #20
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 21,361
Karma: 20890066
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab 2(RIP)
Quote:
Originally Posted by Doitsu View Post
If you tried to modify the desktop shortcut target via Properties > Target, make sure to enclose the qt_styles.qss path in quotation marks. E.g.:

Code:
"C:\Program Files\Sigil\Sigil.exe" -stylesheet "C:\Users\doitsu\Desktop\qt_styles.qss"
(It worked on my Windows 10 machine.)
That is exactly what I have in my BAT (different username )
Space, not = after the switch
theducks is offline   Reply With Quote
Advert
Old 05-24-2016, 04:09 PM   #21
KevinH
Wizard
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: 2,835
Karma: 1328806
Join Date: Nov 2009
Device: many
So it appears to work. That is good to know. I will see about adding some code to Sigil to look into its preferences for a qt_styles.qss file and if found, to load it. I think this has to be done before the application main window is loaded.

I have no idea about what sizes are good or default and what are not. Most of these things are inherited from the underlying OS (as is correct). This stylesheet approach is mainly used to override whatever the damn Windows is passing along to Qt for min font sizes for specific things. I can not understand how a Windows 10 can not have settings for controlling all of these things at the OS level.

If someone has a problem dialog, I can look at its Sigil/src/Form_Files/*.ui file for what Qt classes it uses in a particular dialog. You can then add higher minimum font size style info for those types of Widgets as well.


That is what I did to find out that the FindReplace.ui used QComboBox widgets to do its thing. There might even be a way to specify these changes only for certain dialogs instead of at the widget level but I really have not studied it enough. On Mac OS X, the qt_styles.qss trick is simply not needed.
KevinH is offline   Reply With Quote
Old 05-24-2016, 04:13 PM   #22
KevinH
Wizard
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: 2,835
Karma: 1328806
Join Date: Nov 2009
Device: many
I am not sure if the "=" is needed or not.

I found this from here:

http://stackoverflow.com/questions/4...tylesheet-file

I tried with = and with a single space and both worked just fine on Mac OS X.

Also there are some Qt examples here:
http://doc.qt.io/qt-4.8/stylesheet-examples.html
KevinH is offline   Reply With Quote
Old 05-24-2016, 04:31 PM   #23
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 4,066
Karma: 12828160
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
I am not sure if the "=" is needed or not.

I tried with = and with a single space and both worked just fine on Mac OS X.
It's the same with Linux. Apparently, the equal sign is optional.
Doitsu is offline   Reply With Quote
Old 05-24-2016, 06:51 PM   #24
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
Kevin, thanks so much for the tweak! It worked great to make the fields much bigger and readable. The only problem is that when I first invoked the change, it seemed to set some persistent state or cache. So now whenever I open sigil from the shortcut that I entered the command line into, the elements in the S&R box are now always set at 22pt -- because that is the first value I tried. This is pretty huge!

This is the case no matter what value I enter into the qt_styles.qss sheet. If I put in 8pt it’s still opening up at 22pt. I even rebooted my system and it didn’t change. So 22pt is stuck somewhere inside my Windows system, or in QT or in Sigil. Do you know how I can clear it?

Quote:
I will see about adding some code to Sigil to look into its preferences for a qt_styles.qss file and if found, to load it. I think this has to be done before the application main window is loaded.
This would be great. Currently I use the "open with" plugin to open epubs directly from within Calibre. That plugin doesn’t seem to work with shortcuts. So it would be nice to be able to have the tweak every time Sigil opens, whether from a shortcut or not.

Quote:
I can not understand how a Windows 10 can not have settings for controlling all of these things at the OS level.
Display scaling has been a big issue since the last few Windows versions. Users had more control with Windows XP, but not anymore. I think the adoption of high-res monitors combined with the huge amount and variety of legacy software made it difficult for them to move forward, so they stripped away user options in order to simplify things. That’s just a guess on my part.

--Pat
PatNY is offline   Reply With Quote
Old 05-24-2016, 08:25 PM   #25
KevinH
Wizard
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: 2,835
Karma: 1328806
Join Date: Nov 2009
Device: many
PatNY,
Make sure you do not have two-copies of qt_styles.qss anyplace. If you do perhaps you are editing the second copy?

If not, then try editing the launch command to completely remove the whole -stylesheet command line option and see if that helps.

Alternatively, try creating a bat file to launch it but rename qt_styles.qss to something new first (and update the -stylesheet option to point to the new .qss file after changing the 22pt to something you like).

Nothing should be cached unless it is Windows itself doing the caching.

Edit: you must exit completely from Sigil and relaunch for any changes to qt_stylesheet.qss to have any impact.

KevinH

Last edited by KevinH; 05-25-2016 at 09:11 AM.
KevinH is offline   Reply With Quote
Old 05-25-2016, 03:53 AM   #26
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 4,066
Karma: 12828160
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
Nothing should be cached unless it is Windows itself doing the caching.
I just tested it. Windows doesn't do any Qt style caching.
Doitsu is offline   Reply With Quote
Old 05-25-2016, 04:12 AM   #27
quocsan
Member
quocsan began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Jul 2009
Device: none
I've tested on Windows 10: Result is OK; but on MAC OS, line height has no effect.

♪ZF²♪
quocsan is offline   Reply With Quote
Old 05-25-2016, 09:09 AM   #28
KevinH
Wizard
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: 2,835
Karma: 1328806
Join Date: Nov 2009
Device: many
Worked for me on Mac OS X but you must launch it in a very specific way. See my earlier post about how to cd into the Sigil app/Contents/MacOS/Sigil to properly launch Sigil with a commandline option.
KevinH is offline   Reply With Quote
Old 05-25-2016, 09:42 AM   #29
quocsan
Member
quocsan began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Jul 2009
Device: none
Quote:
Originally Posted by KevinH View Post
Worked for me on Mac OS X but you must launch it in a very specific way. See my earlier post about how to cd into the Sigil app/Contents/MacOS/Sigil to properly launch Sigil with a commandline option.
Thank you for your information. :-) I'll try.

Update: Oh! The problem is not the way I started Sigil (I've used ActionScript to start Sigil with parameter). I've changed the qss with margins-top/bottom and now the result is OK, even the colour is changeable. :-)
My qss contents:
Code:
QLabel { font-size: 12pt; }
QLineEdit { font-size: 18pt; font-weight: bold; margin-top: 2pt; margin-bottom: 2pt; }
QComboBox { font-size: 18pt; font-weight: bold; color: navy; margin-top: 2pt; margin-bottom: 2pt; }
Attached Thumbnails
Click image for larger version

Name:	scr.png
Views:	101
Size:	218.6 KB
ID:	148916  

Last edited by quocsan; 05-25-2016 at 10:13 AM.
quocsan is offline   Reply With Quote
Old 05-25-2016, 10:25 AM   #30
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
Kevin, nevermind, it was user error. I was not editing the qss sheet properly. I used Notepad++ to edit it and thought that merely exiting the app saved the change since there is no prompt to save the file. I now know you have to click the save button before exiting.

It works perfectly now. I've set all values to 12pt and now I can clearly see everything. As an added bonus, this change also impacts the text entry field in the TOC editor pane. I always thought that was a little hard to read too, but now it's much easier.

Do you know if there's currently any way to use this change with the "open with" plugin in Calibre? For now, I can open up a book briefly in Sigil from Calibre then exit, then use a desktop shortcut with the command line to open Sigil. I then use the recent files list in Sigil to bring up the book. But it would be nice to do it all from within Calibre.

--Pat
PatNY is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed - how to search for library entries with multiple formats jecilop Calibre 2 09-19-2015 02:39 AM
css to make all images larger? 1611mac ePub 5 03-31-2012 03:18 AM
invert search for custom fields (GUI) rogue_librarian Library Management 4 07-25-2011 12:36 PM
how to make larger fonts soup Sigil 1 08-15-2010 04:00 PM
HELP!!! How To Make PDF Type Larger? magentawave Sony Reader 4 11-04-2008 03:28 PM


All times are GMT -4. The time now is 04:23 AM.


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