forked from qt-creator/qt-creator
Utils: Add "Layouting::HorizontalRule" LayoutItem
We have many horizontal separator lines in the UI, which are each time repetitively created from a QFrame with some flags set. With the .ui inlining, we will have more of these separators coming. This change intoduces a Layouting::HorizontalRule LayoutItem and replaces various existing QFarme separators with it. Change-Id: I60bad89e2a2b777fbd2f9d0cf872af81e41dcfd7 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -472,6 +472,12 @@ PushButton::PushButton(std::initializer_list<LayoutBuilder::LayoutItem> items)
|
||||
applyItems(widget, items);
|
||||
}
|
||||
|
||||
HorizontalRule::HorizontalRule(std::initializer_list<LayoutItem> items)
|
||||
{
|
||||
widget = createHr();
|
||||
applyItems(widget, items);
|
||||
}
|
||||
|
||||
// "Properties"
|
||||
|
||||
LayoutBuilder::Setter title(const QString &title, BoolAspect *checker)
|
||||
@@ -524,6 +530,14 @@ LayoutBuilder::Setter tooltip(const QString &toolTip)
|
||||
};
|
||||
}
|
||||
|
||||
QWidget *createHr(QWidget *parent)
|
||||
{
|
||||
auto frame = new QFrame(parent);
|
||||
frame->setFrameShape(QFrame::HLine);
|
||||
frame->setFrameShadow(QFrame::Sunken);
|
||||
return frame;
|
||||
}
|
||||
|
||||
LayoutBuilder::Break br;
|
||||
LayoutBuilder::Stretch st;
|
||||
LayoutBuilder::Space empty(0);
|
||||
|
@@ -159,6 +159,7 @@ QTCREATOR_UTILS_EXPORT LayoutBuilder::Setter text(const QString &text);
|
||||
QTCREATOR_UTILS_EXPORT LayoutBuilder::Setter tooltip(const QString &toolTip);
|
||||
QTCREATOR_UTILS_EXPORT LayoutBuilder::Setter onClicked(const std::function<void()> &func,
|
||||
QObject *guard = nullptr);
|
||||
QTCREATOR_UTILS_EXPORT QWidget *createHr(QWidget *parent = nullptr);
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT Group : public LayoutBuilder::LayoutItem
|
||||
{
|
||||
@@ -172,6 +173,12 @@ public:
|
||||
PushButton(std::initializer_list<LayoutItem> items);
|
||||
};
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT HorizontalRule : public LayoutBuilder::LayoutItem
|
||||
{
|
||||
public:
|
||||
HorizontalRule(std::initializer_list<LayoutItem> items);
|
||||
};
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT Column : public LayoutBuilder
|
||||
{
|
||||
public:
|
||||
|
@@ -11,8 +11,8 @@
|
||||
|
||||
#include <utils/layoutbuilder.h>
|
||||
#include <utils/outputformatter.h>
|
||||
#include <utils/runextensions.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/runextensions.h>
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <QDialogButtonBox>
|
||||
@@ -76,10 +76,6 @@ AndroidSdkManagerWidget::AndroidSdkManagerWidget(AndroidConfig &config,
|
||||
|
||||
auto obsoleteCheckBox = new QCheckBox(tr("Include obsolete"));
|
||||
|
||||
auto line = new QFrame;
|
||||
line->setFrameShape(QFrame::HLine);
|
||||
line->setFrameShadow(QFrame::Sunken);
|
||||
|
||||
auto showAvailableRadio = new QRadioButton(tr("Available"));
|
||||
auto showInstalledRadio = new QRadioButton(tr("Installed"));
|
||||
auto showAllRadio = new QRadioButton(tr("All"));
|
||||
@@ -141,7 +137,7 @@ AndroidSdkManagerWidget::AndroidSdkManagerWidget(AndroidConfig &config,
|
||||
Column {
|
||||
Row { tr("Channel:"), channelCheckbox },
|
||||
obsoleteCheckBox,
|
||||
line,
|
||||
HorizontalRule {},
|
||||
showAvailableRadio,
|
||||
showInstalledRadio,
|
||||
showAllRadio,
|
||||
|
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/layoutbuilder.h>
|
||||
#include <utils/outputformat.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
@@ -820,14 +821,6 @@ void TestRunner::reportResult(ResultType type, const QString &description)
|
||||
|
||||
/*************************************************************************************************/
|
||||
|
||||
static QFrame *createLine(QWidget *parent)
|
||||
{
|
||||
QFrame *line = new QFrame(parent);
|
||||
line->setFrameShape(QFrame::HLine);
|
||||
line->setFrameShadow(QFrame::Sunken);
|
||||
return line;
|
||||
}
|
||||
|
||||
RunConfigurationSelectionDialog::RunConfigurationSelectionDialog(const QString &buildTargetKey,
|
||||
QWidget *parent)
|
||||
: QDialog(parent)
|
||||
@@ -853,7 +846,7 @@ RunConfigurationSelectionDialog::RunConfigurationSelectionDialog(const QString &
|
||||
formLayout->addRow(m_details);
|
||||
formLayout->addRow(Tr::tr("Run Configuration:"), m_rcCombo);
|
||||
formLayout->addRow(m_rememberCB);
|
||||
formLayout->addRow(createLine(this));
|
||||
formLayout->addRow(Layouting::createHr(this));
|
||||
formLayout->addRow(Tr::tr("Executable:"), m_executable);
|
||||
formLayout->addRow(Tr::tr("Arguments:"), m_arguments);
|
||||
formLayout->addRow(Tr::tr("Working Directory:"), m_workingDir);
|
||||
@@ -861,7 +854,7 @@ RunConfigurationSelectionDialog::RunConfigurationSelectionDialog(const QString &
|
||||
auto vboxLayout = new QVBoxLayout(this);
|
||||
vboxLayout->addLayout(formLayout);
|
||||
vboxLayout->addStretch();
|
||||
vboxLayout->addWidget(createLine(this));
|
||||
vboxLayout->addWidget(Layouting::createHr(this));
|
||||
vboxLayout->addWidget(m_buttonBox);
|
||||
|
||||
connect(m_rcCombo, &QComboBox::currentTextChanged,
|
||||
|
@@ -6,6 +6,8 @@
|
||||
#include "activityselector.h"
|
||||
#include "ui_checkoutdialog.h"
|
||||
|
||||
#include <utils/layoutbuilder.h>
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
namespace ClearCase {
|
||||
@@ -22,12 +24,7 @@ CheckOutDialog::CheckOutDialog(const QString &fileName, bool isUcm, bool showCom
|
||||
m_actSelector = new ActivitySelector(this);
|
||||
|
||||
ui->verticalLayout->insertWidget(0, m_actSelector);
|
||||
|
||||
auto line = new QFrame(this);
|
||||
line->setFrameShape(QFrame::HLine);
|
||||
line->setFrameShadow(QFrame::Sunken);
|
||||
|
||||
ui->verticalLayout->insertWidget(1, line);
|
||||
ui->verticalLayout->insertWidget(1, Utils::Layouting::createHr());
|
||||
}
|
||||
|
||||
if (!showComment)
|
||||
|
@@ -5,8 +5,9 @@
|
||||
|
||||
#include "activityselector.h"
|
||||
|
||||
#include <utils/layoutbuilder.h>
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QFrame>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
using namespace ClearCase::Internal;
|
||||
@@ -67,11 +68,7 @@ void ClearCaseSubmitEditorWidget::addActivitySelector(bool isUcm)
|
||||
|
||||
m_actSelector = new ActivitySelector;
|
||||
m_verticalLayout->insertWidget(0, m_actSelector);
|
||||
|
||||
auto line = new QFrame;
|
||||
line->setFrameShape(QFrame::HLine);
|
||||
line->setFrameShadow(QFrame::Sunken);
|
||||
m_verticalLayout->insertWidget(1, line);
|
||||
m_verticalLayout->insertWidget(1, Utils::Layouting::createHr());
|
||||
}
|
||||
|
||||
QString ClearCaseSubmitEditorWidget::commitName() const
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#include <utils/infobar.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/theme/theme.h>
|
||||
#include <utils/layoutbuilder.h>
|
||||
#include <utils/link.h>
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
@@ -47,7 +48,7 @@ EditorView::EditorView(SplitterOrView *parentSplitterOrView, QWidget *parent) :
|
||||
m_toolBar(new EditorToolBar(this)),
|
||||
m_container(new QStackedWidget(this)),
|
||||
m_infoBarDisplay(new InfoBarDisplay(this)),
|
||||
m_statusHLine(new QFrame(this)),
|
||||
m_statusHLine(Layouting::createHr(this)),
|
||||
m_statusWidget(new QFrame(this))
|
||||
{
|
||||
auto tl = new QVBoxLayout(this);
|
||||
@@ -79,8 +80,6 @@ EditorView::EditorView(SplitterOrView *parentSplitterOrView, QWidget *parent) :
|
||||
tl->addWidget(new FindToolBarPlaceHolder(this));
|
||||
|
||||
{
|
||||
m_statusHLine->setFrameStyle(QFrame::HLine);
|
||||
|
||||
m_statusWidget->setFrameStyle(QFrame::NoFrame);
|
||||
m_statusWidget->setLineWidth(0);
|
||||
m_statusWidget->setAutoFillBackground(true);
|
||||
|
@@ -113,7 +113,7 @@ private:
|
||||
QStackedWidget *m_container;
|
||||
Utils::InfoBarDisplay *m_infoBarDisplay;
|
||||
QString m_statusWidgetId;
|
||||
QFrame *m_statusHLine;
|
||||
QWidget *m_statusHLine;
|
||||
QFrame *m_statusWidget;
|
||||
QLabel *m_statusWidgetLabel;
|
||||
QToolButton *m_statusWidgetButton;
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include <utils/filepath.h>
|
||||
#include <utils/fsengine/fileiconprovider.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/layoutbuilder.h>
|
||||
#include <utils/navigationtreeview.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/removefiledialog.h>
|
||||
@@ -85,13 +86,6 @@ FolderNavigationWidgetFactory *FolderNavigationWidgetFactory::instance()
|
||||
|
||||
namespace Internal {
|
||||
|
||||
static QWidget *createHLine()
|
||||
{
|
||||
auto widget = new QFrame;
|
||||
widget->setFrameStyle(QFrame::Plain | QFrame::HLine);
|
||||
return widget;
|
||||
}
|
||||
|
||||
// Call delayLayoutOnce to delay reporting the new heightForWidget by the double-click interval.
|
||||
// Call setScrollBarOnce to set a scroll bar's value once during layouting (where heightForWidget
|
||||
// is called).
|
||||
@@ -318,7 +312,7 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) : QWidget(parent
|
||||
crumbLayout->setContentsMargins(4, 4, 4, 4);
|
||||
crumbLayout->addWidget(m_crumbLabel);
|
||||
crumbContainerLayout->addLayout(crumbLayout);
|
||||
crumbContainerLayout->addWidget(createHLine());
|
||||
crumbContainerLayout->addWidget(Layouting::createHr(this));
|
||||
m_crumbLabel->setAlignment(Qt::AlignLeft | Qt::AlignTop);
|
||||
|
||||
auto layout = new QVBoxLayout();
|
||||
|
@@ -322,9 +322,7 @@ ClangdSettingsWidget::ClangdSettingsWidget(const ClangdSettings::Data &settingsD
|
||||
else
|
||||
Core::EditorManager::openEditor(Utils::FilePath::fromString(link));
|
||||
});
|
||||
const auto separator = new QFrame;
|
||||
separator->setFrameShape(QFrame::HLine);
|
||||
layout->addWidget(separator);
|
||||
layout->addWidget(Utils::Layouting::createHr());
|
||||
layout->addWidget(configFilesHelpLabel);
|
||||
|
||||
layout->addStretch(1);
|
||||
|
@@ -38,6 +38,7 @@
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/basetreeview.h>
|
||||
#include <utils/layoutbuilder.h>
|
||||
#include <utils/fancylineedit.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -3152,9 +3153,7 @@ public:
|
||||
defaultImplTargetComboBox->setCurrentIndex(implTargetStrings.size() - 1);
|
||||
const auto mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->addLayout(defaultImplTargetLayout);
|
||||
const auto separator = new QFrame();
|
||||
separator->setFrameShape(QFrame::HLine);
|
||||
mainLayout->addWidget(separator);
|
||||
mainLayout->addWidget(Utils::Layouting::createHr(this));
|
||||
mainLayout->addLayout(candidatesLayout);
|
||||
mainLayout->addWidget(buttonBox);
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include <projectexplorer/toolchain.h>
|
||||
|
||||
#include <utils/fancylineedit.h>
|
||||
#include <utils/layoutbuilder.h>
|
||||
#include <utils/pathchooser.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -262,14 +263,6 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
|
||||
"If empty, $SYSROOT/usr/lib/debug will be chosen."));
|
||||
d->debuginfoPathChooser->setHistoryCompleter("Debugger.DebugLocation.History");
|
||||
|
||||
auto line = new QFrame(this);
|
||||
line->setFrameShape(QFrame::HLine);
|
||||
line->setFrameShadow(QFrame::Sunken);
|
||||
|
||||
auto line2 = new QFrame(this);
|
||||
line2->setFrameShape(QFrame::HLine);
|
||||
line2->setFrameShadow(QFrame::Sunken);
|
||||
|
||||
d->historyComboBox = new QComboBox(this);
|
||||
|
||||
d->buttonBox = new QDialogButtonBox(this);
|
||||
@@ -292,13 +285,13 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
|
||||
formLayout->addRow(Tr::tr("Debug &information:"), d->debuginfoPathChooser);
|
||||
formLayout->addRow(d->channelOverrideHintLabel);
|
||||
formLayout->addRow(d->channelOverrideLabel, d->channelOverrideEdit);
|
||||
formLayout->addRow(line2);
|
||||
formLayout->addRow(Layouting::createHr());
|
||||
formLayout->addRow(Tr::tr("&Recent:"), d->historyComboBox);
|
||||
|
||||
auto verticalLayout = new QVBoxLayout(this);
|
||||
verticalLayout->addLayout(formLayout);
|
||||
verticalLayout->addStretch();
|
||||
verticalLayout->addWidget(line);
|
||||
verticalLayout->addWidget(Layouting::createHr());
|
||||
verticalLayout->addWidget(d->buttonBox);
|
||||
|
||||
connect(d->localExecutablePathChooser, &PathChooser::rawPathChanged,
|
||||
|
@@ -13,6 +13,7 @@
|
||||
#include <projectexplorer/kitchooser.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
#include <utils/layoutbuilder.h>
|
||||
#include <utils/pathchooser.h>
|
||||
#include <utils/processinterface.h>
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -258,17 +259,12 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent)
|
||||
formLayout->addRow(Tr::tr("&Executable or symbol file:"), d->symbolFileName);
|
||||
formLayout->addRow(Tr::tr("Override &start script:"), d->overrideStartScriptFileName);
|
||||
formLayout->addRow(Tr::tr("Override S&ysRoot:"), d->sysRootDirectory);
|
||||
|
||||
auto line = new QFrame(this);
|
||||
line->setFrameShape(QFrame::HLine);
|
||||
line->setFrameShadow(QFrame::Sunken);
|
||||
|
||||
formLayout->addRow(d->buttonBox);
|
||||
|
||||
auto vboxLayout = new QVBoxLayout(this);
|
||||
vboxLayout->addLayout(formLayout);
|
||||
vboxLayout->addStretch();
|
||||
vboxLayout->addWidget(line);
|
||||
vboxLayout->addWidget(Layouting::createHr());
|
||||
vboxLayout->addWidget(d->buttonBox);
|
||||
}
|
||||
|
||||
|
@@ -19,7 +19,6 @@
|
||||
#include <QApplication>
|
||||
#include <QCheckBox>
|
||||
#include <QDateTime>
|
||||
#include <QFrame>
|
||||
#include <QGroupBox>
|
||||
#include <QHeaderView>
|
||||
#include <QInputDialog>
|
||||
@@ -71,10 +70,6 @@ IosSettingsWidget::IosSettingsWidget()
|
||||
m_resetButton->setEnabled(false);
|
||||
m_resetButton->setToolTip(tr("Reset contents and settings of simulator devices."));
|
||||
|
||||
auto line = new QFrame;
|
||||
line->setFrameShadow(QFrame::Raised);
|
||||
line->setFrameShape(QFrame::HLine);
|
||||
|
||||
auto createButton = new QPushButton(tr("Create"));
|
||||
createButton->setToolTip(tr("Create a new simulator device."));
|
||||
|
||||
@@ -121,7 +116,7 @@ IosSettingsWidget::IosSettingsWidget()
|
||||
st
|
||||
},
|
||||
},
|
||||
line,
|
||||
HorizontalRule {},
|
||||
Row { tr("Screenshot directory:"), m_pathWidget }
|
||||
}
|
||||
}
|
||||
|
@@ -55,6 +55,7 @@
|
||||
#include <coreplugin/actionmanager/commandbutton.h>
|
||||
#include <utils/fadingindicator.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/layoutbuilder.h>
|
||||
#include <utils/styledbar.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -1120,9 +1121,7 @@ void ModelEditor::initToolbars()
|
||||
}
|
||||
case qmt::Toolbar::TooltypeSeparator:
|
||||
{
|
||||
auto horizLine1 = new QFrame(d->leftToolBox);
|
||||
horizLine1->setFrameShape(QFrame::HLine);
|
||||
toolBarLayout->addWidget(horizLine1);
|
||||
toolBarLayout->addWidget(Layouting::createHr(d->leftToolBox));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1155,9 +1154,7 @@ void ModelEditor::initToolbars()
|
||||
new DragTool(QIcon(":/modelinglib/48x48/item.png"),
|
||||
tr("Item"), tr("New Item"), QLatin1String(qmt::ELEMENT_TYPE_ITEM),
|
||||
QString(), toolBar));
|
||||
auto horizLine1 = new QFrame(d->leftToolBox);
|
||||
horizLine1->setFrameShape(QFrame::HLine);
|
||||
toolBarLayout->addWidget(horizLine1);
|
||||
toolBarLayout->addWidget(Layouting::createHr(d->leftToolBox));
|
||||
toolBarLayout->addWidget(
|
||||
new DragTool(QIcon(":/modelinglib/48x48/annotation.png"),
|
||||
tr("Annotation"), QString(), QLatin1String(qmt::ELEMENT_TYPE_ANNOTATION),
|
||||
|
@@ -15,7 +15,6 @@
|
||||
#include <utils/layoutbuilder.h>
|
||||
|
||||
#include <QDialogButtonBox>
|
||||
#include <QFrame>
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
@@ -46,10 +45,6 @@ PerfLoadDialog::PerfLoadDialog(QWidget *parent)
|
||||
m_kitChooser = new ProjectExplorer::KitChooser(this);
|
||||
m_kitChooser->populate();
|
||||
|
||||
auto line = new QFrame(this);
|
||||
line->setFrameShape(QFrame::HLine);
|
||||
line->setFrameShadow(QFrame::Sunken);
|
||||
|
||||
auto buttonBox = new QDialogButtonBox(this);
|
||||
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
|
||||
|
||||
@@ -62,7 +57,7 @@ PerfLoadDialog::PerfLoadDialog(QWidget *parent)
|
||||
label3, Span(2, m_kitChooser)
|
||||
},
|
||||
st,
|
||||
line,
|
||||
HorizontalRule {},
|
||||
buttonBox
|
||||
}.attachTo(this);
|
||||
|
||||
|
@@ -156,10 +156,6 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser,
|
||||
mainLayout->addWidget(errorText);
|
||||
mainLayout->addWidget(buttonBox);
|
||||
|
||||
// QFrame *line = new QFrame(this);
|
||||
// line->setFrameShape(QFrame::HLine);
|
||||
// line->setFrameShadow(QFrame::Sunken);
|
||||
|
||||
proxyModel.setFilterRegularExpression(processFilterLineEdit->text());
|
||||
|
||||
connect(processFilterLineEdit, &FancyLineEdit::textChanged,
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include "panelswidget.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <utils/layoutbuilder.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/styledbar.h>
|
||||
#include <utils/stylehelper.h>
|
||||
@@ -103,13 +104,7 @@ void PanelsWidget::addPropertiesPanel(const QString &displayName)
|
||||
f.setPointSizeF(f.pointSizeF() * 1.6);
|
||||
nameLabel->setFont(f);
|
||||
m_layout->addWidget(nameLabel);
|
||||
|
||||
// line:
|
||||
auto line = new QFrame(m_root);
|
||||
line->setFrameShape(QFrame::HLine);
|
||||
line->setForegroundRole(QPalette::Midlight);
|
||||
line->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
m_layout->addWidget(line);
|
||||
m_layout->addWidget(Layouting::createHr());
|
||||
}
|
||||
|
||||
void PanelsWidget::addWidget(QWidget *widget)
|
||||
@@ -160,10 +155,7 @@ void PanelsWidget::addGlobalSettingsProperties(ProjectSettingsWidget *widget)
|
||||
}
|
||||
horizontalLayout->addStretch(1);
|
||||
m_layout->addLayout(horizontalLayout);
|
||||
|
||||
auto separator = new QFrame(m_root);
|
||||
separator->setFrameShape(QFrame::HLine);
|
||||
m_layout->addWidget(separator);
|
||||
m_layout->addWidget(Layouting::createHr());
|
||||
}
|
||||
|
||||
} // ProjectExplorer
|
||||
|
@@ -11,7 +11,6 @@
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QFrame>
|
||||
#include <QInputDialog>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
@@ -127,10 +126,6 @@ SessionDialog::SessionDialog(QWidget *parent) : QDialog(parent)
|
||||
|
||||
m_autoLoadCheckBox = new QCheckBox(tr("Restore last session on startup"));
|
||||
|
||||
auto line = new QFrame(this);
|
||||
line->setFrameShape(QFrame::HLine);
|
||||
line->setFrameShadow(QFrame::Sunken);
|
||||
|
||||
auto buttonBox = new QDialogButtonBox(this);
|
||||
buttonBox->setStandardButtons(QDialogButtonBox::Close);
|
||||
|
||||
@@ -157,7 +152,7 @@ SessionDialog::SessionDialog(QWidget *parent) : QDialog(parent)
|
||||
}
|
||||
},
|
||||
m_autoLoadCheckBox,
|
||||
line,
|
||||
HorizontalRule {},
|
||||
Row { whatsASessionLabel, buttonBox },
|
||||
}.attachTo(this);
|
||||
|
||||
|
@@ -134,17 +134,13 @@ QbsProfilesSettingsWidget::QbsProfilesSettingsWidget()
|
||||
m_profileValueLabel = new QLabel;
|
||||
m_propertiesView = new QTreeView;
|
||||
|
||||
auto line = new QFrame;
|
||||
line->setFrameShape(QFrame::HLine);
|
||||
line->setFrameShadow(QFrame::Sunken);
|
||||
|
||||
using namespace Utils::Layouting;
|
||||
Column {
|
||||
Form {
|
||||
tr("Kit:"), m_kitsComboBox, br,
|
||||
tr("Associated profile:"), m_profileValueLabel, br,
|
||||
},
|
||||
line,
|
||||
HorizontalRule {},
|
||||
tr("Profile properties:"),
|
||||
Row {
|
||||
m_propertiesView,
|
||||
|
@@ -60,10 +60,6 @@ BookmarkDialog::BookmarkDialog(BookmarkManager *manager, const QString &title,
|
||||
|
||||
m_toolButton = new QToolButton;
|
||||
m_toolButton->setFixedSize(24, 24);
|
||||
auto line = new QFrame;
|
||||
line->setFrameShape(QFrame::HLine);
|
||||
line->setFrameShadow(QFrame::Sunken);
|
||||
line->setForegroundRole(QPalette::Midlight);
|
||||
|
||||
m_treeView = new QTreeView;
|
||||
m_treeView->setModel(proxyModel);
|
||||
@@ -83,7 +79,7 @@ BookmarkDialog::BookmarkDialog(BookmarkManager *manager, const QString &title,
|
||||
tr("Bookmark:"), m_bookmarkEdit, br,
|
||||
tr("Add in folder:"), m_bookmarkFolders, br,
|
||||
},
|
||||
Row { m_toolButton, line, },
|
||||
Row { m_toolButton, HorizontalRule {}, },
|
||||
m_treeView,
|
||||
Row { m_newFolderButton, m_buttonBox, }
|
||||
}.attachTo(this);
|
||||
|
Reference in New Issue
Block a user