summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2023-06-24 07:07:55 +1000
committer Vas Crabb <vas@vastheman.com>2023-06-24 07:07:55 +1000
commit8c3f2a3c41c88cf9a159fd5f4577acdd6b2e95c8 (patch)
tree59db764c8919531627d43e63c85392cb281eaf69 /src/osd
parent8c1a6fb6bbfdbb563d7bf4e2f68d6380b63cedee (diff)
Miscellaneous cleanup
Diffstat (limited to 'src/osd')
-rw-r--r--src/osd/modules/debugger/osx/debugconsole.mm31
-rw-r--r--src/osd/modules/debugger/osx/deviceinfoviewer.mm11
-rw-r--r--src/osd/modules/debugger/osx/devicesviewer.mm11
-rw-r--r--src/osd/modules/debugger/osx/disassemblyviewer.mm11
-rw-r--r--src/osd/modules/debugger/osx/errorlogviewer.mm15
-rw-r--r--src/osd/modules/debugger/osx/memoryviewer.mm11
-rw-r--r--src/osd/modules/debugger/osx/pointsviewer.mm33
7 files changed, 56 insertions, 67 deletions
diff --git a/src/osd/modules/debugger/osx/debugconsole.mm b/src/osd/modules/debugger/osx/debugconsole.mm
index 0b7ba082875..9673dc852ab 100644
--- a/src/osd/modules/debugger/osx/debugconsole.mm
+++ b/src/osd/modules/debugger/osx/debugconsole.mm
@@ -143,27 +143,24 @@
NSSize const regCurrent = [regScroll frame].size;
NSSize const regSize = [NSScrollView frameSizeForContentSize:[regView maximumFrameSize]
horizontalScrollerClass:[NSScroller class]
- verticalScrollerClass:[NSScroller class]
- borderType:[regScroll borderType]
- controlSize: NSControlSizeRegular
- scrollerStyle: NSScrollerStyleOverlay
- ];
+ verticalScrollerClass:[NSScroller class]
+ borderType:[regScroll borderType]
+ controlSize:NSControlSizeRegular
+ scrollerStyle:NSScrollerStyleOverlay];
NSSize const dasmCurrent = [dasmScroll frame].size;
NSSize const dasmSize = [NSScrollView frameSizeForContentSize:[dasmView maximumFrameSize]
- horizontalScrollerClass:[NSScroller class]
- verticalScrollerClass:[NSScroller class]
- borderType:[dasmScroll borderType]
- controlSize: NSControlSizeRegular
- scrollerStyle: NSScrollerStyleOverlay
- ];
+ horizontalScrollerClass:[NSScroller class]
+ verticalScrollerClass:[NSScroller class]
+ borderType:[dasmScroll borderType]
+ controlSize:NSControlSizeRegular
+ scrollerStyle:NSScrollerStyleOverlay];
NSSize const consoleCurrent = [consoleContainer frame].size;
NSSize consoleSize = [NSScrollView frameSizeForContentSize:[consoleView maximumFrameSize]
- horizontalScrollerClass:[NSScroller class]
- verticalScrollerClass:[NSScroller class]
- borderType:[consoleScroll borderType]
- controlSize: NSControlSizeRegular
- scrollerStyle: NSScrollerStyleOverlay
- ];
+ horizontalScrollerClass:[NSScroller class]
+ verticalScrollerClass:[NSScroller class]
+ borderType:[consoleScroll borderType]
+ controlSize:NSControlSizeRegular
+ scrollerStyle:NSScrollerStyleOverlay];
NSRect windowFrame = [window frame];
NSSize adjustment;
diff --git a/src/osd/modules/debugger/osx/deviceinfoviewer.mm b/src/osd/modules/debugger/osx/deviceinfoviewer.mm
index a60ba02a5c2..12f1ea1957a 100644
--- a/src/osd/modules/debugger/osx/deviceinfoviewer.mm
+++ b/src/osd/modules/debugger/osx/deviceinfoviewer.mm
@@ -210,12 +210,11 @@
// create a scroll view for holding everything
NSSize desired = [NSScrollView frameSizeForContentSize:[contentView frame].size
- horizontalScrollerClass:[NSScroller class]
- verticalScrollerClass:[NSScroller class]
- borderType: NSNoBorder
- controlSize: NSControlSizeRegular
- scrollerStyle: NSScrollerStyleOverlay
- ];
+ horizontalScrollerClass:[NSScroller class]
+ verticalScrollerClass:[NSScroller class]
+ borderType:NSNoBorder
+ controlSize:NSControlSizeRegular
+ scrollerStyle:NSScrollerStyleOverlay];
[window setContentSize:desired];
contentScroll = [[NSScrollView alloc] initWithFrame:[[window contentView] bounds]];
[contentScroll setDrawsBackground:NO];
diff --git a/src/osd/modules/debugger/osx/devicesviewer.mm b/src/osd/modules/debugger/osx/devicesviewer.mm
index 4241aab3e90..02f63a41a6b 100644
--- a/src/osd/modules/debugger/osx/devicesviewer.mm
+++ b/src/osd/modules/debugger/osx/devicesviewer.mm
@@ -161,12 +161,11 @@
// calculate the optimal size for everything
NSSize const desired = [NSScrollView frameSizeForContentSize:NSMakeSize(480, 320)
- horizontalScrollerClass:[NSScroller class]
- verticalScrollerClass:[NSScroller class]
- borderType:[devicesScroll borderType]
- controlSize: NSControlSizeRegular
- scrollerStyle: NSScrollerStyleOverlay
- ];
+ horizontalScrollerClass:[NSScroller class]
+ verticalScrollerClass:[NSScroller class]
+ borderType:[devicesScroll borderType]
+ controlSize:NSControlSizeRegular
+ scrollerStyle:NSScrollerStyleOverlay];
[self cascadeWindowWithDesiredSize:desired forView:devicesScroll];
// don't forget the result
diff --git a/src/osd/modules/debugger/osx/disassemblyviewer.mm b/src/osd/modules/debugger/osx/disassemblyviewer.mm
index 9cd714708c7..20ec457f628 100644
--- a/src/osd/modules/debugger/osx/disassemblyviewer.mm
+++ b/src/osd/modules/debugger/osx/disassemblyviewer.mm
@@ -120,12 +120,11 @@
// calculate the optimal size for everything
NSSize const desired = [NSScrollView frameSizeForContentSize:[dasmView maximumFrameSize]
- horizontalScrollerClass:[NSScroller class]
- verticalScrollerClass:[NSScroller class]
- borderType:[dasmScroll borderType]
- controlSize: NSControlSizeRegular
- scrollerStyle: NSScrollerStyleOverlay
- ];
+ horizontalScrollerClass:[NSScroller class]
+ verticalScrollerClass:[NSScroller class]
+ borderType:[dasmScroll borderType]
+ controlSize:NSControlSizeRegular
+ scrollerStyle:NSScrollerStyleOverlay];
[self cascadeWindowWithDesiredSize:desired forView:dasmScroll];
// don't forget the result
diff --git a/src/osd/modules/debugger/osx/errorlogviewer.mm b/src/osd/modules/debugger/osx/errorlogviewer.mm
index 5c392b9cd6b..68d6f312b7c 100644
--- a/src/osd/modules/debugger/osx/errorlogviewer.mm
+++ b/src/osd/modules/debugger/osx/errorlogviewer.mm
@@ -43,14 +43,13 @@
// calculate the optimal size for everything
{
NSSize desired = [NSScrollView frameSizeForContentSize:[logView maximumFrameSize]
- horizontalScrollerClass:[NSScroller class]
- verticalScrollerClass:[NSScroller class]
- borderType:[logScroll borderType]
- controlSize: NSControlSizeRegular
- scrollerStyle: NSScrollerStyleOverlay
- ];
-
- // this thing starts with no content, so its prefered height may be very small
+ horizontalScrollerClass:[NSScroller class]
+ verticalScrollerClass:[NSScroller class]
+ borderType:[logScroll borderType]
+ controlSize:NSControlSizeRegular
+ scrollerStyle:NSScrollerStyleOverlay];
+
+ // this thing starts with no content, so its preferred height may be very small
desired.height = std::max(desired.height, CGFloat(240));
[self cascadeWindowWithDesiredSize:desired forView:logScroll];
}
diff --git a/src/osd/modules/debugger/osx/memoryviewer.mm b/src/osd/modules/debugger/osx/memoryviewer.mm
index f5de21571bf..1d45650dcbb 100644
--- a/src/osd/modules/debugger/osx/memoryviewer.mm
+++ b/src/osd/modules/debugger/osx/memoryviewer.mm
@@ -118,12 +118,11 @@
// calculate the optimal size for everything
NSSize const desired = [NSScrollView frameSizeForContentSize:[memoryView maximumFrameSize]
- horizontalScrollerClass:[NSScroller class]
- verticalScrollerClass:[NSScroller class]
- borderType:[memoryScroll borderType]
- controlSize: NSControlSizeRegular
- scrollerStyle: NSScrollerStyleOverlay
- ];
+ horizontalScrollerClass:[NSScroller class]
+ verticalScrollerClass:[NSScroller class]
+ borderType:[memoryScroll borderType]
+ controlSize:NSControlSizeRegular
+ scrollerStyle:NSScrollerStyleOverlay];
[self cascadeWindowWithDesiredSize:desired forView:memoryScroll];
// don't forget the result
diff --git a/src/osd/modules/debugger/osx/pointsviewer.mm b/src/osd/modules/debugger/osx/pointsviewer.mm
index 2a12d628236..8b2f69c50b5 100644
--- a/src/osd/modules/debugger/osx/pointsviewer.mm
+++ b/src/osd/modules/debugger/osx/pointsviewer.mm
@@ -139,26 +139,23 @@
// calculate the optimal size for everything
NSSize const breakDesired = [NSScrollView frameSizeForContentSize:[breakView maximumFrameSize]
- horizontalScrollerClass:[NSScroller class]
- verticalScrollerClass:[NSScroller class]
- borderType:[breakScroll borderType]
- controlSize: NSControlSizeRegular
- scrollerStyle: NSScrollerStyleOverlay
- ];
+ horizontalScrollerClass:[NSScroller class]
+ verticalScrollerClass:[NSScroller class]
+ borderType:[breakScroll borderType]
+ controlSize:NSControlSizeRegular
+ scrollerStyle:NSScrollerStyleOverlay];
NSSize const watchDesired = [NSScrollView frameSizeForContentSize:[watchView maximumFrameSize]
- horizontalScrollerClass:[NSScroller class]
- verticalScrollerClass:[NSScroller class]
- borderType:[watchScroll borderType]
- controlSize: NSControlSizeRegular
- scrollerStyle: NSScrollerStyleOverlay
- ];
+ horizontalScrollerClass:[NSScroller class]
+ verticalScrollerClass:[NSScroller class]
+ borderType:[watchScroll borderType]
+ controlSize:NSControlSizeRegular
+ scrollerStyle:NSScrollerStyleOverlay];
NSSize const registerDesired = [NSScrollView frameSizeForContentSize:[registerView maximumFrameSize]
- horizontalScrollerClass:[NSScroller class]
- verticalScrollerClass:[NSScroller class]
- borderType:[registerScroll borderType]
- controlSize: NSControlSizeRegular
- scrollerStyle: NSScrollerStyleOverlay
- ];
+ horizontalScrollerClass:[NSScroller class]
+ verticalScrollerClass:[NSScroller class]
+ borderType:[registerScroll borderType]
+ controlSize:NSControlSizeRegular
+ scrollerStyle:NSScrollerStyleOverlay];
NSSize const desired = NSMakeSize(std::max({ breakDesired.width, watchDesired.width, registerDesired.width }),
std::max({ breakDesired.height, watchDesired.height, registerDesired.height }));
[self cascadeWindowWithDesiredSize:desired forView:tabs];