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
00acf600
Commit
00acf600
authored
Aug 05, 2009
by
Max-Wilhelm Bruker
Browse files
font fix
parent
2148005b
Changes
2
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/carditem.cpp
View file @
00acf600
...
@@ -46,13 +46,12 @@ void CardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
...
@@ -46,13 +46,12 @@ void CardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
}
}
painter
->
drawPixmap
(
translatedPixmap
->
rect
(),
*
translatedPixmap
,
translatedPixmap
->
rect
());
painter
->
drawPixmap
(
translatedPixmap
->
rect
(),
*
translatedPixmap
,
translatedPixmap
->
rect
());
}
else
{
}
else
{
QFont
f
;
QFont
f
(
"Serif"
)
;
f
.
setStyleHint
(
QFont
::
Serif
);
f
.
setStyleHint
(
QFont
::
Serif
);
f
.
setPointSize
(
8
);
f
.
setPixelSize
(
11
);
f
.
setWeight
(
QFont
::
Bold
);
painter
->
setFont
(
f
);
painter
->
setFont
(
f
);
painter
->
setBrush
(
QColor
(
2
0
0
,
2
0
0
,
2
0
0
));
painter
->
setBrush
(
QColor
(
2
3
0
,
2
3
0
,
2
3
0
));
painter
->
setPen
(
QPen
(
Qt
::
black
)
)
;
painter
->
setPen
(
Qt
::
black
);
painter
->
drawRect
(
QRectF
(
0.5
,
0.5
,
CARD_WIDTH
-
1
,
CARD_HEIGHT
-
1
));
painter
->
drawRect
(
QRectF
(
0.5
,
0.5
,
CARD_WIDTH
-
1
,
CARD_HEIGHT
-
1
));
painter
->
drawText
(
QRectF
(
5
,
5
,
CARD_WIDTH
-
15
,
CARD_HEIGHT
-
15
),
Qt
::
AlignTop
|
Qt
::
AlignLeft
|
Qt
::
TextWordWrap
,
name
);
painter
->
drawText
(
QRectF
(
5
,
5
,
CARD_WIDTH
-
15
,
CARD_HEIGHT
-
15
),
Qt
::
AlignTop
|
Qt
::
AlignLeft
|
Qt
::
TextWordWrap
,
name
);
}
}
...
...
cockatrice/src/counter.cpp
View file @
00acf600
...
@@ -18,7 +18,10 @@ void Counter::paint(QPainter *painter, const QStyleOptionGraphicsItem */*option*
...
@@ -18,7 +18,10 @@ void Counter::paint(QPainter *painter, const QStyleOptionGraphicsItem */*option*
painter
->
setBrush
(
QBrush
(
color
));
painter
->
setBrush
(
QBrush
(
color
));
painter
->
drawEllipse
(
boundingRect
());
painter
->
drawEllipse
(
boundingRect
());
if
(
value
)
{
if
(
value
)
{
painter
->
setFont
(
QFont
(
"Times"
,
16
,
QFont
::
Bold
));
QFont
f
(
"Times"
);
f
.
setPixelSize
(
20
);
f
.
setWeight
(
QFont
::
Bold
);
painter
->
setFont
(
f
);
painter
->
drawText
(
boundingRect
(),
Qt
::
AlignCenter
,
QString
::
number
(
value
));
painter
->
drawText
(
boundingRect
(),
Qt
::
AlignCenter
,
QString
::
number
(
value
));
}
}
}
}
...
...
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