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

Sending #addStyle: to an image presenter reduces the display to the presenter's border #1650

Open
koendehondt opened this issue Nov 13, 2024 · 0 comments

Comments

@koendehondt
Copy link
Contributor

koendehondt commented Nov 13, 2024

Related to #1649.

Issue 1

Try this in a Playground:

application := SpApplication new
	addStyleSheetFromString: '.application [
		.yellowBorder [
			Draw { #backgroundColor: #green},
			Container { #borderColor: #yellow, #borderWidth: 3 } ],
		.redBorder [
			Container { #borderColor: #red} ]
	]';
	yourself.
presenter := SpPresenter newApplication: application.
image := presenter newImage
	image: (self iconNamed: #grayCircle);
	addStyle: 'yellowBorder';
	yourself.
layout := SpBoxLayout newTopToBottom
	vAlignCenter;
	hAlignCenter;
	add: image;
	yourself.
presenter layout: layout.
presenter open

The snippet opens this window:

Screenshot 2024-11-13 at 12 54 11

In the Playground, evaulate:

image addStyle: 'redBorder'

That yields this result:

Screenshot 2024-11-13 at 12 55 22

As you can see, the image with the 3-pixel border is reduced to a square of 6 by 6 pixels. The square is the border. The image of the image presenter is not displayed anymore.

Issue 2

Step 1: Start from this window:

Screenshot 2024-11-13 at 12 55 22

Step 2: Make the window inactive by bringing another window to the front.

Step 3: Make the window active again.

When the window becomes active, the border colour changes from red to B5B5B5. This could be related to the border colour issue reported in #1649.

Screenshot 2024-11-13 at 13 14 53
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

1 participant