Skip to content
This repository has been archived by the owner on Oct 12, 2018. It is now read-only.

Commit

Permalink
Minor UI tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
CozmoNate committed Oct 7, 2013
1 parent d510b1a commit f17021b
Show file tree
Hide file tree
Showing 13 changed files with 346 additions and 79 deletions.
26 changes: 20 additions & 6 deletions HWMonitor.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
7E0200B118035D3700520CF7 /* RFOverlayScroller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E0200AE18035D3700520CF7 /* RFOverlayScroller.m */; };
7E0200B218035D3700520CF7 /* RFOverlayScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E0200B018035D3700520CF7 /* RFOverlayScrollView.m */; };
7E0648F016DF3B7D00ACB851 /* LaunchAtLoginController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E0648EE16DF3B7D00ACB851 /* LaunchAtLoginController.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
7E0648F116DF3B7D00ACB851 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 7E0648EF16DF3B7D00ACB851 /* README.md */; };
7E10343616EFAE490089DE7B /* GenericBatteryDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E10343516EFAE490089DE7B /* GenericBatteryDevice.m */; };
Expand All @@ -15,7 +17,6 @@
7E16893616EA106D00BBF6FC /* ArrowlessScroller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E16893516EA106D00BBF6FC /* ArrowlessScroller.m */; };
7E16FD87170648BF00FB253E /* HWMonitorProfiles.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E16FD86170648BF00FB253E /* HWMonitorProfiles.m */; };
7E16FD8A1706BB3000FB253E /* TransparentSplitView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E16FD891706BB3000FB253E /* TransparentSplitView.m */; };
7E170740170569700019173D /* OverlapingScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E17073F170569700019173D /* OverlapingScrollView.m */; };
7E17953616EE705B00145082 /* BatteryCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E17953516EE705B00145082 /* BatteryCell.m */; };
7E19000117005652008F40F1 /* SensorsTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E19000017005652008F40F1 /* SensorsTableView.m */; };
7E19000717006727008F40F1 /* PrefsSensorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E19000617006727008F40F1 /* PrefsSensorCell.m */; };
Expand Down Expand Up @@ -132,6 +133,10 @@

