generated from shilokuma-inc/template-app-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from shilokuma-inc/feat/menuBar
【FEAT】メニューバーにアイコン設置
- Loading branch information
Showing
7 changed files
with
110 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
QuickKeyAssistantApp/QuickKeyAssistantApp/Assets.xcassets/MenuIcon.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "MenuIcon.svg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...ssistantApp/QuickKeyAssistantApp/Assets.xcassets/MenuIcon.imageset/MenuIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 0 additions & 24 deletions
24
QuickKeyAssistantApp/QuickKeyAssistantApp/ContentView.swift
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
QuickKeyAssistantApp/QuickKeyAssistantApp/Extension+NSImage.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// Extension+NSImage.swift | ||
// QuickKeyAssistantApp | ||
// | ||
// Created by 村石 拓海 on 2024/05/19. | ||
// | ||
|
||
import SwiftUI | ||
|
||
extension NSImage { | ||
func resizeImage(named name: String, to newSize: NSSize) -> NSImage? { | ||
guard let image = NSImage(named: name) else { return nil } | ||
let resizedImage = NSImage(size: newSize) | ||
resizedImage.lockFocus() | ||
image.draw(in: NSRect(origin: .zero, size: newSize)) | ||
resizedImage.unlockFocus() | ||
return resizedImage | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// MenuView.swift | ||
// QuickKeyAssistantApp | ||
// | ||
// Created by 村石 拓海 on 2024/05/19. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct MenuView: View { | ||
var body: some View { | ||
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) | ||
} | ||
} | ||
|
||
#Preview { | ||
MenuView() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters