Skip to content

Commit

Permalink
Remove "GENERAL SETTINGS" tab
Browse files Browse the repository at this point in the history
Remove the "GENERAL SETTINGS" tab from the instrument track and sample track window.

This removes clutter as well as dependencies to the non-scalable `TabWidget`.

Remove superfluous calls to `setSpacing` which have set the default value of 6.

Use the default content margins of (9, 9, 9, 9) instead of (8, 8, 8, 8).
  • Loading branch information
michaelgregorius committed Apr 1, 2024
1 parent c271d28 commit 8e468df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
7 changes: 1 addition & 6 deletions src/gui/SampleTrackWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include "SampleTrackView.h"
#include "Song.h"
#include "SubWindow.h"
#include "TabWidget.h"
#include "TrackLabelButton.h"

namespace lmms::gui
Expand Down Expand Up @@ -69,13 +68,9 @@ SampleTrackWindow::SampleTrackWindow(SampleTrackView * tv) :
vlayout->setContentsMargins(0, 0, 0, 0);
vlayout->setSpacing(0);

auto generalSettingsWidget = new TabWidget(tr("GENERAL SETTINGS"), this);

auto generalSettingsWidget = new QWidget(this);
auto generalSettingsLayout = new QVBoxLayout(generalSettingsWidget);

generalSettingsLayout->setContentsMargins(8, 18, 8, 8);
generalSettingsLayout->setSpacing(6);

auto nameWidget = new QWidget(generalSettingsWidget);
auto nameLayout = new QHBoxLayout(nameWidget);
nameLayout->setContentsMargins(0, 0, 0, 0);
Expand Down
6 changes: 1 addition & 5 deletions src/gui/instrument/InstrumentTrackWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,9 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
vlayout->setContentsMargins(0, 0, 0, 0);
vlayout->setSpacing( 0 );

auto generalSettingsWidget = new TabWidget(tr("GENERAL SETTINGS"), this);

auto generalSettingsWidget = new QWidget(this);
auto generalSettingsLayout = new QVBoxLayout(generalSettingsWidget);

generalSettingsLayout->setContentsMargins( 8, 18, 8, 8 );
generalSettingsLayout->setSpacing( 6 );

auto nameAndChangeTrackWidget = new QWidget(generalSettingsWidget);
auto nameAndChangeTrackLayout = new QHBoxLayout(nameAndChangeTrackWidget);
nameAndChangeTrackLayout->setContentsMargins( 0, 0, 0, 0 );
Expand Down

0 comments on commit 8e468df

Please sign in to comment.