mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Merge pull request #4783 from FearlessTobi/port-2517
Port yuzu-emu/yuzu#2517: "configure_hotkeys: Minor cleanup"
This commit is contained in:
		
						commit
						56fc61a41f
					
				
					 2 changed files with 10 additions and 8 deletions
				
			
		|  | @ -87,8 +87,8 @@ void ConfigureHotkeys::Configure(QModelIndex index) { | |||
|     } | ||||
| 
 | ||||
|     if (IsUsedKey(key_sequence) && key_sequence != QKeySequence(previous_key.toString())) { | ||||
|         QMessageBox::critical(this, tr("Error in inputted key"), | ||||
|                               tr("You're using a key that's already bound.")); | ||||
|         QMessageBox::warning(this, tr("Conflicting Key Sequence"), | ||||
|                              tr("The entered key sequence is already assigned to another hotkey.")); | ||||
|     } else { | ||||
|         model->setData(index, key_sequence.toString(QKeySequence::NativeText)); | ||||
|         EmitHotkeysChanged(); | ||||
|  | @ -118,7 +118,6 @@ void ConfigureHotkeys::applyConfiguration(HotkeyRegistry& registry) { | |||
|     } | ||||
| 
 | ||||
|     registry.SaveHotkeys(); | ||||
|     Settings::Apply(); | ||||
| } | ||||
| 
 | ||||
| void ConfigureHotkeys::retranslateUi() { | ||||
|  |  | |||
|  | @ -9,16 +9,19 @@ | |||
| 
 | ||||
| SequenceDialog::SequenceDialog(QWidget* parent) : QDialog(parent) { | ||||
|     setWindowTitle(tr("Enter a hotkey")); | ||||
|     auto* layout = new QVBoxLayout(this); | ||||
|     setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); | ||||
| 
 | ||||
|     key_sequence = new QKeySequenceEdit; | ||||
|     layout->addWidget(key_sequence); | ||||
|     auto* buttons = | ||||
|         new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal); | ||||
| 
 | ||||
|     auto* const buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); | ||||
|     buttons->setCenterButtons(true); | ||||
| 
 | ||||
|     auto* const layout = new QVBoxLayout(this); | ||||
|     layout->addWidget(key_sequence); | ||||
|     layout->addWidget(buttons); | ||||
| 
 | ||||
|     connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept); | ||||
|     connect(buttons, &QDialogButtonBox::rejected, this, &QDialog::reject); | ||||
|     setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); | ||||
| } | ||||
| 
 | ||||
| SequenceDialog::~SequenceDialog() = default; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue