Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
JuK
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
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
Multimedia
JuK
Commits
b588970a
Commit
b588970a
authored
Apr 19, 2004
by
Scott Wheeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make playlist selection prettier in the default view mode.
svn path=/trunk/kdemultimedia/juk/; revision=305025
parent
091050c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
6 deletions
+21
-6
playlistbox.h
playlistbox.h
+1
-0
viewmode.cpp
viewmode.cpp
+19
-6
viewmode.h
viewmode.h
+1
-0
No files found.
playlistbox.h
View file @
b588970a
...
...
@@ -182,6 +182,7 @@ protected:
virtual
int
compare
(
QListViewItem
*
i
,
int
col
,
bool
)
const
;
virtual
void
paintCell
(
QPainter
*
p
,
const
QColorGroup
&
colorGroup
,
int
column
,
int
width
,
int
align
);
virtual
void
paintFocus
(
QPainter
*
,
const
QColorGroup
&
,
const
QRect
&
)
{}
virtual
void
setText
(
int
column
,
const
QString
&
text
);
virtual
QString
text
(
int
column
)
const
{
return
KListViewItem
::
text
(
column
);
}
...
...
viewmode.cpp
View file @
b588970a
...
...
@@ -59,11 +59,26 @@ void ViewMode::paintCell(PlaylistBox::Item *item,
QFontMetrics
fm
=
painter
->
fontMetrics
();
int
y
=
item
->
listView
()
->
itemMargin
();
int
y
=
item
->
listView
()
->
itemMargin
()
+
border
;
const
QPixmap
*
pm
=
item
->
pixmap
(
column
);
if
(
item
->
isSelected
())
{
painter
->
fillRect
(
0
,
0
,
width
,
item
->
height
(),
colorGroup
.
brush
(
QColorGroup
::
Highlight
));
painter
->
eraseRect
(
0
,
0
,
width
,
item
->
height
());
QPen
oldPen
=
painter
->
pen
();
QPen
newPen
=
oldPen
;
newPen
.
setWidth
(
5
);
newPen
.
setJoinStyle
(
RoundJoin
);
newPen
.
setColor
(
QColorGroup
::
Highlight
);
painter
->
setPen
(
newPen
);
painter
->
drawRect
(
border
,
border
,
width
-
border
*
2
,
item
->
height
()
-
border
*
2
+
1
);
painter
->
setPen
(
oldPen
);
painter
->
fillRect
(
border
,
border
,
width
-
border
*
2
,
item
->
height
()
-
border
*
2
+
1
,
colorGroup
.
brush
(
QColorGroup
::
Highlight
));
painter
->
setPen
(
colorGroup
.
highlightedText
());
}
else
...
...
@@ -123,13 +138,11 @@ void ViewMode::updateIcons(int size)
}
}
void
ViewMode
::
updateHeights
()
{
const
int
width
=
m_playlistBox
->
viewport
()
->
width
();
const
int
width
=
m_playlistBox
->
viewport
()
->
width
()
-
border
*
2
;
const
int
baseHeight
=
3
*
m_playlistBox
->
itemMargin
()
+
3
2
;
const
int
baseHeight
=
2
*
m_playlistBox
->
itemMargin
()
+
32
+
border
*
2
;
const
QFontMetrics
fm
=
m_playlistBox
->
fontMetrics
();
for
(
QListViewItemIterator
it
(
m_playlistBox
);
it
.
current
();
++
it
)
{
...
...
viewmode.h
View file @
b588970a
...
...
@@ -74,6 +74,7 @@ private:
bool
m_visible
;
bool
m_needsRefresh
;
QMap
<
PlaylistBox
::
Item
*
,
QStringList
>
m_lines
;
static
const
int
border
=
4
;
};
////////////////////////////////////////////////////////////////////////////////
...
...
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