Commit 7c2afcf1 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

fix "Debugger:" label alignment

on the way also greatly simplify the code in most copies. it was
probably trying to do what i did, but failed miserably.
parent 80e77e95
......@@ -356,18 +356,11 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
QCheckBox *runInTerminal = new QCheckBox;
fl->addRow(tr("Run in Terminal"), runInTerminal);
QWidget *debuggerLabelWidget = new QWidget(this);
QVBoxLayout *debuggerLabelLayout = new QVBoxLayout(debuggerLabelWidget);
debuggerLabelLayout->setMargin(0);
debuggerLabelLayout->setSpacing(0);
debuggerLabelWidget->setLayout(debuggerLabelLayout);
QLabel *debuggerLabel = new QLabel(tr("Debugger:"), this);
debuggerLabelLayout->addWidget(debuggerLabel);
debuggerLabelLayout->addStretch(10);
debuggerLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding);
m_debuggerLanguageChooser = new Utils::DebuggerLanguageChooser(this);
fl->addRow(debuggerLabelWidget, m_debuggerLanguageChooser);
fl->addRow(debuggerLabel, m_debuggerLanguageChooser);
m_debuggerLanguageChooser->setCppChecked(m_cmakeRunConfiguration->useCppDebugger());
m_debuggerLanguageChooser->setQmlChecked(m_cmakeRunConfiguration->useQmlDebugger());
......
......@@ -78,17 +78,11 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
m_useTerminalCheck = new QCheckBox(tr("Run in &Terminal"), this);
layout->addRow(QString(), m_useTerminalCheck);
QWidget *debuggerLabelWidget = new QWidget(this);
QVBoxLayout *debuggerLabelLayout = new QVBoxLayout(debuggerLabelWidget);
debuggerLabelLayout->setMargin(0);
debuggerLabelLayout->setSpacing(0);
debuggerLabelWidget->setLayout(debuggerLabelLayout);
QLabel *debuggerLabel = new QLabel(tr("Debugger:"), this);
debuggerLabelLayout->addWidget(debuggerLabel);
debuggerLabelLayout->addStretch(10);
debuggerLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding);
m_debuggerLanguageChooser = new Utils::DebuggerLanguageChooser(this);
layout->addRow(debuggerLabelWidget, m_debuggerLanguageChooser);
layout->addRow(debuggerLabel, m_debuggerLanguageChooser);
m_debuggerLanguageChooser->setCppChecked(m_runConfiguration->useCppDebugger());
m_debuggerLanguageChooser->setQmlChecked(m_runConfiguration->useQmlDebugger());
......
......@@ -117,17 +117,11 @@ QmlProjectRunConfigurationWidget::QmlProjectRunConfigurationWidget(QmlProjectRun
// Debugging
//
QWidget *debuggerLabelWidget = new QWidget;
QVBoxLayout *debuggerLabelLayout = new QVBoxLayout(debuggerLabelWidget);
debuggerLabelLayout->setMargin(0);
debuggerLabelLayout->setSpacing(0);
debuggerLabelWidget->setLayout(debuggerLabelLayout);
QLabel *debuggerLabel = new QLabel(tr("Debugger:"));
debuggerLabelLayout->addWidget(debuggerLabel);
debuggerLabelLayout->addStretch(10);
debuggerLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding);
DebuggerLanguageChooser *debuggerLanguageChooser = new DebuggerLanguageChooser(formWidget);
form->addRow(debuggerLabelWidget, debuggerLanguageChooser);
form->addRow(debuggerLabel, debuggerLanguageChooser);
debuggerLanguageChooser->setCppChecked(rc->useCppDebugger());
debuggerLanguageChooser->setQmlChecked(rc->useQmlDebugger());
......
......@@ -235,17 +235,11 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run
toplayout->addRow(QString(), m_useTerminalCheck);
m_useTerminalCheck->setVisible(qt4RunConfiguration->target()->id() != Constants::QT_SIMULATOR_TARGET_ID);
QWidget *debuggerLabelWidget = new QWidget(this);
QVBoxLayout *debuggerLabelLayout = new QVBoxLayout(debuggerLabelWidget);
debuggerLabelLayout->setMargin(0);
debuggerLabelLayout->setSpacing(0);
debuggerLabelWidget->setLayout(debuggerLabelLayout);
QLabel *debuggerLabel = new QLabel(tr("Debugger:"), this);
debuggerLabelLayout->addWidget(debuggerLabel);
debuggerLabelLayout->addStretch(10);
debuggerLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding);
m_debuggerLanguageChooser = new Utils::DebuggerLanguageChooser(this);
toplayout->addRow(debuggerLabelWidget, m_debuggerLanguageChooser);
toplayout->addRow(debuggerLabel, m_debuggerLanguageChooser);
m_debuggerLanguageChooser->setCppChecked(m_qt4RunConfiguration->useCppDebugger());
m_debuggerLanguageChooser->setQmlChecked(m_qt4RunConfiguration->useQmlDebugger());
......
......@@ -36,6 +36,7 @@
#include <utils/debuggerlanguagechooser.h>
#include <utils/detailswidget.h>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QVBoxLayout>
#include <QtGui/QHBoxLayout>
......@@ -69,8 +70,11 @@ S60DeviceRunConfigurationWidget::S60DeviceRunConfigurationWidget(
detailsBoxLayout->addLayout(formLayout);
formLayout->addRow(tr("Arguments:"), m_argumentsLineEdit);
QLabel *debuggerLabel = new QLabel(tr("Debugger:"), this);
debuggerLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding);
m_debuggerLanguageChooser = new Utils::DebuggerLanguageChooser(this);
formLayout->addRow(tr("Debugger:"), m_debuggerLanguageChooser);
formLayout->addRow(debuggerLabel, m_debuggerLanguageChooser);
m_debuggerLanguageChooser->setCppChecked(m_runConfiguration->useCppDebugger());
m_debuggerLanguageChooser->setQmlChecked(m_runConfiguration->useQmlDebugger());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment