Refactor gui_templates.h (#7159)

* remove the gui_templates header where functions not used

* refactor and replace template with function argument

* refactor: merge pointSizeF function with pointSize

* removed template per michael's review

* use std::max for more readability

* remove the QDesktopWidget header

* cleanup arguments and remove parentheses from return
This commit is contained in:
Rossmaxx
2024-03-27 18:29:27 +05:30
committed by GitHub
parent a41da81554
commit 286d15724a
47 changed files with 77 additions and 106 deletions

View File

@@ -134,7 +134,7 @@ AudioFileProcessorView::AudioFileProcessorView(Instrument* instrument,
// interpolation selector
m_interpBox = new ComboBox(this);
m_interpBox->setGeometry(142, 62, 82, ComboBox::DEFAULT_HEIGHT);
m_interpBox->setFont(pointSize<8>(m_interpBox->font()));
m_interpBox->setFont(pointSize(m_interpBox->font(), 8));
// wavegraph
m_waveView = 0;
@@ -228,7 +228,7 @@ void AudioFileProcessorView::paintEvent(QPaintEvent*)
int idx = a->sample().sampleFile().length();
p.setFont(pointSize<8>(font()));
p.setFont(pointSize(font(), 8));
QFontMetrics fm(p.font());