UI: increased font sizes

As texts were not readable on high resolution screens the font size for
many widgets has been changed.

Closes #82.
This commit is contained in:
Tobias Doerffel
2014-01-22 22:49:23 +01:00
parent 27fab982ec
commit aaad405f99
27 changed files with 62 additions and 60 deletions

View File

@@ -335,7 +335,7 @@ QToolButton:checked, toolButton:checked {
trackLabelButton {
background-color: #5b6571;
color: #c9c9c9;
font-size: 10px;
font-size: 11px;
font-weight: normal;
border-radius: 1px;
border: none;

View File

@@ -49,6 +49,11 @@ public:
return m_led;
}
int titleBarHeight() const
{
return m_titleBarHeight;
}
protected:
virtual void mousePressEvent( QMouseEvent * _me );
@@ -60,6 +65,7 @@ private:
pixmapButton * m_led;
QString m_caption;
const int m_titleBarHeight;
} ;

View File

@@ -499,7 +499,7 @@ AudioAlsa::setupWidget::setupWidget( QWidget * _parent ) :
m_device->setGeometry( 10, 20, 160, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
lcdSpinBoxModel * m = new lcdSpinBoxModel( /* this */ );

View File

@@ -443,7 +443,7 @@ AudioJack::setupWidget::setupWidget( QWidget * _parent ) :
m_clientName->setGeometry( 10, 20, 160, 20 );
QLabel * cn_lbl = new QLabel( tr( "CLIENT-NAME" ), this );
cn_lbl->setFont( pointSize<6>( cn_lbl->font() ) );
cn_lbl->setFont( pointSize<7>( cn_lbl->font() ) );
cn_lbl->setGeometry( 10, 40, 160, 10 );
lcdSpinBoxModel * m = new lcdSpinBoxModel( /* this */ );

View File

@@ -335,7 +335,7 @@ AudioOss::setupWidget::setupWidget( QWidget * _parent ) :
m_device->setGeometry( 10, 20, 160, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
lcdSpinBoxModel * m = new lcdSpinBoxModel( /* this */ );

View File

@@ -395,14 +395,14 @@ AudioPortAudio::setupWidget::setupWidget( QWidget * _parent ) :
m_backend->setGeometry( 64, 15, 260, 20 );
QLabel * backend_lbl = new QLabel( tr( "BACKEND" ), this );
backend_lbl->setFont( pointSize<6>( backend_lbl->font() ) );
backend_lbl->setFont( pointSize<7>( backend_lbl->font() ) );
backend_lbl->move( 8, 18 );
m_device = new comboBox( this, "DEVICE" );
m_device->setGeometry( 64, 35, 260, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->move( 8, 38 );
/* lcdSpinBoxModel * m = new lcdSpinBoxModel( );

View File

@@ -286,7 +286,7 @@ AudioPulseAudio::setupWidget::setupWidget( QWidget * _parent ) :
m_device->setGeometry( 10, 20, 160, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
lcdSpinBoxModel * m = new lcdSpinBoxModel( /* this */ );

View File

@@ -210,7 +210,7 @@ AudioSdl::setupWidget::setupWidget( QWidget * _parent ) :
m_device->setGeometry( 10, 20, 160, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
}

View File

@@ -183,7 +183,7 @@ MidiAlsaRaw::setupWidget::setupWidget( QWidget * _parent ) :
m_device->setGeometry( 10, 20, 160, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
}

View File

@@ -716,7 +716,7 @@ MidiAlsaSeq::setupWidget::setupWidget( QWidget * _parent ) :
m_device->setGeometry( 10, 20, 160, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
}

View File

@@ -121,7 +121,7 @@ MidiOss::setupWidget::setupWidget( QWidget * _parent ) :
m_device->setGeometry( 10, 20, 160, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
}

View File

@@ -273,7 +273,7 @@ void AutomationPatternView::paintEvent( QPaintEvent * )
}
p.resetMatrix();
p.setFont( pointSize<7>( p.font() ) );
p.setFont( pointSize<8>( p.font() ) );
if( m_pat->isMuted() || m_pat->getTrack()->isMuted() )
{
p.setPen( QColor( 192, 192, 192 ) );

View File

@@ -140,7 +140,7 @@ void pluginDescWidget::paintEvent( QPaintEvent * )
if( height() > 24 || m_mouseOver )
{
f.setBold( false );
p.setFont( pointSize<7>( f ) );
p.setFont( pointSize<8>( f ) );
QRect br;
p.drawText( 10 + logo_size.width(), 20, width() - 58 - 5, 999,
Qt::TextWordWrap,

View File

@@ -56,7 +56,7 @@ ControllerView::ControllerView( Controller * _model, QWidget * _parent ) :
QPushButton * ctls_btn = new QPushButton( tr( "Controls" ), this );
QFont f = ctls_btn->font();
ctls_btn->setFont( pointSize<7>( f ) );
ctls_btn->setFont( pointSize<8>( f ) );
ctls_btn->setGeometry( 140, 2, 50, 14 );
connect( ctls_btn, SIGNAL( clicked() ),
this, SLOT( editControls() ) );

View File

@@ -47,7 +47,7 @@ EffectRackView::EffectRackView( EffectChain* model, QWidget* parent ) :
QVBoxLayout* effectsLayout = new QVBoxLayout( m_effectsGroupBox );
effectsLayout->setSpacing( 0 );
effectsLayout->setContentsMargins( 2, 12, 2, 2 );
effectsLayout->setContentsMargins( 2, m_effectsGroupBox->titleBarHeight() + 2, 2, 2 );
m_scrollArea = new QScrollArea;
m_scrollArea->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOn );

View File

@@ -2,7 +2,7 @@
* EffectView.cpp - view-component for an effect
*
* Copyright (c) 2006-2007 Danny McRae <khjklujn/at/users.sourceforge.net>
* Copyright (c) 2007-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2007-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -92,7 +92,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
QPushButton * ctls_btn = new QPushButton( tr( "Controls" ),
this );
QFont f = ctls_btn->font();
ctls_btn->setFont( pointSize<7>( f ) );
ctls_btn->setFont( pointSize<8>( f ) );
ctls_btn->setGeometry( 140, 14, 50, 20 );
connect( ctls_btn, SIGNAL( clicked() ),
this, SLOT( editControls() ) );

View File

@@ -274,7 +274,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) :
m_x100Cb = new ledCheckBox( tr( "FREQ x 100" ), this );
m_x100Cb->setFont( pointSize<6>( m_x100Cb->font() ) );
m_x100Cb->setFont( pointSizeF( m_x100Cb->font(), 6.5 ) );
m_x100Cb->move( LFO_PREDELAY_KNOB_X, LFO_GRAPH_Y + 36 );
m_x100Cb->setWhatsThis(
tr( "Click here if the frequency of this LFO should be "
@@ -285,8 +285,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) :
m_controlEnvAmountCb = new ledCheckBox( tr( "MODULATE ENV-AMOUNT" ),
this );
m_controlEnvAmountCb->move( LFO_PREDELAY_KNOB_X, LFO_GRAPH_Y + 54 );
m_controlEnvAmountCb->setFont( pointSize<6>(
m_controlEnvAmountCb->font() ) );
m_controlEnvAmountCb->setFont( pointSizeF( m_controlEnvAmountCb->font(), 6.5 ) );
m_controlEnvAmountCb ->setWhatsThis(
tr( "Click here to make the envelope-amount controlled by this "
"LFO." ) );
@@ -407,9 +406,6 @@ void EnvelopeAndLfoView::paintEvent( QPaintEvent * )
QPainter p( this );
p.setRenderHint( QPainter::Antialiasing );
// set smaller font
p.setFont( pointSize<6>( p.font() ) );
// draw envelope-graph
p.drawPixmap( ENV_GRAPH_X, ENV_GRAPH_Y, *s_envGraph );
// draw LFO-graph

View File

@@ -1,7 +1,7 @@
/*
* InstrumentFunctionViews.cpp - view for instrument-functions-tab
*
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -164,14 +164,14 @@ ArpeggiatorView::ArpeggiatorView( Arpeggiator * _arp, QWidget * _parent ) :
m_arpDirectionLbl = new QLabel( tr( "Direction:" ), m_arpGroupBox );
m_arpDirectionLbl->setGeometry( 10, 60, 64, 10 );
m_arpDirectionLbl->setFont( pointSize<7>( m_arpDirectionLbl->font() ) );
m_arpDirectionLbl->setFont( pointSize<8>( m_arpDirectionLbl->font() ) );
m_arpDirectionComboBox->setGeometry( 10, 74, 140, 22 );
QLabel * mode_lbl = new QLabel( tr( "Mode:" ), m_arpGroupBox );
mode_lbl->setGeometry( 10, 110, 64, 10 );
mode_lbl->setFont( pointSize<7>( mode_lbl->font() ) );
mode_lbl->setFont( pointSize<8>( mode_lbl->font() ) );
m_arpModeComboBox->setGeometry( 10, 124, 128, 22 );
}

View File

@@ -188,7 +188,7 @@ void LcdWidget::paintEvent( QPaintEvent* )
// Label
if( !m_label.isEmpty() )
{
p.setFont( pointSize<6>( p.font() ) );
p.setFont( pointSizeF( p.font(), 6.5 ) );
p.setPen( QColor( 64, 64, 64 ) );
p.drawText( width() / 2 -
p.fontMetrics().width( m_label ) / 2 + 1,
@@ -233,8 +233,8 @@ void LcdWidget::updateSize()
else {
setFixedSize( qMax<int>(
m_cellWidth * m_numDigits + 2*(margin+m_marginWidth),
QFontMetrics( pointSize<6>( font() ) ).width( m_label ) ),
m_cellHeight + (2*margin) + 8 );
QFontMetrics( pointSizeF( font(), 6.5 ) ).width( m_label ) ),
m_cellHeight + (2*margin) + 9 );
}
update();

View File

@@ -40,7 +40,8 @@
groupBox::groupBox( const QString & _caption, QWidget * _parent ) :
QWidget( _parent ),
BoolModelView( NULL, this ),
m_caption( _caption )
m_caption( _caption ),
m_titleBarHeight( 11 )
{
updatePixmap();
@@ -112,15 +113,15 @@ void groupBox::updatePixmap()
p.drawLine( 0, height() - 1, width() - 1, height() - 1 );
// draw groupbox-titlebar
QLinearGradient g( 0, 0, 0, 9 );
QLinearGradient g( 0, 0, 0, m_titleBarHeight );
g.setColorAt( 0, bg_color.darker( 250 ) );
g.setColorAt( 0.1, bg_color.lighter( 120 ) );
g.setColorAt( 1, bg_color.darker( 250 ) );
p.fillRect( 2, 2, width() - 4, 9, g );
p.fillRect( 2, 2, width() - 4, m_titleBarHeight, g );
// draw line below titlebar
p.setPen( bg_color.dark( 400 ) );
p.drawLine( 1, 11, width() - 3, 11 );
p.drawLine( 1, m_titleBarHeight + 1, width() - 3, m_titleBarHeight + 1 );
// black inner rect
p.drawRect( 1, 1, width() - 3, height() - 3 );
@@ -128,8 +129,8 @@ void groupBox::updatePixmap()
//p.setPen( QColor( 255, 255, 255 ) );
p.setPen( palette().color( QPalette::Active, QPalette::Text ) );
p.setFont( pointSize<7>( font() ) );
p.drawText( 22, 10, m_caption );
p.setFont( pointSize<8>( font() ) );
p.drawText( 22, m_titleBarHeight, m_caption );
QPalette pal = palette();
pal.setBrush( backgroundRole(), QBrush( pm ) );

View File

@@ -106,8 +106,7 @@ void knob::setLabel( const QString & _txt )
if( m_knobPixmap )
{
setFixedSize( qMax<int>( m_knobPixmap->width(),
QFontMetrics( pointSizeF( font(), 6
) ).width( m_label ) ),
QFontMetrics( pointSizeF( font(), 6.5) ).width( m_label ) ),
m_knobPixmap->height() + 10 );
}
update();
@@ -529,7 +528,7 @@ void knob::paintEvent( QPaintEvent * _me )
drawKnob( &p );
if( !m_label.isEmpty() )
{
p.setFont( pointSizeF( p.font(), 6 ) );
p.setFont( pointSizeF( p.font(), 6.5 ) );
/* p.setPen( QColor( 64, 64, 64 ) );
p.drawText( width() / 2 -
p.fontMetrics().width( m_label ) / 2 + 1,

View File

@@ -1,7 +1,7 @@
/*
* tab_bar.cpp - implementation of tab-bar
*
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -96,7 +96,7 @@ tabButton * tabBar::addTab( QWidget * _w, const QString & _text, int _id,
// widgets have the same size and only the one on the top is visible
_w->setFixedSize( _w->parentWidget()->size() );
b->setFont( pointSize<7>( b->font() ) );
b->setFont( pointSize<8>( b->font() ) );
return( b );
}

View File

@@ -1,7 +1,7 @@
/*
* tab_widget.cpp - tabwidget for LMMS
*
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -39,7 +39,7 @@ tabWidget::tabWidget( const QString & _caption, QWidget * _parent ) :
m_activeTab( 0 ),
m_caption( _caption )
{
setFont( pointSize<7>( font() ) );
setFont( pointSize<8>( font() ) );
setAutoFillBackground( true );
QColor bg_color = QApplication::palette().color( QPalette::Active,
@@ -62,7 +62,7 @@ tabWidget::~tabWidget()
void tabWidget::addTab( QWidget * _w, const QString & _name, int _idx )
{
setFont( pointSize<7>( font() ) );
setFont( pointSize<8>( font() ) );
widgetDesc d = { _w, _name, fontMetrics().width( _name ) + 10 } ;
if( _idx < 0/* || m_widgets.contains( _idx ) == true*/ )
{
@@ -72,7 +72,7 @@ void tabWidget::addTab( QWidget * _w, const QString & _name, int _idx )
}
m_widgets[_idx] = d;
_w->setFixedSize( width() - 4, height() - 14 );
_w->move( 2, 12 );
_w->move( 2, 13 );
_w->hide();
if( m_widgets.contains( m_activeTab ) )
@@ -144,7 +144,7 @@ void tabWidget::resizeEvent( QResizeEvent * )
void tabWidget::paintEvent( QPaintEvent * _pe )
{
setFont( pointSize<7>( font() ) );
setFont( pointSize<8>( font() ) );
QPainter p( this );
QColor bg_color = QApplication::palette().color( QPalette::Active,
@@ -168,13 +168,13 @@ void tabWidget::paintEvent( QPaintEvent * _pe )
p.setPen( QColor( 0, 0, 0 ) );
p.drawRect( 1, 1, width() - 3, height() - 3 );
p.fillRect( 2, 2, width() - 4, 9 + add, g );
p.drawLine( 2, 11 + add, width() - 3, 11 + add );
p.fillRect( 2, 2, width() - 4, 10 + add, g );
p.drawLine( 2, 12 + add, width() - 3, 12 + add );
if( !big_tab_captions )
{
p.setPen( QColor( 255, 255, 255 ) );
p.drawText( 5, 10, m_caption );
p.drawText( 5, 11, m_caption );
}
int cx = ( big_tab_captions ? 4 : 14 ) +
@@ -183,12 +183,12 @@ void tabWidget::paintEvent( QPaintEvent * _pe )
QColor cap_col( 160, 160, 160 );
if( big_tab_captions )
{
p.setFont( pointSize<7>( p.font() ) );
p.setFont( pointSize<8>( p.font() ) );
cap_col = QColor( 224, 224, 224 );
}
else
{
p.setFont( pointSize<6>( p.font() ) );
p.setFont( pointSize<7>( p.font() ) );
}
p.setPen( cap_col );
@@ -199,9 +199,9 @@ void tabWidget::paintEvent( QPaintEvent * _pe )
if( it.key() == m_activeTab )
{
p.setPen( QColor( 32, 48, 64 ) );
p.fillRect( cx, 2, ( *it ).nwidth - 6, 9, cap_col );
p.fillRect( cx, 2, ( *it ).nwidth - 6, 10, cap_col );
}
p.drawText( cx + 3, 9 + add, ( *it ).name );
p.drawText( cx + 3, 10 + add, ( *it ).name );
p.setPen( cap_col );
cx += ( *it ).nwidth;
}

View File

@@ -959,7 +959,7 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV
m_volumeKnob->setVolumeKnob( true );
m_volumeKnob->setModel( &_it->m_volumeModel );
m_volumeKnob->setHintText( tr( "Volume:" ) + " ", "%" );
m_volumeKnob->move( widgetWidth-2*24, 4 );
m_volumeKnob->move( widgetWidth-2*24, 2 );
m_volumeKnob->setLabel( tr( "VOL" ) );
m_volumeKnob->show();
m_volumeKnob->setWhatsThis( tr( volume_help ) );
@@ -968,7 +968,7 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV
tr( "Panning" ) );
m_panningKnob->setModel( &_it->m_panningModel );
m_panningKnob->setHintText( tr( "Panning:" ) + " ", "%" );
m_panningKnob->move( widgetWidth-24, 4 );
m_panningKnob->move( widgetWidth-24, 2 );
m_panningKnob->setLabel( tr( "PAN" ) );
m_panningKnob->show();
@@ -1278,7 +1278,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
// setup line edit for changing instrument track name
m_nameLineEdit = new QLineEdit;
m_nameLineEdit->setFont( pointSize<8>( m_nameLineEdit->font() ) );
m_nameLineEdit->setFont( pointSize<9>( m_nameLineEdit->font() ) );
connect( m_nameLineEdit, SIGNAL( textChanged( const QString & ) ),
this, SLOT( textChanged( const QString & ) ) );

View File

@@ -373,7 +373,7 @@ void SampleTCOView::paintEvent( QPaintEvent * _pe )
}
if( m_tco->isRecord() )
{
p.setFont( pointSize<6>( p.font() ) );
p.setFont( pointSize<7>( p.font() ) );
p.setPen( QColor( 224, 0, 0 ) );
p.drawText( 9, p.fontMetrics().height() - 1, "Rec" );
p.setBrush( QBrush( QColor( 224, 0, 0 ) ) );
@@ -526,11 +526,11 @@ SampleTrackView::SampleTrackView( SampleTrack * _t, TrackContainerView* tcv ) :
if( configManager::inst()->value( "ui",
"compacttrackbuttons" ).toInt() )
{
m_volumeKnob->move( DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT-2*24, 4 );
m_volumeKnob->move( DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT-2*24, 2 );
}
else
{
m_volumeKnob->move( DEFAULT_SETTINGS_WIDGET_WIDTH-2*24, 4 );
m_volumeKnob->move( DEFAULT_SETTINGS_WIDGET_WIDTH-2*24, 2 );
}
m_volumeKnob->setLabel( tr( "VOL" ) );
m_volumeKnob->show();

View File

@@ -208,7 +208,7 @@ void bbTCOView::paintEvent( QPaintEvent * )
p.setPen( col.dark() );
p.drawRect( 0, 0, rect().right(), rect().bottom() );
p.setFont( pointSize<7>( p.font() ) );
p.setFont( pointSize<8>( p.font() ) );
p.setPen( QColor( 0, 0, 0 ) );
p.drawText( 2, p.fontMetrics().height() - 1, m_bbTCO->name() );

View File

@@ -1264,7 +1264,7 @@ void patternView::paintEvent( QPaintEvent * )
}
}
p.setFont( pointSize<7>( p.font() ) );
p.setFont( pointSize<8>( p.font() ) );
if( m_pat->isMuted() || m_pat->getTrack()->isMuted() )
{
p.setPen( QColor( 192, 192, 192 ) );