![]() |
#1 |
Enthusiast
![]() Posts: 33
Karma: 10
Join Date: Sep 2017
Location: Royston, Georgia
Device: Moon Reader & Prestigio on Android
|
Multiple icons in a column when in Book List view
Displaying multiple icons in one column seems elusive to me...
On the topic of using icons in columns (book list view), how many icons can be placed in one column and how many on the same row? So far, I haven't been able to create more than three rules for three icons in my 'Formats' column, and I had to double up a couple of icons to simulate two icons at once(See Screenshot). Is two icons the limit on the same row, or am I doing something wrong? I created icons for the four different eBook formats I use in my library, one each for epub, original_epub, mobi and pdf. If anyone's an expert at creating rules for 'Column icons', I sure would like to see an example of how to make 'Four' rules for one column, and have all four display on the same row. Here is what I have so far: RULE ONE: Set the icon with no text of 'Format' to epub_original.png if the following conditions are met: •If the Format column contains value: ORIGINAL_EPUB RULE TWO: Set the icon with no text of 'Format' to epub_pdficon.png if the following conditions are met: •If the Format column contains value: PDF RULE THREE Set the icon with no text of 'Format' to epubicon.png if the following conditions are met: •If the Format column contains value: EPUB RULE FOUR: ***THIS ONE DOESN'T DISPLAY ICON*** Set the icon with no text of 'Format' to epub_mobiicon.png if the following conditions are met: •If the Format column contains value: MOBI Thanks, Frizzell "Why a four year old child could understand this. Run out and get me a four year old child, I can't make head or tail out of it" |
![]() |
![]() |
![]() |
#2 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,629
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
AFAIK there's no limit on the number of icons that can be placed in a 'composed icon', I have one with six. I create integer columns on which to hang composed icons, so I use the 'composed icon with no text' option.
I think of a composed icon as a fixed array, with each slot assigned to condition. e.g. first slot gets a transparent_square if there's no epub else it gets an epub icon; second slot gets transparent_square if there's no pdf else it gets an pdf icon etc. If you want a transparent square knock the .txt off the end of the attachment. BR |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Enthusiast
![]() Posts: 33
Karma: 10
Join Date: Sep 2017
Location: Royston, Georgia
Device: Moon Reader & Prestigio on Android
|
Two icons limit (or composed icons) per column
Quote:
Well, that certainly seems limiting as to the number of rules per column. Can you post a screenshot of your 'Book List' view so I can see exactly what you've done? Thanks Red, Frizzell "Why a four year old child could understand this. Run out and get me a four year old child, I can't make head or tail out of it" Last edited by Frizzell; 03-26-2020 at 07:57 PM. Reason: add title |
|
![]() |
![]() |
![]() |
#4 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,629
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Last edited by BetterRed; 03-26-2020 at 09:43 PM. |
![]() |
![]() |
![]() |
#5 |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 549
Karma: 1717097
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
Sorry for necroing this old thread.
If I have two conditions with true/false to show two icons simultaneously I will need 4 rules with composed icon sets? 00 xx 0x x0 |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,336
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
I think it would be easier to use a single advanced rule that returns a compound icon. Something like this, but with the column names changed and the logic you want. Code:
program: icon1 = if $$#myint != 'none' then 'cry-icon.png' else 'dictionary.png' fi; icon2 = if $$#mybool != 'true' then 'arrow-down.png' else 'arrow-up.png' fi; icon1 & ':' & icon2 Last edited by chaley; 07-23-2022 at 07:27 AM. Reason: Added image |
|
![]() |
![]() |
![]() |
#7 | |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 549
Karma: 1717097
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
Quote:
Code:
program: icon1 = if $$languages == 'englisch' then 'uk.png' else '' fi; icon2 = if $$#read == 'true' then 'ok.png' else '' fi; icon3 = if $$#redl == 'true' then 'auto-reload.png' else '' fi; icon4 = if $$#toread == 'true' then 'reference.png' else '' fi; icon1 & ':' & icon2 & ':' & icon3 & ':' & icon4 ![]() |
|
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,336
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
program: def add_icon(icon, val): if icon == '' then icon = val else icon = icon & ':' & val fi; return icon fed; icon = ''; if $languages == 'eng' then icon = add_icon(icon, 'uk.png') fi; icon = add_icon( icon, switch( $$#read, 'true', 'ok.png', 'false', 'false_icon.png', 'unset_icon.png')); if $$#redl == 'true' then add_icon(icon, 'auto-reload.png') fi; if $$#toread == 'true' then add_icon(icon, 'reference.png') fi; return icon
|
|
![]() |
![]() |
![]() |
#9 |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 549
Karma: 1717097
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
note to myself: buy chaley some beer
three-letter value ![]() Code:
program: def add_icon(icon, val): if icon == '' then icon = val else icon = icon & ':' & val fi; return icon fed; icon = ''; if $languages == 'eng' then icon = add_icon(icon, 'uk.png') fi; icon = add_icon( icon, switch( $$#toread, 'true', 'toread.png', 'false', 'false.png', '')); if $$#redl == 'true' then icon = add_icon(icon, 'redl.png') fi; if $$#read == 'true' then icon = add_icon(icon, 'ok.png') fi; return icon ![]() ![]() |
![]() |
![]() |
![]() |
#10 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,336
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
![]() |
![]() |
![]() |
#11 |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 549
Karma: 1717097
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
I have an #annots column 'Long text, like comments, not in tag browser' for annotations and I want - like above - an icon if there are annoations.
Code:
program: def add_icon(icon, val): if icon == '' then icon = val else icon = icon & ':' & val fi; return icon fed; icon = ''; if $languages == 'eng' then icon = add_icon(icon, 'uk.png') fi; icon = add_icon( icon, switch( $$#toread, 'true', 'toread.png', 'false', 'false.png', '')); if $$#formats == 'paper' then icon = add_icon(icon, 'paper.png') fi; if $$#read == 'true' then icon = add_icon(icon, 'ok.png') fi; if $$#readinglist != '' then icon = add_icon(icon, 'reading_list.png') fi; if $$#annots != '' then icon = add_icon(icon, 'annotations.png') fi; return icon I also tried Code:
if $$#annots == 'true' then icon = add_icon(icon, 'annotations.png') fi; Some help much appreciated |
![]() |
![]() |
![]() |
#12 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,682
Karma: 74166147
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
The second template is checking that the column has a value of 'true.'
Here's what I would try: Code:
program: if $$#annots then 'annotations.png' fi Last edited by ownedbycats; 02-05-2023 at 10:46 AM. Reason: slight error in template |
![]() |
![]() |
![]() |
#13 |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 549
Karma: 1717097
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
thx, but doesn't work
![]() |
![]() |
![]() |
![]() |
#14 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,682
Karma: 74166147
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Dang, it works for me (though I used a different long-text column).
![]() |
![]() |
![]() |
![]() |
#15 |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 549
Karma: 1717097
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
I placed your code in my list, not as a single one (don’t know how to say in a better way)
|
![]() |
![]() |
![]() |
Tags |
column icons, customize, icons, preferences |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
added custom column icons render larger than original icons | masp | Library Management | 12 | 01-22-2019 04:07 PM |
customized column icons now Micro-icons | Gary_M_Mugford | Calibre | 10 | 09-05-2016 04:05 AM |
View list of custom column settings? | BookJunkieLI | Calibre | 8 | 07-25-2014 09:36 AM |
Multiple icons in a column? | RenoA | Library Management | 2 | 09-09-2013 03:20 AM |
REMOVE multiple files in Book view | wizard2b | Sigil | 1 | 05-09-2011 09:14 PM |