forked from qt-creator/qt-creator
Target selector: Make sure the run icon is not hidden under scrollbar
Fixes: QTCREATORBUG-24148 Change-Id: Icae939d8f63a99b372f32d91d33acdfb2130a4f7 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -68,6 +68,8 @@ using namespace Utils;
|
|||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
const int RunColumnWidth = 30;
|
||||||
|
|
||||||
static QIcon createCenteredIcon(const QIcon &icon, const QIcon &overlay)
|
static QIcon createCenteredIcon(const QIcon &icon, const QIcon &overlay)
|
||||||
{
|
{
|
||||||
QPixmap targetPixmap;
|
QPixmap targetPixmap;
|
||||||
@@ -545,6 +547,8 @@ int SelectorView::optimalWidth() const
|
|||||||
void SelectorView::setOptimalWidth(int width)
|
void SelectorView::setOptimalWidth(int width)
|
||||||
{
|
{
|
||||||
m_optimalWidth = width;
|
m_optimalWidth = width;
|
||||||
|
if (model()->columnCount() == 2)
|
||||||
|
m_optimalWidth += RunColumnWidth;
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -950,7 +954,7 @@ void MiniProjectTargetSelector::doLayout(bool keepSize)
|
|||||||
|
|
||||||
QVector<int> widths = listWidgetWidths(minWidth, 1000);
|
QVector<int> widths = listWidgetWidths(minWidth, 1000);
|
||||||
|
|
||||||
const int runColumnWidth = widths[RUN] == -1 ? 0 : 30;
|
const int runColumnWidth = widths[RUN] == -1 ? 0 : RunColumnWidth;
|
||||||
int x = 0;
|
int x = 0;
|
||||||
for (int i = PROJECT; i < LAST; ++i) {
|
for (int i = PROJECT; i < LAST; ++i) {
|
||||||
int optimalWidth = widths[i];
|
int optimalWidth = widths[i];
|
||||||
@@ -968,7 +972,8 @@ void MiniProjectTargetSelector::doLayout(bool keepSize)
|
|||||||
x += optimalWidth + 1; //1 extra pixel for the separators or the right border
|
x += optimalWidth + 1; //1 extra pixel for the separators or the right border
|
||||||
}
|
}
|
||||||
|
|
||||||
m_listWidgets[RUN]->setColumnWidth(0, m_listWidgets[RUN]->size().width() - runColumnWidth);
|
m_listWidgets[RUN]->setColumnWidth(0, m_listWidgets[RUN]->size().width() - runColumnWidth
|
||||||
|
- m_listWidgets[RUN]->padding());
|
||||||
m_listWidgets[RUN]->setColumnWidth(1, runColumnWidth);
|
m_listWidgets[RUN]->setColumnWidth(1, runColumnWidth);
|
||||||
m_summaryLabel->resize(x - 1, summaryLabelHeight);
|
m_summaryLabel->resize(x - 1, summaryLabelHeight);
|
||||||
m_kitAreaWidget->resize(x - 1, kitAreaHeight);
|
m_kitAreaWidget->resize(x - 1, kitAreaHeight);
|
||||||
|
Reference in New Issue
Block a user