Skip to content

Commit

Permalink
Merge branch 'development' into vscode-ignore-fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
kuychaco committed Sep 10, 2019
2 parents aeccec0 + f0ebcb1 commit 4f0cfd2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
3 changes: 0 additions & 3 deletions app/src/lib/app-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ export interface IAppState {
/** The width of the files list in the stash view */
readonly stashedFilesWidth: number

/** Whether we should hide the toolbar (and show inverted window controls) */
readonly titleBarStyle: 'light' | 'dark'

/**
* Used to highlight access keys throughout the app when the
* Alt key is pressed. Only applicable on non-macOS platforms.
Expand Down
2 changes: 0 additions & 2 deletions app/src/lib/stores/app-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,6 @@ export class AppStore extends TypedBaseStore<IAppState> {
commitSummaryWidth: this.commitSummaryWidth,
stashedFilesWidth: this.stashedFilesWidth,
appMenuState: this.appMenu ? this.appMenu.openMenus : [],
titleBarStyle:
this.showWelcomeFlow || repositories.length === 0 ? 'light' : 'dark',
highlightAccessKeys: this.highlightAccessKeys,
isUpdateAvailableBannerVisible: this.isUpdateAvailableBannerVisible,
currentBanner: this.currentBanner,
Expand Down
19 changes: 13 additions & 6 deletions app/src/ui/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1110,11 +1110,6 @@ export class App extends React.Component<IAppProps, IAppState> {
return null
}

// Don't render the menu bar when the blank slate is shown
if (this.state.repositories.length < 1) {
return null
}

const currentFoldout = this.state.currentFoldout

// AppMenuBar requires us to pass a strongly typed AppMenuFoldout state or
Expand Down Expand Up @@ -1162,11 +1157,23 @@ export class App extends React.Component<IAppProps, IAppState> {
}

const showAppIcon = __WIN32__ && !this.state.showWelcomeFlow
const inWelcomeFlow = this.state.showWelcomeFlow
const inNoRepositoriesView = this.state.repositories.length === 0

// The light title bar style should only be used while we're in
// the welcome flow as well as the no-repositories blank slate
// on macOS. The latter case has to do with the application menu
// being part of the title bar on Windows. We need to render
// the app menu in the no-repositories blank slate on Windows but
// the menu doesn't support the light style at the moment so we're
// forcing it to use the dark style.
const titleBarStyle =
inWelcomeFlow || (__DARWIN__ && inNoRepositoriesView) ? 'light' : 'dark'

return (
<TitleBar
showAppIcon={showAppIcon}
titleBarStyle={this.state.titleBarStyle}
titleBarStyle={titleBarStyle}
windowState={this.state.windowState}
windowZoomFactor={this.state.windowZoomFactor}
>
Expand Down

0 comments on commit 4f0cfd2

Please sign in to comment.