<commit_before>//
//  SidebarLayout.swift
//  NetNewsWire
//
//  Created by <NAME> on 11/24/17.
//  Copyright © 2017 Ranchero Software. All rights reserved.
//

import AppKit
import RSCore

// image - title - unreadCount

struct SidebarCellLayout {

	let faviconRect: CGRect
	let titleRect: CGRect
	let unreadCountRect: CGRect
	
	init(appearance: SidebarCellAppearance, cellSize: NSSize, shouldShowImage: Bool, textField: NSTextField, unreadCountView: UnreadCountView) {

		let bounds = NSRect(x: 0.0, y: 0.0, width: floor(cellSize.width), height: floor(cellSize.height))

		var rFavicon = NSRect.zero
		if shouldShowImage {
			rFavicon = NSRect(x: 0.0, y: 0.0, width: appearance.imageSize.width, height: appearance.imageSize.height)
			rFavicon = RSRectCenteredVerticallyInRect(rFavicon, bounds)
		}
		self.faviconRect = rFavicon

//		textField.sizeToFit()
//		let textFieldSize = textField.fittingSize//frame.size
		let textFieldSize = SingleLineTextFieldSizer.size(for: textField.stringValue, font: textField.font!)

		var rTextField = NSRect(x: 0.0, y: 0.0, width: textFieldSize.width, height: textFieldSize.height)
		if shouldShowImage {<commit_msg>Remove some commented-out code.<commit_after>//
//  SidebarLayout.swift
//  NetNewsWire
//
//  Created by <NAME> on 11/24/17.
//  Copyright © 2017 Ranchero Software. All rights reserved.
//

import AppKit
import RSCore

// image - title - unreadCount

struct SidebarCellLayout {

	let faviconRect: CGRect
	let titleRect: CGRect
	let unreadCountRect: CGRect
	
	init(appearance: SidebarCellAppearance, cellSize: NSSize, shouldShowImage: Bool, textField: NSTextField, unreadCountView: UnreadCountView) {

		let bounds = NSRect(x: 0.0, y: 0.0, width: floor(cellSize.width), height: floor(cellSize.height))

		var rFavicon = NSRect.zero
		if shouldShowImage {
			rFavicon = NSRect(x: 0.0, y: 0.0, width: appearance.imageSize.width, height: appearance.imageSize.height)
			rFavicon = RSRectCenteredVerticallyInRect(rFavicon, bounds)
		}
		self.faviconRect = rFavicon

		let textFieldSize = SingleLineTextFieldSizer.size(for: textField.stringValue, font: textField.font!)

		var rTextField = NSRect(x: 0.0, y: 0.0, width: textFieldSize.width, height: textFieldSize.height)
		if shouldShowImage {
{'fraction_non_alphanumeric': 0.10883140053523639, 'fraction_numerical': 0.019625334522747548, 'mean_word_length': 4.444174757281553, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '414783', 'n_tokens_mistral': 849, 'n_tokens_neox': 769, 'n_words': 189}