File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ ActionHotkeyWidget::ActionHotkeyWidget(const QString& actionName,
1717 , timerMseconds{1300 }
1818{
1919 // Object name for css
20- btnHotkey.setObjectName (" btnHotkey" );
20+ btnHotkey.setObjectName (nameof ( btnHotkey) );
2121 btnHotkey.setProperty (" unique" , false );
2222 btnHotkey.setMinimumSize (ImageManager::DecodeMissingWebpIcon ().size ().width () + 15 , // Checked for letter W
2323 ImageManager::DecodeMissingWebpIcon ().size ().height ());
@@ -42,15 +42,12 @@ ActionHotkeyWidget::ActionHotkeyWidget(const QString& actionName,
4242}
4343
4444QString ActionHotkeyWidget::GetActionName () const { return actionNameLabel.text (); }
45-
4645QString ActionHotkeyWidget::GetHotkey () const { return btnHotkey.text (); }
4746
4847void ActionHotkeyWidget::HighlightKey (bool isKeysMoreThanTwo)
4948{
50- if (isKeysMoreThanTwo)
51- btnHotkey.setProperty (" unique" , false );
52- else
53- btnHotkey.setProperty (" unique" , true );
49+ // If more than 2 == not unique
50+ btnHotkey.setProperty (" unique" , !isKeysMoreThanTwo);
5451
5552 btnHotkey.style ()->unpolish (&btnHotkey);
5653 btnHotkey.style ()->polish (&btnHotkey);
Original file line number Diff line number Diff line change 2020 <translation type =" vanished" >Нажмите латинскую клавишу...</translation >
2121 </message >
2222 <message >
23- <location filename =" ../ActionHotkeyWidget.cpp" line =" 85 " />
23+ <location filename =" ../ActionHotkeyWidget.cpp" line =" 82 " />
2424 <source >It isn' t character key!</source >
2525 <translation >Эта клавиша не буква!</translation >
2626 </message >
2727 <message >
28- <location filename =" ../ActionHotkeyWidget.cpp" line =" 87 " />
28+ <location filename =" ../ActionHotkeyWidget.cpp" line =" 84 " />
2929 <source >This key isn' t allowed!</source >
3030 <translation >Эта клавиша не разрешена!</translation >
3131 </message >
3232 <message >
33- <location filename =" ../ActionHotkeyWidget.cpp" line =" 125 " />
33+ <location filename =" ../ActionHotkeyWidget.cpp" line =" 122 " />
3434 <source >Press the key...</source >
3535 <translation >Нажмите клавишу...</translation >
3636 </message >
You can’t perform that action at this time.
0 commit comments