Use multline for the new traits column in the recall dialog:

- allow to reduce width, maybe needed for big names and small screens

- easier to identify traits and compare units (all traits are left-aligned)

- provide simple and clean support for "gifted" units (no problem for 4 traits,
  then just increase the row height)

- but maybe look a bit uneven, so I am still not sure about this.
This commit is contained in:
Ali El Gariani 2008-07-06 21:49:23 +00:00
parent 14903551e1
commit be2b27cf20

View File

@ -995,8 +995,13 @@ private:
option_to_filter << u->type_name() << " " << name << " " << u->level();
#ifndef USE_TINY_GUI
option << COLUMN_SEPARATOR << u->traits_description();
option_to_filter << " " << u->traits_description();
option << COLUMN_SEPARATOR;
const std::vector<std::string> traits =
utils::split(std::string(u->traits_description()), ',');
foreach(const std::string& trait, traits) {
option << trait << '\n';
option_to_filter << " " << trait;
}
#endif
options.push_back(option.str());