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
00224256
Commit
00224256
authored
May 11, 2013
by
Mark Morschhäuser
Browse files
Fixed implicit conversions from double to int warnings regarding
QPainter.drawRect()
parent
314db1f4
Changes
3
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/phasestoolbar.cpp
View file @
00224256
...
...
@@ -39,7 +39,7 @@ void PhaseButton::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*op
painter
->
setBrush
(
QColor
(
220
*
(
activeAnimationCounter
/
10.0
),
220
*
(
activeAnimationCounter
/
10.0
),
220
*
(
activeAnimationCounter
/
10.0
)));
painter
->
setPen
(
Qt
::
gray
);
painter
->
drawRect
(
0
.5
,
0
.5
,
width
-
1
,
width
-
1
);
painter
->
drawRect
(
0
,
0
,
width
-
1
,
width
-
1
);
painter
->
save
();
painter
->
resetTransform
();
painter
->
drawPixmap
(
iconPixmap
.
rect
().
translated
(
round
(
3
*
scaleFactor
),
round
(
3
*
scaleFactor
)),
iconPixmap
,
iconPixmap
.
rect
());
...
...
@@ -47,7 +47,7 @@ void PhaseButton::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*op
painter
->
setBrush
(
QColor
(
0
,
0
,
0
,
255
*
((
10
-
activeAnimationCounter
)
/
15.0
)));
painter
->
setPen
(
Qt
::
gray
);
painter
->
drawRect
(
0
.5
,
0
.5
,
width
-
1
,
width
-
1
);
painter
->
drawRect
(
0
,
0
,
width
-
1
,
width
-
1
);
}
void
PhaseButton
::
setWidth
(
double
_width
)
...
...
cockatrice/src/pixmapgenerator.cpp
View file @
00224256
...
...
@@ -123,7 +123,7 @@ QPixmap CountryPixmapGenerator::generatePixmap(int height, const QString &countr
QPainter
painter
(
&
pixmap
);
svg
.
render
(
&
painter
,
QRectF
(
0
,
0
,
width
,
height
));
painter
.
setPen
(
Qt
::
black
);
painter
.
drawRect
(
0
.5
,
0
.5
,
width
-
1
,
height
-
1
);
painter
.
drawRect
(
0
,
0
,
width
-
1
,
height
-
1
);
pmCache
.
insert
(
key
,
pixmap
);
return
pixmap
;
...
...
cockatrice/src/tab_game.cpp
View file @
00224256
...
...
@@ -77,7 +77,7 @@ void ToggleButton::paintEvent(QPaintEvent *event)
painter
.
setPen
(
QPen
(
Qt
::
green
,
3
));
else
painter
.
setPen
(
QPen
(
Qt
::
red
,
3
));
painter
.
drawRect
(
1
.5
,
1
.5
,
width
()
-
3
,
height
()
-
3
);
painter
.
drawRect
(
1
,
1
,
width
()
-
3
,
height
()
-
3
);
}
void
ToggleButton
::
setState
(
bool
_state
)
...
...
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