||| Maintained by: mgordon

{curl 6.0 applet}
{curl-file-attributes character-encoding = "utf8"}
{applet 
    manifest = "manifest.mcurl",
    {compiler-directives careful? = true},
    resource-directory = "resources",
    translations-file = "messages.xml"
}

{import * from COM.CURL.GUI.STYLED-CONTROLS}
{import * from CURL.GUI.EXTRAS}
{import * from CURL.GRAPHICS.IMAGEFILTER, using-name = IMAGEFILTER}
{import * from CURL.IO.JSON}
{import * from CURL.GRAPHICS.WINDOW}
{import * from CURL.GUI.SHAPES}

{include "sample-dialog.scurl"}
{include "proto-style-sheet.scurl"}
{include "style-designer-classes.scurl"}

{install-style-sheet {manifest-url "file", "DEFAULT-STYLE-SHEET"}} ||""

{let designer:StyleDesignerApp = {StyleDesignerApp}}
{let shown?:bool = false}

{View
    background = "silver", ||""
    font-size = 10pt,
    visibility = "normal",  ||""

    designer,

    {on e:WindowClose do
        {if not {designer.exit} then
            {e.consume}
        }
    },
    {on e:ViewVisibilityEvent at v:View do
        {if e.visibility != WindowVisibility.hidden then
            {if not shown? then
                {after 0s do
                    {v.set-size-from-child}
                    {designer.refresh-title}
                }
                set shown? = true
            }
        }
    }
}
