Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
3189c99d
Commit
3189c99d
authored
Aug 19, 2006
by
Olivier Teulière
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* skins2/controls/ctrl_slider.cpp: fixed 2 little offset problems, introduced
by a previous commit
parent
0fbf13c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
modules/gui/skins2/controls/ctrl_slider.cpp
modules/gui/skins2/controls/ctrl_slider.cpp
+10
-4
No files found.
modules/gui/skins2/controls/ctrl_slider.cpp
View file @
3189c99d
...
...
@@ -323,6 +323,11 @@ CtrlSliderBg::CtrlSliderBg( intf_thread_t *pIntf,
if
(
pBackground
)
{
// Build the background image sequence
// Note: we suppose that the last padding is not included in the
// given image
// TODO: we should probably change this assumption, as it would make
// the code a bit simpler and it would be more natural for the skins
// designers
m_bgWidth
=
(
pBackground
->
getWidth
()
+
m_padHoriz
)
/
nbHoriz
;
m_bgHeight
=
(
pBackground
->
getHeight
()
+
m_padVert
)
/
nbVert
;
...
...
@@ -363,8 +368,9 @@ void CtrlSliderBg::draw( OSGraphics &rImage, int xDest, int yDest )
getResizeFactors
(
factorX
,
factorY
);
// Rescale the image with the actual size of the control
ScaledBitmap
bmp
(
getIntf
(),
*
m_pImgSeq
,
m_bgWidth
*
m_nbHoriz
,
m_bgHeight
*
m_nbVert
);
ScaledBitmap
bmp
(
getIntf
(),
*
m_pImgSeq
,
m_bgWidth
*
m_nbHoriz
-
(
int
)(
m_padHoriz
*
factorX
),
m_bgHeight
*
m_nbVert
-
(
int
)(
m_padVert
*
factorY
)
);
// Locate the right image in the background bitmap
int
x
=
m_bgWidth
*
(
m_position
%
m_nbHoriz
);
...
...
@@ -439,8 +445,8 @@ void CtrlSliderBg::onResize()
getResizeFactors
(
factorX
,
factorY
);
// Size of one elementary background image (padding included)
m_bgWidth
=
(
int
)(
m_pImgSeq
->
getWidth
(
)
*
factorX
/
m_nbHoriz
);
m_bgHeight
=
(
int
)(
m_pImgSeq
->
getHeight
(
)
*
factorY
/
m_nbVert
);
m_bgWidth
=
(
int
)(
(
m_pImgSeq
->
getWidth
()
+
m_padHoriz
)
*
factorX
/
m_nbHoriz
);
m_bgHeight
=
(
int
)(
(
m_pImgSeq
->
getHeight
()
+
m_padVert
)
*
factorY
/
m_nbVert
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment