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
76512a08
Commit
76512a08
authored
Oct 15, 2010
by
unknown
Browse files
Text rendering fix
parent
dd7f8724
Changes
10
Show whitespace changes
Inline
Side-by-side
cockatrice/cockatrice.pro
View file @
76512a08
...
...
@@ -6,7 +6,6 @@ MOC_DIR = build
OBJECTS_DIR
=
build
RESOURCES
=
cockatrice
.
qrc
QT
+=
network
svg
CONFIG
+=
debug
HEADERS
+=
src
/
counter
.
h
\
src
/
dlg_creategame
.
h
\
...
...
cockatrice/resources/countries/hu.svg
View file @
76512a08
cockatrice/resources/countries/ie.svg
View file @
76512a08
cockatrice/resources/countries/jp.svg
View file @
76512a08
cockatrice/resources/countries/nl.svg
View file @
76512a08
cockatrice/resources/countries/se.svg
View file @
76512a08
cockatrice/resources/countries/tr.svg
View file @
76512a08
cockatrice/resources/countries/us.svg
View file @
76512a08
cockatrice/src/abstractcarditem.cpp
View file @
76512a08
...
...
@@ -118,7 +118,7 @@ void AbstractCardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *
transformPainter
(
painter
,
translatedSize
);
painter
->
setPen
(
textColor
);
painter
->
drawText
(
QRectF
(
2
*
scaleFactor
,
2
*
scaleFactor
,
translatedSize
.
width
()
-
4
*
scaleFactor
,
translatedSize
.
height
()
-
4
*
scaleFactor
),
Qt
::
AlignTop
|
Qt
::
AlignLeft
|
Qt
::
TextWrapAnywhere
,
name
);
painter
->
drawText
(
QRectF
(
4
*
scaleFactor
,
4
*
scaleFactor
,
translatedSize
.
width
()
-
8
*
scaleFactor
,
translatedSize
.
height
()
-
8
*
scaleFactor
),
Qt
::
AlignTop
|
Qt
::
AlignLeft
|
Qt
::
TextWrapAnywhere
,
name
);
}
painter
->
restore
();
...
...
cockatrice/src/carditem.cpp
View file @
76512a08
...
...
@@ -172,12 +172,14 @@ void CardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
if
(
!
pt
.
isEmpty
())
{
painter
->
save
();
QSizeF
translatedSize
=
getTranslatedSize
(
painter
);
qreal
scaleFactor
=
translatedSize
.
width
()
/
boundingRect
().
width
();
transformPainter
(
painter
,
translatedSize
);
painter
->
setBackground
(
Qt
::
black
);
painter
->
setBackgroundMode
(
Qt
::
OpaqueMode
);
painter
->
setPen
(
Qt
::
white
);
painter
->
drawText
(
QRectF
(
2
,
2
,
translatedSize
.
width
()
-
4
,
translatedSize
.
height
()
-
4
),
Qt
::
AlignRight
|
Qt
::
AlignBottom
,
pt
);
painter
->
drawText
(
QRectF
(
4
*
scaleFactor
,
4
*
scaleFactor
,
translatedSize
.
width
()
-
8
,
translatedSize
.
height
()
-
8
),
Qt
::
AlignRight
|
Qt
::
AlignBottom
,
pt
);
painter
->
restore
();
}
if
(
getBeingPointedAt
())
...
...
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