Skip to content

Commit

Permalink
Merge pull request #287 from DivergentEuropeans/add-minimize-hide
Browse files Browse the repository at this point in the history
Prepare Window minimize handle hide for single app mode
  • Loading branch information
DivergentEuropeans authored Oct 5, 2020
2 parents f2260f3 + c087111 commit 8a6f9f5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ export class WindowManagerService implements MVDWindowManagement.WindowManagerSe
this.appKeyboard.keyUpEvent
.subscribe((event:KeyboardEvent) => {
if (event.which === KeyCode.DOWN_ARROW) {
if(this.focusedWindow !== null) {
// TODO: Disable minimize hotkey once mvd-window-manager single app mode is functional. Variable subject to change.
if(this.focusedWindow !== null && !(window as any)['GIZA_SIMPLE_CONTAINER_REQUESTED']) {
this.minimizeToggle(this.focusedWindow.windowId);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
[style.background-size]="buttonSize"
[style.left]="minimizeLeft"
[ngStyle]="hasFocus() ? {'filter': buttonFilter} : {}"
(click)="minimizeToggle()"></div>
(click)="minimizeToggle()"
[style.display]="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,6 +42,7 @@ export class WindowComponent {
public maximizeLeft: string;
public closeLeft: string;
private readonly logger: ZLUX.ComponentLogger = BaseLogger;
public displayMinimize: string;

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

// 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.maximizeLeft = this.minimizeLeft;
}
break;
case 3:
this.borderSize = '3px';
Expand All @@ -68,6 +76,13 @@ export class WindowComponent {
this.buttonTop = '16px';
this.textSize = '18px';
this.textPad = '12px';
this.displayMinimize = "inherit";

// 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.maximizeLeft = this.minimizeLeft;
}
break;
default: //Default size is medium - 2
this.borderSize = '2px';
Expand All @@ -78,6 +93,13 @@ export class WindowComponent {
this.buttonTop = '9px';
this.textSize = '14px';
this.textPad = '5px';
this.displayMinimize = "inherit";

// 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.maximizeLeft = this.minimizeLeft;
}
}
switch (newTheme.color.windowTextActive) {
case Colors.COOLGREY_90:
Expand Down

0 comments on commit 8a6f9f5

Please sign in to comment.