Skip to content

SUGSuggestionView highlighting causes wrong background #2

@xhruso00

Description

@xhruso00

Hello cocoa developer.

First of all, thank you. It's very nice to see this sample code updated.

The sample has been updated with SUGSuggestionView instead of or HighlightingView. One can make his life easier if he subclasses NSTableCellView which propagates backgroundStyle down the whole view hierarchy.

var highlighted: Bool = false {
    didSet {
        guard oldValue != highlighted else { return }
        backgroundStyle = highlighted ? .emphasized : .normal
        needsDisplay = true
    }

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions