Changeset 3189c99ddc42c7e0b4289b28d1efc99d67c1167e
- Timestamp:
- 19/08/06 19:51:41
(2 years ago)
- Author:
- Olivier Teulière <ipkiss@videolan.org>
- git-committer:
- Olivier Teulière <ipkiss@videolan.org> 1156009901 +0000
- git-parent:
[0fbf13c30976400ed00ccf72ce8d7c84c981d628]
- git-author:
- Olivier Teulière <ipkiss@videolan.org> 1156009901 +0000
- Message:
- skins2/controls/ctrl_slider.cpp: fixed 2 little offset problems, introduced
by a previous commit
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r822898c |
r3189c99 |
|
| 324 | 324 | { |
|---|
| 325 | 325 | // Build the background image sequence |
|---|
| | 326 | // Note: we suppose that the last padding is not included in the |
|---|
| | 327 | // given image |
|---|
| | 328 | // TODO: we should probably change this assumption, as it would make |
|---|
| | 329 | // the code a bit simpler and it would be more natural for the skins |
|---|
| | 330 | // designers |
|---|
| 326 | 331 | m_bgWidth = (pBackground->getWidth() + m_padHoriz) / nbHoriz; |
|---|
| 327 | 332 | m_bgHeight = (pBackground->getHeight() + m_padVert) / nbVert; |
|---|
| … | … | |
| 364 | 369 | |
|---|
| 365 | 370 | // Rescale the image with the actual size of the control |
|---|
| 366 | | ScaledBitmap bmp( getIntf(), *m_pImgSeq, m_bgWidth * m_nbHoriz, |
|---|
| 367 | | m_bgHeight * m_nbVert ); |
|---|
| | 371 | ScaledBitmap bmp( getIntf(), *m_pImgSeq, |
|---|
| | 372 | m_bgWidth * m_nbHoriz - (int)(m_padHoriz * factorX), |
|---|
| | 373 | m_bgHeight * m_nbVert - (int)(m_padVert * factorY) ); |
|---|
| 368 | 374 | |
|---|
| 369 | 375 | // Locate the right image in the background bitmap |
|---|
| … | … | |
| 440 | 446 | |
|---|
| 441 | 447 | // Size of one elementary background image (padding included) |
|---|
| 442 | | m_bgWidth = (int)(m_pImgSeq->getWidth() * factorX / m_nbHoriz); |
|---|
| 443 | | m_bgHeight = (int)(m_pImgSeq->getHeight() * factorY / m_nbVert); |
|---|
| | 448 | m_bgWidth = (int)((m_pImgSeq->getWidth() + m_padHoriz) * factorX / m_nbHoriz); |
|---|
| | 449 | m_bgHeight = (int)((m_pImgSeq->getHeight() + m_padVert) * factorY / m_nbVert); |
|---|
| 444 | 450 | } |
|---|
| 445 | 451 | } |
|---|