summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-06-03 17:36:08 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-06-03 17:36:08 +0200
commite2eeb368839d226e763aa917902444a4f892c6c3 (patch)
treee0a2c51fa5bf954e6255c0bc812e0dc39806032f
parent6712130f22914319f3c42365376e42d14bf9be0b (diff)
macOS: remove use of deprecated [NSBox setBorderType:] method
-rw-r--r--src/Fl_Native_File_Chooser_MAC.mm10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Fl_Native_File_Chooser_MAC.mm b/src/Fl_Native_File_Chooser_MAC.mm
index 2317de9c0..5d8741460 100644
--- a/src/Fl_Native_File_Chooser_MAC.mm
+++ b/src/Fl_Native_File_Chooser_MAC.mm
@@ -631,18 +631,18 @@ static NSPopUpButton *createPopupAccessory(NSSavePanel *panel, const char *filte
popup = [[[NSPopUpButton alloc ] initWithFrame:rectpop pullsDown:NO] autorelease];
[view addSubview:box];
[view addSubview:popup];
- [box setBorderType:NSNoBorder];
NSString *nstitle = [[NSString alloc] initWithUTF8String:title];
[box setTitle:nstitle];
+ [box setTitlePosition:NSBelowTop];
[nstitle release];
- NSFont *font = [NSFont controlContentFontOfSize:NSControlSizeRegular];
+ NSFont *font = [NSFont systemFontOfSize:[NSFont systemFontSize]];
[box setTitleFont:font];
[box sizeToFit];
// horizontally move box to fit the locale-dependent width of its title
NSRect r=[box frame];
- NSPoint o = r.origin;
- o.x = rectpop.origin.x - r.size.width + 15;
- [box setFrameOrigin:o];
+ r.origin.x = rectpop.origin.x - r.size.width;
+ r.origin.y = rectpop.origin.y + (rectpop.size.height - r.size.height) / 2;
+ [box setFrame:r];
CFStringRef tab = CFSTR("\n");
CFStringRef tmp_cfs;
tmp_cfs = CFStringCreateWithCString(NULL, filter, kCFStringEncodingUTF8);