54 } |
54 } |
55 else if (type == UI_LABEL_TEXT) { |
55 else if (type == UI_LABEL_TEXT) { |
56 icon = NULL; |
56 icon = NULL; |
57 } |
57 } |
58 |
58 |
59 if (label && icon) { |
59 IconElement icon_elm = { nullptr }; |
|
60 if (icon) { |
|
61 icon_elm = ui_get_icon(icon); |
|
62 } |
|
63 |
|
64 if (label && icon_elm) { |
60 StackPanel panel = StackPanel(); |
65 StackPanel panel = StackPanel(); |
61 panel.Orientation(Orientation::Horizontal); |
66 panel.Orientation(Orientation::Horizontal); |
62 panel.Spacing(5); |
67 panel.Spacing(5); |
63 |
68 |
64 panel.Children().Append(ui_get_icon(icon)); |
69 panel.Children().Append(icon_elm); |
65 |
70 |
66 wchar_t* wlabel = str2wstr(label, nullptr); |
71 wchar_t* wlabel = str2wstr(label, nullptr); |
67 TextBlock label = TextBlock(); |
72 TextBlock label = TextBlock(); |
68 label.Text(wlabel); |
73 label.Text(wlabel); |
69 panel.Children().Append(label); |
74 panel.Children().Append(label); |