Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions sources/Browser/Core/iTermBrowserViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -844,19 +844,23 @@ extension iTermBrowserViewController {

private func layoutSubviews() {
let bounds = view.bounds

// Background view - full coverage
backgroundView.frame = bounds

// Toolbar - top, full width, 44pt height
toolbar.frame = NSRect(x: 0, y: bounds.height - 44,
width: bounds.width, height: 44)

// WebView - below toolbar

let showToolbar = profileObserver.value(KEY_BROWSER_SHOW_TOOLBAR) == true
let toolbarHeight: CGFloat = showToolbar ? 44 : 0
toolbar.isHidden = !showToolbar

// Toolbar - top, full width
toolbar.frame = NSRect(x: 0, y: bounds.height - toolbarHeight,
width: bounds.width, height: toolbarHeight)

// WebView - below toolbar (full height when toolbar is hidden)
browserManager.webView.frame = NSRect(x: 0, y: 0,
width: bounds.width,
height: bounds.height - 44)
height: bounds.height - toolbarHeight)

// Shade view - full coverage
shadeView.frame = bounds
}
Expand Down
1 change: 1 addition & 0 deletions sources/Settings/Profiles/ITAddressBookMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@
// Web
#define KEY_BROWSER_ZOOM @"Browser Zoom" // 100 = 100%
#define KEY_BROWSER_DEV_NULL @"Dev Null Mode"
#define KEY_BROWSER_SHOW_TOOLBAR @"Browser Show Toolbar" // bool
#define KEY_BROWSER_EXTENSIONS_ROOT @"Browser Extensions Root"
#define KEY_BROWSER_EXTENSION_ACTIVE_IDS @"Browser Extension Active IDs"
#define KEY_INSTANT_REPLAY @"Instant Replay"
Expand Down
2 changes: 2 additions & 0 deletions sources/Settings/iTermProfilePreferences.m
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ + (iTermProfilePreferencesKeyFuncs)keyFuncs {
KEY_DYNAMIC_PROFILE_REWRITABLE,
KEY_DYNAMIC_PROFILE,
KEY_BROWSER_DEV_NULL,
KEY_BROWSER_SHOW_TOOLBAR,
KEY_INSTANT_REPLAY,
];
NSArray *number = @[
Expand Down Expand Up @@ -1169,6 +1170,7 @@ + (NSDictionary *)defaultValueMap {

KEY_BROWSER_ZOOM: @100,
KEY_BROWSER_DEV_NULL: @NO,
KEY_BROWSER_SHOW_TOOLBAR: @YES,
KEY_BROWSER_EXTENSIONS_ROOT: [NSNull null],
KEY_BROWSER_EXTENSION_ACTIVE_IDS: @[],
KEY_WIDTH: @1000,
Expand Down