Skip to content

Commit

Permalink
Further adjustments to the instrument controls
Browse files Browse the repository at this point in the history
Changes to the grid layout: tighter layout margins, less horizontal
spacing to make the widget grouping more obvious, no more vertical
spacing to move the labels even more close to the widgets, widgets align
vertically on the center so that the spin boxes are centered with the
knobs.

Added a "STORE" label for the preset button to make the layout more
balanced.
  • Loading branch information
michaelgregorius committed Sep 13, 2015
1 parent cbd750f commit 87a8024
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/tracks/InstrumentTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1308,12 +1308,13 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :


QGridLayout* basicControlsLayout = new QGridLayout;
basicControlsLayout->setHorizontalSpacing(9);
basicControlsLayout->setVerticalSpacing(1);
basicControlsLayout->setHorizontalSpacing(3);
basicControlsLayout->setVerticalSpacing(0);
basicControlsLayout->setContentsMargins(0, 0, 0, 0);

QString labelStyleSheet = "font-size: 6pt;";
Qt::Alignment labelAlignment = Qt::AlignHCenter | Qt::AlignTop;
Qt::Alignment widgetAlignment = Qt::AlignHCenter | Qt::AlignBottom;
Qt::Alignment widgetAlignment = Qt::AlignHCenter | Qt::AlignCenter;

// set up volume knob
m_volumeKnob = new Knob( knobBright_26, NULL, tr( "Instrument volume" ) );
Expand Down Expand Up @@ -1397,6 +1398,11 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :

basicControlsLayout->addWidget( saveSettingsBtn, 0, 7 );

label = new QLabel( tr( "STORE" ), this );
label->setStyleSheet( labelStyleSheet );
basicControlsLayout->addWidget( label, 1, 7);
basicControlsLayout->setAlignment( label, labelAlignment );

generalSettingsLayout->addLayout( basicControlsLayout );


Expand Down

0 comments on commit 87a8024

Please sign in to comment.