Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
ffdf11d5
Commit
ffdf11d5
authored
Aug 20, 2009
by
con
Browse files
Try to beautify the project settings page a bit on Mac.
parent
fff4ed47
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/buildstepspage.cpp
View file @
ffdf11d5
...
...
@@ -70,6 +70,11 @@ BuildStepsPage::BuildStepsPage(Project *project, bool clean) :
hboxLayout
->
addWidget
(
m_removeButton
);
hboxLayout
->
addStretch
(
10
);
#ifdef Q_OS_MAC
m_addButton
->
setAttribute
(
Qt
::
WA_MacSmallSize
);
m_removeButton
->
setAttribute
(
Qt
::
WA_MacSmallSize
);
#endif
m_vbox
->
addLayout
(
hboxLayout
);
updateBuildStepButtonsState
();
...
...
@@ -96,10 +101,10 @@ BuildStepsPage::~BuildStepsPage()
void
BuildStepsPage
::
toggleDetails
()
{
Q
Tool
Button
*
t
b
=
qobject_cast
<
Q
Tool
Button
*>
(
sender
());
if
(
t
b
)
{
Q
Abstract
Button
*
b
utton
=
qobject_cast
<
Q
Abstract
Button
*>
(
sender
());
if
(
b
utton
)
{
foreach
(
const
BuildStepsWidgetStruct
&
s
,
m_buildSteps
)
{
if
(
s
.
detailsButton
==
t
b
)
{
if
(
s
.
detailsButton
==
b
utton
)
{
s
.
widget
->
setVisible
(
!
s
.
widget
->
isVisible
());
fixupLayout
(
s
.
widget
);
}
...
...
@@ -172,9 +177,18 @@ void BuildStepsPage::addBuildStepWidget(int pos, BuildStep *step)
s
.
upButton
->
setArrowType
(
Qt
::
UpArrow
);
s
.
downButton
=
new
QToolButton
(
this
);
s
.
downButton
->
setArrowType
(
Qt
::
DownArrow
);
#ifdef Q_OS_MAC
s
.
detailsButton
=
new
QPushButton
(
this
);
s
.
detailsButton
->
setAttribute
(
Qt
::
WA_MacSmallSize
);
s
.
detailsButton
->
setSizePolicy
(
QSizePolicy
::
Fixed
,
QSizePolicy
::
Fixed
);
s
.
upButton
->
setIconSize
(
QSize
(
10
,
10
));
s
.
downButton
->
setIconSize
(
QSize
(
10
,
10
));
#else
s
.
detailsButton
=
new
QToolButton
(
this
);
#endif
s
.
detailsButton
->
setText
(
tr
(
"Details"
));
// layout
s
.
hbox
=
new
QHBoxLayout
();
s
.
hbox
->
addWidget
(
s
.
detailsLabel
);
...
...
src/plugins/projectexplorer/buildstepspage.h
View file @
ffdf11d5
...
...
@@ -36,6 +36,7 @@ QT_BEGIN_NAMESPACE
class
QTreeWidgetItem
;
class
QHBoxLayout
;
class
QPushButton
;
class
QAbstractButton
;
class
QToolButton
;
class
QLabel
;
class
QVBoxLayout
;
...
...
@@ -55,7 +56,7 @@ struct BuildStepsWidgetStruct
{
BuildStepConfigWidget
*
widget
;
QLabel
*
detailsLabel
;
Q
Tool
Button
*
detailsButton
;
Q
Abstract
Button
*
detailsButton
;
QToolButton
*
upButton
;
QToolButton
*
downButton
;
QHBoxLayout
*
hbox
;
...
...
src/plugins/projectexplorer/dependenciespanel.cpp
View file @
ffdf11d5
...
...
@@ -230,7 +230,14 @@ DependenciesWidget::DependenciesWidget(SessionManager *session,
m_titleLabel
->
setText
(
"Dummy Text"
);
hbox
->
addWidget
(
m_titleLabel
);
QToolButton
*
detailsButton
=
new
QToolButton
(
this
);
QAbstractButton
*
detailsButton
;
#ifdef Q_OS_MAC
detailsButton
=
new
QPushButton
;
detailsButton
->
setAttribute
(
Qt
::
WA_MacSmallSize
);
detailsButton
->
setSizePolicy
(
QSizePolicy
::
Fixed
,
QSizePolicy
::
Fixed
);
#else
detailsButton
=
new
QToolButton
(
this
);
#endif
detailsButton
->
setText
(
tr
(
"Details"
));
connect
(
detailsButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
toggleDetails
()));
...
...
src/plugins/projectexplorer/environmenteditmodel.cpp
View file @
ffdf11d5
...
...
@@ -438,7 +438,14 @@ EnvironmentWidget::EnvironmentWidget(QWidget *parent, QWidget *additionalDetails
m_summaryText
=
new
QLabel
(
this
);
m_summaryText
->
setText
(
""
);
QToolButton
*
detailsButton
=
new
QToolButton
(
this
);
QAbstractButton
*
detailsButton
;
#ifdef Q_OS_MAC
detailsButton
=
new
QPushButton
(
this
);
detailsButton
->
setAttribute
(
Qt
::
WA_MacSmallSize
);
detailsButton
->
setSizePolicy
(
QSizePolicy
::
Fixed
,
QSizePolicy
::
Fixed
);
#else
detailsButton
=
new
QToolButton
(
this
);
#endif
detailsButton
->
setText
(
tr
(
"Details"
));
connect
(
detailsButton
,
SIGNAL
(
clicked
()),
...
...
src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
View file @
ffdf11d5
...
...
@@ -79,7 +79,22 @@ Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(Qt4Project *project)
m_ui
->
detailsWidget
->
setVisible
(
false
);
m_ui
->
titleLabel
->
setText
(
""
);
connect
(
m_ui
->
detailsButton
,
SIGNAL
(
clicked
()),
QAbstractButton
*
detailsButton
;
#ifdef Q_OS_MAC
detailsButton
=
new
QPushButton
;
detailsButton
->
setAttribute
(
Qt
::
WA_MacSmallSize
);
detailsButton
->
setSizePolicy
(
QSizePolicy
::
Fixed
,
QSizePolicy
::
Fixed
);
#else
detailsButton
=
new
QToolButton
;
#endif
detailsButton
->
setText
(
tr
(
"Details"
));
QHBoxLayout
*
layout
=
new
QHBoxLayout
;
layout
->
setMargin
(
0
);
layout
->
setSpacing
(
0
);
layout
->
addWidget
(
detailsButton
);
m_ui
->
detailsButtonWidget
->
setLayout
(
layout
);
connect
(
detailsButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
toggleDetails
()));
connect
(
m_ui
->
nameLineEdit
,
SIGNAL
(
textEdited
(
QString
)),
...
...
src/plugins/qt4projectmanager/qt4projectconfigwidget.ui
View file @
ffdf11d5
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
463
</width>
<height>
2
21
</height>
<width>
557
</width>
<height>
2
37
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
...
...
@@ -38,9 +38,12 @@ placeholder</string>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QToolButton"
name=
"detailsButton"
>
<property
name=
"text"
>
<string>
Details
</string>
<widget
class=
"QWidget"
name=
"detailsButtonWidget"
native=
"true"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Fixed"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</item>
...
...
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