fix: font combo list display lots of blank lines after only show monospaced fonts.
This commit is contained in:
parent
d054d9ffce
commit
6c454143cb
|
@ -98,4 +98,5 @@ void DebugGeneralWidget::on_chkOnlyMono_stateChanged(int)
|
|||
} else {
|
||||
ui->cbFont->setFontFilters(QFontComboBox::FontFilter::AllFonts);
|
||||
}
|
||||
ui->cbFont->view()->reset();
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ void EditorFontWidget::on_chkGutterOnlyMonospacedFonts_stateChanged(int)
|
|||
} else {
|
||||
ui->cbGutterFont->setFontFilters(QFontComboBox::FontFilter::AllFonts);
|
||||
}
|
||||
ui->cbGutterFont->view()->reset();
|
||||
}
|
||||
|
||||
void EditorFontWidget::on_btnAddFont_clicked()
|
||||
|
|
|
@ -82,4 +82,5 @@ void ExecutorProblemSetWidget::on_chkOnlyMonospaced_stateChanged(int )
|
|||
} else {
|
||||
ui->cbFont->setFontFilters(QFontComboBox::FontFilter::AllFonts);
|
||||
}
|
||||
ui->cbFont->view()->reset();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "editorfontdialog.h"
|
||||
#include "ui_editorfontdialog.h"
|
||||
#include <QAbstractItemView>
|
||||
|
||||
EditorFontDialog::EditorFontDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
|
@ -28,6 +29,7 @@ void EditorFontDialog::on_chkMonoOnly_toggled(bool checked)
|
|||
{
|
||||
QString savedFont = ui->fontComboBox->currentFont().family();
|
||||
ui->fontComboBox->setFontFilters(checked ? QFontComboBox::MonospacedFonts : QFontComboBox::AllFonts);
|
||||
ui->fontComboBox->view()->reset();
|
||||
ui->fontComboBox->setCurrentFont(QFont(savedFont));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue