Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed gui_templates.h #7183

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions plugins/AudioFileProcessor/AudioFileProcessorView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include "ComboBox.h"
#include "DataFile.h"
#include "gui_templates.h"
// #include "gui_templates.h"
#include "PixmapButton.h"
#include "SampleLoader.h"
#include "Song.h"
Expand Down Expand Up @@ -134,7 +134,8 @@ AudioFileProcessorView::AudioFileProcessorView(Instrument* instrument,
// interpolation selector
m_interpBox = new ComboBox(this);
m_interpBox->setGeometry(142, 62, 82, ComboBox::DEFAULT_HEIGHT);
m_interpBox->setFont(pointSize(m_interpBox->font(), 8));
// m_interpBox->setFont(pointSize(m_interpBox->font(), 8));
m_interpBox->setPointSize(8);

// wavegraph
m_waveView = 0;
Expand Down Expand Up @@ -228,7 +229,9 @@ void AudioFileProcessorView::paintEvent(QPaintEvent*)

int idx = a->sample().sampleFile().length();

p.setFont(pointSize(font(), 8));
// p.setFont(pointSize(font(), 8));
p.setFont(font());
font().setPointSize(8);

QFontMetrics fm(p.font());

Expand Down
6 changes: 4 additions & 2 deletions plugins/AudioFileProcessor/AudioFileProcessorWaveView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "AudioFileProcessorWaveView.h"

#include "ConfigManager.h"
#include "gui_templates.h"
// #include "gui_templates.h"
#include "SampleWaveform.h"

#include <QPainter>
Expand Down Expand Up @@ -273,7 +273,9 @@ void AudioFileProcessorWaveView::paintEvent(QPaintEvent * pe)
p.fillRect(s_padding, s_padding, m_graph.width(), 14, g);

p.setPen(QColor(255, 255, 255));
p.setFont(pointSize(font(), 8));
// p.setFont(pointSize(font(), 8));
p.setFont(font());
font.setPointSize(8);

QString length_text;
const int length = m_sample->sampleDuration().count();
Expand Down
8 changes: 5 additions & 3 deletions plugins/CarlaBase/Carla.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "Knob.h"
#include "MidiEventToByteSeq.h"
#include "MainWindow.h"
#include "gui_templates.h"
// #include "gui_templates.h"
#include "Song.h"

#include <QApplication>
Expand Down Expand Up @@ -632,7 +632,8 @@ CarlaInstrumentView::CarlaInstrumentView(CarlaInstrument* const instrument, QWid
m_toggleUIButton->setCheckable( true );
m_toggleUIButton->setChecked( false );
m_toggleUIButton->setIcon( embed::getIconPixmap( "zoom" ) );
m_toggleUIButton->setFont(pointSize(m_toggleUIButton->font(), 8));
// m_toggleUIButton->setFont(pointSize(m_toggleUIButton->font(), 8));
m_toggleUIButton->setPointSize(8);
connect( m_toggleUIButton, SIGNAL( clicked(bool) ), this, SLOT( toggleUI( bool ) ) );

m_toggleUIButton->setToolTip(
Expand All @@ -642,7 +643,8 @@ CarlaInstrumentView::CarlaInstrumentView(CarlaInstrument* const instrument, QWid
m_toggleParamsWindowButton = new QPushButton(tr("Params"), this);
m_toggleParamsWindowButton->setIcon(embed::getIconPixmap("controller"));
m_toggleParamsWindowButton->setCheckable(true);
m_toggleParamsWindowButton->setFont(pointSize(m_toggleParamsWindowButton->font(), 8));
// m_toggleParamsWindowButton->setFont(pointSize(m_toggleParamsWindowButton->font(), 8));
m_toggleParamsWindowButton->setPointSize(8);
#if CARLA_VERSION_HEX < CARLA_MIN_PARAM_VERSION
m_toggleParamsWindowButton->setEnabled(false);
m_toggleParamsWindowButton->setToolTip(tr("Available from Carla version 2.1 and up."));
Expand Down
8 changes: 5 additions & 3 deletions plugins/DualFilter/DualFilterControlDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "Knob.h"
#include "LedCheckBox.h"
#include "ComboBox.h"
#include "gui_templates.h"
//#include "gui_templates.h"

namespace lmms::gui
{
Expand Down Expand Up @@ -76,12 +76,14 @@ DualFilterControlDialog::DualFilterControlDialog( DualFilterControls* controls )

auto m_filter1ComboBox = new ComboBox(this);
m_filter1ComboBox->setGeometry( 19, 70, 137, ComboBox::DEFAULT_HEIGHT );
m_filter1ComboBox->setFont(pointSize(m_filter1ComboBox->font(), 8));
// m_filter1ComboBox->setFont(pointSize(m_filter1ComboBox->font(), 8));
m_filter1ComboBox->setPointSize(8);
m_filter1ComboBox->setModel( &controls->m_filter1Model );

auto m_filter2ComboBox = new ComboBox(this);
m_filter2ComboBox->setGeometry( 217, 70, 137, ComboBox::DEFAULT_HEIGHT );
m_filter2ComboBox->setFont(pointSize(m_filter2ComboBox->font(), 8));
// m_filter2ComboBox->setFont(pointSize(m_filter2ComboBox->font(), 8));
m_filter2ComboBox->setPointSize(8);
m_filter2ComboBox->setModel( &controls->m_filter2Model );
}

Expand Down
5 changes: 3 additions & 2 deletions plugins/LadspaBrowser/LadspaBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <QLabel>


#include "gui_templates.h"
//#include "gui_templates.h"
#include "LadspaDescription.h"
#include "LadspaPortDialog.h"
#include "TabBar.h"
Expand Down Expand Up @@ -172,7 +172,8 @@ QWidget * LadspaBrowserView::createTab( QWidget * _parent, const QString & _txt,
auto title = new QLabel(type + _txt, tab);
QFont f = title->font();
f.setBold( true );
title->setFont(pointSize(f, 12));
// title->setFont(pointSize(f, 12));
f.setPointSize(12);

layout->addSpacing( 5 );
layout->addWidget( title );
Expand Down
17 changes: 11 additions & 6 deletions plugins/Monstro/Monstro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "ComboBox.h"
#include "Engine.h"
#include "InstrumentTrack.h"
#include "gui_templates.h"
// #include "gui_templates.h"
#include "lmms_math.h"
#include "interpolation.h"

Expand Down Expand Up @@ -1694,7 +1694,8 @@ QWidget * MonstroView::setupOperatorsView( QWidget * _parent )

m_osc2WaveBox = new ComboBox( view );
m_osc2WaveBox -> setGeometry( 204, O2ROW + 7, 42, ComboBox::DEFAULT_HEIGHT );
m_osc2WaveBox->setFont(pointSize(m_osc2WaveBox->font(), 8));
// m_osc2WaveBox->setFont(pointSize(m_osc2WaveBox->font(), 8));
m_osc2WaveBox->setPointSize(8);

maketinyled( m_osc2SyncHButton, 212, O2ROW - 3, tr( "Hard sync oscillator 2" ) )
maketinyled( m_osc2SyncRButton, 191, O2ROW - 3, tr( "Reverse sync oscillator 2" ) )
Expand All @@ -1709,26 +1710,30 @@ QWidget * MonstroView::setupOperatorsView( QWidget * _parent )

m_osc3Wave1Box = new ComboBox( view );
m_osc3Wave1Box -> setGeometry( 160, O3ROW + 7, 42, ComboBox::DEFAULT_HEIGHT );
m_osc3Wave1Box->setFont(pointSize(m_osc3Wave1Box->font(), 8));
// m_osc3Wave1Box->setFont(pointSize(m_osc3Wave1Box->font(), 8));
m_osc3Wave1Box->setPointSize(8);

m_osc3Wave2Box = new ComboBox( view );
m_osc3Wave2Box -> setGeometry( 204, O3ROW + 7, 42, ComboBox::DEFAULT_HEIGHT );
m_osc3Wave2Box->setFont(pointSize(m_osc3Wave2Box->font(), 8));
// m_osc3Wave2Box->setFont(pointSize(m_osc3Wave2Box->font(), 8));
m_osc3Wave2Box->setPointSize(8);

maketinyled( m_osc3SyncHButton, 212, O3ROW - 3, tr( "Hard sync oscillator 3" ) )
maketinyled( m_osc3SyncRButton, 191, O3ROW - 3, tr( "Reverse sync oscillator 3" ) )

m_lfo1WaveBox = new ComboBox( view );
m_lfo1WaveBox -> setGeometry( 2, LFOROW + 7, 42, ComboBox::DEFAULT_HEIGHT );
m_lfo1WaveBox->setFont(pointSize(m_lfo1WaveBox->font(), 8));
// m_lfo1WaveBox->setFont(pointSize(m_lfo1WaveBox->font(), 8));
m_lfo1WaveBox->setPointSize(8);

maketsknob( m_lfo1AttKnob, LFOCOL1, LFOROW, tr( "Attack" ), " ms", "lfoKnob" )
maketsknob( m_lfo1RateKnob, LFOCOL2, LFOROW, tr( "Rate" ), " ms", "lfoKnob" )
makeknob( m_lfo1PhsKnob, LFOCOL3, LFOROW, tr( "Phase" ), tr( " deg" ), "lfoKnob" )

m_lfo2WaveBox = new ComboBox( view );
m_lfo2WaveBox -> setGeometry( 127, LFOROW + 7, 42, ComboBox::DEFAULT_HEIGHT );
m_lfo2WaveBox->setFont(pointSize(m_lfo2WaveBox->font(), 8));
// m_lfo2WaveBox->setFont(pointSize(m_lfo2WaveBox->font(), 8));
m_lfo2WaveBox->setPointSize(8);

maketsknob(m_lfo2AttKnob, LFOCOL4, LFOROW, tr("Attack"), " ms", "lfoKnob")
maketsknob(m_lfo2RateKnob, LFOCOL5, LFOROW, tr("Rate"), " ms", "lfoKnob")
Expand Down
10 changes: 7 additions & 3 deletions plugins/Patman/Patman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "endian_handling.h"
#include "Engine.h"
#include "FileDialog.h"
#include "gui_templates.h"
// #include "gui_templates.h"
#include "InstrumentTrack.h"
#include "NotePlayHandle.h"
#include "PathUtil.h"
Expand Down Expand Up @@ -545,7 +545,9 @@ void PatmanView::updateFilename()
m_displayFilename = "";
int idx = m_pi->m_patchFile.length();

QFontMetrics fm(pointSize(font(), 8));
// QFontMetrics fm(pointSize(font(), 8));
font().setPointSize(8);
QFontMetrics fm(font());

// simple algorithm for creating a text from the filename that
// matches in the white rectangle
Expand Down Expand Up @@ -615,7 +617,9 @@ void PatmanView::paintEvent( QPaintEvent * )
{
QPainter p( this );

p.setFont(pointSize(font() ,8));
// p.setFont(pointSize(font() ,8));
QFont F = p.setFont(font);
f.setPointSize(8);
p.drawText( 8, 116, 235, 16,
Qt::AlignLeft | Qt::TextSingleLine | Qt::AlignVCenter,
m_displayFilename );
Expand Down
5 changes: 3 additions & 2 deletions plugins/Stk/Mallets/Mallets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "AudioEngine.h"
#include "ConfigManager.h"
#include "Engine.h"
#include "gui_templates.h"
// #include "gui_templates.h"
#include "GuiApplication.h"
#include "InstrumentTrack.h"

Expand Down Expand Up @@ -450,7 +450,8 @@ MalletsInstrumentView::MalletsInstrumentView( MalletsInstrument * _instrument,

m_presetsCombo = new ComboBox( this, tr( "Instrument" ) );
m_presetsCombo->setGeometry( 140, 50, 99, ComboBox::DEFAULT_HEIGHT );
m_presetsCombo->setFont(pointSize(m_presetsCombo->font(), 8));
// m_presetsCombo->setFont(pointSize(m_presetsCombo->font(), 8));
m_presetsCombo->font()->setPointSize(8);

connect( &_instrument->m_presetsModel, SIGNAL( dataChanged() ),
this, SLOT( changePreset() ) );
Expand Down
14 changes: 9 additions & 5 deletions plugins/Vestige/Vestige.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include "Engine.h"
#include "FileDialog.h"
#include "GuiApplication.h"
#include "gui_templates.h"
// #include "gui_templates.h"
#include "InstrumentPlayHandle.h"
#include "InstrumentTrack.h"
#include "LocaleHelper.h"
Expand Down Expand Up @@ -587,7 +587,8 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument,
m_toggleGUIButton = new QPushButton( tr( "Show/hide GUI" ), this );
m_toggleGUIButton->setGeometry( 20, 130, 200, 24 );
m_toggleGUIButton->setIcon( embed::getIconPixmap( "zoom" ) );
m_toggleGUIButton->setFont(pointSize(m_toggleGUIButton->font(), 8));
// m_toggleGUIButton->setFont(pointSize(m_toggleGUIButton->font(), 8));
m_toggleGUIButton->setPointSize(8);
connect( m_toggleGUIButton, SIGNAL( clicked() ), this,
SLOT( toggleGUI() ) );

Expand All @@ -596,7 +597,8 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument,
this);
note_off_all_btn->setGeometry( 20, 160, 200, 24 );
note_off_all_btn->setIcon( embed::getIconPixmap( "stop" ) );
note_off_all_btn->setFont(pointSize(note_off_all_btn->font(), 8));
// note_off_all_btn->setFont(pointSize(note_off_all_btn->font(), 8));
note_off_all_btn->font()->setPointSize(8);
connect( note_off_all_btn, SIGNAL( clicked() ), this,
SLOT( noteOffAll() ) );

Expand Down Expand Up @@ -881,7 +883,8 @@ void VestigeInstrumentView::paintEvent( QPaintEvent * )
tr( "No VST plugin loaded" );
QFont f = p.font();
f.setBold( true );
p.setFont(pointSize(f, 10));
// p.setFont(pointSize(f, 10));
p.setPointSize(10);
p.setPen( QColor( 255, 255, 255 ) );
p.drawText( 10, 100, plugin_name );

Expand All @@ -893,7 +896,8 @@ void VestigeInstrumentView::paintEvent( QPaintEvent * )
{
p.setPen( QColor( 0, 0, 0 ) );
f.setBold( false );
p.setFont(pointSize(f, 8));
// p.setFont(pointSize(f, 8));
p.setPointSize(8);
p.drawText( 10, 114, tr( "by " ) +
m_vi->m_plugin->vendorString() );
p.setPen( QColor( 255, 255, 255 ) );
Expand Down
5 changes: 3 additions & 2 deletions plugins/VstEffect/VstEffectControlDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "PixmapButton.h"
#include "embed.h"

#include "gui_templates.h"
// #include "gui_templates.h"
#include <QToolBar>
#include <QLabel>

Expand Down Expand Up @@ -246,7 +246,8 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
tb->addWidget(space1);

tbLabel = new QLabel( tr( "Effect by: " ), this );
tbLabel->setFont(pointSize(f, 7));
// tbLabel->setFont(pointSize(f, 7));
tbLabel->setFont(f.setPointSize(7));
tbLabel->setTextFormat(Qt::RichText);
tbLabel->setAlignment( Qt::AlignTop | Qt::AlignLeft );
tb->addWidget( tbLabel );
Expand Down
8 changes: 6 additions & 2 deletions plugins/ZynAddSubFx/ZynAddSubFx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <QDropEvent>
#include <QGridLayout>
#include <QPushButton>
#include <QFont>

#include "ZynAddSubFx.h"
#include "ConfigManager.h"
Expand All @@ -40,7 +41,7 @@
#include "DataFile.h"
#include "InstrumentPlayHandle.h"
#include "InstrumentTrack.h"
#include "gui_templates.h"
// #include "gui_templates.h"
#include "Song.h"
#include "StringPairDrag.h"
#include "RemoteZynAddSubFx.h"
Expand Down Expand Up @@ -541,7 +542,10 @@ ZynAddSubFxView::ZynAddSubFxView( Instrument * _instrument, QWidget * _parent )
m_toggleUIButton->setCheckable( true );
m_toggleUIButton->setChecked( false );
m_toggleUIButton->setIcon( embed::getIconPixmap( "zoom" ) );
m_toggleUIButton->setFont(pointSize(m_toggleUIButton->font(), 8));
// m_toggleUIButton->setFont(pointSize(m_toggleUIButton->font(), 8));
QFont f = m_toggleUIButton->font();
f.setPointSize(8);
m_toggleUIButton->setFont(f);
connect( m_toggleUIButton, SIGNAL( toggled( bool ) ), this,
SLOT( toggleUI() ) );

Expand Down
9 changes: 6 additions & 3 deletions src/gui/EffectView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "CaptionMenu.h"
#include "embed.h"
#include "GuiApplication.h"
#include "gui_templates.h"
// #include "gui_templates.h"
#include "Knob.h"
#include "LedCheckBox.h"
#include "MainWindow.h"
Expand Down Expand Up @@ -90,7 +90,8 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
{
auto ctls_btn = new QPushButton(tr("Controls"), this);
QFont f = ctls_btn->font();
ctls_btn->setFont(pointSize(f, 8));
// ctls_btn->setFont(pointSize(f, 8));
f.setPointSize(8);
ctls_btn->setGeometry( 150, 14, 50, 20 );
connect( ctls_btn, SIGNAL(clicked()),
this, SLOT(editControls()));
Expand Down Expand Up @@ -257,7 +258,9 @@ void EffectView::paintEvent( QPaintEvent * )
QPainter p( this );
p.drawPixmap( 0, 0, m_bg );

QFont f = pointSize(font(), 7.5f);
QFont f = font();
// QFont f = pointSize(font(), 7.5f);
f.setPointSizeF(7.5f);
f.setBold( true );
p.setFont( f );

Expand Down
6 changes: 4 additions & 2 deletions src/gui/Lv2ViewBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "Engine.h"
#include "GuiApplication.h"
#include "embed.h"
#include "gui_templates.h"
// #include "gui_templates.h"
#include "lmms_math.h"
#include "Lv2ControlBase.h"
#include "Lv2Manager.h"
Expand Down Expand Up @@ -157,7 +157,9 @@ Lv2ViewBase::Lv2ViewBase(QWidget* meAsWidget, Lv2ControlBase *ctrlBase) :
m_toggleUIButton->setCheckable(true);
m_toggleUIButton->setChecked(false);
m_toggleUIButton->setIcon(embed::getIconPixmap("zoom"));
m_toggleUIButton->setFont(pointSize(m_toggleUIButton->font(), 8));
// m_toggleUIButton->setFont(pointSize(m_toggleUIButton->font(), 8));
QFont f = m_toggleUIButton->font();
f.setPointSize(8);
btnBox->addWidget(m_toggleUIButton, 0);
}
btnBox->addStretch(1);
Expand Down
7 changes: 5 additions & 2 deletions src/gui/MixerChannelView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "Song.h"
#include "ConfigManager.h"

#include "gui_templates.h"
// #include "gui_templates.h"
#include "lmms_math.h"

#include <QGraphicsProxyWidget>
Expand Down Expand Up @@ -76,7 +76,10 @@ namespace lmms::gui

m_renameLineEdit = new QLineEdit{mixerName, nullptr};
m_renameLineEdit->setFixedWidth(65);
m_renameLineEdit->setFont(pointSize(font(), 7.5f));
//m_renameLineEdit->setFont(pointSize(font(), 7.5f));
QFont newFont = font();
newFont.setPointSizeF(7.5f);
m_renameLineEdit->setFont(newFont);
m_renameLineEdit->setReadOnly(true);
m_renameLineEdit->installEventFilter(this);

Expand Down
Loading
Loading