Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
269a62c8
Commit
269a62c8
authored
Apr 22, 2015
by
Zach
Browse files
Merge pull request #1005 from poixen/colored_PT
Colored PT
parents
1e474bef
004a952c
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/carditem.cpp
View file @
269a62c8
...
@@ -105,13 +105,19 @@ void CardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
...
@@ -105,13 +105,19 @@ void CardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
if
(
!
pt
.
isEmpty
())
{
if
(
!
pt
.
isEmpty
())
{
painter
->
save
();
painter
->
save
();
transformPainter
(
painter
,
translatedSize
,
tapAngle
);
transformPainter
(
painter
,
translatedSize
,
tapAngle
);
QStringList
ptDbSplit
=
db
->
getCard
(
name
)
->
getPowTough
().
split
(
"/"
);
QStringList
ptSplit
=
pt
.
split
(
"/"
);
if
(
ptDbSplit
.
at
(
0
)
!=
ptSplit
.
at
(
0
)
||
ptDbSplit
.
at
(
1
)
!=
ptSplit
.
at
(
1
))
painter
->
setPen
(
QColor
(
0
,
195
,
255
));
else
painter
->
setPen
(
Qt
::
white
);
painter
->
setBackground
(
Qt
::
black
);
painter
->
setBackground
(
Qt
::
black
);
painter
->
setBackgroundMode
(
Qt
::
OpaqueMode
);
painter
->
setBackgroundMode
(
Qt
::
OpaqueMode
);
painter
->
setPen
(
Qt
::
white
);
painter
->
drawText
(
QRectF
(
4
*
scaleFactor
,
4
*
scaleFactor
,
translatedSize
.
width
()
-
8
*
scaleFactor
,
translatedSize
.
height
()
-
8
*
scaleFactor
),
Qt
::
AlignRight
|
Qt
::
AlignBottom
,
pt
);
painter
->
drawText
(
QRectF
(
4
*
scaleFactor
,
4
*
scaleFactor
,
translatedSize
.
width
()
-
10
*
scaleFactor
,
translatedSize
.
height
()
-
8
*
scaleFactor
),
Qt
::
AlignRight
|
Qt
::
AlignBottom
,
pt
);
painter
->
restore
();
painter
->
restore
();
}
}
if
(
!
annotation
.
isEmpty
())
{
if
(
!
annotation
.
isEmpty
())
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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