diff options
| author | 2015-08-19 05:48:22 -0300 | |
|---|---|---|
| committer | 2015-09-07 16:46:28 -0300 | |
| commit | 2d195ba64e084ac382fb4ae463b724d4d8a1724f (patch) | |
| tree | 1d1d01e1d7ec3302cc378498a8d9cb086b7ee830 /src | |
| parent | Shader Disassembly: Fix printing of jump offsets (diff) | |
| download | yuzu-2d195ba64e084ac382fb4ae463b724d4d8a1724f.tar.gz yuzu-2d195ba64e084ac382fb4ae463b724d4d8a1724f.tar.xz yuzu-2d195ba64e084ac382fb4ae463b724d4d8a1724f.zip | |
Shader Debugger: Improve space efficiency of the layout
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra_qt/debugger/graphics_vertex_shader.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/citra_qt/debugger/graphics_vertex_shader.cpp b/src/citra_qt/debugger/graphics_vertex_shader.cpp index 59b63cd54..32c48cb6e 100644 --- a/src/citra_qt/debugger/graphics_vertex_shader.cpp +++ b/src/citra_qt/debugger/graphics_vertex_shader.cpp | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | #include <QBoxLayout> | 8 | #include <QBoxLayout> |
| 9 | #include <QFileDialog> | 9 | #include <QFileDialog> |
| 10 | #include <QFormLayout> | ||
| 10 | #include <QGroupBox> | 11 | #include <QGroupBox> |
| 11 | #include <QLabel> | 12 | #include <QLabel> |
| 12 | #include <QLineEdit> | 13 | #include <QLineEdit> |
| @@ -395,6 +396,9 @@ GraphicsVertexShaderWidget::GraphicsVertexShaderWidget(std::shared_ptr< Pica::De | |||
| 395 | // Create an HBoxLayout to store the widgets used to specify a particular attribute | 396 | // Create an HBoxLayout to store the widgets used to specify a particular attribute |
| 396 | // and store it in a QWidget to allow for easy hiding and unhiding. | 397 | // and store it in a QWidget to allow for easy hiding and unhiding. |
| 397 | auto row_layout = new QHBoxLayout; | 398 | auto row_layout = new QHBoxLayout; |
| 399 | // Remove unecessary padding between rows | ||
| 400 | row_layout->setContentsMargins(0, 0, 0, 0); | ||
| 401 | |||
| 398 | row_layout->addWidget(new QLabel(tr("Attribute %1").arg(i, 2))); | 402 | row_layout->addWidget(new QLabel(tr("Attribute %1").arg(i, 2))); |
| 399 | for (unsigned comp = 0; comp < 4; ++comp) | 403 | for (unsigned comp = 0; comp < 4; ++comp) |
| 400 | row_layout->addWidget(input_data[4 * i + comp]); | 404 | row_layout->addWidget(input_data[4 * i + comp]); |
| @@ -414,20 +418,25 @@ GraphicsVertexShaderWidget::GraphicsVertexShaderWidget(std::shared_ptr< Pica::De | |||
| 414 | input_data_group->setLayout(sub_layout); | 418 | input_data_group->setLayout(sub_layout); |
| 415 | main_layout->addWidget(input_data_group); | 419 | main_layout->addWidget(input_data_group); |
| 416 | } | 420 | } |
| 417 | { | 421 | |
| 418 | auto sub_layout = new QHBoxLayout; | 422 | // Make program listing expand to fill available space in the dialog |
| 419 | sub_layout->addWidget(binary_list); | 423 | binary_list->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); |
| 420 | main_layout->addLayout(sub_layout); | 424 | main_layout->addWidget(binary_list); |
| 421 | } | 425 | |
| 422 | main_layout->addWidget(dump_shader); | 426 | main_layout->addWidget(dump_shader); |
| 423 | { | 427 | { |
| 424 | auto sub_layout = new QHBoxLayout; | 428 | auto sub_layout = new QFormLayout; |
| 425 | sub_layout->addWidget(new QLabel(tr("Cycle Index:"))); | 429 | sub_layout->addRow(tr("Cycle Index:"), cycle_index); |
| 426 | sub_layout->addWidget(cycle_index); | 430 | |
| 427 | main_layout->addLayout(sub_layout); | 431 | main_layout->addLayout(sub_layout); |
| 428 | } | 432 | } |
| 433 | |||
| 434 | // Set a minimum height so that the size of this label doesn't cause the rest of the bottom | ||
| 435 | // part of the UI to keep jumping up and down when cycling through instructions. | ||
| 436 | instruction_description->setMinimumHeight(instruction_description->fontMetrics().lineSpacing() * 6); | ||
| 437 | instruction_description->setAlignment(Qt::AlignLeft | Qt::AlignTop); | ||
| 429 | main_layout->addWidget(instruction_description); | 438 | main_layout->addWidget(instruction_description); |
| 430 | main_layout->addStretch(); | 439 | |
| 431 | main_widget->setLayout(main_layout); | 440 | main_widget->setLayout(main_layout); |
| 432 | setWidget(main_widget); | 441 | setWidget(main_widget); |
| 433 | 442 | ||