"Video Chat" Layout has a dark background, controls are and title are removed in this layout.

This commit is contained in:
Ghazi Triki 2017-03-22 17:34:11 +01:00
parent 4ecc88ed08
commit a416f8cb8c
4 changed files with 89 additions and 57 deletions

View File

@ -755,6 +755,16 @@ MDIWindow { /*None of the following properties are overridden by the MDIWindow c
borderThicknessRight: 3;
}
.videoDockStyleFocusChatLayout {
borderColor: #42444c;
backgroundColor: #42444c;
}
.videoDockStyleNoFocusChatLayout {
borderColor: #32343b;
backgroundColor: #42444c;
}
.presentationSlideViewStyle {
backgroundColor: #b9babc;
}

View File

@ -23,8 +23,6 @@ package org.bigbluebutton.common
import flexlib.mdi.containers.MDIWindow;
import flexlib.mdi.managers.MDIManager;
import mx.utils.ObjectUtil;
/**
* This class exists so we can properly handle context menus on MDIWindow
* instances. Also, we'll be able in the future to properly handle shortcuts

View File

@ -219,18 +219,18 @@ package org.bigbluebutton.modules.layout.managers
var e:SyncLayoutEvent = new SyncLayoutEvent(layout);
_globalDispatcher.dispatchEvent(e);
}
}
private function applyLayout(layout:LayoutDefinition):void {
_detectContainerChange = false;
if (layout != null) {
layout.applyToCanvas(_canvas);
dispatchSwitchedLayoutEvent(layout.name);
}
//trace(LOG + " applyLayout layout [" + layout.name + "]");
updateCurrentLayout(layout);
_detectContainerChange = true;
}
}
private function applyLayout(layout:LayoutDefinition):void {
_detectContainerChange = false;
if (layout != null) {
layout.applyToCanvas(_canvas);
dispatchSwitchedLayoutEvent(layout.name);
}
//trace(LOG + " applyLayout layout [" + layout.name + "]");
updateCurrentLayout(layout);
_detectContainerChange = true;
}
public function handleLockLayoutEvent(e: LockLayoutEvent):void {
@ -282,47 +282,48 @@ package org.bigbluebutton.modules.layout.managers
}
}
}
private function onContainerResized(e:ResizeEvent):void {
//trace(LOG + "Canvas is changing as user is resizing browser");
/*
* the main canvas has been resized
* while the user is resizing the window, this event is dispatched
* multiple times, so we use a timer to re-apply the current layout
* only once, when the user finished his action
*/
_applyCurrentLayoutTimer.reset();
_applyCurrentLayoutTimer.start();
}
private function onActionOverWindowFinished(e:MDIManagerEvent):void {
if (LayoutDefinition.ignoreWindow(e.window))
return;
checkPermissionsOverWindow(e.window);
//trace(LOG + "Window is being resized. Event=[" + e.type + "]");
//updateCurrentLayout(null);
/*
* All events must be delayed because the window doesn't actually
* change size until after the animation has finished.
*/
_sendCurrentLayoutUpdateTimer.reset();
_sendCurrentLayoutUpdateTimer.start();
}
private function updateCurrentLayout(layout:LayoutDefinition):LayoutDefinition {
//trace(LOG + "updateCurrentLayout");
if (layout != null) {
if (_currentLayout) _currentLayout.currentLayout = false;
_currentLayout = layout;
//trace(LOG + "updateCurrentLayout - currentLayout = [" + layout.name + "]");
layout.currentLayout = true;
} else {
_currentLayout = LayoutDefinition.getLayout(_canvas, ResourceUtil.getInstance().getString('bbb.layout.combo.customName'));
//trace(LOG + "updateCurrentLayout - layout is NULL! Setting currentLayout = [" + _currentLayout.name + "]");
}
return _currentLayout;
}
private function onContainerResized(e:ResizeEvent):void {
//trace(LOG + "Canvas is changing as user is resizing browser");
/*
* the main canvas has been resized
* while the user is resizing the window, this event is dispatched
* multiple times, so we use a timer to re-apply the current layout
* only once, when the user finished his action
*/
_applyCurrentLayoutTimer.reset();
_applyCurrentLayoutTimer.start();
}
private function onActionOverWindowFinished(e:MDIManagerEvent):void {
if (LayoutDefinition.ignoreWindow(e.window))
return;
checkPermissionsOverWindow(e.window);
//trace(LOG + "Window is being resized. Event=[" + e.type + "]");
//updateCurrentLayout(null);
/*
* All events must be delayed because the window doesn't actually
* change size until after the animation has finished.
*/
_sendCurrentLayoutUpdateTimer.reset();
_sendCurrentLayoutUpdateTimer.start();
}
private function updateCurrentLayout(layout:LayoutDefinition):LayoutDefinition {
//trace(LOG + "updateCurrentLayout");
if (layout != null) {
if (_currentLayout)
_currentLayout.currentLayout = false;
_currentLayout = layout;
//trace(LOG + "updateCurrentLayout - currentLayout = [" + layout.name + "]");
layout.currentLayout = true;
} else {
_currentLayout = LayoutDefinition.getLayout(_canvas, ResourceUtil.getInstance().getString('bbb.layout.combo.customName'));
//trace(LOG + "updateCurrentLayout - layout is NULL! Setting currentLayout = [" + _currentLayout.name + "]");
}
return _currentLayout;
}
}
}

View File

@ -33,7 +33,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
creationComplete="onCreationComplete()">
<mate:Listener type="{ShortcutEvent.FOCUS_VIDEO_WINDOW}" method="focusWindow" />
<mate:Listener type="{SwitchedLayoutEvent.SWITCHED_LAYOUT_EVENT}" method="onLayoutChanged" />
<mx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
@ -41,6 +42,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import mx.core.UIComponent;
import org.bigbluebutton.core.KeyboardUtil;
import org.bigbluebutton.core.events.SwitchedLayoutEvent;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.main.views.MainCanvas;
import org.bigbluebutton.modules.videoconf.model.VideoConfOptions;
@ -50,6 +52,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private var keyCombos:Object;
private var disp:Dispatcher = new Dispatcher();
private var darkMode:Boolean;
private function onCreationComplete():void {
hotkeyCapture();
titleBarOverlay.tabIndex = videoOptions.baseTabIndex;
@ -89,7 +93,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
override protected function resourcesChanged():void {
super.resourcesChanged();
this.title = ResourceUtil.getInstance().getString("bbb.videodock.title");
if (!darkMode) {
this.title = ResourceUtil.getInstance().getString("bbb.videodock.title");
} else {
this.title = "";
}
if (titleBarOverlay != null) {
titleBarOverlay.accessibilityName = ResourceUtil.getInstance().getString('bbb.videoDock.titleBar');
@ -115,6 +123,21 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
focusManager.setFocus(titleBarOverlay);
}
private function onLayoutChanged(e:SwitchedLayoutEvent):void {
if(e.layoutID != "bbb.layout.name.videochat"){
setStyle("styleNameFocus", "videoDockStyleFocus");
setStyle("styleNameNoFocus", "videoDockStyleNoFocus");
showControls = true;
this.title = ResourceUtil.getInstance().getString("bbb.videodock.title");
} else {
setStyle("styleNameFocus", "videoDockStyleFocusChatLayout");
setStyle("styleNameNoFocus", "videoDockStyleNoFocusChatLayout");
showControls = false;
this.title = "";
}
styleChanged("styleName");
}
private function remoteMinimize(e:ShortcutEvent):void {
if (!minimized) {
this.minimize();