<mx:HBox id="headerContent" width="100%" height="{headerGroup.height - 45}" backgroundAlpha="{getStyle('contentBackgroundAlpha')}" backgroundColor="{getStyle('contentBackgroundColor')}"
Since this change is for the Header controller only, I suggest making changes to headercontroller widget only. but See Coordinates widget source.If you still want it through main config file, you will have to make following changes:You will have to perform following:In defaults.css,add:.HeaderStyle { background-color: #FFFF00; // default Color }In config.xml,add the seventh color e.g. 0xFFFF00 (yellow) first six are used elsewhere.e.g. <style> <colors>0x4C2600,0xFFEDB8,0xB2AD81,0x6F6750,0x4C2600,0xFFFFFF,0xFFFF00</colors> <alpha>0.8</alpha> </style>Below is the Code from UIManager.as that you will need to modify.Add the lines that has comment "My Code" or "My Code Start" . . . var titleFontName:String = (configData.titleFont.name != "") ? configData.titleFont.name : defaultFontName; var titleFontSize:int = (configData.titleFont.size != 0) ? configData.titleFont.size : 20; var fontName:String = (configData.font.name != "") ? configData.font.name : defaultFontName; var fontSize:int = (configData.font.size != 0) ? configData.font.size : defaultFontSize; var headerBackGroundColor:uint; //My Code styleAlpha = configData.styleAlpha; if (numberOfStyleColors > 4) { textColor = configData.styleColors[0]; backgroundColor = configData.styleColors[1]; rolloverColor = configData.styleColors[2]; selectionColor = configData.styleColors[3]; titleColor = configData.styleColors[4]; applicationBackgroundColor = (configData.styleColors[5] != null) ? configData.styleColors[5] : 0xFFFFFF; headerBackGroundColor = configData.styleColors[6]; //My Code } . . . cssStyleDeclarationBannerTitle.setStyle("fontFamily", titleFontName); topLevelStyleManager.setStyleDeclaration(".BannerTitle", cssStyleDeclarationBannerTitle, false); //My Code Start var cssStyleDeclarationHeaderStyle:CSSStyleDeclaration = topLevelStyleManager.getStyleDeclaration(".HeaderStyle"); if (numberOfStyleColors > 4) { cssStyleDeclarationHeaderStyle.setStyle("backgroundColor", headerBackGroundColor); } topLevelStyleManager.setStyleDeclaration(".HeaderStyle", cssStyleDeclarationHeaderStyle, false); // My Code End var cssStyleDeclarationBannerSubtitle:CSSStyleDeclaration = new CSSStyleDeclaration(".BannerSubtitle"); if (numberOfStyleColors > 4) { cssStyleDeclarationBannerSubtitle.setStyle("color", titleColor); } topLevelStyleManager.setStyleDeclaration(".BannerSubtitle", cssStyleDeclarationBannerSubtitle, false); Hope this helps.
.HeaderStyle { background-color: #FFFF00; // default Color }
<style> <colors>0x4C2600,0xFFEDB8,0xB2AD81,0x6F6750,0x4C2600,0xFFFFFF,0xFFFF00</colors> <alpha>0.8</alpha> </style>
. . . var titleFontName:String = (configData.titleFont.name != "") ? configData.titleFont.name : defaultFontName; var titleFontSize:int = (configData.titleFont.size != 0) ? configData.titleFont.size : 20; var fontName:String = (configData.font.name != "") ? configData.font.name : defaultFontName; var fontSize:int = (configData.font.size != 0) ? configData.font.size : defaultFontSize; var headerBackGroundColor:uint; //My Code styleAlpha = configData.styleAlpha; if (numberOfStyleColors > 4) { textColor = configData.styleColors[0]; backgroundColor = configData.styleColors[1]; rolloverColor = configData.styleColors[2]; selectionColor = configData.styleColors[3]; titleColor = configData.styleColors[4]; applicationBackgroundColor = (configData.styleColors[5] != null) ? configData.styleColors[5] : 0xFFFFFF; headerBackGroundColor = configData.styleColors[6]; //My Code } . . . cssStyleDeclarationBannerTitle.setStyle("fontFamily", titleFontName); topLevelStyleManager.setStyleDeclaration(".BannerTitle", cssStyleDeclarationBannerTitle, false); //My Code Start var cssStyleDeclarationHeaderStyle:CSSStyleDeclaration = topLevelStyleManager.getStyleDeclaration(".HeaderStyle"); if (numberOfStyleColors > 4) { cssStyleDeclarationHeaderStyle.setStyle("backgroundColor", headerBackGroundColor); } topLevelStyleManager.setStyleDeclaration(".HeaderStyle", cssStyleDeclarationHeaderStyle, false); // My Code End var cssStyleDeclarationBannerSubtitle:CSSStyleDeclaration = new CSSStyleDeclaration(".BannerSubtitle"); if (numberOfStyleColors > 4) { cssStyleDeclarationBannerSubtitle.setStyle("color", titleColor); } topLevelStyleManager.setStyleDeclaration(".BannerSubtitle", cssStyleDeclarationBannerSubtitle, false);
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.