MCPcopy Create free account
hub / github.com/Linloir/GraphBuilder / resizeEvent

Method resizeEvent

mainwindow.cpp:392–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392void MainWindow::resizeEvent(QResizeEvent *event){
393 //Resize border
394 if(border)
395 border->resize(ui->mainWidget->size() + QSize(2, 2));
396
397 //Resize mask
398 QPainterPath path;
399 path.addRoundedRect(ui->mainWidget->rect(), cornerRadius - 1, cornerRadius - 1);
400 QRegion mask(path.toFillPolygon().toPolygon());
401 ui->mainWidget->setMask(mask);
402
403 //Resize all pages
404 for(int i = 0; i < pageList.size(); i++){
405 pageList[i]->resize(ui->mainWidget->width() * 0.3 < pageList[i]->preferWidth ? pageList[i]->preferWidth - 1 : ui->mainWidget->width() * 0.3 - 1, ui->mainWidget->height());
406 pageList[i]->resize(pageList[i]->width() + 1, pageList[i]->height());
407 }
408}
409
410void MainWindow::controlWindowScale(){
411 if(!maximized){

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected