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
36d0a13f
Commit
36d0a13f
authored
Jun 27, 2015
by
Zach
Browse files
Merge pull request #1153 from ctrlaltca/issue_1144
Fix windows size growing out of screen; fix #1144
parents
d2b71a15
ec45a099
Changes
4
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/playerlistwidget.cpp
View file @
36d0a13f
...
@@ -67,7 +67,7 @@ PlayerListWidget::PlayerListWidget(TabSupervisor *_tabSupervisor, AbstractClient
...
@@ -67,7 +67,7 @@ PlayerListWidget::PlayerListWidget(TabSupervisor *_tabSupervisor, AbstractClient
}
else
}
else
userContextMenu
=
0
;
userContextMenu
=
0
;
setMinimumHeight
(
6
0
);
setMinimumHeight
(
4
0
);
setIconSize
(
QSize
(
20
,
15
));
setIconSize
(
QSize
(
20
,
15
));
setColumnCount
(
6
);
setColumnCount
(
6
);
setColumnWidth
(
0
,
20
);
setColumnWidth
(
0
,
20
);
...
...
cockatrice/src/tab_game.cpp
View file @
36d0a13f
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
#include
"dlg_creategame.h"
#include
"dlg_creategame.h"
#include
"tab_game.h"
#include
"tab_game.h"
#include
"tab_supervisor.h"
#include
"tab_supervisor.h"
#include
"card
infowidget
.h"
#include
"card
frame
.h"
#include
"playerlistwidget.h"
#include
"playerlistwidget.h"
#include
"messagelogwidget.h"
#include
"messagelogwidget.h"
#include
"phasestoolbar.h"
#include
"phasestoolbar.h"
...
@@ -280,7 +280,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay)
...
@@ -280,7 +280,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay)
gameView
=
new
GameView
(
scene
);
gameView
=
new
GameView
(
scene
);
gameView
->
hide
();
gameView
->
hide
();
cardInfo
=
new
Card
InfoWidget
(
CardInfoWidget
::
ModeGameTab
);
cardInfo
=
new
Card
Frame
(
250
,
372
);
playerListWidget
=
new
PlayerListWidget
(
0
,
0
,
this
);
playerListWidget
=
new
PlayerListWidget
(
0
,
0
,
this
);
playerListWidget
->
setFocusPolicy
(
Qt
::
NoFocus
);
playerListWidget
->
setFocusPolicy
(
Qt
::
NoFocus
);
...
@@ -293,6 +293,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay)
...
@@ -293,6 +293,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay)
deckViewContainerLayout
=
new
QVBoxLayout
;
deckViewContainerLayout
=
new
QVBoxLayout
;
QVBoxLayout
*
messageLogLayout
=
new
QVBoxLayout
;
QVBoxLayout
*
messageLogLayout
=
new
QVBoxLayout
;
messageLogLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
messageLogLayout
->
addWidget
(
messageLog
);
messageLogLayout
->
addWidget
(
messageLog
);
QWidget
*
messageLogLayoutWidget
=
new
QWidget
;
QWidget
*
messageLogLayoutWidget
=
new
QWidget
;
...
@@ -357,7 +358,8 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay)
...
@@ -357,7 +358,8 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay)
setLayout
(
superMainLayout
);
setLayout
(
superMainLayout
);
splitter
->
restoreState
(
settingsCache
->
getTabGameSplitterSizes
());
splitter
->
restoreState
(
settingsCache
->
getTabGameSplitterSizes
());
splitter
->
setChildrenCollapsible
(
false
);
messageLog
->
logReplayStarted
(
gameInfo
.
game_id
());
messageLog
->
logReplayStarted
(
gameInfo
.
game_id
());
}
}
...
@@ -390,7 +392,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList<AbstractClient *> &_client
...
@@ -390,7 +392,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList<AbstractClient *> &_client
gameView
=
new
GameView
(
scene
);
gameView
=
new
GameView
(
scene
);
gameView
->
hide
();
gameView
->
hide
();
cardInfo
=
new
Card
InfoWidget
(
CardInfoWidget
::
ModeGameTab
);
cardInfo
=
new
Card
Frame
(
250
,
372
);
playerListWidget
=
new
PlayerListWidget
(
tabSupervisor
,
clients
.
first
(),
this
);
playerListWidget
=
new
PlayerListWidget
(
tabSupervisor
,
clients
.
first
(),
this
);
playerListWidget
->
setFocusPolicy
(
Qt
::
NoFocus
);
playerListWidget
->
setFocusPolicy
(
Qt
::
NoFocus
);
connect
(
playerListWidget
,
SIGNAL
(
openMessageDialog
(
QString
,
bool
)),
this
,
SIGNAL
(
openMessageDialog
(
QString
,
bool
)));
connect
(
playerListWidget
,
SIGNAL
(
openMessageDialog
(
QString
,
bool
)),
this
,
SIGNAL
(
openMessageDialog
(
QString
,
bool
)));
...
@@ -414,6 +416,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList<AbstractClient *> &_client
...
@@ -414,6 +416,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList<AbstractClient *> &_client
deckViewContainerLayout
=
new
QVBoxLayout
;
deckViewContainerLayout
=
new
QVBoxLayout
;
QVBoxLayout
*
messageLogLayout
=
new
QVBoxLayout
;
QVBoxLayout
*
messageLogLayout
=
new
QVBoxLayout
;
messageLogLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
messageLogLayout
->
addWidget
(
timeElapsedLabel
);
messageLogLayout
->
addWidget
(
timeElapsedLabel
);
messageLogLayout
->
addWidget
(
messageLog
);
messageLogLayout
->
addWidget
(
messageLog
);
messageLogLayout
->
addLayout
(
hLayout
);
messageLogLayout
->
addLayout
(
hLayout
);
...
@@ -488,6 +491,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList<AbstractClient *> &_client
...
@@ -488,6 +491,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList<AbstractClient *> &_client
setLayout
(
mainLayout
);
setLayout
(
mainLayout
);
splitter
->
restoreState
(
settingsCache
->
getTabGameSplitterSizes
());
splitter
->
restoreState
(
settingsCache
->
getTabGameSplitterSizes
());
splitter
->
setChildrenCollapsible
(
false
);
messageLog
->
logGameJoined
(
gameInfo
.
game_id
());
messageLog
->
logGameJoined
(
gameInfo
.
game_id
());
...
...
cockatrice/src/tab_game.h
View file @
36d0a13f
...
@@ -11,7 +11,7 @@ class CardDatabase;
...
@@ -11,7 +11,7 @@ class CardDatabase;
class
GameView
;
class
GameView
;
class
DeckView
;
class
DeckView
;
class
GameScene
;
class
GameScene
;
class
Card
InfoWidget
;
class
Card
Frame
;
class
MessageLogWidget
;
class
MessageLogWidget
;
class
QTimer
;
class
QTimer
;
class
QSplitter
;
class
QSplitter
;
...
@@ -125,7 +125,7 @@ private:
...
@@ -125,7 +125,7 @@ private:
QToolButton
*
replayStartButton
,
*
replayPauseButton
,
*
replayFastForwardButton
;
QToolButton
*
replayStartButton
,
*
replayPauseButton
,
*
replayFastForwardButton
;
QSplitter
*
splitter
;
QSplitter
*
splitter
;
Card
InfoWidget
*
cardInfo
;
Card
Frame
*
cardInfo
;
PlayerListWidget
*
playerListWidget
;
PlayerListWidget
*
playerListWidget
;
QLabel
*
timeElapsedLabel
;
QLabel
*
timeElapsedLabel
;
MessageLogWidget
*
messageLog
;
MessageLogWidget
*
messageLog
;
...
...
cockatrice/src/userinfobox.cpp
View file @
36d0a13f
...
@@ -21,6 +21,9 @@ UserInfoBox::UserInfoBox(AbstractClient *_client, bool _fullInfo, QWidget *paren
...
@@ -21,6 +21,9 @@ UserInfoBox::UserInfoBox(AbstractClient *_client, bool _fullInfo, QWidget *paren
nameFont
.
setBold
(
true
);
nameFont
.
setBold
(
true
);
nameFont
.
setPointSize
(
nameFont
.
pointSize
()
*
1.5
);
nameFont
.
setPointSize
(
nameFont
.
pointSize
()
*
1.5
);
nameLabel
.
setFont
(
nameFont
);
nameLabel
.
setFont
(
nameFont
);
avatarLabel
.
setMaximumWidth
(
400
);
avatarLabel
.
setMaximumHeight
(
200
);
QGridLayout
*
mainLayout
=
new
QGridLayout
;
QGridLayout
*
mainLayout
=
new
QGridLayout
;
mainLayout
->
addWidget
(
&
avatarLabel
,
0
,
0
,
1
,
3
,
Qt
::
AlignCenter
);
mainLayout
->
addWidget
(
&
avatarLabel
,
0
,
0
,
1
,
3
,
Qt
::
AlignCenter
);
...
@@ -61,7 +64,7 @@ void UserInfoBox::updateInfo(const ServerInfo_User &user)
...
@@ -61,7 +64,7 @@ void UserInfoBox::updateInfo(const ServerInfo_User &user)
const
std
::
string
bmp
=
user
.
avatar_bmp
();
const
std
::
string
bmp
=
user
.
avatar_bmp
();
if
(
!
avatarPixmap
.
loadFromData
((
const
uchar
*
)
bmp
.
data
(),
bmp
.
size
()))
if
(
!
avatarPixmap
.
loadFromData
((
const
uchar
*
)
bmp
.
data
(),
bmp
.
size
()))
avatarPixmap
=
UserLevelPixmapGenerator
::
generatePixmap
(
64
,
userLevel
,
false
);
avatarPixmap
=
UserLevelPixmapGenerator
::
generatePixmap
(
64
,
userLevel
,
false
);
avatarLabel
.
setPixmap
(
avatarPixmap
);
avatarLabel
.
setPixmap
(
avatarPixmap
.
scaled
(
avatarLabel
.
size
(),
Qt
::
KeepAspectRatio
,
Qt
::
SmoothTransformation
)
);
nameLabel
.
setText
(
QString
::
fromStdString
(
user
.
name
()));
nameLabel
.
setText
(
QString
::
fromStdString
(
user
.
name
()));
realNameLabel2
.
setText
(
QString
::
fromStdString
(
user
.
real_name
()));
realNameLabel2
.
setText
(
QString
::
fromStdString
(
user
.
real_name
()));
...
...
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