# CutBox.app

## Coverage Report

#### Created: 2024-03-12 03:40

    .../Source/App/SearchAndPreview/ClipItems/ItemTableRowContainerView.swift

    Line

    Count

    Source (jump to first uncovered line)

    1

    //

    2

    //  ItemTableRowContainerView.swift

    3

    //  CutBox

    4

    //

    5

    //  Created by Jason Milkins on 17/5/18.

    6

    //  Copyright © 2018-2023 ocodo. All rights reserved.

    7

    //

    8

    9

    import Cocoa

    10

    11

    class ItemTableRowContainerView: NSTableRowView {

    12

    13

        var textView: ItemTableRowTextView?

    14

        var imageView: ItemTableRowImageView?

    15

    16

        override var selectionHighlightStyle: NSTableView.SelectionHighlightStyle {

    17

    1

            get {

    18

    1

                return .regular

    19

    1

            }

    20

    72

            set {

    21

    72

                _ = newValue // unused new value

    22

    72

            }

    23

        }

    24

    25

    1

        override func drawSelection(in dirtyRect: NSRect) {

    26

    1

            let theme = CutBoxPreferencesService.shared.currentTheme

    27

    1

            if self.selectionHighlightStyle != .none {

    28

    1

                let selectionRect = self.bounds

    29

    1

    30

    1

                theme

    31

    1

                    .clip

    32

    1

                    .highlightColor

    33

    1

                    .setFill()

    34

    1

    35

    1

                if let textView = self.textView {

    36

    0

                    textView.color = theme.clip.highlightTextColor

    37

    1

                }

    38

    1

    39

    1

                if let imageView = self.imageView {

    40

    0

                    imageView.color = theme.clip.highlightTextColor

    41

    1

                }

    42

    1

    43

    1

                let selectionPath = NSBezierPath(rect: selectionRect)

    44

    1

                selectionPath.fill()

    45

    1

            }

    46

    1

        }

    47

    }