Fix hardcoded fonts scaling issues (#7493)
* changed font sizes to better values * rename gui_templates.h to FontHelper.h * replace hardcoded values with constants * make knob labels use small font * code review from michael * more consolidation * Fix text problem in Vectorscope Fix a problem with cutoff text in Vectorscope. During the constructor call of `LedCheckBox` the method `LedCheckBox::onTextUpdated` is triggered which sets a fixed size that fits the pixmap and the text. After instantiating the two instances in `VecControlsDialog` the constructor then set a minimum size which overrode the fixed size that was previously set. This then led to text that was cutoff. --------- Co-authored-by: Michael Gregorius <michael.gregorius.git@arcor.de>
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
#include "CaptionMenu.h"
|
||||
#include "embed.h"
|
||||
#include "GuiApplication.h"
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
#include "Knob.h"
|
||||
#include "LedCheckBox.h"
|
||||
#include "MainWindow.h"
|
||||
@@ -91,7 +91,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
|
||||
{
|
||||
auto ctls_btn = new QPushButton(tr("Controls"), this);
|
||||
QFont f = ctls_btn->font();
|
||||
ctls_btn->setFont(adjustedToPixelSize(f, 10));
|
||||
ctls_btn->setFont(adjustedToPixelSize(f, DEFAULT_FONT_SIZE));
|
||||
ctls_btn->setGeometry( 150, 14, 50, 20 );
|
||||
connect( ctls_btn, SIGNAL(clicked()),
|
||||
this, SLOT(editControls()));
|
||||
@@ -258,7 +258,7 @@ void EffectView::paintEvent( QPaintEvent * )
|
||||
QPainter p( this );
|
||||
p.drawPixmap( 0, 0, m_bg );
|
||||
|
||||
QFont f = adjustedToPixelSize(font(), 10);
|
||||
QFont f = adjustedToPixelSize(font(), DEFAULT_FONT_SIZE);
|
||||
f.setBold( true );
|
||||
p.setFont( f );
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "Engine.h"
|
||||
#include "GuiApplication.h"
|
||||
#include "embed.h"
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
#include "lmms_math.h"
|
||||
#include "Lv2ControlBase.h"
|
||||
#include "Lv2Manager.h"
|
||||
@@ -157,7 +157,7 @@ Lv2ViewBase::Lv2ViewBase(QWidget* meAsWidget, Lv2ControlBase *ctrlBase) :
|
||||
m_toggleUIButton->setCheckable(true);
|
||||
m_toggleUIButton->setChecked(false);
|
||||
m_toggleUIButton->setIcon(embed::getIconPixmap("zoom"));
|
||||
m_toggleUIButton->setFont(adjustedToPixelSize(m_toggleUIButton->font(), 8));
|
||||
m_toggleUIButton->setFont(adjustedToPixelSize(m_toggleUIButton->font(), SMALL_FONT_SIZE));
|
||||
btnBox->addWidget(m_toggleUIButton, 0);
|
||||
}
|
||||
btnBox->addStretch(1);
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
#include "PeakIndicator.h"
|
||||
#include "Song.h"
|
||||
#include "ConfigManager.h"
|
||||
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
|
||||
#include <QGraphicsProxyWidget>
|
||||
#include <QGraphicsScene>
|
||||
@@ -95,7 +94,7 @@ namespace lmms::gui
|
||||
|
||||
m_renameLineEdit = new QLineEdit{mixerName, nullptr};
|
||||
m_renameLineEdit->setFixedWidth(65);
|
||||
m_renameLineEdit->setFont(adjustedToPixelSize(font(), 12));
|
||||
m_renameLineEdit->setFont(adjustedToPixelSize(font(), LARGE_FONT_SIZE));
|
||||
m_renameLineEdit->setReadOnly(true);
|
||||
m_renameLineEdit->installEventFilter(this);
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ SampleTrackWindow::SampleTrackWindow(SampleTrackView * tv) :
|
||||
basicControlsLayout->setVerticalSpacing(0);
|
||||
basicControlsLayout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
QString labelStyleSheet = "font-size: 6pt;";
|
||||
QString labelStyleSheet = "font-size: 10px;";
|
||||
Qt::Alignment labelAlignment = Qt::AlignHCenter | Qt::AlignTop;
|
||||
Qt::Alignment widgetAlignment = Qt::AlignHCenter | Qt::AlignCenter;
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <QPushButton>
|
||||
|
||||
#include "embed.h"
|
||||
#include "FontHelper.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
@@ -63,8 +64,7 @@ void SideBarWidget::paintEvent( QPaintEvent * )
|
||||
QFont f = p.font();
|
||||
f.setBold( true );
|
||||
f.setUnderline(false);
|
||||
f.setPointSize( f.pointSize() + 2 );
|
||||
p.setFont( f );
|
||||
p.setFont(adjustedToPixelSize(f, LARGE_FONT_SIZE));
|
||||
|
||||
p.setPen( palette().highlightedText().color() );
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
#include "TimeLineWidget.h"
|
||||
#include "debug.h"
|
||||
#include "embed.h"
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
@@ -1040,7 +1040,7 @@ void AutomationEditor::paintEvent(QPaintEvent * pe )
|
||||
QBrush bgColor = p.background();
|
||||
p.fillRect( 0, 0, width(), height(), bgColor );
|
||||
|
||||
p.setFont(adjustedToPixelSize(p.font(), 10));
|
||||
p.setFont(adjustedToPixelSize(p.font(), DEFAULT_FONT_SIZE));
|
||||
|
||||
int grid_height = height() - TOP_MARGIN - SCROLLBAR_SIZE;
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
#include "DetuningHelper.h"
|
||||
#include "embed.h"
|
||||
#include "GuiApplication.h"
|
||||
#include "FontHelper.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "MainWindow.h"
|
||||
#include "MidiClip.h"
|
||||
@@ -1028,7 +1029,7 @@ void PianoRoll::drawNoteRect( QPainter & p, int x, int y,
|
||||
QString noteKeyString = getNoteString(n->key());
|
||||
|
||||
QFont noteFont(p.font());
|
||||
noteFont.setPixelSize(noteTextHeight);
|
||||
noteFont = adjustedToPixelSize(noteFont, noteTextHeight);
|
||||
QFontMetrics fontMetrics(noteFont);
|
||||
QSize textSize = fontMetrics.size(Qt::TextSingleLine, noteKeyString);
|
||||
|
||||
@@ -3017,8 +3018,8 @@ void PianoRoll::paintEvent(QPaintEvent * pe )
|
||||
|
||||
// set font-size to 80% of key line height
|
||||
QFont f = p.font();
|
||||
f.setPixelSize(m_keyLineHeight * 0.8);
|
||||
p.setFont(f); // font size doesn't change without this for some reason
|
||||
int keyFontSize = m_keyLineHeight * 0.8;
|
||||
p.setFont(adjustedToPixelSize(f, keyFontSize));
|
||||
QFontMetrics fontMetrics(p.font());
|
||||
// G-1 is one of the widest; plus one pixel margin for the shadow
|
||||
QRect const boundingRect = fontMetrics.boundingRect(QString("G-1")) + QMargins(0, 0, 1, 0);
|
||||
@@ -3345,8 +3346,7 @@ void PianoRoll::paintEvent(QPaintEvent * pe )
|
||||
|
||||
// display note editing info
|
||||
f.setBold(false);
|
||||
f.setPixelSize(10);
|
||||
p.setFont(f);
|
||||
p.setFont(adjustedToPixelSize(f, SMALL_FONT_SIZE));
|
||||
p.setPen(m_noteModeColor);
|
||||
p.drawText( QRect( 0, keyAreaBottom(),
|
||||
m_whiteKeyWidth, noteEditBottom() - keyAreaBottom()),
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include "LfoGraph.h"
|
||||
#include "EnvelopeAndLfoParameters.h"
|
||||
#include "SampleLoader.h"
|
||||
#include "gui_templates.h"
|
||||
#include "Knob.h"
|
||||
#include "LedCheckBox.h"
|
||||
#include "DataFile.h"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "InstrumentFunctionViews.h"
|
||||
#include "ComboBox.h"
|
||||
#include "GroupBox.h"
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
#include "Knob.h"
|
||||
#include "TempoSyncKnob.h"
|
||||
|
||||
@@ -57,7 +57,7 @@ InstrumentFunctionNoteStackingView::InstrumentFunctionNoteStackingView( Instrume
|
||||
mainLayout->setVerticalSpacing( 1 );
|
||||
|
||||
auto chordLabel = new QLabel(tr("Chord:"));
|
||||
chordLabel->setFont(adjustedToPixelSize(chordLabel->font(), 10));
|
||||
chordLabel->setFont(adjustedToPixelSize(chordLabel->font(), DEFAULT_FONT_SIZE));
|
||||
|
||||
m_chordRangeKnob->setLabel( tr( "RANGE" ) );
|
||||
m_chordRangeKnob->setHintText( tr( "Chord range:" ), " " + tr( "octave(s)" ) );
|
||||
@@ -145,15 +145,14 @@ InstrumentFunctionArpeggioView::InstrumentFunctionArpeggioView( InstrumentFuncti
|
||||
m_arpGateKnob->setLabel( tr( "GATE" ) );
|
||||
m_arpGateKnob->setHintText( tr( "Arpeggio gate:" ), tr( "%" ) );
|
||||
|
||||
constexpr int labelFontSize = 10;
|
||||
auto arpChordLabel = new QLabel(tr("Chord:"));
|
||||
arpChordLabel->setFont(adjustedToPixelSize(arpChordLabel->font(), labelFontSize));
|
||||
arpChordLabel->setFont(adjustedToPixelSize(arpChordLabel->font(), DEFAULT_FONT_SIZE));
|
||||
|
||||
auto arpDirectionLabel = new QLabel(tr("Direction:"));
|
||||
arpDirectionLabel->setFont(adjustedToPixelSize(arpDirectionLabel->font(), labelFontSize));
|
||||
arpDirectionLabel->setFont(adjustedToPixelSize(arpDirectionLabel->font(), DEFAULT_FONT_SIZE));
|
||||
|
||||
auto arpModeLabel = new QLabel(tr("Mode:"));
|
||||
arpModeLabel->setFont(adjustedToPixelSize(arpModeLabel->font(), labelFontSize));
|
||||
arpModeLabel->setFont(adjustedToPixelSize(arpModeLabel->font(), DEFAULT_FONT_SIZE));
|
||||
|
||||
mainLayout->addWidget( arpChordLabel, 0, 0 );
|
||||
mainLayout->addWidget( m_arpComboBox, 1, 0 );
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include "Engine.h"
|
||||
#include "embed.h"
|
||||
#include "GroupBox.h"
|
||||
#include "gui_templates.h"
|
||||
#include "LcdSpinBox.h"
|
||||
#include "MidiClient.h"
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "EnvelopeAndLfoView.h"
|
||||
#include "ComboBox.h"
|
||||
#include "GroupBox.h"
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
#include "Knob.h"
|
||||
#include "TabWidget.h"
|
||||
|
||||
@@ -83,7 +83,7 @@ InstrumentSoundShapingView::InstrumentSoundShapingView(QWidget* parent) :
|
||||
m_singleStreamInfoLabel = new QLabel(tr("Envelopes, LFOs and filters are not supported by the current instrument."), this);
|
||||
m_singleStreamInfoLabel->setWordWrap(true);
|
||||
// TODO Could also be rendered in system font size...
|
||||
m_singleStreamInfoLabel->setFont(adjustedToPixelSize(m_singleStreamInfoLabel->font(), 10));
|
||||
m_singleStreamInfoLabel->setFont(adjustedToPixelSize(m_singleStreamInfoLabel->font(), DEFAULT_FONT_SIZE));
|
||||
m_singleStreamInfoLabel->setFixedWidth(242);
|
||||
|
||||
mainLayout->addWidget(m_singleStreamInfoLabel, 0, Qt::AlignTop);
|
||||
|
||||
@@ -137,7 +137,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
|
||||
|
||||
#endif
|
||||
|
||||
QString labelStyleSheet = "font-size: 6pt;";
|
||||
QString labelStyleSheet = "font-size: 10px;";
|
||||
Qt::Alignment labelAlignment = Qt::AlignHCenter | Qt::AlignTop;
|
||||
Qt::Alignment widgetAlignment = Qt::AlignHCenter | Qt::AlignCenter;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "ComboBox.h"
|
||||
#include "GroupBox.h"
|
||||
#include "GuiApplication.h"
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "LedCheckBox.h"
|
||||
#include "MainWindow.h"
|
||||
@@ -60,7 +60,7 @@ InstrumentTuningView::InstrumentTuningView(InstrumentTrack *it, QWidget *parent)
|
||||
|
||||
auto tlabel = new QLabel(tr("Enables the use of global transposition"));
|
||||
tlabel->setWordWrap(true);
|
||||
tlabel->setFont(adjustedToPixelSize(tlabel->font(), 10));
|
||||
tlabel->setFont(adjustedToPixelSize(tlabel->font(), DEFAULT_FONT_SIZE));
|
||||
masterPitchLayout->addWidget(tlabel);
|
||||
|
||||
// Microtuner settings
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "Oscillator.h"
|
||||
#include "ColorHelper.h"
|
||||
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
@@ -166,8 +166,7 @@ void LfoGraph::drawInfoText(const EnvelopeAndLfoParameters& params)
|
||||
|
||||
// First configure the font so that we get correct results for the font metrics used below
|
||||
QFont f = p.font();
|
||||
f.setPixelSize(height() * 0.2);
|
||||
p.setFont(f);
|
||||
p.setFont(adjustedToPixelSize(f, height() * 0.2));
|
||||
|
||||
// This is the position where the text and its rectangle will be rendered
|
||||
const QPoint textPosition(4, height() - 6);
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#include "CaptionMenu.h"
|
||||
#include "embed.h"
|
||||
#include "Engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "Song.h"
|
||||
#include "StringPairDrag.h"
|
||||
@@ -72,7 +72,7 @@ const int PW_WHITE_KEY_WIDTH = 10; /*!< The width of a white key */
|
||||
const int PW_BLACK_KEY_WIDTH = 8; /*!< The width of a black key */
|
||||
const int PW_WHITE_KEY_HEIGHT = 57; /*!< The height of a white key */
|
||||
const int PW_BLACK_KEY_HEIGHT = 38; /*!< The height of a black key */
|
||||
const int LABEL_TEXT_SIZE = 7; /*!< The height of the key label text */
|
||||
const int LABEL_TEXT_SIZE = 8; /*!< The height of the key label text */
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <QScreen>
|
||||
|
||||
#include "CaptionMenu.h"
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
|
||||
#define QT_SUPPORTS_WIDGET_SCREEN (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
#if !QT_SUPPORTS_WIDGET_SCREEN
|
||||
@@ -53,7 +53,7 @@ ComboBox::ComboBox( QWidget * _parent, const QString & _name ) :
|
||||
{
|
||||
setFixedHeight( ComboBox::DEFAULT_HEIGHT );
|
||||
|
||||
setFont(adjustedToPixelSize(font(), 10));
|
||||
setFont(adjustedToPixelSize(font(), DEFAULT_FONT_SIZE));
|
||||
|
||||
connect( &m_menu, SIGNAL(triggered(QAction*)),
|
||||
this, SLOT(setItem(QAction*)));
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "GroupBox.h"
|
||||
#include "embed.h"
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
@@ -111,7 +111,7 @@ void GroupBox::paintEvent( QPaintEvent * pe )
|
||||
|
||||
// draw text
|
||||
p.setPen( palette().color( QPalette::Active, QPalette::Text ) );
|
||||
p.setFont(adjustedToPixelSize(font(), 10));
|
||||
p.setFont(adjustedToPixelSize(font(), DEFAULT_FONT_SIZE));
|
||||
|
||||
int const captionX = ledButtonShown() ? 22 : 6;
|
||||
p.drawText(captionX, m_titleBarHeight, m_caption);
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "lmms_math.h"
|
||||
#include "DeprecationHelper.h"
|
||||
#include "embed.h"
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
@@ -139,7 +139,7 @@ void Knob::setLabel( const QString & txt )
|
||||
if( m_knobPixmap )
|
||||
{
|
||||
setFixedSize(qMax<int>( m_knobPixmap->width(),
|
||||
horizontalAdvance(QFontMetrics(adjustedToPixelSize(font(), 10)), m_label)),
|
||||
horizontalAdvance(QFontMetrics(adjustedToPixelSize(font(), SMALL_FONT_SIZE)), m_label)),
|
||||
m_knobPixmap->height() + 10);
|
||||
}
|
||||
|
||||
@@ -459,7 +459,7 @@ void Knob::paintEvent( QPaintEvent * _me )
|
||||
{
|
||||
if (!m_isHtmlLabel)
|
||||
{
|
||||
p.setFont(adjustedToPixelSize(p.font(), 10));
|
||||
p.setFont(adjustedToPixelSize(p.font(), SMALL_FONT_SIZE));
|
||||
p.setPen(textColor());
|
||||
p.drawText(width() / 2 -
|
||||
horizontalAdvance(p.fontMetrics(), m_label) / 2,
|
||||
@@ -468,7 +468,7 @@ void Knob::paintEvent( QPaintEvent * _me )
|
||||
else
|
||||
{
|
||||
// TODO setHtmlLabel is never called so this will never be executed. Remove functionality?
|
||||
m_tdRenderer->setDefaultFont(adjustedToPixelSize(p.font(), 10));
|
||||
m_tdRenderer->setDefaultFont(adjustedToPixelSize(p.font(), SMALL_FONT_SIZE));
|
||||
p.translate((width() - m_tdRenderer->idealWidth()) / 2, (height() - m_tdRenderer->pageSize().height()) / 2);
|
||||
m_tdRenderer->drawContents(&p);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "DeprecationHelper.h"
|
||||
#include "embed.h"
|
||||
#include "GuiApplication.h"
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
namespace lmms::gui
|
||||
@@ -245,7 +245,7 @@ void LcdFloatSpinBox::paintEvent(QPaintEvent*)
|
||||
// Label
|
||||
if (!m_label.isEmpty())
|
||||
{
|
||||
p.setFont(adjustedToPixelSize(p.font(), 10));
|
||||
p.setFont(adjustedToPixelSize(p.font(), DEFAULT_FONT_SIZE));
|
||||
p.setPen(m_wholeDisplay.textShadowColor());
|
||||
p.drawText(width() / 2 - p.fontMetrics().boundingRect(m_label).width() / 2 + 1, height(), m_label);
|
||||
p.setPen(m_wholeDisplay.textColor());
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "LcdWidget.h"
|
||||
#include "DeprecationHelper.h"
|
||||
#include "embed.h"
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
@@ -209,7 +209,7 @@ void LcdWidget::paintEvent( QPaintEvent* )
|
||||
// Label
|
||||
if( !m_label.isEmpty() )
|
||||
{
|
||||
p.setFont(adjustedToPixelSize(p.font(), 10));
|
||||
p.setFont(adjustedToPixelSize(p.font(), DEFAULT_FONT_SIZE));
|
||||
p.setPen( textShadowColor() );
|
||||
p.drawText(width() / 2 -
|
||||
horizontalAdvance(p.fontMetrics(), m_label) / 2 + 1,
|
||||
@@ -261,7 +261,7 @@ void LcdWidget::updateSize()
|
||||
setFixedSize(
|
||||
qMax<int>(
|
||||
m_cellWidth * m_numDigits + marginX1 + marginX2,
|
||||
horizontalAdvance(QFontMetrics(adjustedToPixelSize(font(), 10)), m_label)
|
||||
horizontalAdvance(QFontMetrics(adjustedToPixelSize(font(), DEFAULT_FONT_SIZE)), m_label)
|
||||
),
|
||||
m_cellHeight + (2 * marginY) + 9
|
||||
);
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "DeprecationHelper.h"
|
||||
#include "embed.h"
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
@@ -93,7 +93,7 @@ void LedCheckBox::initUi( LedColor _color )
|
||||
m_ledOnPixmap = embed::getIconPixmap(names[static_cast<std::size_t>(_color)].toUtf8().constData());
|
||||
m_ledOffPixmap = embed::getIconPixmap("led_off");
|
||||
|
||||
if (m_legacyMode){ setFont(adjustedToPixelSize(font(), 10)); }
|
||||
if (m_legacyMode){ setFont(adjustedToPixelSize(font(), DEFAULT_FONT_SIZE)); }
|
||||
|
||||
setText( m_text );
|
||||
}
|
||||
@@ -114,7 +114,7 @@ void LedCheckBox::onTextUpdated()
|
||||
void LedCheckBox::paintLegacy(QPaintEvent * pe)
|
||||
{
|
||||
QPainter p( this );
|
||||
p.setFont(adjustedToPixelSize(font(), 10));
|
||||
p.setFont(adjustedToPixelSize(font(), DEFAULT_FONT_SIZE));
|
||||
|
||||
p.drawPixmap(0, 0, model()->value() ? m_ledOnPixmap : m_ledOffPixmap);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "Oscilloscope.h"
|
||||
#include "GuiApplication.h"
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
#include "MainWindow.h"
|
||||
#include "AudioEngine.h"
|
||||
#include "Engine.h"
|
||||
@@ -203,7 +203,7 @@ void Oscilloscope::paintEvent( QPaintEvent * )
|
||||
else
|
||||
{
|
||||
p.setPen( QColor( 192, 192, 192 ) );
|
||||
p.setFont(adjustedToPixelSize(p.font(), 10));
|
||||
p.setFont(adjustedToPixelSize(p.font(), DEFAULT_FONT_SIZE));
|
||||
p.drawText( 6, height()-5, tr( "Click to enable" ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "DeprecationHelper.h"
|
||||
#include "embed.h"
|
||||
#include "gui_templates.h"
|
||||
#include "FontHelper.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
@@ -58,7 +58,7 @@ TabWidget::TabWidget(const QString& caption, QWidget* parent, bool usePixmap,
|
||||
|
||||
m_tabheight = caption.isEmpty() ? m_tabbarHeight - 3 : m_tabbarHeight - 4;
|
||||
|
||||
setFont(adjustedToPixelSize(font(), 10));
|
||||
setFont(adjustedToPixelSize(font(), DEFAULT_FONT_SIZE));
|
||||
|
||||
setAutoFillBackground(true);
|
||||
QColor bg_color = QApplication::palette().color(QPalette::Active, QPalette::Window).darker(132);
|
||||
@@ -214,7 +214,7 @@ void TabWidget::resizeEvent(QResizeEvent*)
|
||||
void TabWidget::paintEvent(QPaintEvent* pe)
|
||||
{
|
||||
QPainter p(this);
|
||||
p.setFont(adjustedToPixelSize(font(), 10));
|
||||
p.setFont(adjustedToPixelSize(font(), DEFAULT_FONT_SIZE));
|
||||
|
||||
// Draw background
|
||||
QBrush bg_color = p.background();
|
||||
|
||||
Reference in New Issue
Block a user