SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit eeb15c74f971f254f45a87874d4b0f987009fa07 parent 0d1f686d68ff1687108fd824816627ad8a8b37ce Author: Lior Halphon <LIJI32@gmail.com> Date: Sun, 23 Oct 2022 21:39:13 +0300 Fix visual glitches with the debugger split divider Diffstat:
| M | Cocoa/Document.m | 8 | ++------ |
| M | Cocoa/Document.xib | 6 | +++--- |
| M | Cocoa/GBSplitView.m | 6 | ++++++ |
3 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/Cocoa/Document.m b/Cocoa/Document.m @@ -733,7 +733,8 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) self.consoleWindow.title = [NSString stringWithFormat:@"Debug Console – %@", [self.fileURL.path lastPathComponent]]; - self.debuggerSplitView.dividerColor = [NSColor clearColor]; + self.debuggerSplitView.dividerColor = self.debuggerVerticalLine.borderColor; + [self.debuggerVerticalLine removeFromSuperview]; // No longer used, just there for the color if (@available(macOS 11.0, *)) { self.memoryWindow.toolbarStyle = NSWindowToolbarStyleExpanded; self.printerFeedWindow.toolbarStyle = NSWindowToolbarStyleUnifiedCompact; @@ -2261,11 +2262,6 @@ static bool is_path_writeable(const char *path) if ([[[splitview arrangedSubviews] firstObject] frame].size.width < 600) { [splitview setPosition:600 ofDividerAtIndex:0]; } - /* NSSplitView renders its separator without the proper vibrancy, so we made it transparent and move an - NSBox-based separator that renders properly so it acts like the split view's separator. */ - NSRect rect = self.debuggerVerticalLine.frame; - rect.origin.x = [[[splitview arrangedSubviews] firstObject] frame].size.width - 2; - self.debuggerVerticalLine.frame = rect; } - (IBAction)showCheats:(id)sender diff --git a/Cocoa/Document.xib b/Cocoa/Document.xib @@ -89,7 +89,7 @@ <rect key="contentRect" x="0.0" y="0.0" width="921" height="400"/> <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/> <value key="minSize" type="size" width="921" height="400"/> - <view key="contentView" id="dCP-E5-7Fi"> + <view key="contentView" id="dCP-E5-7Fi" customClass="GBOptionalVisualEffectView"> <rect key="frame" x="0.0" y="0.0" width="921" height="400"/> <autoresizingMask key="autoresizingMask"/> <subviews> @@ -101,7 +101,7 @@ <rect key="frame" x="0.0" y="0.0" width="921" height="401"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> - <customView fixedFrame="YES" id="2rj-7i-kxc" customClass="GBOptionalVisualEffectView"> + <customView fixedFrame="YES" id="2rj-7i-kxc"> <rect key="frame" x="0.0" y="0.0" width="591" height="401"/> <autoresizingMask key="autoresizingMask"/> <subviews> @@ -845,7 +845,7 @@ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" heightSizable="YES"/> <clipView key="contentView" id="mzf-yu-RID"> <rect key="frame" x="1" y="0.0" width="398" height="274"/> - <autoresizingMask key="autoresizingMask"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="none" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" headerView="pvX-uJ-qK5" id="tA3-8T-bxb"> <rect key="frame" x="0.0" y="0.0" width="398" height="257"/> diff --git a/Cocoa/GBSplitView.m b/Cocoa/GBSplitView.m @@ -19,6 +19,12 @@ return [super dividerColor]; } +- (void)drawDividerInRect:(NSRect)rect +{ + [self.dividerColor set]; + NSRectFill(rect); +} + /* Mavericks comaptibility */ - (NSArray<NSView *> *)arrangedSubviews {
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.