From 2eede1781da06c146cd1a957737bd8a64789b65f Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Wed, 29 Sep 2010 21:28:26 +0000 Subject: [PATCH] Allow different sizes of the title screen logo. Small logos are no longer tiled and large ones no longer cut off (at least not unless they become larger as the maximum 550x250). (Fixes bug #16632.) --- changelog | 1 + .../widget/progress_bar_title_screen.cfg | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/changelog b/changelog index ad75e5ae8c0..dea76d63fa0 100644 --- a/changelog +++ b/changelog @@ -39,6 +39,7 @@ Version 1.9.1+svn: * Changed: Improved the layout of the title screen. * Fixed: Changing the language updates map and logo in title screen (bug #16631). + * Fixed: No longer cut off large title screen logos (bug #16632). * WML Engine: * id= in SUFs now accepts a comma-separated list * [capture_village] now accepts a full SLF diff --git a/data/gui/default/widget/progress_bar_title_screen.cfg b/data/gui/default/widget/progress_bar_title_screen.cfg index 3fb8abe4a15..acbdacf1a39 100644 --- a/data/gui/default/widget/progress_bar_title_screen.cfg +++ b/data/gui/default/widget/progress_bar_title_screen.cfg @@ -9,14 +9,16 @@ [resolution] - min_width = 440 - min_height = 201 + # This maximum is also documented in the wiki + # http://wiki.wesnoth.org/ImageLocalization#BfW_Logo + min_width = 550 + min_height = 250 - default_width = 440 - default_height = 201 + default_width = 550 + default_height = 250 - max_width = 440 - max_height = 201 + max_width = 550 + max_height = 250 [state_enabled] @@ -25,8 +27,9 @@ [image] # w = 0 means fit # using percentage = 0 seems to fail for some reason... - w = "(if(percentage <= 0, 1, (width * percentage) / 100))" - h = "(height)" + x = "((width - image_original_width) / 2)" + w = "(if(percentage <= 0, 1, (image_original_width * percentage) / 100))" + h = "(image_height)" name = "misc/logo.png" resize_mode = "tile" [/image]