Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
c05d3353
Commit
c05d3353
authored
Mar 07, 2004
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ctrl_list.cpp: insert a 1-pixel line between two items in the playlist
parent
d8158122
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
modules/gui/skins2/controls/ctrl_list.cpp
modules/gui/skins2/controls/ctrl_list.cpp
+6
-5
No files found.
modules/gui/skins2/controls/ctrl_list.cpp
View file @
c05d3353
...
...
@@ -36,6 +36,7 @@
#include "vlc_keys.h"
#define SCROLL_STEP 0.05
#define LINE_INTERVAL 1 // Number of pixels inserted between 2 lines
CtrlList
::
CtrlList
(
intf_thread_t
*
pIntf
,
VarList
&
rList
,
GenericFont
&
rFont
,
...
...
@@ -85,7 +86,7 @@ void CtrlList::onUpdate( Subject<VarPercent> &rPercent )
int
height
=
pPos
->
getHeight
();
// How many lines can be displayed ?
int
itemHeight
=
m_rFont
.
getSize
();
int
itemHeight
=
m_rFont
.
getSize
()
+
LINE_INTERVAL
;
int
maxItems
=
height
/
itemHeight
;
// Determine what is the first item to display
...
...
@@ -121,7 +122,7 @@ void CtrlList::onResize()
int
height
=
pPos
->
getHeight
();
// How many lines can be displayed ?
int
itemHeight
=
m_rFont
.
getSize
();
int
itemHeight
=
m_rFont
.
getSize
()
+
LINE_INTERVAL
;
int
maxItems
=
height
/
itemHeight
;
// Update the position variable
...
...
@@ -165,8 +166,8 @@ void CtrlList::handleEvent( EvtGeneric &rEvent )
{
EvtMouse
&
rEvtMouse
=
(
EvtMouse
&
)
rEvent
;
const
Position
*
pos
=
getPosition
();
int
yPos
=
m_lastPos
+
(
rEvtMouse
.
getYPos
()
-
pos
->
getTop
()
)
/
m_rFont
.
getSize
(
);
int
yPos
=
m_lastPos
+
(
rEvtMouse
.
getYPos
()
-
pos
->
getTop
()
)
/
(
m_rFont
.
getSize
()
+
LINE_INTERVAL
);
VarList
::
Iterator
it
;
int
index
=
0
;
...
...
@@ -335,7 +336,7 @@ void CtrlList::makeImage()
}
int
width
=
pPos
->
getWidth
();
int
height
=
pPos
->
getHeight
();
int
itemHeight
=
m_rFont
.
getSize
();
int
itemHeight
=
m_rFont
.
getSize
()
+
LINE_INTERVAL
;
// Create an image
OSFactory
*
pOsFactory
=
OSFactory
::
instance
(
getIntf
()
);
...
...
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