|
|
Thread Tools | Search this Thread |
05-24-2016, 12:15 PM | #16 |
Sigil Developer
Posts: 7,644
Karma: 5433388
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 } Code:
cd /Applications/Sigil.app/Contents/MacOS ./Sigil -stylesheet /Users/kbhend/Desktop/qt_styles.qss 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 12:17 PM. Reason: add response to theducks |
05-24-2016, 12:37 PM | #17 |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
Advert | |
|
05-24-2016, 01:33 PM | #18 |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
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 |
05-24-2016, 01:44 PM | #19 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
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" |
05-24-2016, 02:18 PM | #20 | |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Space, not = after the switch |
|
Advert | |
|
05-24-2016, 03:09 PM | #21 |
Sigil Developer
Posts: 7,644
Karma: 5433388
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. |
05-24-2016, 03:13 PM | #22 |
Sigil Developer
Posts: 7,644
Karma: 5433388
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 |
05-24-2016, 03:31 PM | #23 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
|
05-24-2016, 05:51 PM | #24 | ||
Zennist
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:
Quote:
--Pat |
||
05-24-2016, 07:25 PM | #25 |
Sigil Developer
Posts: 7,644
Karma: 5433388
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 08:11 AM. |
05-25-2016, 02:53 AM | #26 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
|
05-25-2016, 03:12 AM | #27 |
Enthusiast
Posts: 26
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²♪ |
05-25-2016, 08:09 AM | #28 |
Sigil Developer
Posts: 7,644
Karma: 5433388
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.
|
05-25-2016, 08:42 AM | #29 | |
Enthusiast
Posts: 26
Karma: 10
Join Date: Jul 2009
Device: none
|
Quote:
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; } Last edited by quocsan; 05-25-2016 at 09:13 AM. |
|
05-25-2016, 09:25 AM | #30 |
Zennist
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 |
|
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 01:39 AM |
css to make all images larger? | 1611mac | ePub | 5 | 03-31-2012 02:18 AM |
invert search for custom fields (GUI) | rogue_librarian | Library Management | 4 | 07-25-2011 11:36 AM |
how to make larger fonts | soup | Sigil | 1 | 08-15-2010 03:00 PM |
HELP!!! How To Make PDF Type Larger? | magentawave | Sony Reader | 4 | 11-04-2008 02:28 PM |