mirror of
https://github.com/LMMS/lmms.git
synced 2025-12-23 22:58:33 -05:00
69f7c3243dbcb6c61dc17e7ef9fd0700b2101ff1
10 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
69f7c3243d |
Fix knob linking / refactor linking (#7883)
Closes #7869 This PR aims to fix linking bugs and it aims to make linking code faster. In the future I would like to replace controller and automation code with linked models, so it is essential for this feature to work as efficiently as possible. Before this PR: - AutomatableModels store a list of AutomatableModels that they are linked to. - setValue() and other functions make recursive calls to themself resulting in the #7869 crash. - Each AutomatableModel can unlink from other AutomatableModels, unlinking is the inverse operation to linking. After this PR: - AutomatableModels store a pointer to an other AutomatableModel making a linked list. The end is connected to the first element resulting in a "ring". - setValue() and others are now recursion free, the code runs for every linked model, more efficiently than before. - Each AutomatableModel can NOT unlink form other AutomatableModels, unlinking is NOT the inverse operation to linking. AutomatableModels can unlink themself from the linked list, they can not unlink themself from single models. --------- Co-authored-by: allejok96 <allejok96@gmail.com> |
||
|
|
51529cefb1 |
Add Qt6 Support (#7339)
* Rebase against master Co-authored-by: michaelgregorius <michael.gregorius.git@arcor.de> Co-authored-by: Rossmaxx <74815851+Rossmaxx@users.noreply.github.com> * Fix Qt6 DMG on Apple (#7240) - Fix linking issues with Qt Framework files - Fix qmake detection * Fixes after rebase * Fix embed.cpp compilation Fix implicit conversion from int when using QString.arg(...) * Fix Qt6 signature change for nativeEventFilter (#7254) * Adds win32EventFilter a wrapper for nativeEventFilter on Windows * win32EventFilter is currently used to intercept top-level Window events (currently, to avoid VSTs setting transparency of the parent application) * fix broken signal slot connections (#7274) QComboBox activated() replaced with textActivated() since Qt 5.14 * Enabled VSTs on Qt 6 (#7273) * enabled VST support for Qt 6 builds * Note : Embedding on QT6 will be buggy on linux as a result of using qt embedding, which unfortunately is a qt bug which hasn't been resolved. * Changed bar lines to follow snap size (#7034) * Added lines in between bars * Changed bar lines to follow snap size * Changed default zoom and quantization value * Added constants for line widths * Added QSS configuration for new grid line colors * Tied line widths to QSS properties * Changed default quantization to 1/4 * Removed clear() from destructor model * Removed destructor in ComboBoxModel.h * Changed member set/get functions to pass by value * Updated signal connection with newer syntax * Fix compilation * Fix MSVC builds * fix nullptr deref in AudioFileProcessor (qt6 branch) (#7532) * ensured mouse event != nullptr before deref * separation of concerns: AFP WaveView updateCursor extract check to pointerCloseToStartEndOrLoop() * marked some function parameters as const * Remove Core5Compat usage * Fix bad merge * Fixes after rebase * Simplify QTX_WRAP_CPP call * Remove comments that are obvious to a developer * Whitespace * Try using Qt 6 for MSVC CI I chose Qt 6.5 because it's the last Qt LTS release with declared support for Visual Studio 2019. Once we upgrade to Visual Studio 2022, we could upgrade Qt as well. * Fix MSVC build Also fixes two memory leaks in MidiWinMM * Fix GuiApplication on MSVC * Fix interpolateInRgb * Try building with patched Calf * Fix submodule * Fix OpulenZ build * Try to fix zyn * Fix comment * Ty to fix zyn (again) * Ty to fix RemotePluginBase * Revert "Ty to fix RemotePluginBase" This reverts commit 92dac44ffb11e19d1d5a21d9155369f017bd59e9. * Update plugins/ZynAddSubFx/CMakeLists.txt Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com> * Fix vertical & horizontal scroll wheel in SongEditor * AppImage: Fix finding of Qt6 libs * Fix implicit QString --> QFileInfo conversion * Point submodule to lmms * Fix multiple deprecation warnings * Fix for Clang compiler * Build with latest Qt LTS version now that we use MSVC 2022 * Update jurplel/install-qt-action to v4.3.0 * Bump minimum Qt6 version for MSVC * Fix incorrect Qt version checks Some comparisons were using ">" rather than ">=" * `QSize()` != `QSize(0, 0)` * Fix more deprecation warnings * Fix style * Simplify Spectrum Analyzer mouse events The Qt bug that used to be present appears to have been fixed, so the workaround can be removed * Minor changes * Fix deprecated QCheckBox signal * Fix setContent helper functions * Remove QMultiMap usage from ControlLayout * Remove SIGNAL and SLOT macros * Revert TrackView.cpp changes * Remove Q_DISABLE_MOVE usage since it does not seem to be available in Qt6 --------- Co-authored-by: michaelgregorius <michael.gregorius.git@arcor.de> Co-authored-by: Rossmaxx <74815851+Rossmaxx@users.noreply.github.com> Co-authored-by: BoredGuy1 <66702733+BoredGuy1@users.noreply.github.com> Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com> Co-authored-by: Lisa Magdalena Riedler <git@riedler.wien> Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com> |
||
|
|
a505f570e9 |
Fix TextFloat flickering (#7942)
Fixes TextFloat flickering which occurs when scrolling on knobs, faders, and note volume in the piano roll. --------- Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com> |
||
|
|
3c3441bb0c |
Faders with a dB scale (instead of linear/percentage) (#7636)
* Use dbFS scale for the faders
Make the faders use a linear dbFS scale. They now also change position on first click and can then be dragged.
The `Fader` class now has a new property called `m_faderMinDb`. It's the minimum value before the amplification drops down fully to 0. It is needed because we cannot represent a scale from -inf to maxDB.
Rename `knobPosY` to `calculateKnobPosYFromModel` and move the implementation into the cpp file. The method now first converts the model's current amplification value to dbFS and then computes a ratio based on that values and the minimum and maximum dbFS values.
Add the method `setVolumeByLocalPixelValue` which takes a local y coordinate of the widget and sets the amplification of the model based on a dbFS scale.
Adjust `mousePressEvent` and `mouseMoveEvent` so that they mostly take the local y coordinate of the event and use that to adjust the model via `setVolumeByLocalPixelValue`.
Remove `m_moveStartPoint` and `m_startValue` and they are not needed anymore.
* Apply curve to faders
Apply a curve, i.e. the cube function and its inverse, to the fader
positions to that we have more space to work with in the "interesting"
areas around 0 dB and less space in the area where we tend to "-inf dB".
Set the minimum dB value of the fader to -120 dB to increase the potential
headroom.
* Support for dB models
Add support for models that are in dB.
There's a new member `m_modelIsLinear` which can be set via the
constructor. The default value in the constructor is `true`.
Add the method `modelIsLinear` which can be used to query the parameter.
It is used in `calculateKnobPosYFromModel` and
`setVolumeByLocalPixelValue`. Both methods got extended to deal with
models in dB. They were also refactored to extract code that is common
for both cases.
Ensure that the constructor of `Fader` is called with `false` for
`CrossoverEQControlDialog` and `EqFader` because these use models that
are in dB.
* Show current dB value of fader in tool tip
Show the current value of the fader in its tool tip. Please note that
this value is always shown in dB because the goal should be to get rid
of the linear values for the faders.
Some of the code is extracted into the new method
`Fader::getModelValueAsDbString` which is shared by
`Fader::modelValueChanged` (also new) and `Fader::updateTextFloat`.
Please note that `getModelValueAsDbString` will use "dB" instead of
"dBFS" as the unit and that it will format "-inf dB" instead of "-∞ dB".
These changes will also be visible in the text float that is used to
show the new values as the fader is being dragged.
* Let users enter values in dB
Let users enter values in dB in the dialog that opens with a double
click.
The minimum value that can be entered is the minimum value that the
fader allows to set, i.e. -120 dB. The maximum value is the maximum
value of the model converted to dB. As of now this is ~6 dB. The
current value is converted to dB. If it corresponds to "-inf dB", i.e.
if the amplification is 0 then the minimum value is used.
* Remove option "Display volume as dBFS"
Remove the option "Display volume as dBFS" from the settings dialog and
the check box option "Volume as dBFS" from the "View" menu. Volumes are
now always treated as dB, i.e. all evaluations of the property
"displaydbfs" have been removed which results in assuming that this
option is always true.
The upgrade code in `ConfigManager::upgrade_1_1_91` was left as is.
However, a note was added which informs the reader that the value of
"displaydbfs" is not evaluated anymore.
* Extend Fader::wheelEvent
Extend `Fader::wheelEvent` for the case where the model is not a dB
model (`modelIsLinear() == true`), e.g. for the mixer faders. In that
case it works as follows. Each step increments or decrements by 1 dB if
no modifier is pressed. With "Shift" pressed the increment value is 3 dB.
With "STRG" ("CTRL") pressed the increment value is reduced to 0.1 dB. If
the value goes below the minimum positive dB value that is allowed by the
fader then the fader is set to "-inf dB", i.e. zero amplification. If the
fader is set to "-inf dB" and the users want to increase the value then
it is first set to the minimum positive value that is allowed by the
fader.
If the model is a dB model then the same behavior as before is used.
Although it should be considered to adjust this case as well. These
models are used by the faders of the Crossover Equalizer, Equalizer,
Compressor and Delay and they are not very usable with the mouse wheel.
* Adjust the wheel behavior for faders with dB models
Make the faders of the Crossover Equalizer, Equalizer, Compressor and
Delay behave like the mixer faders, i.e. step in sizes of 3 dB, 1dB and
0.1 dB depending on whether a modifier key is pressed or not.
Extract some common code to do so and add some `const` keywords.
* Less "jumpy" knobs
Implement a more stable knob behavior.
Remove the jumping behavior if the users directly click on a volume
knob. By storing the offset from the knob center and taking it into
account during the changes it now also feels like the users are
dragging the knob.
Changes to the amplification are now only applied when the mouse is
moved. This makes the double click behavior much more stable, i.e. if
users click on the knob when it is at 0 dB the dialog will also show
0 dB and not something like 0.3 dB because the first click is already
registered as a change of volume.
If the users click next to the knob the amplification will still be
changed immediately to that value.
## Technical details
To make the knobs more stable a variable called `m_knobCenterOffset` was
introduced. It stores the offset of the click from the knob center so
that this value can be taken into account for in the method
`setVolumeByLocalPixelValue`.
* Make MSVC happy
Add an indication that a float value is assigned to a float variable.
* Introduce constexpr for scaling exponent
Introduce the `constexpr c_dBScalingExponent` which describes the
scaling exponent that's used to scale the dB scale in both directions.
This will simplify potential adjustments by keeping the values
consistent everywhere.
* Draw fader ticks
Draw fader ticks in case the model is a linear one. This means that for
now they should only be painted for the mixer faders but not for the
faders of the Compressor, Delay, etc.
Extract the computation of the scaled ratio between the maximum model dB
value and the minimum supported fader dB value into the new private
method `computeScaledRatio`. This is necessary because it is needed to
paint the fader knob at the correct position (using the knob bottom as
the reference) and to paint the fader ticks at the correct position
(using the knob center).
Introduce the private method `paintFaderTicks` which paints the fader
ticks.
Note: to paint some non-evenly spaced fader ticks replace the `for`
expression in `paintFaderTicks` with something like the following:
```
for (auto & i : {6.f, 0.f, -6.f, -12.f, -24.f, -36.f, -48.f, -60.f, -72.f, -84.f, -96.f, -108.f, -120.f})
```
* Fader adjustments via keyboard
Allow the adjustment of the faders via the keyboard. Using the up or
plus key will increment the fader value whereas the down or minus key
will decrement it. The same key modifiers as for the wheel event apply:
* No modifier: adjust by 1 dB
* Shift: adjust by 3 dB
* Control: adjust by 0.1 dB
Due to the very similar behavior of the mouse wheel and key press
handling some common functionality was factored out:
* Determinination of the (absolute) adjustment delta value by
insprecting the modifier keys of an event. Factored into
`determineAdjustmentDelta`.
* Adjustment of the model by a given dB delta value. Factored into
`adjustModelByDBDelta`.
* Move the fader of the selected channel
Move the fader of the selected channel instead of the fader that has
focus when the up/plus or down/minus keys are pressed. Doing so also
feels more natural because users can already change the selected
channel via the left and right keys and now they can immediately adjust
the volume of the currently selected channel while doing so.
Key events are now handled in `MixerView::keyPressEvent` instead of
`Fader::keyPressEvent` and the latter is removed. `MixerChannelView`
now has a method called `fader` which provides the associated fader.
This is needed so that the event handler of `MixerView` can act upon
the currently selected fader.
## Changes in Fader
The `Fader` class provides two new public methods.
The `adjust` method takes the modifier key(s) and the adjustment
direction and then decides internally how the modifier keys are mapped
to increment values. This is done to keep the mapping between modifier
keys and increment values consistent across different clients, e.g. the
key event of the `MixerView` and the wheel event of the `Fader` itself.
The direction is provided by the client because the means to determine
the direction can differ between clients and cases, e.g. a wheel event
determines the direction differently than a key event does.
The method `adjustByDecibelDelta` simply adjusts the fader by the given
delta amount. It currently is not really used in a public way but it
still makes sense to provide this functionality in case a parent class
or client wants to manipulate the faders by its very own logic.
Because the `Fader` class does not react itself to key press events
anymore the call to `setFocusPolicy` is removed again.
* Enter fader value when space key pressed
Let the users enter the fader value via dialog when the space key is
pressed.
Extract the dialog logic into the new method `adjustByDialog` and call
it from `MixerView::keyPressEvent`.
Make `Fader::mouseDoubleClickEvent` delegate to `adjustByDialog` and
also fix the behavior by accepting the event.
* More prominent fader ticks around 0 dB
Make the fader ticks around 0 dB more prominent but drawing them
slightly wider and with a more opaque color.
* Work around a Qt bug
Work around a Qt bug in conjunction with the scroll wheel and the Alt
key. Simply return 0 for the fader delta as soon as Alt is pressed.
* Fix wheel events without any modifier
Fix the handling of wheel events without any modifier key being pressed.
Commit
|
||
|
|
cf4b492292 |
Fix logarithmic behavior when dragging knobs and sliders (#7647)
* Initial fix * Remove stray m_leftOver reference * Fix shift-dragging * Revert to relative mouse control. I realize now that the maths don't actually change. * Change qRound to std::round * Fix scrolling behavior * Fix mouse relative position buildup at values < minValue * Use approximatelyEqual |
||
|
|
30216aac51 |
macOS: Change drag copy shortcut from Command to Option (#7325)
macOS: Replace Command + Drag shortcut key with Option + Drag Add new header `KeyboardShortcuts.h` for platform-specific keyboard mappings --------- Co-authored-by: Michael Gregorius <michael.gregorius.git@arcor.de> |
||
|
|
9aa937d391 |
Use templates for common geometric constants (#7558)
* add templates for common geometric constants * oops missed one * LD_2PI -> LD_PI i re-added the wrong constant ffs * CamelCase names and also verify compilation without -DLMMS_MINIMAL * C++20 stuff Updated to account for `<numbers>` and C++20: - Marked all `lmms_constants.h` constants with an exact equivalent in `<numbers>` as deprecated - Removed all `lmms_constants.h` constants where no variant is currently in use - Using `inline constexpr` - Using `std::floating_point` concept instead of `typename` * add lmms::numbers namespace * Remove panning_constants.h Moves the four constants in panning_constants.h into panning.h, then removes panning.h. * Use std::exp(n) instead of powf(numbers::e, n) * Use C++ std math functions Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com> * Use overloaded std math functions An attempt to fix compiler warnings on some platforms * Remove uses of __USE_XOPEN And also update two functions I missed from the previous commit * Missed a few * Fix ANOTHER std math function use Of course there's another one --------- Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com> |
||
|
|
32fe3e50e7 |
Add "natural" scrolling support for trackpads (#5510)
Adds QWheelEvent::inverted() support to spinboxes, knobs, sliders |
||
|
|
922eb7f2ba |
Fix NaNs for some dbFS value displays (-∞ dbFS) (#7142)
Fix some NaNs in the context of the display of dbFS values when "View > Volume as dbFS" is checked. They occur during the display of the current value when a mixer fader or the volume knob of an instrument is pulled down completely. The fix is to detect these cases and to display "-∞ dbFS". Also fix a problem with the editor where dbFS values can be entered for volume knobs. When the knob is turned completely to the left and the amplification is 0 then the initially displayed value is set to -96 dBFS, i.e. the lower limit that is shown in the dialog. This is done because the dialog likely cannot handle displaying or entering "-∞". |
||
|
|
c6ed4a274a |
First version of a new dynamic LADSPA control dialog (#2068)
Introduce a new version of the LADSPA control dialog which uses "bar controllers" and arranges them in a grid layout. Long parameter names are elided long if needed. The new dialog is implemented in the class `LadspaMatrixControlDialog`.
Note: it is still possible to reactivate the old dialog as it has not been removed yet. You can do so in `plugins/LadspaEffect/LadspaControls.h` by replacing the implementation of `createView()` with the following:
```
gui::EffectControlDialog* createView() override
{
return new gui::LadspaControlDialog( this );
}
```
Introduce the new base class `FloatModelEditorBase`. It serves as the base widget for widgets that manipulate a float model and provides some base functionalities like context menus, edit dialogs, mouse handling, etc. Currently `BarModelEditor` and `Knob` inherit from `FloatModelEditorBase`. Therefore lots of code was moved from `Knob` to `FloatModelEditorBase`.
`BarModelEditor` supports style sheets. See the changes in style.css for the available options and their usage.
Extend `LedCheckBox` so that it adds support to render the text with the default font in the default size. The class now supports two modes:
* Legacy mode
* Non-legacy mode
Legacy mode is the default and renders the LedCheckBox as before. The font is set to 7 pixels and all the text is rendered with a shadow.
Non-legacy mode uses the current font to render the text. The text is rendered without a shadow and the pixmap is centered vertically to the left side of the text. Non-legacy mode is currently only used in the context of the matrix LADSPA dialog. Toggle options are rendered using it as well as the "Link Channels" button.
Add `TempoSyncBarModelEditor` which adds a tempo sync option to a `BarModelEditor`. Please note that the code was mostly copied and adjusted from the `TempoSyncKnob` class. It was not attempted yet to unify some of the code because with the current design it seems to be a road to "inheritance hell". A better solution might be to refactor the code so that it becomes more composable.
What follows are the individual commit messages of the 64 commits that have been squashed into a single merge commit.
* First version of a new dynamic LADSPA control dialog
The new dialog shows the LADSPA controls in a matrix layout. Each row
corresponds to a LADSPA parameter. Each parameter can have several
channels which can be linked. Each channel has its own row of controls.
The class LadspaMatrixControlView was added by copying and modifying
LadspaControlView to get rid of the link buttons which are associated
with some controls and some labels.
* Remove trailing whitespaces
* Merge fix
* Use the new connect syntax
* Remove empty destructors
* Use override keyword
* Reformat a bit
* Use nullptr
* Use range-based loops
* Add BarModelEditor and improve layouts
Add the new class `BarModelEditor` which is intended to become a new way
to adjust values of float models.
Simplify the layout in `LadspaMatrixControlDialog` by removing some
nested layouts. Remove the "Parameters" column.
Adjust `LadspaMatrixControlView` to implement the following changes:
* Show the name of the control next to toggle buttons (`LedCheckBox`).
* Use the new `BarModelEditor` for integer and float types.
* SHow the name of the control next to time based parameters that use
`TempoSyncKnob`.
The names are shown so that the "Parameters" column can be removed.
Technical details
------------------
The class `LadspaMatrixControlDialog` now creates a widget that contains
the matrix layout with the controls. This widget is then added to a
scroll area. The layout is populated in the new method
`arrangeControls`.
Add some helper methods to `LadspaMatrixControlDialog` which retrieve
the `LadspaControls` instance and the number of channels.
Add the implementation of `BarModelEditor` to `src/gui/CMakeLists.txt`.
TODOs
------
Extract common code out of the `Knob` class so that it can be reused by
`BarModelEditor`.
* Use factory to create LADSPA control widgets
Replace the class `LadspaMatrixControlView` with the factory class
`LadspaWidgetFactory`. The former was a widget that wrapped the widget
representation of a LADSPA control in yet another widget with a layout.
The factory simply returns the configured widget so that it can be
incorporated directly in layouts or other widgets.
Adjust `LadspaMatrixControlDialog` so that it uses the
`LadspaWidgetFactory` instead of the `LadspaMatrixControlView`.
* Initial version of FloatModelEditorBase
Create an initial version of `FloatModelEditorBase`. It is intended to
become the base widget for all widgets that manipulate a float model and
provides some base functionalities like context menus, edit dialogs,
mouse handling, etc.
The initial version is a copy of `Knob`. The enum and its values have
been suffixed with "Temp" as they will be removed later anyway. Same
applies for the function `convertPixmapToGrayScaleTemp`.
* Remove Knob related code from FloatModelEditorBase
First removal of Knob related code from FloatModelEditorBase.
* Remove setHtmlLabel
* Remove enum for knob types
* Remove label related code
Remove setLabel and the members m_label and m_isHtmlLabel.
* Remove several Qt properties
* Remove angle related members and methods
* Remove unused members and includes
* Clean up includes
* Make BarModelEditor inherit from FloatModelEditorBase
Make `BarModelEditor` inherit from `FloatModelEditorBase` so that it
inherits all shared functionality. Currently the class mostly implements
size related methods and overrides the paint method.
* Move LadspaWidgetFactory to LadspaEffect
Move the class `LadspaWidgetFactory` to the project LadspaEffect to make
it hopefully compile with mingw32 and mingw64.
Interestingly the code compiled and worked under Linux and MacOS.
* Code adjustments after scripted checks
Add an include guard and an additional `#pragme once`. Add comments to
closing namespace scopes.
* Export BarModelEditor
Export BarModelEditor so that for example the LadspaEffect project/
plugin can use it.
* Improve rendering of bar model editor
Increase the margin from 2 to 3 so that we have a more prominent border
around the filled area.
Fix a problem in the rendering code which led to situations where the
bar was drawn to the left of the start position for small values.
Return a more exact minimum size hint.
* Elide long parameter names
Elide long parameter names if needed.
* Enable horizontal direction of manipulation
Extend `FloatModelEditorBase` so that it also allows manipulation of the
values when the mouse is moved in horizontal directions. The default is
to use the vertical direction.
Make use of this new feature in `BarModelEditor` which now reacts to
horizontal movements when changing values.
* Represent enum parameters using the bar widget
The implementation of the current LADSPA dialog in master uses knobs to
represent enum parameters. Therefore it should also work with the new
bar widget.
This gets rid of many labels with the parameter name followed by
"(unsupported)".
* Remove TODO in LadspaWidgetFactory
* Render text of LedCheckBox with default font
Extend LedCheckBox so that it adds support to render the text with the
default font in the default size. The class now supports two modes:
* Legacy mode
* Non-legacy mode
Legacy mode is the default and renders the LedCheckBox as before. The
font is set to 7 pixels and all the text is rendered with a shadow.
Non-legacy mode uses the current font to render the text. The text is
rendered without a shadow and the pixmap is centered vertically to the
left side of the text.
The non-legacy mode is currently only used in the context of the matrix
LADSPA dialog. Toggle options are rendered using it as well as the "Link
Channels" button.
* Use "yellow" LEDs for bool parameters
Use "yellow" LEDs (which are actually blue) for dynamically added bool
parameters so that the dialog is consistent with regards to the LED
colors. The "Link Channels" button also uses a "yellow" LED.
* Fix Qt5 builds
Fix the Qt5 builds which do not know horizontalAdvance as a member of
FontMetrics.
Also refactor LedCheckBox::onTextUpdated to make it more compact.
* Style sheets for BarModelEditor
Add style sheets options for BarModelEditor. See the changes in
style.css for the available options and their usage.
The members that can be manipulated by the style sheet options are
initialized accoriding to the palette so that the BarModelEditor should
also render something useful if no style is set.
Adjust the paintEvent method to use the style sheet brushes and colors.
* Layout optimizations
Set the vertical scroll bar to always show so that the controls do not
move around if the scroll bar is hidden or shown.
Set the margin of the grid layout to 0 so that the whole dialog becomes
tighter.
* Get rid of initial scroll bars
Make sure that the widget is shown without a scrollbar whenever possible
using the following rules.
If the widget fits on the workspace we use the height of the widget as
the minimum size of the scroll area. This will ensure that the scrollbar
is not shown initially (and never will be).
If the widget is larger than the workspace then we want it to mostly
cover the workspace. In that case the minimum height is set to 90 % of
the workspace.
* Switch to a green theme
Switch to a green theme to better match the default theme.
* Adjust classic theme
Adjust the classic theme so that it renders the bars in a legible way.
* Fixes for CodeFactor
Remove virtual keyword from methods that are marked as override.
Remove whitespaces that make CodeFactor unhappy. One of these fixes
includes moving the implementation of
LadspaMatrixControlDialog::isResizable into the cpp file.
* CodeFactor is still unhappy
Remove a blank line after the constructor.
* Center align time based controls
Align time based controls, i.e. knobs, in the center.
The implementation defeats the purpose of the widget factory a bit but
it makes the design look nicer.
* Fix build
Fix the build by adjusting the enums. I added the changes while writing
the commit message for the merge commit but they did not make it.
* Attempt at CodeFactor warning
Try to make the last CodeFactor warning disappear.
* Add bar controller with tempo sync option
Add `TempoSyncBarModelEditor` which adds a tempo sync option to a `BarModelEditor`. Please note that the code was mostly copied and adjusted from the `TempoSyncKnob` class. It was not attempted yet to unify some of the code because with the current design it seems to be a road to "inheritance hell". A better solution might be to refactor the code so that it is more composable.
Another option might be to move the tempo sync functionality into a class like `FloatModelEditorBase`. Although this would not be a 100% right place either because `TempoSyncKnobModel` inherits from `FloatModel`. In that case we'd have specialized code in a generic base class.
Adjust `LadspaWidgetFactory` so that it now returns an instance of a `TempoSyncBarModelEditor` instead of a `TempoSyncKnob`.
Remove the extra layout code from `LadspaMatrixControlDialog.cpp` as most things are bar editors now.
Adjust `TempoSyncKnobModel` so we do not have to make `TempoSyncBarModelEditor` a friend of it.
* Another attempt to please CodeFactor
Have another attempt to fix CodeFactor's complaints about `LadspaMatrixControlDialog.h`.
* Coding conventions, blanks and blank lines
Remove lots of unnecessary white space. Remove blank lines. Remove leading underscores from parameters.
Remove line breaks in `TempoSyncBarModelEditor.cpp` to make the code more readable. Remove repeated method calls by introducing local variables.
* Break down complex method
Break down the complex method `TempoSyncBarModelEditor::updateDescAndIcon` by delegating to the new methods `updateTextDescription` and `updateIcon`.
* Another attempt to please CodeFactor
Another attempt to fix `LadspaMatrixControlDialog.h` to please CodeFactor.
* Work on TODOs
The TODO "Assumes that all processors are equal..." has been turned into a comment when we start iterating over the channels. If the channels are not of the same structure this would likely also have been a problem in the old implementation.
The TODO "Use a factory..." has been removed as this is already done.
The include of `FloatModelEditorBase.h` in LadspaWidgetFactory has been removed.
* Modifier keys for mouse wheel adjustments
Integrate the changes of commit
|