![]() |
#1 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 500
Karma: 3498633
Join Date: May 2011
Location: Surrey, UK
Device: Kobo Aura One, Sony PRS 600/650
|
Custom toolbar
Since working on the updated images for the Sigil user manual I have been toying with the idea of creating my own custom toolbar.
I have located the current icons at https://github.com/Sigil-Ebook/Sigil...rce_Files/main and have downloaded all the svg files. I am fairly good at using CorelDraw and Photoshop so I can create any new icons (or modify existing) to suit, but it's the compiling bit that is the daunting bit - "You can use the command line to run rcc: rcc -binary -o PATH_TO_OUTPUT_FILE.RCC PATH_TO_QRC_FILE" ![]() I have located and dowloaded qt-unified for Windows (but not yet installed) so I was wondering if one of the experts could do a simple tutorial as to how one goes about compiling all the svg files into the required .rcc file. Thanks, Ashley |
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 839
Karma: 2657572
Join Date: Jan 2017
Location: Poland
Device: Various
|
It's simple. It's best to do everything in a separate, external folder.
In "main" folder are *.svg files and important file: main.qrc You can rename the main.qrc file with your own (ashjuk.qrc) to avoid confusion. Important: It's best not to change ANYTHING inside the qrc file, because you don't need to. Change your graphics while keeping the original svg file names. After that, it is really enough to run the command rcc: Code:
rcc.exe --binary ashjuk.qrc -o custom_icon_theme.rcc You can find it easily by going to "Preferences" and pressing the button in the lower left corner of this window. The last thing is setting "Custom icons" in "Preferences". Restart Sigil and enjoy your own icons. If necessary, repeat the last steps (rcc, copying the result file to the settings folder, restart Sigil). |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
|
BeckyEbook beat me to it and her reply is better!
You are talking about a custom IconTheme not a custom toolbar (I think). If you look at our IconTheme repo you will see each theme has its own folder (ie. fluent, material, main, etc. Inside each folder is a set of svg files whose names are important (and can not be changed as Sigil looks for those file names) and a file that ends in .qrc (ie. fluent.qrc, material.qrc,etc). That qrc file gives the filename and path to every file in the icon theme. If you have Qt installed it will come with a command line tool called "rcc.exe". So to create your iwn icons, start by copying one of those folders, give the folder and the .qrc file a new name. Edit the contents of each svg file to your heart is content but do not add height and width to them as they should be freely rescalable svg. Once you are happy with each svg file run the rcc.exe executable as shown in the IconThemes read me and point it at your new folder's .qrc file. It will compile the resources into a binary file which you can copy to your Sigil Preferences folder and rename it as described in that ReadMe. Then once properly named and placed, open Sigil and use its preferences menu to tell it to use a custom icon theme and then close out of Sigil and relaunch. They should appear in place of the normal Sigil icons. |
![]() |
![]() |
![]() |
#4 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 500
Karma: 3498633
Join Date: May 2011
Location: Surrey, UK
Device: Kobo Aura One, Sony PRS 600/650
|
Thank you both, I think I know what to do now.
You are right Kevin, I do mean a custom set of icons. I was happy with the vector image part of the operation, but it was the "rcc.exe" bit I was not certain about. I assume that if I install the QT-Unified package I have downloaded it will have that executable? I grew-up in the days of DOS so command line working holds no fears... ![]() |
![]() |
![]() |
![]() |
#5 |
Hedge Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
You SHOULD be able to get the rcc executable using the unified installer, but I don't know the particulars of how. Any version of Qt's rcc.exe up to and including 5.12.9 should work, but you won't be able to use an external compiled binary resource built with a version of rcc newer than the version of Qt that is currently shipping with Sigil. Last edited by DiapDealer; 02-20-2021 at 09:47 PM. |
|
![]() |
![]() |
![]() |
#7 | |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 500
Karma: 3498633
Join Date: May 2011
Location: Surrey, UK
Device: Kobo Aura One, Sony PRS 600/650
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sticky second row of main toolbar or move second toolbar to top? | Zealousky | Calibre | 6 | 04-20-2021 11:58 PM |
Custom column long text toolbar | MerlinMama | Calibre | 2 | 03-01-2017 01:14 PM |
Custom adding to toolbar? | imans314 | Calibre | 9 | 04-28-2014 08:29 AM |
Sigil forgets custom toolbar layout (0.6.2) | JeffPalley | Sigil | 0 | 12-18-2012 02:57 PM |
iLiad Adding custom action buttons to toolbar | thijso | iRex Developer's Corner | 1 | 12-31-2009 07:12 AM |