mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 01:08:39 +12:00
Qt: use QString::simplified() instead of get_single_line
hopefully this works
This commit is contained in:
parent
baea538c32
commit
9f1fe5775e
2 changed files with 3 additions and 13 deletions
|
@ -890,12 +890,9 @@ int game_list_frame::PopulateGameList()
|
||||||
|
|
||||||
auto l_GetItem = [](const std::string& text)
|
auto l_GetItem = [](const std::string& text)
|
||||||
{
|
{
|
||||||
// force single line text ("hack" used instead of Qt shenanigans like Qt::TextSingleLine)
|
|
||||||
QString formattedText = gui::get_Single_Line(qstr(text));
|
|
||||||
|
|
||||||
QTableWidgetItem* curr = new QTableWidgetItem;
|
QTableWidgetItem* curr = new QTableWidgetItem;
|
||||||
curr->setFlags(curr->flags() & ~Qt::ItemIsEditable);
|
curr->setFlags(curr->flags() & ~Qt::ItemIsEditable);
|
||||||
curr->setText(formattedText);
|
curr->setText(qstr(text).simplified()); // simplified() forces single line text
|
||||||
return curr;
|
return curr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1008,7 +1005,7 @@ void game_list_frame::PopulateGameGrid(int maxCols, const QSize& image_size, con
|
||||||
|
|
||||||
for (const auto& app : matching_apps)
|
for (const auto& app : matching_apps)
|
||||||
{
|
{
|
||||||
QString title = gui::get_Single_Line(qstr(app.first->info.name));
|
const QString title = qstr(app.first->info.name).simplified(); // simplified() forces single line text
|
||||||
|
|
||||||
m_xgrid->addItem(app.first->pxmap, title, app.second, r, c);
|
m_xgrid->addItem(app.first->pxmap, title, app.second, r, c);
|
||||||
|
|
||||||
|
|
|
@ -70,16 +70,9 @@ namespace gui
|
||||||
return gl_max_slider_pos * current_delta / size_delta;
|
return gl_max_slider_pos * current_delta / size_delta;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline QString get_Single_Line(const QString& multi_line_string)
|
|
||||||
{
|
|
||||||
QString single_line_string = multi_line_string;
|
|
||||||
single_line_string.replace("\n"," ");
|
|
||||||
return single_line_string;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline q_string_pair Recent_Game(const QString& path, const QString& title)
|
inline q_string_pair Recent_Game(const QString& path, const QString& title)
|
||||||
{
|
{
|
||||||
return q_string_pair(path, get_Single_Line(title));
|
return q_string_pair(path, title.simplified()); // simplified() forces single line text
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString Default = QObject::tr("default");
|
const QString Default = QObject::tr("default");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue