!97 #I8USHY fix mainwindow gridlayout
Merge pull request !97 from likehomedream/UIFIX
This commit is contained in:
commit
6c3e708007
|
@ -136,14 +136,21 @@ void MainWindow::initUI()
|
|||
|
||||
QVBoxLayout* alllayout = new QVBoxLayout;
|
||||
|
||||
|
||||
QGridLayout* layout = new QGridLayout;
|
||||
layout->addWidget(m_globalbtn,0,0);
|
||||
layout->addWidget(m_iconbtn,0,1);
|
||||
layout->addWidget(m_cursorbtn,0,2);
|
||||
|
||||
layout->addWidget(m_plymouthbtn,1,0);
|
||||
layout->addWidget(m_grubbtn,1,1);
|
||||
layout->setSpacing(24);
|
||||
|
||||
layout->addWidget(m_globalbtn, 1, 1);
|
||||
layout->addWidget(m_iconbtn, 1, 2);
|
||||
layout->addWidget(m_cursorbtn, 1, 3);
|
||||
layout->addWidget(m_plymouthbtn, 2, 1);
|
||||
layout->addWidget(m_grubbtn, 2, 2);
|
||||
|
||||
layout->setColumnStretch(0, 1);
|
||||
layout->setRowStretch(0, 1);
|
||||
layout->setColumnStretch(4, 1);
|
||||
layout->setRowStretch(3, 1);
|
||||
|
||||
|
||||
m_guideWidget = new QWidget();
|
||||
|
||||
|
|
|
@ -45,9 +45,14 @@ HistoryWidget::HistoryWidget(QWidget *parent) : QWidget(parent)
|
|||
}
|
||||
}
|
||||
QGridLayout *layout = new QGridLayout;
|
||||
int row = 0;
|
||||
int col = 0;
|
||||
layout->setSpacing(24);
|
||||
int row = 1;
|
||||
int col = 1;
|
||||
|
||||
layout->setColumnStretch(0, 1);
|
||||
layout->setRowStretch(0, 1);
|
||||
layout->setColumnStretch(5, 1);
|
||||
layout->setRowStretch(5, 1);
|
||||
foreach (QString folder, validFolders) {
|
||||
HistoryButton *button = new HistoryButton(this);
|
||||
HistoryInfoLoad *info = new HistoryInfoLoad(folder);
|
||||
|
@ -69,8 +74,8 @@ HistoryWidget::HistoryWidget(QWidget *parent) : QWidget(parent)
|
|||
});
|
||||
layout->addWidget(button, row, col);
|
||||
col++;
|
||||
if (col == 4) {
|
||||
col = 0;
|
||||
if (col == 5) {
|
||||
col = 1;
|
||||
row++;
|
||||
}
|
||||
connect(this,&HistoryWidget::updateInfo,info,&HistoryInfoLoad::updateHistoryInfo);
|
||||
|
@ -114,8 +119,13 @@ void HistoryWidget::updateHistoryDir()
|
|||
}
|
||||
|
||||
QGridLayout *layout = new QGridLayout;
|
||||
layout->setSpacing(24);
|
||||
int row = 0;
|
||||
int col = 0;
|
||||
int col = 1;
|
||||
layout->setColumnStretch(0, 1);
|
||||
layout->setRowStretch(0, 1);
|
||||
layout->setColumnStretch(5, 1);
|
||||
layout->setRowStretch(5, 1);
|
||||
|
||||
foreach (QString folder, validFolders) {
|
||||
HistoryButton *button = new HistoryButton(this);
|
||||
|
@ -139,8 +149,8 @@ void HistoryWidget::updateHistoryDir()
|
|||
layout->addWidget(button, row, col);
|
||||
|
||||
col++;
|
||||
if (col == 4) {
|
||||
col = 0;
|
||||
if (col == 5) {
|
||||
col = 1;
|
||||
row++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue