mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	sequence_dialog: Reorganize the constructor
The previous code was all "smushed" together wasn't really grouped together that well. This spaces things out and separates them by relation to one another, making it easier to visually parse the individual sections of code that make up the constructor.
This commit is contained in:
		
							parent
							
								
									ec837cd16c
								
							
						
					
					
						commit
						4b5cbcae21
					
				
					 1 changed files with 8 additions and 4 deletions
				
			
		|  | @ -9,15 +9,19 @@ | ||||||
| 
 | 
 | ||||||
| SequenceDialog::SequenceDialog(QWidget* parent) : QDialog(parent) { | SequenceDialog::SequenceDialog(QWidget* parent) : QDialog(parent) { | ||||||
|     setWindowTitle(tr("Enter a hotkey")); |     setWindowTitle(tr("Enter a hotkey")); | ||||||
|     auto* layout = new QVBoxLayout(this); |     setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); | ||||||
|  | 
 | ||||||
|     key_sequence = new QKeySequenceEdit; |     key_sequence = new QKeySequenceEdit; | ||||||
|     layout->addWidget(key_sequence); | 
 | ||||||
|     auto* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); |     auto* const buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); | ||||||
|     buttons->setCenterButtons(true); |     buttons->setCenterButtons(true); | ||||||
|  | 
 | ||||||
|  |     auto* const layout = new QVBoxLayout(this); | ||||||
|  |     layout->addWidget(key_sequence); | ||||||
|     layout->addWidget(buttons); |     layout->addWidget(buttons); | ||||||
|  | 
 | ||||||
|     connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept); |     connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept); | ||||||
|     connect(buttons, &QDialogButtonBox::rejected, this, &QDialog::reject); |     connect(buttons, &QDialogButtonBox::rejected, this, &QDialog::reject); | ||||||
|     setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| SequenceDialog::~SequenceDialog() = default; | SequenceDialog::~SequenceDialog() = default; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue