You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Sergey Grebnov (JIRA)" <ji...@apache.org> on 2014/09/11 09:42:34 UTC

[jira] [Commented] (CB-7520) Add MRT image support for Windows platform icons

    [ https://issues.apache.org/jira/browse/CB-7520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14129759#comment-14129759 ] 

Sergey Grebnov commented on CB-7520:
------------------------------------

Similar to Android platform `density` attribute it is proposed to simplify process of adding all different image sizes by introducing `target` attribute

{code}
    <platform name="windows">
        <icon src="res/win/_smalllogo.png" target="Square30x30Logo" />
        <icon src="res/win/_Square44x44Logo.png" target="Square44x44Logo" />
        <icon src="res/win/_Square70x70Logo.png" target="Square70x70Logo" />
        <icon src="res/win/_Square71x71Logo.png" target="Square71x71Logo" />
        <icon src="res/win/_Square150x150Logo.png" target="Square150x150Logo" />
        <icon src="res/win/_Square310x310Logo.png" target="Square310x310Logo" />

        <icon src="res/win/_Wide310x150Logo.png" target="Wide310x150Logo" />
        <icon src="res/win/_StoreLogo.png" target="StoreLogo" />

        <splash src="res/win/_SplashScreen.png" target="SplashScreen" />
        <splash src="res/win/_SplashScreenPhone.png" target="SplashScreenPhone" />
    </platform>
{code}

In example above
{code}
<icon src="res/win/_smalllogo.png" target="Square30x30Logo" />
{code} 
res/win/_smalllogo.png is copied as Square30x30Logo.scale-100.png
res/win/_smalllogo.scale-180.png (if exists) is copied as Square30x30Logo.scale-180.png
etc


The previous way to define images by size must be supported as well, for example
{code}
    <platform name="windows">
        <icon src="res/win/_logo.png" width="150" height="150" />
        <icon src="res/win/_smalllogo.png" width="30" height="30" />
        <icon src="res/win/_storelogo.png" width="50" height="50" />
        
        <icon src="res/win/_Square44x44Logo.scale-240.png" width="106" height="106" />
        <icon src="res/win/_Square71x71Logo.scale-240.png" width="170" height="170" />
        <icon src="res/win/_Square70x70Logo.png" width="70" height="70" />
        <icon src="res/win/_Square310x310Logo.png" width="310" height="310" />
        <icon src="res/win/_Square71x71Logo.scale-240.png" width="170" height="170" />
        <icon src="res/win/_Square150x150Logo.scale-240.png" width="360" height="360" />
        <icon src="res/win/_StoreLogo.scale-240.png" width="120" height="120" />
        <icon src="res/win/_Wide310x150Logo.scale-240.png" width="744" height="360" />
        <icon src="res/win/_Wide310x150Logo.png" width="310" height="150" />

        <splash src="res/win/_splashscreen.png" width="620" height="300" />
        <splash src="res/win/_SplashScreen.scale-240.png" width="1152" height="1920" />
    </platform>
{code}

> Add MRT image support for Windows platform icons
> ------------------------------------------------
>
>                 Key: CB-7520
>                 URL: https://issues.apache.org/jira/browse/CB-7520
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Windows
>            Reporter: Sergey Grebnov
>            Assignee: Sergey Grebnov
>              Labels: config.xml, icons, images, windows
>
> MS platforms support the idea of MRT images where you refer to it as follows:
> image.png
> ...but underneath there are actually different images per DPI...
> image.scale-100.png
> image.scale-140.png
> ... etc ...
> The following must be improved to support MRT images
> 1. Scaled image versions are copied to platform images folder if defined in config.xml
> 2. Ensure all new image files from platform images folder are added to the project.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)