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
e09060fa
Commit
e09060fa
authored
Sep 09, 2010
by
Max-Wilhelm Bruker
Browse files
Fixed automatic table resize. This fixes bug #0000023.
parent
5ec06b4b
Changes
3
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/gamescene.cpp
View file @
e09060fa
...
...
@@ -66,6 +66,7 @@ void GameScene::rearrange()
playersRect
=
QRectF
(
0
,
0
,
sceneWidth
,
sceneHeight
);
setSceneRect
(
sceneRect
().
x
(),
sceneRect
().
y
(),
sceneWidth
,
sceneHeight
);
processViewSizeChange
(
viewSize
);
qDebug
(
QString
(
"rearrange(): w=%1 h=%2"
).
arg
(
sceneWidth
).
arg
(
sceneHeight
).
toLatin1
());
}
...
...
@@ -108,6 +109,8 @@ void GameScene::closeMostRecentZoneView()
void
GameScene
::
processViewSizeChange
(
const
QSize
&
newSize
)
{
viewSize
=
newSize
;
qreal
newRatio
=
((
qreal
)
newSize
.
width
())
/
newSize
.
height
();
qreal
minWidth
=
0
;
for
(
int
i
=
0
;
i
<
players
.
size
();
++
i
)
{
...
...
cockatrice/src/gamescene.h
View file @
e09060fa
...
...
@@ -15,6 +15,7 @@ private:
QList
<
Player
*>
players
;
QRectF
playersRect
;
QList
<
ZoneViewWidget
*>
views
;
QSize
viewSize
;
public:
GameScene
(
QObject
*
parent
=
0
);
void
retranslateUi
();
...
...
cockatrice/src/tablezone.cpp
View file @
e09060fa
...
...
@@ -186,7 +186,7 @@ void TableZone::resizeToContents()
if
(
xMax
<
minWidth
)
xMax
=
minWidth
;
currentMinimumWidth
=
xMax
+
2
*
marginX
+
2
*
boxLineWidth
;
if
(
currentMinimumWidth
>
width
)
{
if
(
currentMinimumWidth
!=
width
)
{
prepareGeometryChange
();
width
=
currentMinimumWidth
;
emit
sizeChanged
();
...
...
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