0

I'm trying to style the title of the title label in a Spark Window Application. I think if I can find the correct CSS selector I can set it but I haven't been able to find it.

    WindowedApplication  {
        skinClass:ClassReference("spark.skins.spark.SparkChromeWindowedApplicationSkin");
    }

    WindowedApplication > TitleBar { 
        fontSize: 24; /* this doesn't work */
    }

Here is more info on the Spark Window Application, http://help.adobe.com/en_US/Flex/4.0/UsingSDK/WSacd9bdd0c5c09f4a-690d4877120e8b878b0-7fd8.html

Update:

It looks like the styles are defined inline in MacTitleBarSkin. So even if I could style them using CSS there is nothing more specific than inline styles. I tried to remove the styles in the MacTitleBarSkin but they don't seem to be removing. PS I'm using Flex 4.14RC.

1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231

2 Answers2

0

The title from the WindowedApplication itself can not be changed programmatically. It is based on the OS settings.

If you do want to customize it, you will have to customize the complete application container (including close/maximize/minimize buttons). You can achieve this by setting <systemChrome></systemChrome> to "none" in your application descriptor.

  • With SparkChromeWindowedApplicationSkin it is not part of the chrome. I think styles don't work because they are defined inline in MacTitleBarSkin but I've tried removing them and nothings changed. – 1.21 gigawatts Jan 14 '15 at 10:43
  • Did you change the application descriptor systemChrome property? if not, here's a quote from the article you provided in your question: "If systemChrome is set to “standard” in the application .xml file (or flash.display.NativeWindowSystemChrome.STANDARD in ActionScript) the operating system renders the chrome." – Robin van den Bogaard Jan 14 '15 at 11:30
  • Yes. Thanks for mentioning that. I have it changed to none. With the Spark skin I mention above, the title bar is part of the skin. – 1.21 gigawatts Jan 14 '15 at 20:45
0

It looks like this will work but you have to copy the skins into your project and then remove the styles on the titleText label in MacTitleBarSkin:

    windowChrome|MacTitleBarSkin s|Group s|Label#titleText {
        fontSize: 12;
        color: red;
    }

See this post on how to import skins into your project.

Community
  • 1
  • 1
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231