| demos\blackmajic\application.sdf |
1 Application { 2 name: "BlackMajic" 3 lookAndFeelPropertiesURL:<< 4 defaultBackground=ColorShade|#161920 5 foregroundColor=ColorShade|#818083 6 brightForeground=ColorShade|foregroundColor+50 7 podHilite=ColorShade|green 8 linkColor=Color|#ffffff 9 Sage.control=Color|defaultBackground 10 Sage.foreground=Color|foregroundColor 11 12 Sage.ComboBox.button.border=Border|"{matte [insets='0,1,0,0']}" 13 Sage.ComboBox.border=Border|"{line_3d [ cornerArc='6' ]}" 14 Sage.ComboBox.background=BackgroundColor|"Sage.controlLtGradient, Sage.controlDkGradient" 15 Sage.ComboBox.macIconStyle=Boolean|false 16 Sage.html.styleSheet=URL|stylesheet.css 17 18 >> [ inline="true", keep_color_keys="true" ] 19 resourceIconsURL:<< 20 icon_checkbox=images/checkbox.png 21 icon_checkbox_checked=images/checkbox_checked.png 22 >> [ inline="true" ] 23 /** 24 * A custom painter for list type selections 25 */ 26 selectionPainter { 27 bgColor: "podHilite@50,podHilite" 28 borders { 29 matte [ color="controlShadow", insets="1,0,1,0" ] 30 } 31 } [ foreground="controlDkShadow" ] 32 /** 33 * A custom painter for list type selections 34 * when the widget looses focus 35 */ 36 lostFocusSelectionPainter { 37 bgColor: "white@50,controlShadow@50" 38 borders { 39 matte [ color="controlShadow", insets="1,0,1,0" ] 40 } 41 } [ foreground="b" ] 42 mainWindow { 43 //create a template for the header buttons 44 templateURL:<< 45 TemplateContext { 46 widgets { 47 { 48 Canvas { 49 templateName: "canvas" 50 borders { 51 line [thickness=2] 52 } 53 verticalAlign: full 54 horizontalAlign: full 55 } 56 } 57 { 58 Slider { 59 templateName: "equalizerSlider" 60 focusable: false 61 horizontal: false 62 showTicks: true 63 trackPainter { 64 width: "10" 65 bgColor: "defaultBackground-10, defaultBackground+20" 66 borders { 67 line_3d [ cornerArc="6" ] 68 } 69 } 70 thumbIcon: "images/equalizer_thumb.png" 71 } 72 } 73 { 74 PushButton { 75 templateName: "headerButton" 76 borders { 77 line [ color="transparent", cornerArc="10",thickness=2] 78 empty [insets="4,4,4,4"] 79 } 80 font { 81 size: "+3" 82 style: bold 83 } 84 fgColor: "foregroundColor" 85 bgColor: "defaultBackground@1" 86 rolloverEnabled: false 87 buttonStyle: toggle_toolbar 88 selectionPainter { 89 bgColor: "Sage.controlDkShadow,Sage.controlDkShadow~brighter" 90 borders { 91 line [cornerArc=10,thickness=2,color="podHilite"] 92 empty [insets="4,4,4,4"] 93 } 94 } [foreground="brightForeground"] 95 } 96 } 97 } 98 } 99 100 >> [ inline="true" ] 101 title: "Black Majic" 102 scriptURL:<< 103 function fadeWindow(value) { 104 window.translucency=value/255 105 } 106 >> [ inline="true" ] 107 decorated: false 108 windowPainter { 109 bgColor: "defaultBackground" 110 borders { 111 line [ cornerArc="10", thickness="2" ] 112 } 113 } 114 contentPanePainter { 115 bgColor: "defaultBackground" 116 borders { 117 line [ padForArc="false", color="white", cornerArc="7", thickness="1" ] 118 } 119 } [ fillColor="defaultBackground" ] 120 viewer { 121 Form { 122 layout: forms 123 rows: "2dlu,d,4dlu,d,14dlu,[450dlu,d]:g,14dlu,d,d" 124 columns: "d,d,c:450dlu:g,d,d,2dlu" 125 widgets { 126 { 127 Navigator { 128 borders { 129 line_3d [ cornerArc="6" ] 130 } 131 columnSpan: 6 132 horizontalAlign: center 133 font { 134 size: "+2" 135 style: bold 136 } 137 fgColor: "brightForeground" 138 bounds { 139 x: "0" 140 y: "3" 141 height: "2ln" 142 } 143 type: toggle 144 selectedIndex: 0 145 selectionPainter { 146 bgColor: "podHilite+30,podHilite-30" 147 } 148 textVAlignment: center 149 actions { 150 { 151 value: "Skynard" 152 } [ onAction="stack.switchTo(0)" ] 153 { 154 value: "HTML 5 Canvas" 155 } [ onAction="stack.switchTo(1)" ] 156 { 157 value: "JavaFX" 158 enabled: false 159 } [ onAction="stack.switchTo(2)" ] 160 } 161 } [ onConfigure="if(java.lang.System.getProperty('jnlp.javafx')=='true'){widget.setActionEnabled(2,true)}" ] 162 } 163 { 164 StackPane { 165 name: "stack" 166 verticalAlign: full 167 horizontalAlign: full 168 bgColor: "transparent" 169 bounds { 170 x: "2" 171 y: "5" 172 height: "-1" 173 } 174 viewerURLs { 175 "skin.sdf" 176 "html_canvas.sdf" 177 "javafx.sdf" 178 } 179 } 180 } 181 { 182 Slider { 183 bounds { 184 x: "2" 185 y: "6" 186 } 187 focusable: false 188 focusPainted: false 189 value: 255 190 minValue: 64 191 maxValue: 255 192 minorTickSpacing: 15 193 majorTickSpacing: 30 194 leftIcon: "images/transparent.png" 195 rightIcon: "images/opaque.png" 196 thumbIcon: "images/fade_thumb.png" 197 trackPainter { 198 y: "3" 199 height: "6" 200 bgColor: "Sage.controlDkGradient,defaultBackground+10" 201 borders { 202 line_3d [ cornerArc="4" ] 203 } 204 } 205 } [ onChange="fadeWindow(widget.value)" ] 206 } 207 { 208 Label { 209 bounds { 210 x: "2" 211 y: "7" 212 } 213 value: "Disappearing Act" 214 } 215 } 216 { 217 Label { 218 borders{} 219 bounds { 220 x: "2" 221 y: "1" 222 } 223 cursorName: "move" 224 icon: "images/window_handle.png" 225 } [ onConfigure="window.addWindowDragger(widget.dataComponent)" ] 226 } 227 { 228 PushButton { 229 borders { 230 none 231 } 232 bounds { 233 x: "4" 234 y: "1" 235 } 236 focusable: false 237 icon: "resource:Sage.icon.close" 238 rolloverEnabled: false 239 buttonStyle: toolbar 240 } [ onAction="window.close()" ] 241 } 242 } 243 } 244 } 245 } [ manager="simple", opaque="false" ] 246 } 247 248