Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

Commit

Permalink
updated icon and added clear action
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaden Geller committed Apr 10, 2015
1 parent c578d43 commit 719e561
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Helium/Helium/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ class AppDelegate: NSObject, NSApplicationDelegate {

}

@IBAction func clearPress(sender: AnyObject) {
NSNotificationCenter.defaultCenter().postNotificationName("HeliumClear", object: nil)
}

@IBAction func translucencyPress(sender: NSMenuItem) {
if sender.state == NSOnState {
sender.state = NSOffState
Expand Down
12 changes: 11 additions & 1 deletion Helium/Helium/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@
<action selector="reloadPress:" target="Voe-Tx-rLC" id="s9q-6Q-yVK"/>
</connections>
</menuItem>
<menuItem title="Clear" id="yCk-JK-BBT">
<string key="keyEquivalent" base64-UTF8="YES">
CA
</string>
<connections>
<action selector="clearPress:" target="Voe-Tx-rLC" id="Q3H-QC-5dk"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
Expand Down Expand Up @@ -245,7 +253,9 @@
<subviews>
<webView translatesAutoresizingMaskIntoConstraints="NO" id="bnm-Cq-vij">
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
<webPreferences key="preferences" defaultFontSize="12" defaultFixedFontSize="12"/>
<webPreferences key="preferences" defaultFontSize="12" defaultFixedFontSize="12">
<nil key="identifier"/>
</webPreferences>
</webView>
</subviews>
<constraints>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "icon.png",
"filename" : "test.png",
"scale" : "2x"
},
{
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Helium/Helium/WebViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ class WebViewController: NSViewController {
super.viewDidLoad()
// Do any additional setup after loading the view.
NSNotificationCenter.defaultCenter().addObserver(self, selector: "requestedReload", name: "HeliumReload", object: nil)
NSNotificationCenter.defaultCenter().addObserver(self, selector: "clear", name: "HeliumClear", object: nil)

clear()
}

override var representedObject: AnyObject? {
Expand All @@ -29,6 +32,9 @@ class WebViewController: NSViewController {
func requestedReload() {
webView.mainFrame.reload()
}
func clear() {
webView.mainFrame.loadHTMLString("<!DOCTYPE html><html><head><style>body{background-color:#101010}</style></head></html>", baseURL: nil)
}

@IBOutlet weak var webView: WebView!

Expand Down

0 comments on commit 719e561

Please sign in to comment.