VirtualBox

Changeset 75776 in vbox


Ignore:
Timestamp:
Nov 27, 2018 6:07:53 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6699. Trying to make copy progress bar look half way decent.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManager.cpp

    r75762 r75776  
    8080
    8181/*********************************************************************************************************************************
    82 *   UIGuestControlFileManagerOptions implementation.                                                                            *
     82*   UIGuestControlFileManagerOptions implementation.                                                                             *
    8383*********************************************************************************************************************************/
    8484
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerOperationsPanel.cpp

    r75761 r75776  
    102102{
    103103    prepare();
     104    setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum);
    104105}
    105106
     
    140141    if (!m_pMainLayout)
    141142        return;
     143    m_pMainLayout->setSpacing(0);
    142144
    143145    m_pCancelButton = new QIToolButton;
     
    146148        m_pCancelButton->setIcon(QApplication::style()->standardIcon(QStyle::SP_DockWidgetCloseButton));
    147149        m_pCancelButton->setStyleSheet("QToolButton { border: 0px none black; margin: 0px 0px 0px 0px; } ");
    148         const QSize sh = m_pCancelButton->sizeHint();
    149         m_pCancelButton->setFixedSize(sh);
     150
    150151
    151152        connect(m_pCancelButton, &QIToolButton::clicked, this, &UIFileOperationProgressWidget::sltCancelProgress);
     
    161162        m_pProgressBar->setMaximum(100);
    162163        m_pProgressBar->setTextVisible(true);
    163         m_pProgressBar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
     164        m_pProgressBar->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum);
    164165        m_pMainLayout->addWidget(m_pProgressBar);
    165166    }
    166 
    167167    setLayout(m_pMainLayout);
    168168}
     
    230230        return;
    231231
    232     m_pTableWidget->setRowCount(m_pTableWidget->rowCount() + 1);
     232    /** Insert the row to the top of the table since inserting to the bottom causes a strange stacking
     233     *  effect of the widgets: */
     234    m_pTableWidget->insertRow(0);
    233235    UIFileOperationProgressWidget *pOperationsWidget = new UIFileOperationProgressWidget(comProgress);
    234     m_pTableWidget->setCellWidget(m_pTableWidget->rowCount() - 1, 0, pOperationsWidget);
     236    m_pTableWidget->setCellWidget(0, 0, pOperationsWidget);
    235237    connect(pOperationsWidget, &UIFileOperationProgressWidget::sigProgressComplete,
    236238            this, &UIGuestControlFileManagerOperationsPanel::sigFileOperationComplete);
    237239    connect(pOperationsWidget, &UIFileOperationProgressWidget::sigProgressFail,
    238240            this, &UIGuestControlFileManagerOperationsPanel::sigFileOperationFail);
    239 
    240     m_pTableWidget->resizeColumnsToContents();
     241    /* Trying to make the the rows look a bit less shitty */
     242    //m_pTableWidget->resizeRowsToContents();
     243    //m_pTableWidget->horizontalHeader()->setStretchLastSection(true);
     244    m_pTableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
     245    //m_pTableWidget->scrollToBottom();
    241246}
    242247
     
    257262        m_pTableWidget->setColumnCount(TableColumn_Max);
    258263        m_pTableWidget->verticalHeader()->hide();
    259         QStringList headers;
    260         headers << "Progress" << "Information";
    261         m_pTableWidget->setHorizontalHeaderLabels(headers);
     264        m_pTableWidget->horizontalHeader()->hide();
    262265        m_pTableWidget->setShowGrid(false);
    263266        mainLayout()->addWidget(m_pTableWidget);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette