PDA

View Full Version : Theme Extension question



iotech
September 18th, 2018, 06:15
I'm working on a theme. When adding sidebar icons, I see the images used in other themes are approx 100px x 100px. So, I made my icons 100x100... and they turn out TINY. I'm supposing that DPI has something to do with it, so I inspect my image - 1100dpi. A button from FGPro is 72DPI. Hmm, I says... so I change the DPI of my 100x100 image to 72dpi and try again... nope, still tiny.

Anyone have an idea of what I am missing here?

Thanks!

G

damned
September 18th, 2018, 09:26
You might have to share an image an the xml code...

Talyn
September 18th, 2018, 15:12
Check your setting in your image editor also.

DPI is only used for printing. Paper has inches.

Screens have pixels.

LordEntrails
September 18th, 2018, 19:06
I suspect the images are being sized based upon the windowclass you are placing them in. As damned said, you'll need to share your code.

Skillkoil
September 18th, 2018, 20:13
Yeah DPI doesn't effect screen viewing size it is the Pixels you have set. If you can share the code around one of your buttons we can probably "fix" it for you.

iotech
September 19th, 2018, 04:15
<root>
<!-- Logo - referenced by name "diehard" -->
<icon name="nsg" file="graphics/icons/nsg.png" />


<!-- Sidebar -->
<icon name="button_characters" file="graphics/sidebar/workman.png" />
<icon name="button_characters_down" file="graphics/sidebar/workman.png" />
</root>
(edited for brevity)

24669
24670

Note that all of the other sidebar icons *were* normal size until I added the included workman.png, now they have all resized.

Thank You to all who are helping! THIS is why our community is the best!

(And yes, I am hacking the Strahd theme :) )

damned
September 19th, 2018, 04:18
Please attach the actual icon file that you have in the extension.
graphics/sidebar/workman.png

iotech
September 19th, 2018, 05:51
@damned - I did, it's in the post above.

Edit: I see why there might be confusion. In the screenshot, the icon has a wooden shield behind the "workman". The version in the screenshot is an earlier iteration when I was trying to sort this out; I pasted the workman on top of another sidebar icon (the wood shield) to see if I liked the effect. In both cases, including with the workman.png I included above, I'm seeing the resized behavior.

Here is a new screenshot with the *exact* workman.png linked above:
24671

damned
September 19th, 2018, 06:06
workman.png should be a round circle with a man inside... i need that file...

LordEntrails
September 19th, 2018, 06:06
I think damned was saying to attach the actual png file, not a screen shot of it.

damned
September 19th, 2018, 06:09
Ok... I know what is going on.
My Curse of Strahd theme does not really use graphic icons like most other rulesets.
It is designed to use a short wide button with dynamically created text on top.

You will want to remove: data_library_com.lua
or adjust the following line: DesktopManager.setDockIconSizeAndSpacing(100, 24, 0, 6);

to something like: DesktopManager.setDockIconSizeAndSpacing(100, 90, 0, 6);
and play with some of the other settings.

iotech
September 19th, 2018, 06:23
I understand what damned is asking for. I made that icon, saved it to the unpacked extension, compressed the extension, got the results in the original screenshot. I then tried it without the shield in the background but did not save the one with the shield. Second screenshot was made with the workman.png (no shield) I originally linked above - same reduction in size. I dont have the one with the shield as I didnt save it outside the extension which has since been overwritten. Please disregard the first screenshot above, go with the second (in post #8) as that was made with the icon in post #6. i.e. the funky resizing happens with both versions of the icon.

iotech
September 19th, 2018, 06:24
Ok... I know what is going on.
My Curse of Strahd theme does not really use graphic icons like most other rulesets.
It is designed to use a short wide button with dynamically created text on top.

You will want to remove: data_library_com.lua
or adjust the following line: DesktopManager.setDockIconSizeAndSpacing(100, 24, 0, 6);

to something like: DesktopManager.setDockIconSizeAndSpacing(100, 90, 0, 6);
and play with some of the other settings.

Ah! You, Sir, are a gentleman and a scholar! I'll do that tomorrow evening and report back.
Thanks to all!

iotech
September 19th, 2018, 06:30
Ok, I should have gone to bed, but... I'm addicted.

Damned, here is the reslut of your suggestion:
24672
Bravo! Thank you! I can handle removing the text.

damned
September 19th, 2018, 07:48
For what you are doing I would remove data_library_com.lua
Its not intended for that style of sidebar.

iotech
September 19th, 2018, 15:04
Will do, but I'll remember that as it is quite handy. Thanks again!

iotech
September 21st, 2018, 21:48
New Question: So, I'm working on a theme with custom icons in the sidebar. Is there a way I can override icons from other extensions without having to modify those extensions? For example, I want to replace the icons in the DOE extensions with my own. I can open the DOE extension and replace the icon there, but when there is an update I have to do it again. It would be handy if I could override it in my theme. I messed with LoadOrder, but it didnt seem to have an effect. Possible?

Trenloe
September 21st, 2018, 22:09
Load order is the way to control the order that extensions load, and so overwrite earlier loaded extension code.

iotech
September 22nd, 2018, 02:32
Load order is the way to control the order that extensions load, and so overwrite earlier loaded extension code.

Thanks, Trenloe! I believe I found my problem - my LoadOrder tag was outside the Properties tag. D'oh!

iotech
September 22nd, 2018, 03:20
Here's where I'm going with this theme:
24694
I'm not sure how well I like it, but I'm mostly doing it to learn HOW.
Thanks again to all of you for your help!

Dax Doomslayer
September 23rd, 2018, 03:07
That looks pretty slick. Very spiffy iotech!

iotech
September 24th, 2018, 00:48
Thanks, Dax! I had fun making it (with a little help from the gang here). Well.. "making it" is a stretch - I picked apart Damned's excellent Curse of Strahd theme and modified it. He did all the hard work. As I mentioned upthread, I like this theme, but i dont LOVE this theme... so I did another one. The second one I did in one day. Since I stole icons from all over the net, I cant share it but here's a screenie:
24729

Bidmaron
September 24th, 2018, 03:00
That is really impressive. A shame you cannot share it.

Dax Doomslayer
September 24th, 2018, 03:12
Wow - that's very pretty!! That's a super job iotech. Congrats. It is too bad you can't share it - I really like that!

iotech
September 24th, 2018, 03:56
Agreed. I need to find a starving artist and commission an icon set similar to this, then I could make a theme and share it. I should poke around deviantart and Patreon and see. Sadly, I lack any artistic talent other than stealing icons off the web and making them into buttons.

shadzar
September 24th, 2018, 08:35
Since I stole icons from all over the net, I cant share it but here's a screenie:
24729

if only FG really looked this good. that is going to be some happy players that get to use that sidebar menu.

iotech
September 30th, 2018, 22:48
I have made a new theme with all Cc/Public Domain/GPL icons that I can and *AM* sharing with the community:

https://www.fantasygrounds.com/forums/showthread.php?45798-Theme-The-Coming-of-Night

Dax Doomslayer
September 30th, 2018, 23:24
Very cool iotech!! Thanks for this. I'm digging the look. :D