# CutBox.app

## Coverage Report

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

    .../Source/App/Preferences/PreferencesThemeSelectionView+ThemeSelector.swift

    Line

    Count

    Source (jump to first uncovered line)

    1

    //

    2

    //  PreferencesThemeSelectionView+ThemeSelector.swift

    3

    //  CutBox

    4

    //

    5

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

    6

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

    7

    //

    8

    9

    import Foundation

    10

    11

    extension PreferencesThemeSelectionView {

    12

    13

    49

        func setupThemeSelector() {

    14

    49

            self.themeSelectorTitleLabel.stringValue =

    15

    49

                "preferences_color_theme_title".l7n

    16

    49

    17

    49

            self.reloadThemesButton.title = "preferences_color_theme_reload_themes".l7n

    18

    49

    19

    49

            self.reloadThemesButton

    20

    49

                .rx

    21

    49

                .tap

    22

    49

                .bind { [self] in

    23

    0

                    CutBoxPreferencesService

    24

    0

                        .shared

    25

    0

                        .loadThemes()

    26

    0

    27

    0

                    self.setupThemesList()

    28

    0

                    self.themeSelectorMenu

    29

    0

                        .selectItem(at: prefs.theme)

    30

    0

                }

    31

    49

                .disposed(by: disposeBag)

    32

    49

    33

    49

            self.setupThemesList()

    34

    49

    35

    49

            self.themeSelectorMenu

    36

    49

                .selectItem(at: prefs.theme)

    37

    49

        }

    38

    39

    49

        func setupThemesList() {

    40

    49

            self.themeSelectorMenu

    41

    49

                .addItems(

    42

    49

                    withTitles: CutBoxPreferencesService

    43

    49

                        .shared

    44

    49

                        .themes

    45

    588

                        .map { $0.name })

    46

    49

        }

    47

    }