Skip to content

Commit

Permalink
Merge branch 'master' into sample-thumbnail
Browse files Browse the repository at this point in the history
  • Loading branch information
khoidauminh authored Nov 11, 2024
2 parents 58a98a4 + ada836c commit b9bd512
Show file tree
Hide file tree
Showing 57 changed files with 640 additions and 611 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ jobs:
arch: [ x86_64, arm64 ]
include:
- arch: x86_64
os: macos-12
xcode: "13.1"
os: macos-13
xcode: "15.2"
- arch: arm64
os: macos-14
xcode: "14.3.1"
xcode: "15.4"
name: macos-${{ matrix.arch }}
runs-on: ${{ matrix.os }}
env:
Expand Down
10 changes: 5 additions & 5 deletions data/themes/classic/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ lmms--gui--TrackContentWidget {

/* gear button in tracks */

lmms--gui--TrackOperationsWidget > QPushButton {
lmms--gui--TrackOperationsWidget QPushButton {
max-height: 26px;
max-width: 26px;
min-height: 26px;
Expand All @@ -384,20 +384,20 @@ lmms--gui--TrackOperationsWidget > QPushButton {
border: none;
}

lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator {
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator {
image: url("resources:trackop.png");
subcontrol-origin: padding;
subcontrol-position: center;
position: relative;
top: 1px;
}

lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator:hover {
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator:hover {
image: url("resources:trackop_h.png");
}

lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator:pressed,
lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator:checked {
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator:pressed,
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator:checked {
image: url("resources:trackop_c.png");
position: relative;
top: 2px;
Expand Down
19 changes: 4 additions & 15 deletions data/themes/default/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ lmms--gui--TrackContentWidget {

/* gear button in tracks */

lmms--gui--TrackOperationsWidget > QPushButton {
lmms--gui--TrackOperationsWidget QPushButton {
max-height: 26px;
max-width: 26px;
min-height: 26px;
Expand All @@ -420,16 +420,16 @@ lmms--gui--TrackOperationsWidget > QPushButton {
border: none;
}

lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator {
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator {
image: url("resources:trackop.png");
subcontrol-origin: padding;
subcontrol-position: center;
position: relative;
top: 1px;
}

lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator:pressed,
lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator:checked {
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator:pressed,
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator:checked {
image: url("resources:trackop.png");
position: relative;
top: 2px;
Expand Down Expand Up @@ -601,35 +601,24 @@ lmms--gui--TrackLabelButton:hover {
background: #3B424A;
border: 1px solid #515B66;
border-radius: none;
font-size: 11px;
font-weight: normal;
padding: 2px 1px;
}

lmms--gui--TrackLabelButton:pressed {
background: #262B30;
border-radius: none;
font-size: 11px;
font-weight: normal;
padding: 2px 1px;
}

lmms--gui--TrackLabelButton:checked {
border: 1px solid #485059;
background: #1C1F24;
background-image: url("resources:track_shadow_p.png");
border-radius: none;
font-size: 11px;
font-weight: normal;
padding: 2px 1px;
}

lmms--gui--TrackLabelButton:checked:pressed {
border: 1px solid #2f353b;
background: #0e1012;
background-image: url("resources:track_shadow_p.png");
font-size: 11px;
padding: 2px 1px;
font-weight: solid;
}

Expand Down
19 changes: 16 additions & 3 deletions include/AudioEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <memory>
#include <vector>

#include "AudioDevice.h"
#include "lmms_basics.h"
#include "SampleFrame.h"
#include "LocklessList.h"
Expand Down Expand Up @@ -235,9 +236,20 @@ class LMMS_EXPORT AudioEngine : public QObject
}


sample_rate_t baseSampleRate() const;
sample_rate_t outputSampleRate() const;
sample_rate_t inputSampleRate() const;
sample_rate_t baseSampleRate() const { return m_baseSampleRate; }


sample_rate_t outputSampleRate() const
{
return m_audioDev != nullptr ? m_audioDev->sampleRate() : m_baseSampleRate;
}


sample_rate_t inputSampleRate() const
{
return m_audioDev != nullptr ? m_audioDev->sampleRate() : m_baseSampleRate;
}


inline float masterGain() const
{
Expand Down Expand Up @@ -361,6 +373,7 @@ class LMMS_EXPORT AudioEngine : public QObject
SampleFrame* m_inputBuffer[2];
f_cnt_t m_inputBufferFrames[2];
f_cnt_t m_inputBufferSize[2];
sample_rate_t m_baseSampleRate;
int m_inputBufferRead;
int m_inputBufferWrite;

Expand Down
2 changes: 2 additions & 0 deletions include/AutomationEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ protected slots:
QScrollBar * m_leftRightScroll;
QScrollBar * m_topBottomScroll;

void adjustLeftRightScoll(int value);

TimePos m_currentPosition;

Action m_action;
Expand Down
2 changes: 1 addition & 1 deletion include/Editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Editor : public QMainWindow
DropToolBar * addDropToolBar(Qt::ToolBarArea whereToAdd, QString const & windowTitle);
DropToolBar * addDropToolBar(QWidget * parent, Qt::ToolBarArea whereToAdd, QString const & windowTitle);

void closeEvent( QCloseEvent * _ce ) override;
void closeEvent(QCloseEvent * event) override;
protected slots:
virtual void play() {}
virtual void record() {}
Expand Down
3 changes: 2 additions & 1 deletion include/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class MainWindow : public QMainWindow
LMMS_EXPORT SubWindow* addWindowedWidget(QWidget *w, Qt::WindowFlags windowFlags = QFlag(0));


void refocus();

///
/// \brief Asks whether changes made to the project are to be saved.
///
Expand Down Expand Up @@ -195,7 +197,6 @@ private slots:
void finalize();

void toggleWindow( QWidget *window, bool forceShow = false );
void refocus();

void exportProject(bool multiExport = false);
void handleSaveResult(QString const & filename, bool songSavedSuccessfully);
Expand Down
37 changes: 17 additions & 20 deletions include/MixerChannelView.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MixerChannelView.h - the mixer channel view
* MixerChannelView.h
*
* Copyright (c) 2022 saker <[email protected]>
* Copyright (c) 2024 saker
*
* This file is part of LMMS - https://lmms.io
*
Expand All @@ -22,8 +22,8 @@
*
*/

#ifndef MIXER_CHANNEL_VIEW_H
#define MIXER_CHANNEL_VIEW_H
#ifndef LMMS_GUI_MIXER_CHANNEL_VIEW_H
#define LMMS_GUI_MIXER_CHANNEL_VIEW_H

#include <QGraphicsView>
#include <QLabel>
Expand All @@ -46,8 +46,6 @@ class MixerChannel;
namespace lmms::gui {
class PeakIndicator;

constexpr int MIXER_CHANNEL_INNER_BORDER_SIZE = 3;
constexpr int MIXER_CHANNEL_OUTER_BORDER_SIZE = 1;

class MixerChannelView : public QWidget
{
Expand All @@ -65,25 +63,24 @@ class MixerChannelView : public QWidget
void mouseDoubleClickEvent(QMouseEvent*) override;
bool eventFilter(QObject* dist, QEvent* event) override;

int channelIndex() const;
void reset();
int channelIndex() const { return m_channelIndex; }
void setChannelIndex(int index);

QBrush backgroundActive() const;
void setBackgroundActive(const QBrush& c);

QColor strokeOuterActive() const;
void setStrokeOuterActive(const QColor& c);
QBrush backgroundActive() const { return m_backgroundActive; }
void setBackgroundActive(const QBrush& c) { m_backgroundActive = c; }

QColor strokeOuterInactive() const;
void setStrokeOuterInactive(const QColor& c);
QColor strokeOuterActive() const { return m_strokeOuterActive; }
void setStrokeOuterActive(const QColor& c) { m_strokeOuterActive = c; }

QColor strokeInnerActive() const;
void setStrokeInnerActive(const QColor& c);
QColor strokeOuterInactive() const { return m_strokeOuterInactive; }
void setStrokeOuterInactive(const QColor& c) { m_strokeOuterInactive = c; }

QColor strokeInnerInactive() const;
void setStrokeInnerInactive(const QColor& c);
QColor strokeInnerActive() const { return m_strokeInnerActive; }
void setStrokeInnerActive(const QColor& c) { m_strokeInnerActive = c; }

void reset();
QColor strokeInnerInactive() const { return m_strokeInnerInactive; }
void setStrokeInnerInactive(const QColor& c) { m_strokeInnerInactive = c; }

public slots:
void renameChannel();
Expand Down Expand Up @@ -135,4 +132,4 @@ private slots:
};
} // namespace lmms::gui

#endif // MIXER_CHANNEL_VIEW_H
#endif // LMMS_GUI_MIXER_CHANNEL_VIEW_H
3 changes: 1 addition & 2 deletions include/PeakController.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ public slots:
static int m_loadCount;
static bool m_buggedFile;

float m_attackCoeff;
float m_decayCoeff;
float m_coeff;
bool m_coeffNeedsUpdate;
} ;

Expand Down
2 changes: 2 additions & 0 deletions include/PianoRoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ protected slots:
QScrollBar * m_leftRightScroll;
QScrollBar * m_topBottomScroll;

void adjustLeftRightScoll(int value);

TimePos m_currentPosition;
bool m_recording;
bool m_doAutoQuantization{false};
Expand Down
1 change: 1 addition & 0 deletions include/PixmapButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class LMMS_EXPORT PixmapButton : public AutomatableButton
void setInactiveGraphic( const QPixmap & _pm, bool _update = true );

QSize sizeHint() const override;
QSize minimumSizeHint() const override;

signals:
void doubleClicked();
Expand Down
6 changes: 1 addition & 5 deletions include/PluginView.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ class LMMS_EXPORT PluginView : public QWidget, public ModelView
{
}

void setResizable(bool resizable) { m_isResizable = resizable; }
bool isResizable() { return m_isResizable; }

private:
bool m_isResizable = false;
virtual bool isResizable() const { return false; }
};

} // namespace lmms::gui
Expand Down
4 changes: 2 additions & 2 deletions include/RemotePluginBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,15 +398,15 @@ class LMMS_EXPORT RemotePluginBase
message & addInt( int _i )
{
char buf[32];
sprintf( buf, "%d", _i );
std::snprintf(buf, 32, "%d", _i);
data.emplace_back( buf );
return *this;
}

message & addFloat( float _f )
{
char buf[32];
sprintf( buf, "%f", _f );
std::snprintf(buf, 32, "%f", _f);
data.emplace_back( buf );
return *this;
}
Expand Down
2 changes: 1 addition & 1 deletion include/RemotePluginClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ bool RemotePluginClient::processMessage( const message & _m )
default:
{
char buf[64];
sprintf( buf, "undefined message: %d\n", (int) _m.id );
std::snprintf(buf, 64, "undefined message: %d\n", _m.id);
debugMessage( buf );
break;
}
Expand Down
2 changes: 2 additions & 0 deletions include/SongEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ private slots:

QScrollBar * m_leftRightScroll;

void adjustLeftRightScoll(int value);

LcdSpinBox * m_tempoSpinBox;

TimeLineWidget * m_timeLine;
Expand Down
2 changes: 2 additions & 0 deletions include/SubWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ class LMMS_EXPORT SubWindow : public QMdiSubWindow
void paintEvent( QPaintEvent * pe ) override;
void changeEvent( QEvent * event ) override;

QPushButton* addTitleButton(const std::string& iconName, const QString& toolTip);

signals:
void focusLost();

Expand Down
Loading

0 comments on commit b9bd512

Please sign in to comment.