improve combo_box_ex

This commit is contained in:
lixianjing 2019-11-26 17:04:27 +08:00
parent fc275ae67b
commit 9a81ae5013

View File

@ -19,14 +19,8 @@
*
*/
#include "tkc/mem.h"
#include "tkc/utils.h"
#include "base/layout.h"
#include "base/window.h"
#include "widgets/button.h"
#include "widgets/popup.h"
#include "widgets/combo_box.h"
#include "tkc/tokenizer.h"
#include "widgets/combo_box_item.h"
#include "ext_widgets/scroll_view/list_view.h"
#include "ext_widgets/scroll_view/scroll_view.h"
@ -42,7 +36,11 @@ static ret_t combo_box_create_popup_items(combo_box_t* combo_box, widget_t* pare
widget_t* item = combo_box_item_create(parent, 0, 0, 0, 0);
widget_set_value(item, iter->value);
widget_set_tr_text(item, iter->text);
if (combo_box->localize_options) {
widget_set_tr_text(item, iter->text);
} else {
widget_set_text_utf8(item, iter->text);
}
iter = iter->next;
}