开云体育

Re: How is the default layer assigned to resource folder icons used with the panel editors? #controlpaneleditor #paneleditor


 

Bob,

There is a comment that I did not copy:

// infer a background icon from its size

This occurs when "dropping" an icon on the CPE panel.


Dave Sand

----- Original message -----
From: "Bob Jacobsen via groups.io" <rgj1927@...>
To: [email protected]
Subject: Re: [jmriusers] How is the default layer assigned to resource folder icons used with the panel editors?
Date: Saturday, March 22, 2025 9:38 AM

I think that code dates back to when there wasn’t a way to change the level of something on a panel. It was probably meant to make sure that large, background images _stayed_ in the background.

Maybe that’s no longer important?

Bob

On Mar 22, 2025, at 10:33?AM, Dave Sand via groups.io <ds@...> wrote:

Jim,

I suspect this answers the question.

if (icon.getIconHeight() > 500 || icon.getIconWidth() > 600) {
ni.setDisplayLevel(BKG);
BKG is defined as level 1.


Bob Jacobsen
rgj1927@...

Join [email protected] to automatically receive all group messages.