Custom Icon Size

Post Reply
User avatar
WyoDog
Advisor
Advisor
Posts: 67
Joined: Wed Aug 23, 2017 6:39 pm
Location: Powell, WY USA
Station model: Davis Pro2
Software: Weather Display
Contact:

Custom Icon Size

Post by WyoDog » Sun Nov 05, 2017 6:53 am

I have a menu on my main page Road Conditions

I created icons for the menu items WyDot and MtDot.

I want to display a larger image of these icons as these are almost too small to see.
I have tried changing the image size of the .png files. Regardless of the physical size the image, it still displays as this size image. I'm guessing that there is a defined size of menu icons but can't find it.

Any ideas?
Road icons.png
Road icons.png (27.6 KiB) Viewed 5306 times
Terry

Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Custom Icon Size

Post by Jachym » Sun Nov 05, 2017 9:35 am

Hi,
you could change it in menu.php, but the problem is that it will then not scale nicely. If the custom icons are larger, then you would have irregular gaps between menu items

User avatar
WyoDog
Advisor
Advisor
Posts: 67
Joined: Wed Aug 23, 2017 6:39 pm
Location: Powell, WY USA
Station model: Davis Pro2
Software: Weather Display
Contact:

Re: Custom Icon Size

Post by WyoDog » Sun Nov 05, 2017 4:40 pm

Got it,

Any ideas about how I can increase the size of just these two .png? Perhaps another file type?

Thank you, Jachym
Terry

Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Custom Icon Size

Post by Jachym » Sun Nov 05, 2017 4:57 pm

It is here:

$thisLinkIcon = '<img src="'.$thisLinkIcon.'" style="width:25px;max-height:25px;" class="menuItemIcon">';

in menu.php, but make sure you never update the menu, it would revert your changes. Also keep in mind that you will have irregular gaps between menu items if the icons are smaller than the image icons

User avatar
WyoDog
Advisor
Advisor
Posts: 67
Joined: Wed Aug 23, 2017 6:39 pm
Location: Powell, WY USA
Station model: Davis Pro2
Software: Weather Display
Contact:

Re: Custom Icon Size

Post by WyoDog » Sun Nov 05, 2017 8:16 pm

Thank you
Terry

Image

Post Reply