GUI2: taddon_description:

Un-hardcode max icon size of 72x72 and avoid scaling smaller icons
(attacks/, etc.)
This commit is contained in:
Ignacio R. Morelle 2010-12-26 14:19:58 +00:00
parent 95b25e5527
commit c514d77361
2 changed files with 14 additions and 5 deletions

View file

@ -19,10 +19,21 @@
border_size = 5
vertical_alignment = "top"
[image]
[drawing]
id = "image"
definition = "default"
[/image]
width = 72
height = 72
[draw]
[image]
name = "(text)"
w = "(if(image_original_width < 72, image_original_width, 72))"
h = "(if(image_original_height < 72, image_original_height, 72))"
[/image]
[/draw]
[/drawing]
[/column]

View file

@ -75,9 +75,7 @@ REGISTER_WINDOW(addon_description)
void taddon_description::pre_show(CVideo& /*video*/, twindow& window)
{
const std::string fixed_icon = ainfo_.icon + "~SCALE(72,72)";
find_widget<tcontrol>(&window, "image", false).set_label(fixed_icon);
find_widget<tcontrol>(&window, "image", false).set_label(ainfo_.icon);
find_widget<tcontrol>(&window, "title", false).set_label(ainfo_.name);
find_widget<tcontrol>(&window, "version", false).set_label(ainfo_.version);
find_widget<tcontrol>(&window, "author", false).set_label(ainfo_.author);