src: bug fixes
* fixed gaps in code view line indication for different fonts * only allow latin fonts in fontpicker * don't show 'files to clear' for full refresh * fixed screen scale settings were visible on all platforms
This commit is contained in:
@@ -233,16 +233,17 @@ void QtCodeArea::lineNumberAreaPaintEvent(QPaintEvent *event)
|
|||||||
if (block.isVisible() && bottom >= event->rect().top())
|
if (block.isVisible() && bottom >= event->rect().top())
|
||||||
{
|
{
|
||||||
int number = blockNumber + getStartLineNumber();
|
int number = blockNumber + getStartLineNumber();
|
||||||
|
int height = std::ceil(blockBoundingRect(block).height());
|
||||||
|
|
||||||
p.setColor(textColor);
|
p.setColor(textColor);
|
||||||
|
|
||||||
if (focusedLineNumbers.find(number) != focusedLineNumbers.end())
|
if (focusedLineNumbers.find(number) != focusedLineNumbers.end())
|
||||||
{
|
{
|
||||||
painter.fillRect(m_lineNumberArea->width() - 8, top, 3, fontMetrics().height() + 1, focusedMarkerColor);
|
painter.fillRect(m_lineNumberArea->width() - 8, top, 3, height, focusedMarkerColor);
|
||||||
}
|
}
|
||||||
else if (activeLineNumbers.find(number) != activeLineNumbers.end())
|
else if (activeLineNumbers.find(number) != activeLineNumbers.end())
|
||||||
{
|
{
|
||||||
painter.fillRect(m_lineNumberArea->width() - 8, top, 3, fontMetrics().height() + 1, activeMarkerColor);
|
painter.fillRect(m_lineNumberArea->width() - 8, top, 3, height, activeMarkerColor);
|
||||||
}
|
}
|
||||||
else if (!m_isActiveFile)
|
else if (!m_isActiveFile)
|
||||||
{
|
{
|
||||||
@@ -250,8 +251,7 @@ void QtCodeArea::lineNumberAreaPaintEvent(QPaintEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
painter.setPen(p);
|
painter.setPen(p);
|
||||||
painter.drawText(
|
painter.drawText(0, top, m_lineNumberArea->width() - 16, height, Qt::AlignRight, QString::number(number));
|
||||||
0, top, m_lineNumberArea->width() - 16, fontMetrics().height(), Qt::AlignRight, QString::number(number));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
block = block.next();
|
block = block.next();
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ void QtIndexingDialog::updateRefreshInfo(const RefreshInfo& info)
|
|||||||
m_clearLabel->setText("Files to clear: " + QString::number(clearCount));
|
m_clearLabel->setText("Files to clear: " + QString::number(clearCount));
|
||||||
m_indexLabel->setText("Source files to index: " + QString::number(indexCount));
|
m_indexLabel->setText("Source files to index: " + QString::number(indexCount));
|
||||||
|
|
||||||
m_clearLabel->setVisible(clearCount);
|
m_clearLabel->setVisible(clearCount && info.mode != REFRESH_ALL_FILES);
|
||||||
m_indexLabel->setVisible(true);
|
m_indexLabel->setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ void QtProjectWizzardContentPreferences::populate(QGridLayout* layout, int& row)
|
|||||||
// font face
|
// font face
|
||||||
m_fontFace = new QFontComboBox(this);
|
m_fontFace = new QFontComboBox(this);
|
||||||
m_fontFace->setFontFilters(QFontComboBox::MonospacedFonts);
|
m_fontFace->setFontFilters(QFontComboBox::MonospacedFonts);
|
||||||
|
m_fontFace->setWritingSystem(QFontDatabase::Latin);
|
||||||
m_fontFace->setEditable(false);
|
m_fontFace->setEditable(false);
|
||||||
addLabelAndWidget("Font Face", m_fontFace, layout, row);
|
addLabelAndWidget("Font Face", m_fontFace, layout, row);
|
||||||
row++;
|
row++;
|
||||||
@@ -85,7 +86,7 @@ void QtProjectWizzardContentPreferences::populate(QGridLayout* layout, int& row)
|
|||||||
|
|
||||||
|
|
||||||
// Linux UI scale
|
// Linux UI scale
|
||||||
// if (utility::getOsType() == OS_LINUX)
|
if (utility::getOsType() == OS_LINUX)
|
||||||
{
|
{
|
||||||
// screen
|
// screen
|
||||||
addTitle("SCREEN", layout, row);
|
addTitle("SCREEN", layout, row);
|
||||||
|
|||||||
Reference in New Issue
Block a user