Fix bution action position when using textplacement TEXT_ONLY_RIGHT
This makes the touch target include both the text and the image
for buttons masquerading as a check box.
Change-Id: If8432c5863de136b1a215dabb3e06109ccce4410
diff --git a/gui/button.cpp b/gui/button.cpp
index 601a516..a4c1b52 100644
--- a/gui/button.cpp
+++ b/gui/button.cpp
@@ -104,10 +104,13 @@
mButtonLabel->SetRenderPos(mTextX, mTextY);
} else {
mTextX = mRenderW + mRenderX + 5;
- mRenderW += mTextW + 5;
mButtonLabel->GetCurrentBounds(mTextW, mTextH);
+ mRenderW += mTextW + 5;
mTextY = mRenderY + (mRenderH / 2) - (mTextH / 2);
mButtonLabel->SetRenderPos(mTextX, mTextY);
+ if (mAction)
+ mAction->SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
+ SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
}
}
}