/* Begin PBXFileReference section */
7E00C2481708B827001570E4 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
7E0200AD18035D3700520CF7 /* RFOverlayScroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RFOverlayScroller.h; sourceTree = "<group>"; };
7E0200AE18035D3700520CF7 /* RFOverlayScroller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RFOverlayScroller.m; sourceTree = "<group>"; };
7E0200AF18035D3700520CF7 /* RFOverlayScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RFOverlayScrollView.h; sourceTree = "<group>"; };
7E0200B018035D3700520CF7 /* RFOverlayScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RFOverlayScrollView.m; sourceTree = "<group>"; };
7E0648ED16DF3B7D00ACB851 /* LaunchAtLoginController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LaunchAtLoginController.h; sourceTree = "<group>"; };
7E0648EE16DF3B7D00ACB851 /* LaunchAtLoginController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LaunchAtLoginController.m; sourceTree = "<group>"; };
7E0648EF16DF3B7D00ACB851 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = "<group>"; };
Expand All @@ -146,8 +151,6 @@
7E16FD86170648BF00FB253E /* HWMonitorProfiles.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HWMonitorProfiles.m; sourceTree = "<group>"; };
7E16FD881706BB3000FB253E /* TransparentSplitView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransparentSplitView.h; sourceTree = "<group>"; };
7E16FD891706BB3000FB253E /* TransparentSplitView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TransparentSplitView.m; sourceTree = "<group>"; };
7E17073E1705696F0019173D /* OverlapingScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OverlapingScrollView.h; sourceTree = "<group>"; };
7E17073F170569700019173D /* OverlapingScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OverlapingScrollView.m; sourceTree = "<group>"; };
7E17953416EE705B00145082 /* BatteryCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BatteryCell.h; sourceTree = "<group>"; };
7E17953516EE705B00145082 /* BatteryCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BatteryCell.m; sourceTree = "<group>"; };
7E19000017005652008F40F1 /* SensorsTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SensorsTableView.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -307,6 +310,17 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
7E0200AC18035D3700520CF7 /* RFOverlayScrollView */ = {
isa = PBXGroup;
children = (
7E0200AD18035D3700520CF7 /* RFOverlayScroller.h */,
7E0200AE18035D3700520CF7 /* RFOverlayScroller.m */,
7E0200AF18035D3700520CF7 /* RFOverlayScrollView.h */,
7E0200B018035D3700520CF7 /* RFOverlayScrollView.m */,
);
path = RFOverlayScrollView;
sourceTree = "<group>";
};
7E0648F216DF3B8300ACB851 /* LaunchAtLoginController */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -538,6 +552,7 @@
isa = PBXGroup;
children = (
7E39415716DBEA13005A685D /* Cells */,
7E0200AC18035D3700520CF7 /* RFOverlayScrollView */,
7E9A17D117E45ACA003DB018 /* NSString+Size.h */,
7E9A17D217E45ACA003DB018 /* NSString+Size.m */,
7E9A17CE17E45938003DB018 /* NSPopover+Message.h */,
Expand All @@ -550,8 +565,6 @@
7E7B9B3E1786A732003ACB61 /* OBMenuBarWindow.m */,
7E16893416EA106D00BBF6FC /* ArrowlessScroller.h */,
7E16893516EA106D00BBF6FC /* ArrowlessScroller.m */,
7E17073E1705696F0019173D /* OverlapingScrollView.h */,
7E17073F170569700019173D /* OverlapingScrollView.m */,
7E16FD881706BB3000FB253E /* TransparentSplitView.h */,
7E16FD891706BB3000FB253E /* TransparentSplitView.m */,
7E19FFFF17005652008F40F1 /* SensorsTableView.h */,
Expand Down Expand Up @@ -807,6 +820,7 @@
7EA2494216D8EA95002231B2 /* HWMonitorEngine.m in Sources */,
7EA2494316D8EA95002231B2 /* HWMonitorSensor.m in Sources */,
7EA2494416D8EA95002231B2 /* smc.c in Sources */,
7E0200B218035D3700520CF7 /* RFOverlayScrollView.m in Sources */,
7EA2494D16D8EB2D002231B2 /* StatusItemView.m in Sources */,
7EA2495416D8EE45002231B2 /* HWMonitorGroup.m in Sources */,
7EA2495516D8EE45002231B2 /* HWMonitorItem.m in Sources */,
Expand All @@ -826,9 +840,9 @@
7EDDC87316FA5DA50072B15B /* Localizer.m in Sources */,
7E19000117005652008F40F1 /* SensorsTableView.m in Sources */,
7E19000717006727008F40F1 /* PrefsSensorCell.m in Sources */,
7E0200B118035D3700520CF7 /* RFOverlayScroller.m in Sources */,
7E19000A170070F3008F40F1 /* GraphsSensorCell.m in Sources */,
7E7D61FB1704453B00F7222F /* FadingButton.m in Sources */,
7E170740170569700019173D /* OverlapingScrollView.m in Sources */,
7E16FD87170648BF00FB253E /* HWMonitorProfiles.m in Sources */,
7E16FD8A1706BB3000FB253E /* TransparentSplitView.m in Sources */,
7E44D95E1710433A00D06387 /* WindowFilter.m in Sources */,
Expand Down
20 changes: 10 additions & 10 deletions HWMonitor/AppController.xib
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@
<rect key="frame" x="17" y="17" width="286" height="411"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<scrollView fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="17" horizontalPageScroll="10" verticalLineScroll="17" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" id="339">
<scrollView fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="17" horizontalPageScroll="10" verticalLineScroll="17" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" id="339" customClass="RFOverlayScrollView">
<rect key="frame" x="0.0" y="0.0" width="286" height="151"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<clipView key="contentView" copiesOnScroll="NO" id="kfm-vl-U9h">
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="kfm-vl-U9h">
<rect key="frame" x="1" y="1" width="284" height="149"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
Expand Down Expand Up @@ -488,23 +488,23 @@
</subviews>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" id="389">
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" id="389" customClass="RFOverlayScroller">
<rect key="frame" x="-100" y="-100" width="269" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" arrowsPosition="none" controlSize="mini" id="390">
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" arrowsPosition="none" controlSize="mini" id="390" customClass="RFOverlayScroller">
<rect key="frame" x="274" y="1" width="11" height="141"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<scrollView fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="17" horizontalPageScroll="10" verticalLineScroll="17" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" id="340">
<scrollView fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="17" horizontalPageScroll="10" verticalLineScroll="17" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" id="340" customClass="RFOverlayScrollView">
<rect key="frame" x="0.0" y="160" width="286" height="251"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<clipView key="contentView" copiesOnScroll="NO" id="aHv-sd-Cij">
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="aHv-sd-Cij">
<rect key="frame" x="1" y="1" width="284" height="249"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" typeSelect="NO" rowSizeStyle="automatic" viewBased="YES" id="341" customClass="SensorsTableView">
<tableView appearanceType="aqua" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" typeSelect="NO" rowSizeStyle="automatic" viewBased="YES" id="341" customClass="SensorsTableView">
<rect key="frame" x="0.0" y="0.0" width="284" height="249"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="16" height="0.0"/>
Expand Down Expand Up @@ -665,12 +665,12 @@
</subviews>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" id="342">
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" id="342" customClass="RFOverlayScroller">
<rect key="frame" x="-100" y="-100" width="269" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" arrowsPosition="none" controlSize="mini" id="343">
<rect key="frame" x="274" y="1" width="11" height="257"/>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" arrowsPosition="none" controlSize="mini" id="343" customClass="RFOverlayScroller">
<rect key="frame" x="274" y="1" width="11" height="249"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
Expand Down
6 changes: 3 additions & 3 deletions HWMonitor/GraphsController.xib
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="1" height="0.0"/>
<color key="backgroundColor" white="0.1482093978" alpha="0.5" colorSpace="calibratedWhite"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<tableColumns>
<tableColumn width="242" minWidth="200" maxWidth="1000" id="18">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
Expand Down Expand Up @@ -486,11 +486,11 @@
<constraints>
<constraint firstAttribute="width" relation="lessThanOrEqual" constant="275" id="29t-Mh-0Je"/>
</constraints>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" arrowsPosition="none" controlSize="mini" id="16" customClass="ArrowlessScroller">
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" arrowsPosition="none" controlSize="mini" id="16" customClass="RFOverlayScroller">
<rect key="frame" x="-100" y="-100" width="218" height="11"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" arrowsPosition="none" controlSize="mini" id="15" customClass="ArrowlessScroller">
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" arrowsPosition="none" controlSize="mini" id="15" customClass="RFOverlayScroller">
<rect key="frame" x="-100" y="-100" width="11" height="476"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
Expand Down
50 changes: 36 additions & 14 deletions HWMonitor/JLNFadingScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@
// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//


#import <objc/objc-class.h>
#import "JLNFadingScrollView.h"
#import "RFOverlayScroller.h"


#define DEFAULTFADEHEIGHT 6.0
Expand All @@ -57,6 +58,17 @@ @implementation JLNFadingScrollView

#pragma mark Constructors / Destructors

static NSComparisonResult scrollerAboveSiblingViewsComparator(NSView *view1, NSView *view2, void *context)
{
if ([view1 isKindOfClass:[RFOverlayScroller class]]) {
return NSOrderedDescending;
} else if ([view2 isKindOfClass:[RFOverlayScroller class]]) {
return NSOrderedAscending;
}

return NSOrderedSame;
}

- (id)initWithFrame:(NSRect)frameRect
{
self = [super initWithFrame:frameRect];
Expand All @@ -68,10 +80,9 @@ - (id)initWithFrame:(NSRect)frameRect
_bottomFadeView = nil;
_fadeHeight = DEFAULTFADEHEIGHT;
_fadeColor = [NSColor blackColor];

// Kill copy on scroll
[[self contentView] setCopiesOnScroll:NO];

}

return self;
Expand Down Expand Up @@ -134,20 +145,31 @@ - (void)setFadeColor:(NSColor *)newColor

- (void)tile
{

// Super first, then fade views
[super tile];

NSRect frame = [self bounds];

if ([self borderType] != NSNoBorder) {
frame = NSInsetRect(frame, 1, 1);
}

[[self contentView] setFrame:frame];

[self tileFadeViews];


// Fake zero scroller width so the contentView gets drawn to the edge
method_exchangeImplementations(class_getClassMethod([RFOverlayScroller class], @selector(scrollerWidthForControlSize:scrollerStyle:)),
class_getClassMethod([RFOverlayScroller class], @selector(zeroWidth)));
[super tile];
// Restore original scroller width
method_exchangeImplementations(class_getClassMethod([RFOverlayScroller class], @selector(scrollerWidthForControlSize:scrollerStyle:)),
class_getClassMethod([RFOverlayScroller class], @selector(zeroWidth)));

// Resize vertical scroller
CGFloat width = [RFOverlayScroller scrollerWidthForControlSize:self.verticalScroller.controlSize
scrollerStyle:self.verticalScroller.scrollerStyle];
[self.verticalScroller setFrame:(NSRect){
self.bounds.size.width - width,
0.0f,
width,
self.bounds.size.height
}];

// Move scroller to front
[self sortSubviewsUsingFunction:scrollerAboveSiblingViewsComparator
context:NULL];
}

- (void)tileFadeViews
Expand Down

0 comments on commit f17021b

Please sign in to comment.