From 5d4981fbba8b91096ddb8ff58301b7376ae93f73 Mon Sep 17 00:00:00 2001 From: anthony Date: Mon, 8 Mar 2021 20:03:22 +0000 Subject: [PATCH] Fix tabview height calculation, create new window on startup --- frontends/gnustep/AppDelegate.m | 1 + frontends/gnustep/BrowserWindowController.m | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frontends/gnustep/AppDelegate.m b/frontends/gnustep/AppDelegate.m index b4f74021e..c03f875c3 100644 --- a/frontends/gnustep/AppDelegate.m +++ b/frontends/gnustep/AppDelegate.m @@ -113,6 +113,7 @@ static NSMenuItem *menuItemForItem(id item) { object: nil]; [self bookmarksUpdated: nil]; [self historyUpdated: nil]; + [self didTapNewWindow: nil]; } -(void)didTapNewWindow: (id)sender { diff --git a/frontends/gnustep/BrowserWindowController.m b/frontends/gnustep/BrowserWindowController.m index d00786d20..ce629499a 100644 --- a/frontends/gnustep/BrowserWindowController.m +++ b/frontends/gnustep/BrowserWindowController.m @@ -17,7 +17,7 @@ #define TAB_TITLE_LEN 20 // Everything above the browser. Used to calculate the tabview's height. -#define TOP_CONTENT_HEIGHT 74 +#define TOP_CONTENT_HEIGHT 45 // Any way to get this programatically? #define TAB_ITEM_HEIGHT 13 #define VERTICAL_TAB_WIDTH 100 @@ -460,8 +460,9 @@ static id newTabTarget; NSRect rect = [tabView frame]; rect.origin.x = 0; rect.origin.y = 0; - rect.size.height = [[self window] frame].size.height - TOP_CONTENT_HEIGHT; - rect.size.width = [[self window] frame].size.width; + rect.size.height = [[[self window] contentView] frame].size.height - + TOP_CONTENT_HEIGHT; + rect.size.width = [[[self window] contentView] frame].size.width; if (hideTabs) { [tabView setTabViewType: NSNoTabsNoBorder]; [tabView setFrame: rect];