mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-17 02:43:26 +00:00
Fix weapons info not aligned in attack dialog when only one has a special.
A space was already added for that, but some old-gui code started to trim trailing spaces. (it is possible that previously hidden trailing spaces become visible in a dialog. I didn't see one, but feel free to report them to me)
This commit is contained in:
parent
3d004ac569
commit
b8eb54fe99
@ -795,7 +795,7 @@ void menu::sort_by(int column)
|
||||
|
||||
SDL_Rect menu::style::item_size(const std::string& item) const {
|
||||
SDL_Rect res = {0,0,0,0};
|
||||
std::vector<std::string> img_text_items = utils::split(item, IMG_TEXT_SEPARATOR);
|
||||
std::vector<std::string> img_text_items = utils::split(item, IMG_TEXT_SEPARATOR, utils::REMOVE_EMPTY);
|
||||
for (std::vector<std::string>::const_iterator it = img_text_items.begin();
|
||||
it != img_text_items.end(); it++) {
|
||||
if (res.w > 0 || res.h > 0) {
|
||||
@ -933,7 +933,7 @@ void menu::draw_row(const size_t row_index, const SDL_Rect& rect, ROW_TYPE type)
|
||||
const int last_x = xpos;
|
||||
column.w = widths[i];
|
||||
std::string str = row[i];
|
||||
std::vector<std::string> img_text_items = utils::split(str, IMG_TEXT_SEPARATOR);
|
||||
std::vector<std::string> img_text_items = utils::split(str, IMG_TEXT_SEPARATOR, utils::REMOVE_EMPTY);
|
||||
for (std::vector<std::string>::const_iterator it = img_text_items.begin();
|
||||
it != img_text_items.end(); it++) {
|
||||
str = *it;
|
||||
|
Loading…
x
Reference in New Issue
Block a user