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

The IMAGE STYLE doesn't get its face color. #5498

Open
luce80 opened this issue Apr 3, 2024 · 9 comments
Open

The IMAGE STYLE doesn't get its face color. #5498

luce80 opened this issue Apr 3, 2024 · 9 comments
Assignees
Labels
status.reviewed Ticket has been reviewed and accepted for further processing.

Comments

@luce80
Copy link

luce80 commented Apr 3, 2024

Describe the bug
The image style doesn't get its face color.

To reproduce
If I do view [image yellow] I get a WHITE image,.

Expected behavior

system/view/VID/styles/image: [
	default-actor: on-down
	template: [type: 'base size: 100x100]
	init: [unless image [image: make image! reduce [size color]]]
]

view [image yellow]

Platform version

-----------RED & PLATFORM VERSION----------- 
RED: [ branch: "master" tag: #v0.6.5 ahead: 32 date: 16-Mar-2024/20:36:50 commit: #181d7faeab0381d7a86575847918a4ab05e68503 ]
PLATFORM: [ name: "Windows 11" OS: 'Windows arch: 'x86-64 version: 10.0.0 build: 22631 ]
--------------------------------------------
@qtxie
Copy link
Contributor

qtxie commented Apr 3, 2024

The rendering order of the facets is as follows:

color -> image -> text

The white image covers the background color in this issue, that why you cannot see the color.

@qtxie qtxie self-assigned this Apr 3, 2024
@greggirwin
Copy link
Contributor

view [img: image yellow with [image: #(none)] button [img/image: none]]

If you wanted no image to begin with, should with work here? Clearing the image does correctly reveal the color.

@dockimbel
Copy link
Member

Yellow image here using the latest commit from master:

image

@dockimbel dockimbel added the status.dismissed Changes asked are rejected (should be elaborated in comments). label Apr 4, 2024
@qtxie qtxie closed this as completed Apr 5, 2024
@greggirwin
Copy link
Contributor

greggirwin commented Apr 5, 2024

Hmmm. I just pulled and rebuilt, and I still get a white image. Or are you saying users need to patch the style to get this behavior, as it doesn't do that by default?

@dockimbel
Copy link
Member

Are you sure? Using the latest View build, I get a yellow result.

@greggirwin
Copy link
Contributor

greggirwin commented Apr 5, 2024

Just DL'd the static build and still get the white result by default. If I patch the style, as you have above, it works. I just didn't know if the new behavior should be by default.

>> about
Red 0.6.5 for Windows built 5-Apr-2024/8:22:23-06:00  commit #9516a4b
>> system/view/vid/styles/image
== [
    default-actor: on-down 
    template: [type: 'base size: 100x100] 
    init: [unless image [image: make image! size]]
]

is the standard image style in the static build as well.

@dockimbel
Copy link
Member

It seems I am the one who got it wrong. I kept using the code provided under "Expected behavior" as code for reproducing the issue...

@dockimbel dockimbel reopened this Apr 5, 2024
@dockimbel
Copy link
Member

I think we can improve VID so that the image gets colored using the provided color.

@dockimbel dockimbel added status.reviewed Ticket has been reviewed and accepted for further processing. and removed status.dismissed Changes asked are rejected (should be elaborated in comments). labels Apr 5, 2024
@luce80
Copy link
Author

luce80 commented Apr 6, 2024

This is better then my previous suggestion:

	system/view/VID/styles/image: [
		default-actor: on-down
		template: [type: 'base size: 100x100]
		init: [unless image [image: make image! reduce [size any [color white]]]]
	]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status.reviewed Ticket has been reviewed and accepted for further processing.
Projects
None yet
Development

No branches or pull requests

4 participants