<commit_before>//
//  StoryRowView.swift
//  Diurna
//
//  Created by <NAME> on 28/01/2017.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import Cocoa

class StoryRowView: NSTableRowView {

    // MARK: Properties

    override var isOpaque: Bool {
        return true
    }

    override var isNextRowSelected: Bool {
        didSet {
            setNeedsDisplay(bounds)
        }
    }

    // MARK: Methods

    override func drawSelection(in dirtyRect: NSRect) {
        guard selectionHighlightStyle != .none else { return }

        Themes.current.cellHighlightBackgroundColor.setFill()
        dirtyRect.fill()
    }

    override func drawSeparator(in _: NSRect) {
        let bottomRect = NSRect(x: 0, y: 0, width: bounds.maxX, height: 1.0),
            topRect = NSRect(x: 0, y: bounds.maxY - 1.0, width: bounds.maxX, height: 1.0)

        Themes.current.dividerColor.setFill()<commit_msg>Tweak stories cell view separators<commit_after>//
//  StoryRowView.swift
//  Diurna
//
//  Created by <NAME> on 28/01/2017.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import Cocoa

class StoryRowView: NSTableRowView {

    // MARK: Properties

    override var isOpaque: Bool {
        return true
    }

    override var isNextRowSelected: Bool {
        didSet {
            setNeedsDisplay(bounds)
        }
    }

    // MARK: Methods

    override func drawSelection(in dirtyRect: NSRect) {
        guard selectionHighlightStyle != .none else { return }

        Themes.current.cellHighlightBackgroundColor.setFill()
        dirtyRect.fill()
    }

    override func drawSeparator(in _: NSRect) {
        let margin: CGFloat = 10.0,
            height: CGFloat = 1.0,
            start: CGFloat = isSelected ? 0 : margin,
            width: CGFloat = isSelected ? bounds.maxX : bounds.maxX - (margin * 2),
            bottomRect = NSRect(
                x: start,
                y: 0,
                width: width,
                height: height
            ),
            topRect = NSRect(
                x: start,
                y: bounds.maxY - height,
                width: width,
                height: height
            ),
            color = isSelected ? Themes.current.cellHighlightForegroundColor.blended(withFraction: 0.75, of: .white) : Themes.current.dividerColor

        color?.setFill()
{'fraction_non_alphanumeric': 0.10120068610634649, 'fraction_numerical': 0.018867924528301886, 'mean_word_length': 1.8731527093596059, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6783649', 'n_tokens_mistral': 755, 'n_tokens_neox': 679, 'n_words': 176}