GUI2: taddon_description:
Un-hardcode max icon size of 72x72 and avoid scaling smaller icons (attacks/, etc.)
This commit is contained in:
parent
95b25e5527
commit
c514d77361
2 changed files with 14 additions and 5 deletions
|
@ -19,10 +19,21 @@
|
||||||
border_size = 5
|
border_size = 5
|
||||||
vertical_alignment = "top"
|
vertical_alignment = "top"
|
||||||
|
|
||||||
[image]
|
[drawing]
|
||||||
id = "image"
|
id = "image"
|
||||||
definition = "default"
|
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]
|
[/column]
|
||||||
|
|
||||||
|
|
|
@ -75,9 +75,7 @@ REGISTER_WINDOW(addon_description)
|
||||||
|
|
||||||
void taddon_description::pre_show(CVideo& /*video*/, twindow& window)
|
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(ainfo_.icon);
|
||||||
|
|
||||||
find_widget<tcontrol>(&window, "image", false).set_label(fixed_icon);
|
|
||||||
find_widget<tcontrol>(&window, "title", false).set_label(ainfo_.name);
|
find_widget<tcontrol>(&window, "title", false).set_label(ainfo_.name);
|
||||||
find_widget<tcontrol>(&window, "version", false).set_label(ainfo_.version);
|
find_widget<tcontrol>(&window, "version", false).set_label(ainfo_.version);
|
||||||
find_widget<tcontrol>(&window, "author", false).set_label(ainfo_.author);
|
find_widget<tcontrol>(&window, "author", false).set_label(ainfo_.author);
|
||||||
|
|
Loading…
Add table
Reference in a new issue