Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 02:38 PM   #46
BeckyEbook
Wizard
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: 1,044
Karma: 3761621
Join Date: Jan 2017
Location: Poland
Device: Various
For Windows:
1. delete .qmake.stash
2. in file "SelectCharacter.cpp" in line 111 set path to file "characters.txt". Notice: use double backslashes, eg.
QString custom_path = "W:\\Develop\\special_char\\characters.txt";
3. run console (x64 Native Tools Command Prompt for VS)
4. run qmake (will create new .qmake.stash file)
5. run nmake and wait (remember: NMAKE)
6. in subfolder "release" should be "flowlayout.exe" file
7. run this exe file

It works, and overall it's OK. This is exactly the effect I was going for – wrapping the characters to fit the width of the window while keeping the groups fixed.
I'd probably condense the spacing between the groups a bit, but that's just an aesthetic detail.
Attached Thumbnails
Click image for larger version

Name:	isc-test-win10.png
Views:	8
Size:	32.8 KB
ID:	226013  

Last edited by BeckyEbook; Yesterday at 02:48 PM.
BeckyEbook is offline   Reply With Quote
Old Yesterday, 02:59 PM   #47
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: 10,036
Karma: 7518950
Join Date: Nov 2009
Device: many
Yes the spacing between groups by default is 0 since the linebreak is really an invisible QWidget and without layout spacing/margins there is no gap at all.

So I hardcoded an additional height of 15 in the dolayout routine in FlowLayout.cpp. Just look for the "if" that isLineBreak and tweak what gets added to y height.

The problem with a flowlayout is that two back to back linebreaks adds no intergroup spacing at all without that hard coded addition.


I thought the make distclean removed the qmake stash.

And yes, fix the path to characters.txt in SelectCharacter.cpp not windows.cpp. My bad!


Thanks for getting it working on Windows. Please make what tweaks you want and then I will start the conversion to xml.

Thanks

Kevin

Last edited by KevinH; Yesterday at 03:06 PM.
KevinH is offline   Reply With Quote
Old Yesterday, 03:41 PM   #48
BeckyEbook
Wizard
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: 1,044
Karma: 3761621
Join Date: Jan 2017
Location: Poland
Device: Various
I think it's enough to remove the extra "+15" from the height, since the groups already clearly separate the blocks. I've been experimenting with making the group names bold, and I think that's worth considering as well.

Code:
y = y + lineHeight + verticalSpacing();

Code:
            QLabel* lbl = new QLabel(insert_text);
            QFont labelFont = lbl->font();
            labelFont.setBold(true);
            lbl->setFont(labelFont);
Attached Thumbnails
Click image for larger version

Name:	isc-test-win10-dark.png
Views:	11
Size:	46.5 KB
ID:	226018  
BeckyEbook is offline   Reply With Quote
Old Yesterday, 05:44 PM   #49
BeckyEbook
Wizard
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: 1,044
Karma: 3761621
Join Date: Jan 2017
Location: Poland
Device: Various
Maybe we could also include the color in the group name? I have to admit that in my mind, this window looked very similar.
Attached Thumbnails
Click image for larger version

Name:	isc-label-color-light.png
Views:	11
Size:	39.7 KB
ID:	226019   Click image for larger version

Name:	isc-label-color-dark.png
Views:	11
Size:	41.4 KB
ID:	226020  
BeckyEbook is offline   Reply With Quote
Old Yesterday, 06:23 PM   #50
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: 10,036
Karma: 7518950
Join Date: Nov 2009
Device: many
Without that 15 added in there is no spacing at all between the groups on MacOS, so we will need to do something platform specific here. Literally, the top of the heading touches the bottom of the preceding line text.

Let's worry about heading colours at some later point. Hard coding colours to work in all platforms under both dark and light is hard especially on Linux. Those types of tweaks can come later.

Functionally, is this proof of concept working enough to go ahead and convert it to xml?

Last edited by KevinH; Yesterday at 06:26 PM.
KevinH is offline   Reply With Quote
Old Yesterday, 07:49 PM   #51
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 54,471
Karma: 182218685
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by KevinH View Post
Functionally, is this proof of concept working enough to go ahead and convert it to xml?
Other than the joy of figuring out that I misspelled QT_PLUGIN_PATH (you don't spell plugin with two g's?), it looks good here. I added my personal selection as another group and continued looking good.
DNSB is offline   Reply With Quote
Old Today, 12:53 AM   #52
BeckyEbook
Wizard
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: 1,044
Karma: 3761621
Join Date: Jan 2017
Location: Poland
Device: Various
Yes, OK for me.
BeckyEbook is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PageEdit 2.1.0 - Insert Special Character not working BetterRed Sigil 0 05-17-2024 10:01 PM
Add title="" to h* based on existing TOC -- suggestion for new feature (or plugin?) Mister L Sigil 82 09-11-2020 09:09 AM
"insert special character" in editor rjwse@aol.com Editor 5 08-27-2019 08:31 PM
Insert special character: some niggles Phssthpok Editor 2 11-19-2016 12:55 PM
Feature Request: configurable space setting for "Insert blank line" in "Look & Feel" therealjoeblow Calibre 15 07-25-2011 03:14 PM


All times are GMT -4. The time now is 05:55 AM.


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