Skip to content

Commit

Permalink
Adds toggle button for background drawing to example
Browse files Browse the repository at this point in the history
  • Loading branch information
ricobeck committed Jan 19, 2015
1 parent 8f96c2c commit d3d72b5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Example/DMPathBar/AppDelegate.m
Expand Up @@ -67,6 +67,9 @@ - (BOOL)useAnimations {
- (IBAction) buttonToggleEnabled:(id)sender {
pathBar.enabled = !pathBar.enabled;
}
- (IBAction) buttonToggleBackground:(id)sender {
pathBar.drawsBackground = !pathBar.drawsBackground;
}

- (IBAction) buttonAddItem:(id)sender {
NSImage *icon = (buttonNewItemUseIcon.state == NSOnState ? [NSImage imageNamed:@"icon"] : nil);
Expand Down
16 changes: 13 additions & 3 deletions Example/DMPathBar/Base.lproj/MainMenu.xib
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6724" systemVersion="14C94b" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6724" systemVersion="14B25" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6724"/>
</dependencies>
Expand Down Expand Up @@ -676,7 +676,7 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="335" y="390" width="380" height="360"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="900"/>
<value key="minSize" type="size" width="340" height="305"/>
<value key="maxSize" type="size" width="340" height="305"/>
<view key="contentView" id="EiT-Mj-1SZ">
Expand Down Expand Up @@ -727,7 +727,7 @@
</connections>
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="OIZ-1Q-vpf">
<rect key="frame" x="231" y="14" width="135" height="32"/>
<rect key="frame" x="206" y="14" width="160" height="32"/>
<buttonCell key="cell" type="push" title="Toggle Enabled" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="lNj-ph-neG">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
Expand Down Expand Up @@ -801,6 +801,16 @@
<action selector="buttonRemoveAllItems:" target="Voe-Tx-rLC" id="IOI-iY-Gdu"/>
</connections>
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="xsP-w9-7w4">
<rect key="frame" x="206" y="41" width="160" height="32"/>
<buttonCell key="cell" type="push" title="Toggle Background" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="34W-i7-ca1">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="buttonToggleBackground:" target="Voe-Tx-rLC" id="0nf-AB-m0a"/>
</connections>
</button>
</subviews>
</view>
<point key="canvasLocation" x="-478" y="212"/>
Expand Down

0 comments on commit d3d72b5

Please sign in to comment.