Merge pull request #190 from diizy/stable-0.4

UI: small fixes, improvements, clean-up & requested changes
This commit is contained in:
Tobias Doerffel
2014-01-28 15:39:34 -08:00
19 changed files with 113 additions and 49 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 681 B

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 B

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 B

After

Width:  |  Height:  |  Size: 742 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 692 B

After

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 962 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 893 B

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 507 B

View File

@@ -1,4 +1,6 @@
/* LMMS style sheet */
/********************
* LMMS style sheet *
********************/
QWhatsThat {
color: black;
@@ -12,6 +14,7 @@ AutomationEditor {
background-color: rgb(0, 0, 0);
}
/* text box */
QLineEdit {
border-radius: 4px;
@@ -20,6 +23,8 @@ QLineEdit {
color: #e0e0e0;
}
/* text box when it wants text */
QLineEdit:focus {
border: 1px solid rgba(0,0,0, 128);
}
@@ -89,6 +94,20 @@ pianoRoll {
background-color: rgb(0, 0, 0);
}
/* main toolbar oscilloscope - can have transparent bg now */
visualizationWidget {
background: none;
border: none;
}
/* main toolbar cpu load widget - this can have transparent bg now */
cpuloadWidget {
border: none;
background: url(resources:cpuload_bg.png);
}
/* scrollbar: trough */
QScrollBar:horizontal {
@@ -104,15 +123,6 @@ QScrollBar:vertical {
margin: 13px 0px;
}
visualizationWidget {
background: none;
border: none;
}
cpuloadWidget {
border: none;
background: url(resources:cpuload_bg.png);
}
/* scrollbar: trough clicky things */
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal,
@@ -130,7 +140,7 @@ QScrollBar::add-page:vertical:pressed, QScrollBar::sub-page:vertical:pressed {
QScrollBar::handle:horizontal {
background: qlineargradient(spread:reflect,
x1:0.5, y1:0, x2:0.5, y2:1,
stop:0 #747474, stop:0.5 #c9c9c9, stop:1 #808080);
stop:0 #969696, stop:0.5 #c9c9c9, stop:1 #aaa);
border: 1px outset #888;
border-radius: 2px;
min-width: 24px;
@@ -139,7 +149,7 @@ QScrollBar::handle:horizontal {
QScrollBar::handle:horizontal:hover {
background: qlineargradient(spread:reflect,
x1:0.5, y1:0, x2:0.5, y2:1,
stop:0 #747474, stop:0.5 #f0f0f0, stop:1 #808080);
stop:0 #969696, stop:0.5 #f0f0f0, stop:1 #aaa);
}
QScrollBar::handle:horizontal:pressed {
@@ -151,7 +161,7 @@ QScrollBar::handle:horizontal:pressed {
QScrollBar::handle:vertical {
background: qlineargradient(spread:reflect,
x1:0, y1:0.5, x2:1, y2:0.5,
stop:0 #747474, stop:0.5 #c9c9c9, stop:1 #808080);
stop:0 #969696, stop:0.5 #c9c9c9, stop:1 #aaa);
border: 1px outset #888;
border-radius: 2px;
min-height: 24px;
@@ -160,7 +170,7 @@ QScrollBar::handle:vertical {
QScrollBar::handle:vertical:hover {
background: qlineargradient(spread:reflect,
x1:0, y1:0.5, x2:1, y2:0.5,
stop:0 #747474, stop:0.5 #f0f0f0, stop:1 #808080);
stop:0 #969696, stop:0.5 #f0f0f0, stop:1 #aaa);
}
QScrollBar::handle:vertical:pressed {
@@ -201,6 +211,8 @@ QScrollBar::add-line:disabled, QScrollBar::sub-line:disabled {
background: #747474;
}
/* arrow button arrows */
QScrollBar::left-arrow:horizontal, QScrollBar::right-arrow:horizontal,
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
border: none;
@@ -218,18 +230,23 @@ QScrollBar::right-arrow:horizontal:disabled { background-image: url(resources:sb
QScrollBar::up-arrow:vertical:disabled { background-image: url(resources:sbarrow_up_d.png);}
QScrollBar::down-arrow:vertical:disabled { background-image: url(resources:sbarrow_down_d.png);}
/* background for song editor and bb-editor */
TrackContainerView QFrame{
background-color: #49515b;
}
nStateButton {
/* autoscroll, loop, stop behaviour toggle buttons */
nStateButton {
max-height: 26px;
max-width: 26px;
min-height: 26px;
min-width: 26px;
}
/* gear button in tracks */
trackOperationsWidget > QPushButton {
max-height: 26px;
max-width: 26px;
@@ -260,15 +277,19 @@ trackOperationsWidget > QPushButton::menu-indicator:checked
top: 3px;
}
trackWidget {
/* border-bottom: 1px solid rgb(0, 0, 0);*/
/* actually has no effect yet so disabled */
/*trackWidget {
/* border-bottom: 1px solid rgb(0, 0, 0);*//*
background-color: rgb(0, 0, 0);
}
}*/
/* font sizes */
nameLabel, effectLabel, sf2InstrumentView > QLabel {
font-size:10px;
}
/* main toolbar sliders (master vol, master pitch) */
automatableSlider::groove:vertical {
background: rgba(0,0,0, 128);
@@ -287,11 +308,14 @@ automatableSlider::handle:vertical {
margin: -4px -12px -2px;
}
/* window that shows up when you add effects */
EffectSelectDialog QScrollArea {
background: #5b6571;
}
/* the inner boxes in LADSPA effect windows */
EffectControlDialog QGroupBox {
background: #49515b;
margin-top: 1ex;
@@ -300,6 +324,8 @@ EffectControlDialog QGroupBox {
border: 1px solid rgba(0,0,0, 64);
}
/* the inner box titles when present (channel 1, channel 2...) */
EffectControlDialog QGroupBox::title {
subcontrol-origin: margin;
subcontrol-position: top left;
@@ -310,10 +336,14 @@ EffectControlDialog QGroupBox::title {
padding: 2px 1px;
}
/* main toolbar */
QWidget#mainToolbar {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #98a2a7, stop:1 #5b646f);
}
/* smaller toolbars */
QToolBar {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #98a2a7, stop:1 #5b646f);
}
@@ -327,6 +357,22 @@ QToolButton, toolButton {
color: black;
}
/* separate corner rounding for play and stop buttons! */
toolButton#playButton {
border-top-left-radius: 8px 6px;
border-bottom-left-radius: 8px 6px;
}
toolButton#stopButton {
border-top-right-radius: 8px 6px;
border-bottom-right-radius: 8px 6px;
}
/* record and record-accompany can be styled with #recordButton and #recordAccompanyButton respectively */
/* all tool buttons */
QToolButton:hover, toolButton:hover {
background: qradialgradient(cx:0.3, cy:0.3, radius:0.8, fx:0.3, fy:0.3, stop:0 #e0e0e0, stop:0.5 #c9c9c9, stop:1 #969696 );
border: 1px solid rgba(0,0,0,128);
@@ -348,6 +394,8 @@ QToolButton:checked, toolButton:checked {
color: black;
}
/* track label buttons - the part that contains the icon and track title */
trackLabelButton {
background-color: #5b6571;
color: #c9c9c9;
@@ -363,6 +411,7 @@ trackLabelButton:hover {
color: white;
border: 1px solid rgba(0,0,0,64);
padding: 1px 0px;
margin: 0px;
}
trackLabelButton:pressed {
@@ -389,7 +438,7 @@ trackLabelButton:checked:pressed {
background: qlineargradient(spread:reflect, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #49515b, stop:0.3 #5b6571, stop:1 #6b7581 );
}
/* sidebar, sidebar buttons */
SideBar {
background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop: 0 #98a2a7, stop: 1.0 #5b646f);
@@ -399,13 +448,16 @@ SideBar QToolButton {
font-size: 12px;
}
/* font sizes for text buttons */
FxMixerView QPushButton, EffectRackView QPushButton, ControllerRackView QPushButton {
font-size: 10px;
}
timeLine {
/* has no effect yet */
/*timeLine {
font-size: 8px;
}
}*/
QTreeView {
alternate-background-color: #747474;
@@ -511,9 +563,3 @@ palette:brighttext {color: #4afd85}
palette:highlight {color: #202020}
palette:highlightedtext {color: #ffffff}
/* Notes:
lcd-spinbox colors: (12, 250, 150), (37, 57, 42)
*/

View File

@@ -5,7 +5,7 @@
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2013 Paul Giblock <pgib/at/users.sourceforge.net>
* Copyright (c) 2006-2008 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
*
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
@@ -156,10 +156,14 @@ AutomationEditor::AutomationEditor() :
tr( "Play/pause current pattern (Space)" ),
this, SLOT( play() ), m_toolBar );
m_stopButton = new toolButton( embed::getIconPixmap( "stop" ),
tr( "Stop playing of current pattern (Space)" ),
this, SLOT( stop() ), m_toolBar );
m_playButton->setObjectName( "playButton" );
m_stopButton->setObjectName( "stopButton" );
m_playButton->setWhatsThis(
tr( "Click here if you want to play the current pattern. "
"This is useful while editing it. The pattern is "
@@ -277,7 +281,7 @@ AutomationEditor::AutomationEditor() :
connect( &m_tensionModel, SIGNAL( dataChanged() ),
this, SLOT( tensionChanged() ) );
tool_button_group = new QButtonGroup( this );
tool_button_group->addButton( m_discreteButton );
tool_button_group->addButton( m_linearButton );
@@ -524,7 +528,7 @@ void AutomationEditor::updateAfterPatternChange()
}
if( m_pattern->progressionType() ==
AutomationPattern::DiscreteProgression &&
AutomationPattern::DiscreteProgression &&
!m_discreteButton->isChecked() )
{
m_discreteButton->setChecked( true );
@@ -763,20 +767,20 @@ void AutomationEditor::drawLine( int _x0, float _y0, int _x1, float _y1 )
float yscale = deltay / ( deltax );
if( _x0 < _x1)
if( _x0 < _x1)
{
xstep = quantization();
}
else
else
{
xstep = -( quantization() );
}
if( _y0 < _y1 )
{
ystep = 1;
ystep = 1;
}
else
else
{
ystep = -1;
}
@@ -878,7 +882,7 @@ void AutomationEditor::mousePressEvent( QMouseEvent * _me )
{
// then set new value
MidiTime value_pos( pos_ticks );
MidiTime new_time =
m_pattern->putValue( value_pos,
level );
@@ -1577,7 +1581,7 @@ void AutomationEditor::paintEvent( QPaintEvent * _pe )
is_selected );
}
delete [] values;
// Draw cross
int y = yCoordOfLevel( it.value() );
p.drawLine( x - 1, y, x + 1, y );
@@ -1803,7 +1807,7 @@ void AutomationEditor::wheelEvent( QWheelEvent * _we )
m_timeLine->setPixelsPerTact( m_ppt );
update();
}
else if( _we->modifiers() & Qt::ShiftModifier
else if( _we->modifiers() & Qt::ShiftModifier
|| _we->orientation() == Qt::Horizontal )
{
m_leftRightScroll->setValue( m_leftRightScroll->value() -
@@ -2069,7 +2073,7 @@ void AutomationEditor::selectAll()
const float level = it.value();
if( level < m_selectStartLevel )
{
// if we move start-level down, we have to add
// if we move start-level down, we have to add
// the difference between old and new start-level
// to m_selectedLevels, otherwise the selection
// is just moved down...

View File

@@ -412,7 +412,7 @@ void MainWindow::finalize( void )
toolButton * bb_editor_window = new toolButton(
embed::getIconPixmap( "bb_track" ),
embed::getIconPixmap( "bb_track_btn" ),
tr( "Show/hide Beat+Bassline Editor" ) +
" (F6)",
this, SLOT( toggleBBEditorWin() ),

View File

@@ -2,7 +2,7 @@
* bb_editor.cpp - basic main-window for editing of beats and basslines
*
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
@@ -85,6 +85,9 @@ bbEditor::bbEditor( bbTrackContainer* tc ) :
tr( "Stop playback of current beat/bassline (Space)" ),
this, SLOT( stop() ), m_toolBar );
m_playButton->setObjectName( "playButton" );
m_stopButton->setObjectName( "stopButton" );
toolButton * add_bb_track = new toolButton(
embed::getIconPixmap( "add_bb_track" ),
tr( "Add beat/bassline" ),

View File

@@ -331,6 +331,11 @@ pianoRoll::pianoRoll() :
m_stopButton = new toolButton( embed::getIconPixmap( "stop" ),
tr( "Stop playing of current pattern (Space)" ),
this, SLOT( stop() ), m_toolBar );
m_playButton->setObjectName( "playButton" );
m_stopButton->setObjectName( "stopButton" );
m_recordButton->setObjectName( "recordButton" );
m_recordAccompanyButton->setObjectName( "recordAccompanyButton" );
m_playButton->setWhatsThis(
tr( "Click here to play the current pattern. "

View File

@@ -113,7 +113,7 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
this, SLOT( adjustUiAfterProjectLoad() ) );
// add some essential widgets to global tool-bar
// add some essential widgets to global tool-bar
QWidget * tb = engine::mainWindow()->toolBar();
engine::mainWindow()->addSpacingToToolBar( 10 );
@@ -153,7 +153,7 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
engine::mainWindow()->addWidgetToToolBar( m_timeSigDisplay );
engine::mainWindow()->addSpacingToToolBar( 10 );
QLabel * master_vol_lbl = new QLabel( tb );
master_vol_lbl->setPixmap( embed::getIconPixmap( "master_volume" ) );
@@ -239,7 +239,7 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
m_toolBar->setFixedHeight( 32 );
m_toolBar->setAutoFillBackground( true );
QPalette pal;
pal.setBrush( m_toolBar->backgroundRole(),
pal.setBrush( m_toolBar->backgroundRole(),
embed::getIconPixmap( "toolbar_bg" ) );
m_toolBar->setPalette( pal );
@@ -255,19 +255,23 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
m_playButton = new toolButton( embed::getIconPixmap( "play" ),
tr( "Play song (Space)" ),
this, SLOT( play() ), m_toolBar );
m_playButton->setObjectName( "playButton" );
m_recordButton = new toolButton( embed::getIconPixmap( "record" ),
tr( "Record samples from Audio-device" ),
this, SLOT( record() ), m_toolBar );
m_recordAccompanyButton = new toolButton(
m_recordButton->setObjectName( "recordButton" );
m_recordAccompanyButton = new toolButton(
embed::getIconPixmap( "record_accompany" ),
tr( "Record samples from Audio-device while playing "
"song or BB track" ),
this, SLOT( recordAccompany() ), m_toolBar );
m_recordAccompanyButton->setObjectName( "recordAccompanyButton" );
// FIXME: disable record button while it is not implemented
m_recordButton->setDisabled( true );
// disable record buttons if capturing is not supported
if( !engine::mixer()->audioDev()->supportsCapture() )
{
@@ -278,6 +282,7 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
m_stopButton = new toolButton( embed::getIconPixmap( "stop" ),
tr( "Stop song (Space)" ),
this, SLOT( stop() ), m_toolBar );
m_stopButton->setObjectName( "stopButton" );
m_addBBTrackButton = new toolButton( embed::getIconPixmap(
"add_bb_track" ),
@@ -566,7 +571,7 @@ void songEditor::wheelEvent( QWheelEvent * _we )
setPixelsPerTact( pixelsPerTact() );
// and make sure, all TCO's are resized and relocated
realignTracks();
}
}
else if( engine::mainWindow()->isShiftPressed() == TRUE )
{
m_leftRightScroll->setValue( m_leftRightScroll->value() -
@@ -720,7 +725,7 @@ void songEditor::updatePosition( const MidiTime & _t )
trackOpWidth = TRACK_OP_WIDTH;
}
if( ( m_s->isPlaying() && m_s->m_playMode == song::Mode_PlaySong
if( ( m_s->isPlaying() && m_s->m_playMode == song::Mode_PlaySong
&& m_timeLine->autoScroll() == timeLine::AutoScrollEnabled) ||
m_scrollBack == true )
{

View File

@@ -352,6 +352,7 @@ void knob::drawKnob( QPainter * _p )
}
case knobDark_28:
{
p.setPen( QPen( QApplication::palette().color( QPalette::Active, QPalette::WindowText ), 2 ) );
const float rb = qMax<float>( ( radius - 10 ) / 3.0,
0.0 );
const float re = qMax<float>( ( radius - 4 ), 0.0 );

View File

@@ -58,7 +58,7 @@ trackLabelButton::trackLabelButton( trackView * _tv, QWidget * _parent ) :
setFixedSize( 160, 29 );
}
setIconSize( QSize( 32, 32 ) );
setIconSize( QSize( 24, 24 ) );
setText( " " );
connect( m_trackView->getTrack(), SIGNAL( dataChanged() ),