Upgrade version makes buttons dissapear (possible bug?)

Hello, I have installed a new gateway with latest version 8.1.13, and imported a project from version 8.1.7. All my buttons dissapeared (not really, they are there, but invisible).

I think that the visual effect when mousing over the object has been enabled in these new versions when the colors from buttons are changed from default, as described in this topic from 2020. In fact i had a test button with all default properties and that one was restored perfectly.

Going to my invisible buttons in the new gateway, and clearing the "Fill Area" checkbox under appearance, and enabling it back again made my buttons go visible again with the new effect.

As well noticed that in this new version, with the buttons, even if i have the option "No Border" selected, a border always appear, seems that cannot get rid of it.

Is there any "easy" way to disable this new effect?

Thanks.

Can you show what you have, and what you’re expecting to have?

Do you have a .gwbk or project export from the system before the upgrade?

We tweaked the look and feel (and removed a few Vision properties) in that timeframe, so it’s possible there’s something wrong in the ‘upgrade’ conversion logic.

Just the project. Trying to keep my gateway “clean” and start from scratch as the old one had a lot of old stuff.

As Irose suggested, will attach some images to explain. Just did the whole thing again:

First, in the thumbnails of the welcome screen indeed i can see the buttons (showing just a portion because of privacy):

imagen

But then i open the screen and… the buttons are invisible (if i click in the area the button should be, i can select it without any problem:

imagen

The properties of the button:

After clearing the “Fill Area” checkbox, and enabling it back again, my button appears:

imagen

I have to go trough each screen, do this procedure, save it and then is good (takes a lot of time going trough all).

As i said, i had one button with the default background in a test screen, and that one seems to be fine after importing:

imagen

Finally, before i was able to remove the border if i select the option “no border” in the properties. This is a default button, just with the background color changed and the option “no border” selected in the new version (border is still there):

imagen

This is the same thing in 8.1.7, no border at all when that option is selected.

imagen

Finally, i would know if there is any way to disable that “highlight” visual effect that has been added in the new versions when the mouse moves over the buttons, even if the backgroud color has been changed (the effect discussed in the topic linked in my first post).

Thanks all for your replies.

It would be interesting to compare the window XML before and after fixing the problem manually.

good idea, will test that first time tomorrow when i am back in the office.

The only difference i can see between them is that in the new version this line is not there:

<c-c m="setBorderPainted" s="1;b"><false/></c-c>

Everything else for the button object seems to be the same.

Sounds like an experiment. Take a fresh, non-working window, extract the XML, delete those, and set the window XML. See if it now works.

1 Like

Yes, absolutely forgot to say that in my last reply. I have tested that, and after deleting that line and pasting again the code, voila, all the buttons appear. Still takes some time to go trough each but is quicker than doing the fill area “trick” to make the buttons appear back again.

@PGriffith any idea about why in the new versions is impossible to delete the border around the buttons, even when the option “no border” is selected?

Thanks.

Okay, let’s make sure I have things correct.
By my count, there’s three problems you’re describing in this thread.

  1. Upon upgrade, some of your buttons disappear outright.
    I think I understand what’s gone wrong. There’s an issue in the LaF with the borderPainted property (causing the button to become invisible) so we removed the property entirely. However, older windows could still have a change from the default value serialized, so you end up with your issue - invisible buttons. We’ll see if we can fix the core problem there.

  2. Upon upgrade, your buttons now are highlighting on hover, and this is not what you want?
    This is somewhat backwards from pretty much everyone’s desired behavior in the previous version, but c’est la vie. You could try changing the background blend mode via UIManager key in a client startup script, e.g. set Synthetica.background.blendMode to a different blend mode - I’d start with ALPHA:

  3. You want to still be able to disable the border around the button entirely for a flat look.
    The good news is, setting the blend mode should do that as well, e.g. this is a button I set to ALPHA in 8.1.15:
    java_TgR6jD
    You can do this to individual components, via putClientProperty, but you’ll have to do it every time you open the window. Setting it on the UIManager in a startup script will work for each client, just be aware that the styling will be “wrong” in the designer still.

1 Like

Yes, those are exactly the problems I am asking about you are right.

OK, for the invisible buttons i will be doing the “trick” of the .xml or the “fill area” to make them visible again for the moment.

But with the appaerance of the buttons, would like to get rid of the border,that’s all. I am trying to set the blendmode as you suggest but I cannot do it in a client startup script. Found a thread that talked about this but still i am unable to do so.

from com.inductiveautomation.ignition.client import IgnitionLookAndFeel
from de.javasoft.plaf.synthetica.util.Synthetica2DUtils import BlendMode 

IgnitionLookAndFeel.setBlendMode(button, BlendMode.ALPHA)

Thanks.

You should try a UIManager key, as I mentioned above.

from javax.swing import UIManager
UIManager.put("Synthetica.background.blendMode", "ALPHA")

Try just that, in a client startup script.

1 Like

Sorry for the late reply.

That worked like a charm. Will use that workaround for the moment.

Many thanks.

For anyone finding/being linked to this thread in the future; if you want a ‘middle ground’ solution between a global UI manager key and setting every button up with scripting, you could use a technique like this to recursively modify every button in the window (e.g. in visionWindowOpened):

from javax.swing import AbstractButton
from com.inductiveautomation.ignition.client.IgnitionLookAndFeel import setBlendMode
from de.javasoft.plaf.synthetica.util.Synthetica2DUtils import BlendMode

def getComponents(window):
	def walkComponents(component):
		for component in component.components:
			yield component
			walkComponents(component)
	
	return walkComponents(window.rootContainer)
	
isButton = lambda component: isinstance(component, AbstractButton)

def updateBlendMode(component, blendMode):
	setBlendMode(component, blendMode)
	component.repaint()

In use:

win = system.gui.getWindow("buttons")
for button in filter(isButton, getComponents(win)):
	updateBlendMode(button, BlendMode.ALPHA)
2 Likes

I have noticed that by setting the blendMode to ALPHA, it fixes the issues with the buttons but it causes an issue with the Radio Buttons which disappear. Is there a quick fix to this issue?
We have also noticed that buttons have a hover over feature that gets enabled and displays a lighter color when hovering over. This was not the behavior on prior versions and requires the team to uncheck the rollover checkbox on all buttons. Is there a quicker/better work around?

1 Like

Was this a case of some buttons disappearing, or all?

I am going through 7.9.12 to 8.1.25 for a customer now.

In 7.9.12 on one screen, I have 12 buttons, in 8.1.25 only 7 are showing.

I tried adding the code for client startup that solved this topic but the issue remains.

I have logged a support ticket, but just curious if this is all buttons or only some.

1 Like

I was not able to get what @PGriffith wrote to work for me. I am in this process too, from 7.9.9 to 8.1.25.

from javax.swing import UIManager
UIManager.put("Synthetica.background.blendMode", "ALPHA")

Didn't do anything noticeable for me but I also did not get missing buttons, just missing borders on my buttons.

Warning though: this script did do to me what @sahibdeep.sodhi said, radio buttons disappeared and also boolean columns in a normal table - the checkboxes disappear.

So far I've just resorted to writing a script in script console that grabs the window goes through all the buttons and applies a border, saving it and going to the next window and running the script again.

One other thing I noticed though is that some backgrounds just got lighter? I have a footer window and it went from a RGB value of (236,248,232) to (250,250,251) and I surely did not change it. I don't know why this happened but it did during the upgrade - just something else to watch out for.

1 Like

The default background changed. If you hadn't set the background to something else in v7.9, there wouldn't be a background setting for that component. So the v8.1 component ends up slightly different.

This was an undesired feature that I experienced while upgrading through the different 8.1 version.
At one point, it was a transparency issue so instead of color(250,250,251), I had to update color(250,250,251,254) which fixed that current issue until I upgraded to a later version. Maybe work a try.

In my case only the buttons that had the default background changed dissapeared. Others were fine.

This is how i made those visible again (had to go trough each screen xml, deleting that line and pasting again the code):

other option you have is this:
clearing the “Fill Area” checkbox under appearance, and enabling it back again made my buttons go visible again with the new effect. You can still select the buttons from the tree in vision.

The code for the client startup was to get rid of the new border that was added in the new version (in this topic 2 different things were discussed, just a bit messy sorry).

1 Like