WinRT: Refactor icon specification usage

Naming for different logo sizes on WinRT has been varying in the
past and evolved from using small/medium/large to some being
explicit (71x71).

Add new values introduced by 8.1 (310x150, 310x310,...) and clean up
mixed usage. Detailed pixel versions overrule general specification
and latter ones stay mostly for compatibility reasons. Still the
preferred way is to use explicit pixel values.

Task-number: QTBUG-43644
Change-Id: I9173ec2951a82e5eac9d8c9956bfb0bb4d1a2459
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This commit is contained in:
Maurice Kalinowski 2015-01-09 15:48:50 +01:00
parent e18f4bca28
commit 2a02a01709
9 changed files with 24 additions and 6 deletions

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 737 B

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -27,14 +27,18 @@
Description=\"$${WINRT_MANIFEST.description}\"
BackgroundColor=\"$${WINRT_MANIFEST.background}\"
ForegroundText=\"$${WINRT_MANIFEST.foreground}\"
Square150x150Logo=\"$${WINRT_MANIFEST.logo_large}\"
Square30x30Logo=\"$${WINRT_MANIFEST.logo_small}\">
<m2:DefaultTile>
Square150x150Logo=\"$${WINRT_MANIFEST.logo_150x150}\"
Square30x30Logo=\"$${WINRT_MANIFEST.logo_30x30}\">
<m2:DefaultTile Square310x310Logo=\"$${WINRT_MANIFEST.logo_310x310}\"
Wide310x150Logo=\"$${WINRT_MANIFEST.logo_310x150}\"
Square70x70Logo=\"$${WINRT_MANIFEST.logo_70x70}\">
<m2:ShowNameOnTiles>
<m2:ShowOn Tile=\"square150x150Logo\" />
<m2:ShowOn Tile=\"wide310x150Logo\" />
<m2:ShowOn Tile=\"square310x310Logo\" />
</m2:ShowNameOnTiles>
</m2:DefaultTile>
<m2:SplashScreen Image=\"$${WINRT_MANIFEST.logo_splash}\" />$${WINRT_MANIFEST.rotation_preference}
<m2:SplashScreen Image=\"$${WINRT_MANIFEST.logo_620x300}\" />$${WINRT_MANIFEST.rotation_preference}
</m2:VisualElements>
</Application>
</Applications>$${WINRT_MANIFEST.capabilities}$${WINRT_MANIFEST.dependencies}

View File

@ -30,11 +30,13 @@
Description=\"$${WINRT_MANIFEST.description}\"
BackgroundColor=\"$${WINRT_MANIFEST.background}\"
ForegroundText=\"$${WINRT_MANIFEST.foreground}\"
Square150x150Logo=\"$${WINRT_MANIFEST.logo_large}\"
Square150x150Logo=\"$${WINRT_MANIFEST.logo_150x150}\"
Square44x44Logo=\"$${WINRT_MANIFEST.logo_44x44}\">
<m3:DefaultTile Square71x71Logo=\"$${WINRT_MANIFEST.logo_71x71}\">
<m3:DefaultTile Square71x71Logo=\"$${WINRT_MANIFEST.logo_71x71}\"
Wide310x150Logo=\"$${WINRT_MANIFEST.logo_310x150}\">
<m3:ShowNameOnTiles>
<m3:ShowOn Tile=\"square150x150Logo\" />
<m3:ShowOn Tile=\"wide310x150Logo\" />
</m3:ShowNameOnTiles>
</m3:DefaultTile>
<m3:SplashScreen Image=\"$${WINRT_MANIFEST.logo_480x800}\" />$${WINRT_MANIFEST.rotation_preference}

View File

@ -137,6 +137,18 @@
ICONS_FOUND ~= s/.*\\\$\\\$\\{WINRT_MANIFEST\\.((logo|tile)_[^\}]+)\\}.*/\\1/g
for (ICON_NAME, ICONS_FOUND) {
ICON_FILE = $$eval(WINRT_MANIFEST.$$ICON_NAME)
isEmpty(ICON_FILE) {
equals(ICON_NAME, "logo_310x150"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_wide)
else: equals(ICON_NAME, "logo_150x150"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_large)
# Windows Phone specifics
else: equals(ICON_NAME, "logo_480x800"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_splash)
else: equals(ICON_NAME, "logo_71x71"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_medium)
else: equals(ICON_NAME, "logo_44x44"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_small)
# Windows RT specifics
else: equals(ICON_NAME, "logo_620x300"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_splash)
else: equals(ICON_NAME, "logo_70x70"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_medium)
else: equals(ICON_NAME, "logo_30x30"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_small)
}
isEmpty(ICON_FILE): ICON_FILE = $$WINRT_ASSETS_PATH/$${ICON_NAME}.png
icon_$${ICON_NAME}.input = $$ICON_FILE
icon_$${ICON_NAME}.output = $$BUILD_DIR/assets/$$basename(ICON_FILE)