⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 load_skin.js

📁 javascript 很酷的类库
💻 JS
📖 第 1 页 / 共 2 页
字号:
/*============================================================    "SmartClient" theme programmatic settings    SmartClient v5.5    Copyright 2001-2007, Isomorphic Software============================================================*/isc.loadSkin = function (theWindow) {if (theWindow == null) theWindow = window;with (theWindow) {//----------------------------------------// Specify skin directory//----------------------------------------    // must be relative to your application file or isomorphicDir    isc.Page.setSkinDir("[ISOMORPHIC]/skins/TreeFrog/")//----------------------------------------// Load skin style sheet(s)//----------------------------------------    isc.Page.loadStyleSheet("[SKIN]/skin_styles.css", theWindow)//============================================================//  Component Skinning//============================================================//   1) Scrollbars//   2) Buttons//   3) Resizebars//   4) Sections//   5) Progressbars//   6) TabSets//   7) Windows//   8) Dialogs//   9) Pickers//  10) Menus//  11) Hovers//  12) ListGrids//  13) TreeGrids//  14) Form controls//  15) Drag & Drop//  16) Edges//  17) Sliders//============================================================//----------------------------------------// 1) Scrollbars//----------------------------------------    isc.Canvas.addProperties({        showCustomScrollbars:true,        scrollbarSize:18    })    isc.ScrollThumb.addProperties({        capSize:5,        vSrc:"[SKIN]vthumb.png",        hSrc:"[SKIN]hthumb.png",        showGrip:true,        gripLength:13,        gripBreadth:5,        backgroundColor:"transparent"    })    isc.Scrollbar.addProperties({        allowThumbDownState:true,        btnSize:18,        thumbMinSize:25,        startThumbOverlap:-5,        endThumbOverlap:-2,        vSrc:"[SKIN]vscroll.png",        hSrc:"[SKIN]hscroll.png",        showTrackEnds:true,        trackStartSize:10,        trackEndSize:10,        startImg:{name:"start", width:19, height:19}    })//----------------------------------------// 2) Buttons//----------------------------------------        // "IButton" is the new standard button class for SmartClient applications. Application    // code should use IButton instead of Button for all standalone buttons. Other skins may    // map IButton directly to Button, so this single class will work everywhere. Button remains    // for internal and advanced uses (eg if you need to mix both CSS-based and image-based    // standalone buttons in the same application).    isc.defineClass("IButton", "StretchImgButton").addProperties({        src:"[SKIN]button/button.png",        height:25,        width:100,        capSize:7,        vertical:false,        valign:"top",        labelVPad:4,        titleStyle:"buttonTitle",        showFocused:true,        showFocusedAsOver:false    });    isc.defineClass("IAutoFitButton", "IButton").addProperties({        autoFit: true,        autoFitDirection: isc.Canvas.HORIZONTAL    });//----------------------------------------// 3) Resizebars//----------------------------------------    // StretchImgSplitbar class renders as resize bar with     // end caps, body, grip    isc.StretchImgSplitbar.addProperties({        // modify vSrc / hSrc for custom appearance        //vSrc:"[SKIN]vsplit.gif",        //hSrc:"[SKIN]hsplit.gif",        capSize:10,        showGrip:true    })        // ImgSplitbar renders as resizebar with resize grip only    isc.ImgSplitbar.addProperties({        // modify these properties for custom appearance        //vSrc:"[SKIN]vgrip.png",        //hSrc:"[SKIN]hgrip.png",        //showDown:true,        //styleName:"splitbar"    })        isc.Snapbar.addProperties({        vSrc:"[SKIN]vsplit.png",        hSrc:"[SKIN]hsplit.png",        capSize:8    })        isc.Layout.addProperties({        resizeBarSize:13,        // Use the Snapbar as a resizeBar by default - subclass of Splitbar that         // shows interactive (closed/open) grip images        // Other options include the Splitbar, StretchImgSplitbar or ImgSplitbar        resizeBarClass:"Snapbar"    })    //----------------------------------------// 4) Sections//----------------------------------------    if (isc.SectionItem) {        isc.SectionItem.addProperties({            sectionHeaderClass:"ImgSectionHeader",            height:28        })    }    if (isc.SectionStack) {        isc.SectionStack.addProperties({            sectionHeaderClass:"ImgSectionHeader",            headerHeight:28,            itemStartIndent: 2,            itemEndIndent: 1        })        isc.ImgSectionHeader.changeDefaults("backgroundDefaults", {            showRollOver:true,            showDown:false,            showDisabledIcon:false,            showRollOverIcon:true,            src:"[SKIN]SectionHeader/header.png",            icon:"[SKIN]SectionHeader/opener.png",            iconSize:18,            padding:1,            capSize:9,            titleStyle:"imgSectionHeaderTitle",            baseStyle:"imgSectionHeader",            backgroundColor:"transparent"        })        isc.SectionHeader.addProperties({            icon:"[SKIN]SectionHeader/opener.png",            iconSize:18        })    }//----------------------------------------// 5) Progressbars//----------------------------------------    if (isc.Progressbar) {        isc.Progressbar.addProperties({            horizontalItems: [            {name:"bar_start",size:3},            {name:"bar_stretch",size:0},            {name:"bar_end",size:4},            {name:"empty_start",size:2},            {name:"empty_stretch",size:0},            {name:"empty_end",size:2}            ],            breadth:12        })    }//----------------------------------------// 6) TabSets//----------------------------------------    if (isc.TabSet) {        isc.TabSet.addProperties({            tabBarThickness:23,            scrollerButtonSize:19,            pickerButtonSize:21,                        symmetricScroller:false,            symmetricPickerButton:false,                        scrollerSrc:"[SKIN]scroll.png",            pickerButtonSrc:"[SKIN]picker.png",                        paneContainerClassName:"normal",                        showPaneContainerEdges:true,            showPartialEdges:true,                        paneMargin:5,                        symmetricEdges:false,            topEdgeSizes:{defaultSize:2, top:1, bottom:25},            bottomEdgeSizes:{defaultSize:2, bottom:1, top:25},            leftEdgeSizes:{defaultSize:2, left:1, right:25},            rightEdgeSizes:{defaultSize:2, right:1, left:25},                        topEdgeOffsets:{right:1, bottom:2},            bottomEdgeOffsets:{right:1, top:2},            leftEdgeOffsets:{bottom:1, right:2},            rightEdgeOffsets:{bottom:1, left:2}        });        isc.TabSet.changeDefaults("paneContainerDefaults", {            edgeImage:"[SKIN]/TabSet/ts.png",            edgeCenterBackgroundColor:"#FFFFFF"        })        isc.TabBar.addProperties({            stackZIndex:"firstOnTop",            memberOverlap:16,                        // keep the tabs from reaching the curved edge of the pane (regardless of align)            layoutEndMargin:10,            // have the baseline overlap the top edge of the TabSet, using rounded media            baseLineSrc:"[SKIN]baseline.png",            baseLineThickness:1,            baseLineCapSize:2        })    }        if (isc.ImgTab) {        isc.ImgTab.addProperties({            src:"[SKIN]tab.png",            items:[                {name:"start", width:8, height:8},                {name:"stretch", width:"*", height:"*"},                {name:"end", width:28, height:28}            ],            labelLengthPad:8,            showRollOver:true,            showDown:false,            titleStyle:"tabTitle"        })    }//----------------------------------------// 7) Windows//----------------------------------------    if (isc.Window) {        isc.Window.addProperties({            // rounded frame edges            showEdges:true,            edgeImage:"[SKIN]/Window/w.png",            customEdges:null,            edgeSize:7,             edgeBottom:2,            edgeTop:29,            edgeOffset:2,             edgeOffsetTop:4,            edgeOffsetBottom:2,            // set minimize height large enough to show header + 1px (sides) + 2px (footer) media            minimizeHeight:32,            showHeaderBackground:false,                        edgeOverflow:"hidden",            // clear backgroundColor and style since corners are rounded            backgroundColor:null,            styleName:"normal",            edgeCenterBackgroundColor:"white",            bodyColor:"transparent",            layoutMargin:0,            membersMargin:0,            showFooter:false,            showShadow:true,            shadowSoftness:2,            shadowOffset:4        })        isc.Window.changeDefaults("headerDefaults", {            layoutMargin:0,            layoutLeftMargin:5,            layoutRightMargin:5,            height:18, extraSpace: 7        })        isc.Window.changeDefaults("headerBackgroundDefaults", {            capSize:7        })        isc.Window.changeDefaults("headerIconDefaults", {            width:16,            height:16,            src:"[SKIN]/Window/headerIcon.png"        })        isc.Window.changeDefaults("restoreButtonDefaults", {             src:"[SKIN]/Window/restore.png",             showRollOver:true,             showDown:false,             width:18,             height:18        })        isc.Window.changeDefaults("closeButtonDefaults", {              src:"[SKIN]/Window/close.png",             showRollOver:true,             showDown:false,             width:18,             height:18        })        isc.Window.changeDefaults("maximizeButtonDefaults", {              src:"[SKIN]/Window/maximize.png",             showRollOver:true,             width:18,             height:18        })        isc.Window.changeDefaults("minimizeButtonDefaults", {              src:"[SKIN]/Window/minimize.png",             showRollOver:true,             showDown:false,             width:18,             height:18        })        isc.Window.changeDefaults("toolbarDefaults", {            buttonConstructor: "IButton"        })//----------------------------------------// 8) Dialogs//----------------------------------------        if (isc.Dialog) {            isc.Dialog.addProperties({                bodyColor:"transparent",                hiliteBodyColor:"transparent"            })

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -