- BPictureButton didn't account for the disabled state. Fixes #2410

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27063 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexandre Deckner
2008-08-19 13:54:42 +00:00
parent 1b6b5b83ab
commit 7f1535c0d2
+11 -4
View File
@@ -127,10 +127,17 @@ BPictureButton::Draw(BRect updateRect)
rgb_color color = ui_color(B_PANEL_BACKGROUND_COLOR);
if (fBehavior == B_ONE_STATE_BUTTON) {
if (Value() == B_CONTROL_ON)
DrawPicture(fEnabledOn);
else
DrawPicture(fEnabledOff);
if (IsEnabled()) {
if (Value() == B_CONTROL_ON)
DrawPicture(fEnabledOn);
else
DrawPicture(fEnabledOff);
} else
DrawPicture(fDisabledOff);
//a disabled one_state_button is always OFF (ie: not pushed)
//since it cannot be pushed while disabled
} else {
// B_TWO_STATE_BUTTON