Put branches viewport into a scrollable area.
This commit is contained in:
parent
8ab19f64f6
commit
6f3b25646d
|
@ -198,6 +198,9 @@ TasEditorWindow::TasEditorWindow(QWidget *parent)
|
||||||
mainHBox->addWidget( controlPanelContainerWidget );
|
mainHBox->addWidget( controlPanelContainerWidget );
|
||||||
mainLayout->addWidget(mainHBox);
|
mainLayout->addWidget(mainHBox);
|
||||||
|
|
||||||
|
mainHBox->setStretchFactor( 0, 5 );
|
||||||
|
mainHBox->setStretchFactor( 1, 1 );
|
||||||
|
|
||||||
menuBar = buildMenuBar();
|
menuBar = buildMenuBar();
|
||||||
|
|
||||||
setLayout(mainLayout);
|
setLayout(mainLayout);
|
||||||
|
@ -1033,7 +1036,7 @@ void TasEditorWindow::buildSideControlPanel(void)
|
||||||
QVBoxLayout *vbox;
|
QVBoxLayout *vbox;
|
||||||
QHBoxLayout *hbox;
|
QHBoxLayout *hbox;
|
||||||
QGridLayout *grid;
|
QGridLayout *grid;
|
||||||
QScrollArea *scrollArea;
|
QScrollArea *scrollArea1, *scrollArea2;
|
||||||
QTreeWidgetItem *item;
|
QTreeWidgetItem *item;
|
||||||
|
|
||||||
ctlPanelMainVbox = new QVBoxLayout();
|
ctlPanelMainVbox = new QVBoxLayout();
|
||||||
|
@ -1140,18 +1143,26 @@ void TasEditorWindow::buildSideControlPanel(void)
|
||||||
//hbox->addWidget( autoLuaCBox );
|
//hbox->addWidget( autoLuaCBox );
|
||||||
//luaGBox->setLayout( hbox );
|
//luaGBox->setLayout( hbox );
|
||||||
|
|
||||||
scrollArea = new QScrollArea();
|
scrollArea1 = new QScrollArea();
|
||||||
scrollArea->setWidgetResizable(false);
|
scrollArea1->setWidgetResizable(false);
|
||||||
scrollArea->setSizeAdjustPolicy( QAbstractScrollArea::AdjustToContents );
|
scrollArea1->setSizeAdjustPolicy( QAbstractScrollArea::AdjustToContents );
|
||||||
scrollArea->setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
|
scrollArea1->setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
|
||||||
scrollArea->setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded );
|
scrollArea1->setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded );
|
||||||
scrollArea->setMinimumSize( QSize( 128, 128 ) );
|
scrollArea1->setMinimumSize( QSize( 128, 128 ) );
|
||||||
scrollArea->setWidget( &bookmarks );
|
scrollArea1->setWidget( &bookmarks );
|
||||||
|
|
||||||
|
scrollArea2 = new QScrollArea();
|
||||||
|
scrollArea2->setWidgetResizable(true);
|
||||||
|
scrollArea2->setSizeAdjustPolicy( QAbstractScrollArea::AdjustToContents );
|
||||||
|
scrollArea2->setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
|
||||||
|
scrollArea2->setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded );
|
||||||
|
scrollArea2->setMinimumSize( QSize( 128, 128 ) );
|
||||||
|
scrollArea2->setWidget( &branches );
|
||||||
|
|
||||||
bkmkBrnchStack = new QTabWidget();
|
bkmkBrnchStack = new QTabWidget();
|
||||||
bkmkBrnchStack->addTab( scrollArea, tr("Bookmarks") );
|
bkmkBrnchStack->addTab( scrollArea1, tr("Bookmarks") );
|
||||||
bkmkBrnchStack->addTab( &branches , tr("Branches") );
|
bkmkBrnchStack->addTab( scrollArea2, tr("Branches") );
|
||||||
bkmkBrnchStack->addTab( histTree , tr("History") );
|
bkmkBrnchStack->addTab( histTree , tr("History") );
|
||||||
|
|
||||||
taseditorConfig.displayBranchesTree = 0;
|
taseditorConfig.displayBranchesTree = 0;
|
||||||
|
|
||||||
|
|
|
@ -107,8 +107,17 @@ void BRANCHES::calcFontData(void)
|
||||||
pxSelWidth = (pxBoxWidth * 7) / 8;
|
pxSelWidth = (pxBoxWidth * 7) / 8;
|
||||||
pxSelHeight = (pxBoxHeight * 7) / 8;
|
pxSelHeight = (pxBoxHeight * 7) / 8;
|
||||||
|
|
||||||
pxMinGridWidth = pxBoxWidth * 1;
|
pxMinGridWidth = (pxBoxWidth * 3) / 2;
|
||||||
pxMaxGridWidth = pxBoxWidth * 2;
|
pxMaxGridWidth = (pxBoxWidth * 2);
|
||||||
|
|
||||||
|
w = pxMaxGridWidth * 12;
|
||||||
|
h = pxMaxGridWidth * 10;
|
||||||
|
|
||||||
|
if (w < BRANCHES_BITMAP_WIDTH ) w = BRANCHES_BITMAP_WIDTH;
|
||||||
|
if (h < BRANCHES_BITMAP_HEIGHT) h = BRANCHES_BITMAP_HEIGHT;
|
||||||
|
|
||||||
|
this->setMinimumWidth(w);
|
||||||
|
this->setMinimumHeight(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BRANCHES::init()
|
void BRANCHES::init()
|
||||||
|
|
Loading…
Reference in New Issue