Commit 4d0979df authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov Committed by Alexander.Trofimov

настройки для цвета и инвертации кнопок скролла вынесены в settings

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55783 954022d7-b5bf-4e40-9824-e11837661b57
parent 0cc7b654
...@@ -53,7 +53,7 @@ function GetClientHeight( elem ) { ...@@ -53,7 +53,7 @@ function GetClientHeight( elem ) {
return 0; return 0;
} }
function CArrowDrawer() { function CArrowDrawer(settings) {
// размер квадратика в пикселах // размер квадратика в пикселах
this.Size = 16; this.Size = 16;
this.IsRetina = false; this.IsRetina = false;
...@@ -62,11 +62,10 @@ function CArrowDrawer() { ...@@ -62,11 +62,10 @@ function CArrowDrawer() {
this.ColorGradStart = {R:69, G:70, B:71}; this.ColorGradStart = {R:69, G:70, B:71};
this.ColorGradEnd = {R:116, G:117, B:118}; this.ColorGradEnd = {R:116, G:117, B:118};
this.ColorBorder = "#BBBEC2"; this.ColorBorder = settings && settings.strokeStyle ? settings.strokeStyle : "#BBBEC2";
this.ColorBackNone = settings && settings.scrollBackgroundColor ? settings.scrollBackgroundColor : "#F4F4F4";
this.ColorBackNone = "#F4F4F4"; this.ColorBackOver = settings && settings.scrollerColorOver ? settings.scrollerColorOver : "#D8DADC";
this.ColorBackOver = "#D8DADC"; this.ColorBackActive = settings && settings.scrollerColorActive ? settings.scrollerColorActive : "#7A7A7A";
this.ColorBackActive = "#7A7A7A";
// вот такие мега настройки для кастомизации) // вот такие мега настройки для кастомизации)
this.IsDrawBorderInNoneMode = false; this.IsDrawBorderInNoneMode = false;
...@@ -77,7 +76,7 @@ function CArrowDrawer() { ...@@ -77,7 +76,7 @@ function CArrowDrawer() {
this.ImageRight = null; this.ImageRight = null;
this.ImageBottom = null; this.ImageBottom = null;
this.IsNeedInvertOnActive = false; this.IsNeedInvertOnActive = settings && settings.isNeedInvertOnActive ? settings.isNeedInvertOnActive : false;
this.InitSize = function ( size, is_retina ) { this.InitSize = function ( size, is_retina ) {
if ( size == this.Size && is_retina == this.IsRetina && null != this.ImageLeft ) if ( size == this.Size && is_retina == this.IsRetina && null != this.ImageLeft )
...@@ -346,8 +345,7 @@ function ScrollObject( elemID, settings, dbg ) { ...@@ -346,8 +345,7 @@ function ScrollObject( elemID, settings, dbg ) {
this.settings = extendSettings( settings, scrollSettings ); this.settings = extendSettings( settings, scrollSettings );
this.ArrowDrawer = new CArrowDrawer(); this.ArrowDrawer = new CArrowDrawer(this.settings);
this.ArrowDrawer.ColorBackNone = this.settings.scrollBackgroundColor;
this.mouseUp = false; this.mouseUp = false;
this.mouseDown = false; this.mouseDown = false;
......
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
//scrollBackgroundColor:"#DDDDDD",//цвет фона скролла //scrollBackgroundColor:"#DDDDDD",//цвет фона скролла
//scrollerColor:"#EDEDED",//цвет ползунка скрола //scrollerColor:"#EDEDED",//цвет ползунка скрола
isViewerMode: false, isViewerMode: false,
wheelScrollLines: 3 wheelScrollLines: 3,
isNeedInvertOnActive: true
}; };
this.view = undefined; this.view = undefined;
......
...@@ -68,7 +68,8 @@ var GlobalSkinFlat = { ...@@ -68,7 +68,8 @@ var GlobalSkinFlat = {
RulerMarkersFillColor : "#FFFFFF", RulerMarkersFillColor : "#FFFFFF",
PageOutline : "#BBBEC2", PageOutline : "#BBBEC2",
STYLE_THUMBNAIL_WIDTH : 109, STYLE_THUMBNAIL_WIDTH : 109,
STYLE_THUMBNAIL_HEIGHT : 45 STYLE_THUMBNAIL_HEIGHT : 45,
isNeedInvertOnActive: true
}; };
var GlobalSkin = GlobalSkinTeamlab; var GlobalSkin = GlobalSkinTeamlab;
...@@ -2541,7 +2542,8 @@ function CEditorPage(api) ...@@ -2541,7 +2542,8 @@ function CEditorPage(api)
screenW: this.m_oEditor.HtmlElement.width, screenW: this.m_oEditor.HtmlElement.width,
screenH: this.m_oEditor.HtmlElement.height, screenH: this.m_oEditor.HtmlElement.height,
vscrollStep: 45, vscrollStep: 45,
hscrollStep: 45 hscrollStep: 45,
isNeedInvertOnActive: GlobalSkin.isNeedInvertOnActive
}; };
if (this.bIsRetinaSupport) if (this.bIsRetinaSupport)
...@@ -2555,9 +2557,6 @@ function CEditorPage(api) ...@@ -2555,9 +2557,6 @@ function CEditorPage(api)
else { else {
this.m_oScrollHor_ = new ScrollObject( "id_horizontal_scroll", settings ); this.m_oScrollHor_ = new ScrollObject( "id_horizontal_scroll", settings );
if (GlobalSkin.Name == "flat")
this.m_oScrollHor_.ArrowDrawer.IsNeedInvertOnActive = true;
this.m_oScrollHor_.onLockMouse = function(evt){ this.m_oScrollHor_.onLockMouse = function(evt){
check_MouseDownEvent(evt, true); check_MouseDownEvent(evt, true);
global_mouseEvent.LockMouse(); global_mouseEvent.LockMouse();
...@@ -2577,9 +2576,6 @@ function CEditorPage(api) ...@@ -2577,9 +2576,6 @@ function CEditorPage(api)
else { else {
this.m_oScrollVer_ = new ScrollObject( "id_vertical_scroll", settings ); this.m_oScrollVer_ = new ScrollObject( "id_vertical_scroll", settings );
if (GlobalSkin.Name == "flat")
this.m_oScrollVer_.ArrowDrawer.IsNeedInvertOnActive = true;
this.m_oScrollVer_.onLockMouse = function(evt){ this.m_oScrollVer_.onLockMouse = function(evt){
check_MouseDownEvent(evt, true); check_MouseDownEvent(evt, true);
global_mouseEvent.LockMouse(); global_mouseEvent.LockMouse();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment