summaryrefslogtreecommitdiffstats
path: root/src/widget/wdisplay.cpp
diff options
context:
space:
mode:
authorRJ Ryan <rryan@mixxx.org>2014-01-12 02:19:59 -0500
committerRJ Ryan <rryan@mixxx.org>2014-01-12 02:19:59 -0500
commitf368a499d68490b4a93ef659e673dacbc3c8eb8c (patch)
treef6cd5be1bf996555a7bd454888e8618a98c001d0 /src/widget/wdisplay.cpp
parent574ed3b042f9cb50cdb509c55642a970820935b8 (diff)
Remove WBaseWidget disabled state. Instead, use QWidget enabled property.
As discussed in Bug #1180872, we should allow skin writers to connect controls to the enabled state of a widget to enable/disable widgets. This disables input events for widgets that are disabled or whose parents are disabled. * Remove old OnOff connection type. I haven't seen a single use of it since I joined the project in 2008. * Convert PropertyBinder into a ControlWidgetConnection. * Update WDisplay to check the QWidget enabled property. Currently only WDisplay supports rendering itself in a disabled state. I'll add support to more widgets in the future.
Diffstat (limited to 'src/widget/wdisplay.cpp')
-rw-r--r--src/widget/wdisplay.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widget/wdisplay.cpp b/src/widget/wdisplay.cpp
index baf2b0d52a..40089dbd31 100644
--- a/src/widget/wdisplay.cpp
+++ b/src/widget/wdisplay.cpp
@@ -160,7 +160,7 @@ void WDisplay::paintEvent(QPaintEvent* ) {
// If we are disabled, use the disabled pixmaps. If not, use the regular
// pixmaps.
- const QVector<PaintablePointer>& pixmaps = (controlDisabled() && m_bDisabledLoaded) ?
+ const QVector<PaintablePointer>& pixmaps = (!isEnabled() && m_bDisabledLoaded) ?
m_disabledPixmaps : m_pixmaps;
if (pixmaps.empty()) {