MCPcopy Create free account
hub / github.com/clementgallet/libTAS / resizeAllColumns

Method resizeAllColumns

src/program/ui/InputEditorView.cpp:238–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238void InputEditorView::resizeAllColumns()
239{
240 horizontalHeader()->resizeSection(InputEditorModel::COLUMN_SAVESTATE, 20);
241 horizontalHeader()->resizeSection(InputEditorModel::COLUMN_FRAME, 80);
242 horizontalHeader()->resizeSection(inputEditorModel->columnCount() - 1, 20);
243
244 /* Set analog columns to be resizable by users.
245 * Increase the other columns by a small amount, because even if it's
246 * supposed to take the same place as the header, sometimes it considers
247 * that it doesn't have enough space. */
248 for (int c = InputEditorModel::COLUMN_SPECIAL_SIZE; c < inputEditorModel->columnCount()-1; c++) {
249 if (inputEditorModel->isInputAnalog(c)) {
250 horizontalHeader()->setSectionResizeMode(c, QHeaderView::Interactive);
251 }
252 else {
253 resizeColumnToContents(c);
254 int size = horizontalHeader()->sectionSize(c);
255 horizontalHeader()->resizeSection(c, size + 2);
256 }
257 }
258}
259
260void InputEditorView::update()
261{

Callers

nothing calls this directly

Calls 2

isInputAnalogMethod · 0.80
columnCountMethod · 0.45

Tested by

no test coverage detected