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
315564f5
Commit
315564f5
authored
Nov 04, 2010
by
Max-Wilhelm Bruker
Browse files
width calculation bug fix
parent
9645d097
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/player.cpp
View file @
315564f5
...
...
@@ -1404,7 +1404,7 @@ QString Player::getName() const
qreal
Player
::
getMinimumWidth
()
const
{
qreal
result
=
table
->
getMinimumWidth
()
+
CARD_WIDTH
+
5
+
counterAreaWidth
;
qreal
result
=
table
->
getMinimumWidth
()
+
CARD_WIDTH
+
5
+
counterAreaWidth
+
stack
->
boundingRect
().
width
()
;
if
(
!
settingsCache
->
getHorizontalHand
())
result
+=
hand
->
boundingRect
().
width
();
return
result
;
...
...
@@ -1423,10 +1423,10 @@ void Player::processSceneSizeChange(const QSizeF &newSize)
// This will need to be changed if player areas are displayed side by side (e.g. 2x2 for a 4-player game)
qreal
fullPlayerWidth
=
newSize
.
width
();
qreal
tableWidth
=
fullPlayerWidth
-
CARD_WIDTH
-
5
-
counterAreaWidth
;
qreal
tableWidth
=
fullPlayerWidth
-
CARD_WIDTH
-
5
-
counterAreaWidth
-
stack
->
boundingRect
().
width
()
;
if
(
!
settingsCache
->
getHorizontalHand
())
tableWidth
-=
hand
->
boundingRect
().
width
();
table
->
setWidth
(
tableWidth
);
hand
->
setWidth
(
tableWidth
);
hand
->
setWidth
(
tableWidth
+
stack
->
boundingRect
().
width
()
);
}
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