mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
simplify layout of ViewPropertiesDialog
svn path=/trunk/KDE/kdebase/apps/; revision=650290
This commit is contained in:
parent
dd026d8cf7
commit
d6f4e13fbd
|
@ -86,7 +86,15 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
|
||||||
m_viewMode->setCurrentIndex(index);
|
m_viewMode->setCurrentIndex(index);
|
||||||
|
|
||||||
QLabel* sortingLabel = new QLabel(i18n("Sorting:"), propsBox);
|
QLabel* sortingLabel = new QLabel(i18n("Sorting:"), propsBox);
|
||||||
m_sorting = new QComboBox(propsBox);
|
QWidget* sortingBox = new QWidget(propsBox);
|
||||||
|
|
||||||
|
m_sortOrder = new QComboBox(sortingBox);
|
||||||
|
m_sortOrder->addItem(i18n("Ascending"));
|
||||||
|
m_sortOrder->addItem(i18n("Descending"));
|
||||||
|
const int sortOrderIdx = (m_viewProps->sortOrder() == Qt::Ascending) ? 0 : 1;
|
||||||
|
m_sortOrder->setCurrentIndex(sortOrderIdx);
|
||||||
|
|
||||||
|
m_sorting = new QComboBox(sortingBox);
|
||||||
m_sorting->addItem("By Name");
|
m_sorting->addItem("By Name");
|
||||||
m_sorting->addItem("By Size");
|
m_sorting->addItem("By Size");
|
||||||
m_sorting->addItem("By Date");
|
m_sorting->addItem("By Date");
|
||||||
|
@ -95,12 +103,11 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
|
||||||
m_sorting->addItem("By Group");
|
m_sorting->addItem("By Group");
|
||||||
m_sorting->setCurrentIndex(m_viewProps->sorting());
|
m_sorting->setCurrentIndex(m_viewProps->sorting());
|
||||||
|
|
||||||
QLabel* sortOrderLabel = new QLabel(i18n("Sort order:"), propsBox);
|
QHBoxLayout* sortingLayout = new QHBoxLayout();
|
||||||
m_sortOrder = new QComboBox(propsBox);
|
sortingLayout->setMargin(0);
|
||||||
m_sortOrder->addItem(i18n("Ascending"));
|
sortingLayout->addWidget(m_sortOrder);
|
||||||
m_sortOrder->addItem(i18n("Descending"));
|
sortingLayout->addWidget(m_sorting);
|
||||||
const int sortOrderIdx = (m_viewProps->sortOrder() == Qt::Ascending) ? 0 : 1;
|
sortingBox->setLayout(sortingLayout);
|
||||||
m_sortOrder->setCurrentIndex(sortOrderIdx);
|
|
||||||
|
|
||||||
QLabel* additionalInfoLabel = new QLabel(i18n("Additional information:"), propsBox);
|
QLabel* additionalInfoLabel = new QLabel(i18n("Additional information:"), propsBox);
|
||||||
m_additionalInfo = new QComboBox(propsBox);
|
m_additionalInfo = new QComboBox(propsBox);
|
||||||
|
@ -121,15 +128,12 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
|
||||||
QGridLayout* propsBoxLayout = new QGridLayout(propsBox);
|
QGridLayout* propsBoxLayout = new QGridLayout(propsBox);
|
||||||
propsBoxLayout->addWidget(viewModeLabel, 0, 0);
|
propsBoxLayout->addWidget(viewModeLabel, 0, 0);
|
||||||
propsBoxLayout->addWidget(m_viewMode, 0, 1);
|
propsBoxLayout->addWidget(m_viewMode, 0, 1);
|
||||||
propsBoxLayout->addWidget(m_sorting, 1, 1);
|
|
||||||
propsBoxLayout->addWidget(sortingLabel, 1, 0);
|
propsBoxLayout->addWidget(sortingLabel, 1, 0);
|
||||||
propsBoxLayout->addWidget(m_sorting, 1, 1);
|
propsBoxLayout->addWidget(sortingBox, 1, 1);
|
||||||
propsBoxLayout->addWidget(sortOrderLabel, 2, 0);
|
propsBoxLayout->addWidget(additionalInfoLabel, 2, 0);
|
||||||
propsBoxLayout->addWidget(m_sortOrder, 2, 1);
|
propsBoxLayout->addWidget(m_additionalInfo, 2, 1);
|
||||||
propsBoxLayout->addWidget(additionalInfoLabel, 3, 0);
|
propsBoxLayout->addWidget(m_showPreview, 3, 0);
|
||||||
propsBoxLayout->addWidget(m_additionalInfo, 3, 1);
|
propsBoxLayout->addWidget(m_showHiddenFiles, 4, 0);
|
||||||
propsBoxLayout->addWidget(m_showPreview, 4, 0);
|
|
||||||
propsBoxLayout->addWidget(m_showHiddenFiles, 5, 0);
|
|
||||||
|
|
||||||
topLayout->addWidget(propsBox);
|
topLayout->addWidget(propsBox);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue