Skip to content

Commit

Permalink
[Simulator] Improve radio UI keyboard shortcut handling for commonly …
Browse files Browse the repository at this point in the history
…used keys (pg. up/down, arrows); Cosmetics.
  • Loading branch information
mpaperno committed Feb 7, 2017
1 parent 1e0046f commit b28bd82
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion companion/src/simulation/simulateduiwidgetX7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ SimulatedUIWidgetX7::SimulatedUIWidgetX7(SimulatorInterface *simulator, Simulato
m_backlightColors << QColor(247,242,159);

setLcd(ui->lcd);
connectScrollActions();

// try to match the gradient on the white radio images.
m_simuDialog->setUiAreaStyle("background-color: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:1, " \
"stop:0 rgba(255, 255, 255, 255), " \
Expand Down
2 changes: 2 additions & 0 deletions companion/src/simulation/simulatordialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ SimulatorDialog::SimulatorDialog(QWidget * parent, SimulatorInterface *simulator

ui->radioUiWidget->layout()->removeItem(ui->radioUiTempSpacer);
ui->radioUiWidget->layout()->addWidget(radioUiWidget);
radioUiWidget->setFocusPolicy(Qt::WheelFocus);
radioUiWidget->setFocus();

vJoyLeft = new VirtualJoystickWidget(this, 'L');
ui->leftStickLayout->addWidget(vJoyLeft);
Expand Down
2 changes: 1 addition & 1 deletion companion/src/simulation/simulatorstartupdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void SimulatorStartupDialog::changeEvent(QEvent *e)
// FIXME : need a better way to check for this
bool SimulatorStartupDialog::usesCategorizedStorage(const QString & name)
{
return name.contains("x12s", Qt::CaseInsensitive) || name.contains("x10", Qt::CaseInsensitive);
return name.contains(QRegExp("(x12|x10|horus)", Qt::CaseInsensitive));
}

bool SimulatorStartupDialog::usesCategorizedStorage()
Expand Down

0 comments on commit b28bd82

Please sign in to comment.