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
4ca58eec
Commit
4ca58eec
authored
Apr 09, 2015
by
Matt Lowe
Browse files
Updated token dlg
Adjusted proportions to make the table fit better. Needs to be checked on UHD screens.
parent
7ea755ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/dlg_create_token.cpp
View file @
4ca58eec
...
...
@@ -79,11 +79,12 @@ DlgCreateToken::DlgCreateToken(const QStringList &_predefinedTokens, QWidget *pa
chooseTokenView
->
header
()
->
setStretchLastSection
(
false
);
chooseTokenView
->
header
()
->
hideSection
(
1
);
chooseTokenView
->
header
()
->
hideSection
(
2
);
chooseTokenView
->
setWordWrap
(
true
);
chooseTokenView
->
setColumnWidth
(
0
,
130
);
chooseTokenView
->
setColumnWidth
(
3
,
178
);
#if QT_VERSION < 0x050000
chooseTokenView
->
header
()
->
setResizeMode
(
3
,
QHeaderView
::
ResizeToContents
);
chooseTokenView
->
header
()
->
setResizeMode
(
4
,
QHeaderView
::
ResizeToContents
);
#else
chooseTokenView
->
header
()
->
setSectionResizeMode
(
3
,
QHeaderView
::
ResizeToContents
);
chooseTokenView
->
header
()
->
setSectionResizeMode
(
4
,
QHeaderView
::
ResizeToContents
);
#endif
connect
(
chooseTokenView
->
selectionModel
(),
SIGNAL
(
currentRowChanged
(
QModelIndex
,
QModelIndex
)),
this
,
SLOT
(
tokenSelectionChanged
(
QModelIndex
,
QModelIndex
)));
...
...
@@ -106,11 +107,12 @@ DlgCreateToken::DlgCreateToken(const QStringList &_predefinedTokens, QWidget *pa
QVBoxLayout
*
leftVBox
=
new
QVBoxLayout
;
leftVBox
->
addWidget
(
tokenDataGroupBox
);
leftVBox
->
addStretch
();
QHBoxLayout
*
hbox
=
new
QHBoxLayout
;
hbox
->
addLayout
(
leftVBox
);
hbox
->
addWidget
(
tokenChooseGroupBox
);
QGridLayout
*
hbox
=
new
QGridLayout
;
hbox
->
addLayout
(
leftVBox
,
0
,
0
);
hbox
->
addWidget
(
tokenChooseGroupBox
,
0
,
1
);
hbox
->
setColumnStretch
(
1
,
1
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
);
connect
(
buttonBox
,
SIGNAL
(
accepted
()),
this
,
SLOT
(
actOk
()));
connect
(
buttonBox
,
SIGNAL
(
rejected
()),
this
,
SLOT
(
reject
()));
...
...
@@ -122,7 +124,7 @@ DlgCreateToken::DlgCreateToken(const QStringList &_predefinedTokens, QWidget *pa
setWindowTitle
(
tr
(
"Create token"
));
setFixedHeight
(
sizeHint
().
height
());
set
MinimumWidth
(
300
);
set
FixedWidth
(
width
()
);
}
void
DlgCreateToken
::
tokenSelectionChanged
(
const
QModelIndex
&
current
,
const
QModelIndex
&
/*previous*/
)
...
...
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