Skip to content

Commit

Permalink
Merge pull request #2307 from ronso0/widget-focus-prevention_1
Browse files Browse the repository at this point in the history
keep the library focused when any deck controls or the overview are clicked
  • Loading branch information
daschuer authored Nov 17, 2019
2 parents fcbf2d0 + 99318c6 commit 1dfecbe
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/widget/weffectparameterknob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ void WEffectParameterKnob::setupEffectParameterSlot(const ConfigKey& configKey)
return;
}
setEffectParameterSlot(pParameterSlot);
setFocusPolicy(Qt::NoFocus);
}

void WEffectParameterKnob::setEffectParameterSlot(
Expand Down
1 change: 1 addition & 0 deletions src/widget/weffectparameterknobcomposed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ void WEffectParameterKnobComposed::setupEffectParameterSlot(const ConfigKey& con
return;
}
setEffectParameterSlot(pParameterSlot);
setFocusPolicy(Qt::NoFocus);
}

void WEffectParameterKnobComposed::setEffectParameterSlot(
Expand Down
1 change: 1 addition & 0 deletions src/widget/weffectpushbutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ void WEffectPushButton::setup(const QDomNode& node, const SkinContext& context)
m_pButtonMenu = new QMenu(this);
connect(m_pButtonMenu, SIGNAL(triggered(QAction*)),
this, SLOT(slotActionChosen(QAction*)));
setFocusPolicy(Qt::NoFocus);
}

void WEffectPushButton::setupEffectParameterSlot(const ConfigKey& configKey) {
Expand Down
1 change: 1 addition & 0 deletions src/widget/wknob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ WKnob::WKnob(QWidget* pParent)
mixxx::Duration::fromSeconds(1)) {
connect(&m_renderTimer, SIGNAL(update()),
this, SLOT(update()));
setFocusPolicy(Qt::NoFocus);
}

void WKnob::mouseMoveEvent(QMouseEvent* e) {
Expand Down
2 changes: 2 additions & 0 deletions src/widget/wknobcomposed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ void WKnobComposed::setup(const QDomNode& node, const SkinContext& context) {
m_dKnobCenterXOffset *= scaleFactor;
m_dKnobCenterYOffset *= scaleFactor;
m_dArcThickness *= scaleFactor;

setFocusPolicy(Qt::NoFocus);
}

void WKnobComposed::clear() {
Expand Down
2 changes: 2 additions & 0 deletions src/widget/woverview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ void WOverview::setup(const QDomNode& node, const SkinContext& context) {
}
}
}

setFocusPolicy(Qt::NoFocus);
}

void WOverview::onConnectedControlChanged(double dParameter, double dValue) {
Expand Down
2 changes: 2 additions & 0 deletions src/widget/wpushbutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ void WPushButton::setup(const QDomNode& node, const SkinContext& context) {
rightConnection->setDirectionOption(ControlParameterWidgetConnection::DIR_FROM_WIDGET);
}
}

setFocusPolicy(Qt::NoFocus);
}

void WPushButton::setStates(int iStates) {
Expand Down
2 changes: 2 additions & 0 deletions src/widget/wslidercomposed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ void WSliderComposed::setup(const QDomNode& node, const SkinContext& context) {
}
}
}

setFocusPolicy(Qt::NoFocus);
}

void WSliderComposed::setSliderPixmap(PixmapSource sourceSlider,
Expand Down
1 change: 1 addition & 0 deletions src/widget/wstarrating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ void WStarRating::setup(const QDomNode& node, const SkinContext& context) {
Q_UNUSED(node);
Q_UNUSED(context);
setMouseTracking(true);
setFocusPolicy(Qt::NoFocus);
}

QSize WStarRating::sizeHint() const {
Expand Down
2 changes: 2 additions & 0 deletions src/widget/wstatuslight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ void WStatusLight::setup(const QDomNode& node, const SkinContext& context) {
m_pixmaps[i].clear();
}
}

setFocusPolicy(Qt::NoFocus);
}

void WStatusLight::setPixmap(int iState, PixmapSource source,
Expand Down
2 changes: 2 additions & 0 deletions src/widget/wvumeter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ void WVuMeter::setup(const QDomNode& node, const SkinContext& context) {
if (m_iPeakFallTime < 1 || m_iPeakFallTime > 1000) {
m_iPeakFallTime = DEFAULT_FALLTIME;
}

setFocusPolicy(Qt::NoFocus);
}

void WVuMeter::setPixmapBackground(
Expand Down

0 comments on commit 1dfecbe

Please sign in to comment.