📄 load_skin.js
字号:
// even though Dialog inherits from Window, we need a separate changeDefaults block // because Dialog defines its own toolbarDefaults isc.Dialog.changeDefaults("toolbarDefaults", { buttonConstructor: "IButton", height:45, // 10px margins + 25px button membersMargin:10 }) if (isc.Dialog.Warn && isc.Dialog.Warn.toolbarDefaults) { isc.addProperties(isc.Dialog.Warn.toolbarDefaults, { buttonConstructor: "IButton", height:45, membersMargin:10 }) } } } // end isc.Window//----------------------------------------// 9) Pickers//---------------------------------------- // add bevels and shadows to all pickers isc.__pickerDefaults = { showEdges:true, edgeSize:6, edgeImage:"[SKIN]/rounded/frame/FFFFFF/6.png", //edgeShowCenter: true, // not available for ridge edges backgroundColor:"#C7C7C7", showShadow:true, shadowDepth:6, shadowOffset:5 } if (isc.ButtonTable) { isc.ButtonTable.addProperties({ backgroundColor:"#FFFFFF" }) } if (isc.FormItem) { isc.FormItem.changeDefaults("pickerDefaults", isc.__pickerDefaults) } if (isc.CheckboxItem) { isc.CheckboxItem.addProperties({ checkedImage:"[SKIN]/DynamicForm/checked.png", uncheckedImage:"[SKIN]/DynamicForm/unchecked.png", unsetImage:"[SKIN]/DynamicForm/unchecked.png", valueIconWidth:15, valueIconHeight:15 }) } if (isc.ColorChooser) { isc.ColorChooser.addProperties(isc.__pickerDefaults) } if (isc.DateChooser) { isc.DateChooser.addProperties({ headerStyle:"dateChooserButton", baseNavButtonStyle:"dateChooserNavButton", baseWeekdayStyle:"dateChooserWeekday", baseWeekendStyle:"dateChooserWeekend", alternateWeekStyles:true, showEdges:true, edgeSize:6, edgeImage:"[SKIN]/Picker/p.png", edgeBottom:18, edgeOffset:2, edgeCenterBackgroundColor:"#FFFFFF", backgroundColor:null, showShadow:true, shadowDepth:6, shadowOffset:5, showDoubleYearIcon:false, skinImgDir:"images/DateChooser/", prevYearIcon:"[SKIN]doubleArrow_left.png", prevYearIconWidth:15, prevYearIconHeight:13, prevMonthIcon:"[SKIN]arrow_left.png", prevMonthIconWidth:7, prevMonthIconHeight:13, nextYearIcon:"[SKIN]doubleArrow_right.png", nextYearIconWidth:15, nextYearIconHeight:13, nextMonthIcon:"[SKIN]arrow_right.png", nextMonthIconWidth:7, nextMonthIconHeight:13 }) } if (isc.MultiFilePicker) { isc.MultiFilePicker.addProperties({ backgroundColor:"#C7C7C7" }) } if (isc.RelationPicker) { isc.RelationPicker.addProperties({ backgroundColor:"#C7C7C7" }) }//----------------------------------------// 10) Menus//---------------------------------------- if (isc.Menu) { isc.Menu.addProperties({ // Increase cellHeight to accomodate text + borders in "over" state. cellHeight:25, showShadow:true, shadowDepth:5, showEdges:true, edgeSize:10, edgeOffset:10, edgeOffsetLeft:2, edgeOffsetRight:2, edgeTop:17, edgeBottom:17, edgeImage:"[SKIN]/Menu/m.png", edgeCenterBackgroundColor:"#F7F7F7", submenuImage:{src:"[SKIN]submenu.png", height:15, width:8}, submenuDisabledImage:{src:"[SKIN]submenu_disabled.png", height:15, width:8}, // get rid of everything that could occlude center segment: // borders around table tableStyle:"normal", // XXX unreachable from CSS bodyBackgroundColor:"transparent" // also: non-rollover cell styles for menu need to avoid setting bgColor // for square/tinted edges only: //edgeBackgroundColor:"#fff0ff" } /* // submenus isc.Menu.addProperties({ cellHeight:25, showShadow:true, shadowDepth:5, showEdges:true, edgeSize:10, edgeOffsetLeft:2, edgeOffsetRight:2, edgeImage:"[SKIN]/Menu/sm.png", edgeCenterBackgroundColor:"#F7F7F7", tableStyle:"normal", bodyBackgroundColor:"transparent" } */ )} if (isc.MenuButton) { isc.MenuButton.addProperties({ menuButtonImage:"[SKIN]menu_button.png", menuButtonImageUp:"[SKIN]menu_button_up.png", iconWidth:12, iconHeight:8 }); }//----------------------------------------// 11) Hovers//---------------------------------------- if (isc.Hover) { isc.addProperties(isc.Hover.hoverCanvasDefaults, { showShadow:true, shadowDepth:5 }) }//----------------------------------------// 12) ListGrids//---------------------------------------- if (isc.ListGrid) { isc.ListGrid.addProperties({ // Render header buttons out as StretchImgButtons headerButtonConstructor:"ImgButton", sorterConstructor:"ImgButton", headerMenuButtonConstructor:"ImgButton", sortAscendingImage:{src:"[SKIN]sort_ascending.png", width:12, height:11}, sortDescendingImage:{src:"[SKIN]sort_descending.png", width:12, height:11}, backgroundColor:"#FFFFFF", headerBackgroundColor:"#D2CFD0", headerHeight:21, headerBaseStyle:"headerButton", // bgcolor tint and borders headerTitleStyle:"headerTitle", headerBarStyle:"headerBar", bodyStyleName:"gridBody", headerMenuButtonBaseStyle:"headerButton", headerMenuButtonTitleStyle:"headerTitle", headerMenuButtonIcon:"[SKIN]/ListGrid/headerMenuButton_icon.png", headerMenuButtonIconWidth:6, headerMenuButtonIconHeight:4, groupIcon:"[SKINIMG]/TreeGrid/folder.png" }) isc.ListGrid.changeDefaults("sorterDefaults", { // baseStyle / titleStyle is auto-assigned from headerBaseStyle src:"[SKIN]ListGrid/header.png", baseStyle:"sorterButton" }) isc.ListGrid.changeDefaults("headerButtonDefaults", { showTitle:true, showDown:false, // baseStyle / titleStyle is auto-assigned from headerBaseStyle src:"[SKIN]ListGrid/header.png" }) isc.ListGrid.changeDefaults("headerMenuButtonDefaults", { showDown:false, showTitle:true, src:"[SKIN]ListGrid/header.png" }) }//----------------------------------------// 13) TreeGrids//---------------------------------------- if (isc.TreeGrid) { isc.TreeGrid.addProperties({ folderIcon:"[SKIN]folder.png", nodeIcon:"[SKIN]file.png", manyItemsImage:"[SKIN]folder_file.png" }) }//----------------------------------------// 14) Form controls//---------------------------------------- if (isc.FormItem) {isc.FormItem.addProperties({ defaultIconSrc:"[SKIN]/controls/helper_control.gif", iconHeight:18, iconWidth:18, iconVAlign:"middle" })} if (isc.TextItem) {isc.TextItem.addProperties({ height:isc.Browser.isSafari ? 22 : 20 })} if (isc.SelectItem) {isc.SelectItem.addProperties({ showFocusedPickerIcon:true, pickerIconSrc:"[SKIN]/controls/selectPicker.png", height:20, pickerIconWidth:20 })} if (isc.ComboBoxItem) {isc.ComboBoxItem.addProperties({ showFocusedPickerIcon:true, pickerIconSrc:"[SKIN]/controls/comboBoxPicker.png", height:20, // pickerIcon automatically sizes to this height pickerIconWidth:20 })} // used by SelectItem and ComboBoxItem for picklist if (isc.ScrollingMenu) {isc.ScrollingMenu.addProperties({ border:"1px solid #606060", showShadow:true, shadowDepth:5 })} if (isc.DateItem) { isc.DateItem.addProperties({ pickerIconWidth:19, pickerIconHeight:16, pickerIconSrc:"[SKIN]/controls/date_control.gif" }) } if (isc.SpinnerItem) { isc.SpinnerItem.addProperties({ height:20 }) isc.SpinnerItem.INCREASE_ICON = isc.addProperties(isc.SpinnerItem.INCREASE_ICON, { width:20, height:10, showOver:true, showFocused:true, imgOnly:true, src:"[SKIN]/controls/spinner_control_increase.png" }) isc.SpinnerItem.DECREASE_ICON = isc.addProperties(isc.SpinnerItem.DECREASE_ICON, { width:20, height:10, showOver:true, showFocused:true, imgOnly:true, src:"[SKIN]/controls/spinner_control_decrease.png" }) } if (isc.PopUpTextAreaItem) {isc.PopUpTextAreaItem.addProperties({ popUpIconSrc: "[SKIN]/controls/text_control.gif", popUpIconWidth:16, popUpIconHeight:16 })} if (isc.ButtonItem && isc.IButton) {isc.ButtonItem.addProperties({ showFocused:true, showFocusAsOver:false, buttonConstructor:isc.IButton, height:25 })} if (isc.ToolbarItem && isc.IAutoFitButton) {isc.ToolbarItem.addProperties({ buttonConstructor:isc.IAutoFitButton, buttonProperties: { autoFitDirection: isc.Canvas.BOTH } })}//----------------------------------------// 15) Drag & Drop//---------------------------------------- // drag tracker drop shadow (disabled by default because many trackers are irregular shape) //isc.addProperties(isc.EH.dragTrackerDefaults, { // showShadow:true, // shadowDepth:4 //}); // drag target shadow and opacity isc.EH.showTargetDragShadow = true; isc.EH.targetDragOpacity = 50; //----------------------------------------// 16) Edges//---------------------------------------- // default edge style serves as a pretty component frame/border - just set showEdges:true if (isc.EdgedCanvas) { isc.EdgedCanvas.addProperties({ edgeSize:6, edgeImage:"[SKIN]/rounded/frame/FFFFFF/6.png" }) }//----------------------------------------// 17) Sliders//---------------------------------------- if (isc.Slider) { isc.Slider.addProperties({ thumbThickWidth:16, thumbThinWidth:16, trackWidth:6, trackCapSize:3, thumbSrc:"thumb.png", trackSrc:"track.png" }) }// specify where the browser should redirect if not supportedisc.Page.checkBrowserAndRedirect("[SKIN]/unsupported_browser.html");} // end with()} // end loadSkin()isc.loadSkin()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -