Skip to content

Commit

Permalink
feat: new icons for the preferences window tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
lwouis committed Aug 5, 2020
1 parent a990bbe commit b20c71c
Show file tree
Hide file tree
Showing 17 changed files with 71 additions and 7 deletions.
38 changes: 38 additions & 0 deletions alt-tab-macos.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file modified resources/SF-Pro-Text-Regular-Full.otf
100644 → 100755
Binary file not shown.
Binary file added resources/icons/tabs/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icons/tabs/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icons/tabs/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icons/tabs/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icons/tabs/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icons/tabs/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icons/tabs/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions scripts/fonticon_to_image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

set -exu

# needed because of macOS SIP (see https://stackoverflow.com/a/35570229)
export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib"

function convert() {
magick convert \
-fill black \
-gravity center \
-font "resources/SF-Pro-Text-Regular-Full.otf" \
-size 64x64 \
-pointsize $3 \
-draw "text $4 '$1'" \
xc:none \
"resources/icons/tabs/$2@2x.png"
}

convert "􀜊" "general" "60" "-3,0"
convert "􀆔" "controls" "54" "-3,0"
convert "􀝥" "appearance" "52" "-2,0"
convert "􀖀" "policies" "58" "-2,0"
convert "􀉻" "blacklists" "58" "-5,1"
convert "􀅴" "about" "58" "-2,0"
convert "􀉿" "acknowledgments" "53" "-2,0"
2 changes: 1 addition & 1 deletion src/ui/preferences-window/tabs/AboutTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Preferences
class AboutTab: NSViewController, PreferencePane {
let preferencePaneIdentifier = PreferencePane.Identifier("About")
let preferencePaneTitle = NSLocalizedString("About", comment: "")
let toolbarItemIcon = NSImage(named: NSImage.infoName)!
let toolbarItemIcon = NSImage(named: "about")!

override func loadView() {
let appIcon = NSImageView(image: NSImage(named: "app-icon")!.resizedCopy(150, 150))
Expand Down
2 changes: 1 addition & 1 deletion src/ui/preferences-window/tabs/AcknowledgmentsTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class AcknowledgmentsTab: NSViewController, PreferencePane {
static let maxTabHeight = CGFloat(450)
let preferencePaneIdentifier = PreferencePane.Identifier("Acknowledgments")
let preferencePaneTitle = NSLocalizedString("Acknowledgments", comment: "")
let toolbarItemIcon = NSImage(named: NSImage.userAccountsName)!
let toolbarItemIcon = NSImage(named: "acknowledgments")!

override func loadView() {
let textViews: [TextField] = ["Contributors", "Acknowledgments"].map {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/preferences-window/tabs/AppearanceTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Preferences
class AppearanceTab: NSViewController, PreferencePane {
let preferencePaneIdentifier = PreferencePane.Identifier("Appearance")
let preferencePaneTitle = NSLocalizedString("Appearance", comment: "")
let toolbarItemIcon = NSImage(named: NSImage.colorPanelName)!
let toolbarItemIcon = NSImage(named: "appearance")!

override func loadView() {
let grid = GridView([
Expand Down
2 changes: 1 addition & 1 deletion src/ui/preferences-window/tabs/BlacklistsTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Preferences
class BlacklistsTab: NSViewController, PreferencePane {
let preferencePaneIdentifier = PreferencePane.Identifier("Blacklists")
let preferencePaneTitle = NSLocalizedString("Blacklists", comment: "")
let toolbarItemIcon = NSImage(named: "NSScriptTemplate")!
let toolbarItemIcon = NSImage(named: "blacklists")!

override func loadView() {
let dontShowBlacklistLabel = NSTextField(labelWithString: NSLocalizedString("Don’t show windows from these apps", comment: ""))
Expand Down
2 changes: 1 addition & 1 deletion src/ui/preferences-window/tabs/ControlsTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Preferences
class ControlsTab: NSViewController, PreferencePane {
let preferencePaneIdentifier = PreferencePane.Identifier("Controls")
let preferencePaneTitle = NSLocalizedString("Controls", comment: "")
let toolbarItemIcon = NSImage(named: NSImage.preferencesGeneralName)!
let toolbarItemIcon = NSImage(named: "controls")!

static var nextWindowShortcut: NSControl!
static var nextWindowShortcut2: NSControl!
Expand Down
2 changes: 1 addition & 1 deletion src/ui/preferences-window/tabs/GeneralTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Preferences
class GeneralTab: NSViewController, PreferencePane {
let preferencePaneIdentifier = PreferencePane.Identifier("General")
let preferencePaneTitle = NSLocalizedString("General", comment: "")
let toolbarItemIcon = NSImage(named: NSImage.preferencesGeneralName)!
let toolbarItemIcon = NSImage(named: "general")!

override func loadView() {
let startAtLogin = LabelAndControl.makeLabelWithCheckbox(NSLocalizedString("Start at login:", comment: ""), "startAtLogin", extraAction: startAtLoginCallback)
Expand Down
2 changes: 1 addition & 1 deletion src/ui/preferences-window/tabs/PoliciesTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Preferences
class PoliciesTab: NSViewController, PreferencePane {
let preferencePaneIdentifier = PreferencePane.Identifier("Policies")
let preferencePaneTitle = NSLocalizedString("Policies", comment: "")
let toolbarItemIcon = NSImage(named: NSImage.refreshTemplateName)!
let toolbarItemIcon = NSImage(named: "policies")!

static var updateButtons: [NSButton]!
static var crashButtons: [NSButton]!
Expand Down

0 comments on commit b20c71c

Please sign in to comment.