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

Should Class present their ToWritableProperties fo ToStyleSheetTheme #215

Open
Nyan11 opened this issue Oct 18, 2024 · 4 comments
Open

Should Class present their ToWritableProperties fo ToStyleSheetTheme #215

Nyan11 opened this issue Oct 18, 2024 · 4 comments
Labels
question Further information is requested

Comments

@Nyan11
Copy link
Collaborator

Nyan11 commented Oct 18, 2024

Hello,

A Style Sheet is composed of a selector(type, stamps, and combinaison between them), a set of properties (backgroud, border, animation, ...) and values for the properties.

Currently the properties are defined in the method: ToStyleSheet class >> #defaultWritablePropertyList.
But it would make more sens if the Toplo Widget contains their own stylable properties.
This properties could be the standard API of the Widget.

For example, we have the property (ToFeatureProperty new name: #innerImage)., this property only makes sens on a Widget with a #innerImage method.
Why do we need the #defaultWritablePropertyList ?

@Nyan11 Nyan11 added the question Further information is requested label Oct 18, 2024
@Nyan11
Copy link
Collaborator Author

Nyan11 commented Oct 18, 2024

Why do we need at the same time ToSkinEventAction and ToPropertyWriter to modify the properties of an object when we could only use ToSkinEventAction that are way simplier than ToPropertyWriter ?

@Nyan11
Copy link
Collaborator Author

Nyan11 commented Oct 18, 2024

Answer: If two styleRules want to change the same property, ToStyleSheet will only apply the last installed one. Therefor we need a system to identify the properties, and it is difficult to identify the property if it is use directly in a block.

@Nyan11 Nyan11 closed this as completed Oct 18, 2024
@plantec plantec reopened this Oct 19, 2024
@plantec
Copy link
Collaborator

plantec commented Oct 19, 2024

Interesting questions! the need for ToStyleSheet class >> #defaultWritablePropertyList is not clearly answered.
@Nyan11 it would be cool to add your answer in the toplo book

@Nyan11
Copy link
Collaborator Author

Nyan11 commented Oct 22, 2024

It is already present in: https://github.com/SquareBracketAssociates/Booklet-Graphics/blob/main/Chapters/toplo/stylesheet.md

By default, only the last writter per editable property and look event is installed for a given graphic element. You can force a rule to be applied using the supplements variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants