Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync problem modifying the GUI event when auto-sync? is false #169

Open
GiuseppeChillemi opened this issue Oct 6, 2024 · 2 comments
Open

Comments

@GiuseppeChillemi
Copy link

GiuseppeChillemi commented Oct 6, 2024

I want to create a GUI which enlarges laterally on the press of a button, as do some task bars and then hide. This is a test script and I am encountering a problems: visible trails and flickering, when resizing even with auto-sync?: false and manual syncing.
Click "enlarge" multiple time to test it, you will see the phantom of redrawing at each change

system/view/auto-sync?: off
enlargement: 100

view l: layout [
	p: panel 80x150 [
		Below
		Button "UltraEdit" 60x50 [
		]		
		pad 0x20
		button "Enlarge" [
			case [
				face/extra = none [
					l/offset/x: l/offset/x - enlargement
					l/size/x: l/size/x + enlargement
					p/offset/x: p/offset/x + enlargement 
					face/extra: 'enlarged
					show l
					show p
				]
				face/extra = 'enlarged [
					l/offset/x: l/offset/x + enlargement
					l/size/x: l/size/x - enlargement
					p/offset/x: p/offset/x - enlargement
					face/extra: none
					show l		
					show p
				]
				
			]
			
		]			
	]
]

I expected that all drawing are done after showing the panel but it seems it happens after that, redrawing the with the previous values and then with the new one. Hiiamboris thinks that internally offset and size are updated in two separate moments.

Discussion started here:

https://matrix.to/#/!ARPBrpwJJYziTJYuJj:gitter.im/$636aa6uwb0a4_GHPCvgomMqed1JydlRUQYtTe4qDQ20?via=gitter.im&via=matrix.org&via=tchncs.de

It would be nice to fix this beaviour to reach clean, no trails and flickering free updating

@GiuseppeChillemi GiuseppeChillemi changed the title Sync problem Sync problem modifying the GUI event when sync? is false Oct 6, 2024
@ldci
Copy link

ldci commented Oct 7, 2024

An error in your code: shop p must be replaced by show p

@GiuseppeChillemi
Copy link
Author

An error in your code: shop p must be replaced by show p

Fixed, thanks

@GiuseppeChillemi GiuseppeChillemi changed the title Sync problem modifying the GUI event when sync? is false Sync problem modifying the GUI event when auto-sync? is false Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants