Skip to content

Commit

Permalink
Merge pull request #289 from DivergentEuropeans/feature/menu-bar-adju…
Browse files Browse the repository at this point in the history
…stments

Hide app tray + adjust maximize mode when single app mode activates
  • Loading branch information
1000TurquoisePogs authored Oct 13, 2020
2 parents 3f3e663 + 754856d commit b0bbb90
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ export class LaunchbarMenuComponent implements MVDHosting.LoginActionInterface{
ngOnInit(): void {
this.appKeyboard.keyUpEvent
.subscribe((event:KeyboardEvent) => {
if (event.which === KeyCode.KEY_M) {
// TODO: Disable bottom app bar once mvd-window-manager single app mode is functional. Variable subject to change.
if (event.which === KeyCode.KEY_M && !(window as any)['GIZA_SIMPLE_CONTAINER_REQUESTED']) {
this.activeToggle();
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
Copyright Contributors to the Zowe Project.
-->

<div class="launchbar-container launchbar-large" id="container"
[style.height]="barSize"
(mouseup)="onMouseUpContainer($event)" [class.active]="isActive">
<div class="launchbar-container launchbar-large"
id="container"
[style.height]="barSize"
(mouseup)="onMouseUpContainer($event)"
[class.active]="isActive"
*ngIf="displayAppBar">
<rs-com-launchbar-menu [menuItems]="allItems" [theme]="_theme" (itemClicked)="menuItemClicked($event)" (refreshClicked)="getNewItems()"></rs-com-launchbar-menu>

<div class="applist row"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export class LaunchbarComponent implements MVDHosting.LogoutActionInterface {

//Always 6+icon size, due to need for space for padding and such
public barSize: string;
public displayAppBar: boolean;
public applistMargin: string;
public applistPadding: string;
public _theme: DesktopTheme;
Expand Down Expand Up @@ -74,6 +75,13 @@ export class LaunchbarComponent implements MVDHosting.LogoutActionInterface {
this.applistMargin = `0px 179px 0px 46px`;
break;
}

// TODO: Disable bottom app bar once mvd-window-manager single app mode is functional. Variable subject to change.
if ((window as any)['GIZA_SIMPLE_CONTAINER_REQUESTED']) {
this.displayAppBar = false;
} else {
this.displayAppBar = true;
}
}

public allItems: LaunchbarItem[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,17 @@ export class WindowManagerService implements MVDWindowManagement.WindowManagerSe
}

private refreshMaximizedWindowSize(desktopWindow: DesktopWindow): void {
//this is the window viewport size, so you must subtract the header and launchbar from the height.
//This is the window viewport size, so you must subtract the header and launchbar from the height, if not in standalone mode.
let height;
if ((window as any)['GIZA_SIMPLE_CONTAINER_REQUESTED']) {
height = window.innerHeight;
} else {
height = window.innerHeight - WindowManagerService.MAXIMIZE_WINDOW_HEIGHT_OFFSET;
}
desktopWindow.windowState.position = { top: 0,
left: 0,
width: window.innerWidth,
height: window.innerHeight
- WindowManagerService.MAXIMIZE_WINDOW_HEIGHT_OFFSET};
height: height};
}

private generateWindowId(): MVDWindowManagement.WindowId {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
[style.left]="minimizeLeft"
[ngStyle]="hasFocus() ? {'filter': buttonFilter} : {}"
(click)="minimizeToggle()"
[style.display]="displayMinimize"></div>
*ngIf="displayMinimize"></div>
<div class="maximize-button"
[style.top]="buttonTop"
[class.active]="hasFocus()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class WindowComponent {
public maximizeLeft: string;
public closeLeft: string;
private readonly logger: ZLUX.ComponentLogger = BaseLogger;
public displayMinimize: string;
public displayMinimize: boolean;

@Input() set theme(newTheme: DesktopTheme) {
this.logger.debug('Window theme set=',newTheme);
Expand All @@ -59,11 +59,11 @@ export class WindowComponent {
this.buttonTop = '6px';
this.textSize = '12px';
this.textPad = '3px';
this.displayMinimize = "inherit";
this.displayMinimize = true;

// TODO: Disable minimize button once mvd-window-manager single app mode is functional. Variable subject to change.
if ((window as any)['GIZA_SIMPLE_CONTAINER_REQUESTED']) {
this.displayMinimize = "none";
this.displayMinimize = false;
this.maximizeLeft = this.minimizeLeft;
}
break;
Expand All @@ -76,11 +76,11 @@ export class WindowComponent {
this.buttonTop = '16px';
this.textSize = '18px';
this.textPad = '12px';
this.displayMinimize = "inherit";
this.displayMinimize = true;

// TODO: Disable minimize button once mvd-window-manager single app mode is functional. Variable subject to change.
if ((window as any)['GIZA_SIMPLE_CONTAINER_REQUESTED']) {
this.displayMinimize = "none";
this.displayMinimize = false;
this.maximizeLeft = this.minimizeLeft;
}
break;
Expand All @@ -93,11 +93,11 @@ export class WindowComponent {
this.buttonTop = '9px';
this.textSize = '14px';
this.textPad = '5px';
this.displayMinimize = "inherit";
this.displayMinimize = true;

// TODO: Disable minimize button once mvd-window-manager single app mode is functional. Variable subject to change.
if ((window as any)['GIZA_SIMPLE_CONTAINER_REQUESTED']) {
this.displayMinimize = "none";
this.displayMinimize = false;
this.maximizeLeft = this.minimizeLeft;
}
}
Expand Down

0 comments on commit b0bbb90

Please sign in to comment.