-
Notifications
You must be signed in to change notification settings - Fork 2
Add a margin between notifications #2
Copy link
Copy link
Open
Labels
Status: Needs DiscussionRequires help discussing a reported issue or provided PRRequires help discussing a reported issue or provided PRType: ImprovementRequest for or addition/enhancement of a featureRequest for or addition/enhancement of a feature
Metadata
Metadata
Assignees
Labels
Status: Needs DiscussionRequires help discussing a reported issue or provided PRRequires help discussing a reported issue or provided PRType: ImprovementRequest for or addition/enhancement of a featureRequest for or addition/enhancement of a feature
Type
Fields
Give feedbackNo fields configured for issues without a type.
The notifications are currently displayed in a TeraNUI/UIList with a custom list item renderer NotificationRenderer. A message is rendered directly under the previous one without and margin between them.
The underlying issue here is probably with TeraNUI rather than with the renderer or the way we use the UIList. The item renderer only controls how the content of the list item is displayed, but not how the background is rendered. The item cell renderer gets the item region with margins subtracted, while the background is drawn for the full area...
https://github.com/MovingBlocks/TeraNUI/blob/release/v1.x/nui/src/main/java/org/terasology/nui/widgets/UIList.java#L99-L100
One way to solve this within this module would be to use a custom skin which does not render a background on
UIList. The custom item renderer could then render a background on it's own just for the reduced area. This is closely related to #3 .