46 Commits

Author SHA1 Message Date
Fawn
eb41051bc5 Make arrow "stepper" buttons themeable and use SVG assets (#8123)
* SVG-ify arrow buttons

These buttons are used in the instrument window, Vestige, and VST
effects. Separate versions of the arrow icons are used for the classic
theme.

* Fix some unrelated SVG formatting and metadata

* Revert accidental change to classic border radius

* Add some XML stuff back to appease Github

LMMS renders these SVGs just fine, but apparently the removal of the
XML declaration completely breaks Github's ability to render the image,
so I am adding these back for the sake of those who want to actually
look at the diff on the website lmao

* Attempt to fix Github SVG previews again (`xmlns`)

* Fix crossover eq band mute button icon size

You may ask, "what does this have to do with the arrow buttons?" and you
would be right to assume this is unrelated. However, I'm already
touching the relevant lines of the stylesheet so I may as well sneak it
in there.

* Add missing metadata to fader_knob.svg

And fix mixed indentation in headphones.svg

* Add missing `xmlns` to fader_knob.svg

GRADIENTS!!!!!!!!!!!!

* Fix classic theme arrow buttons

The originals were right angle chevrons

* Remove unused getters
2025-11-21 01:26:00 -05:00
Dalton Messmer
478f5345dd Bump minimum Qt version to 5.15 (#8129) 2025-11-11 12:57:14 -05:00
luzpaz
8c12e47b11 Fix several typos (#8090)
This cleans up typos in source comments and some user-facing strings.

Found via `codespell -q 3 -S "./plugins,./src/3rdparty,./data/locale,*.in,*.xpf" -L continous,currenty,globaly,inports,localy,nd,ot,sie,te,trough`
2025-10-20 22:20:01 -04:00
Rossmaxx
729593c022 Fix hardcoded fonts scaling issues (#7493)
* changed font sizes to better values

* rename gui_templates.h to FontHelper.h

* replace hardcoded values with constants

* make knob labels use small font

* code review from michael

* more consolidation

* Fix text problem in Vectorscope

Fix a problem with cutoff text in Vectorscope. During the constructor
call of `LedCheckBox` the method `LedCheckBox::onTextUpdated` is
triggered which sets a fixed size that fits the pixmap and the text.
After instantiating the two instances in `VecControlsDialog` the
constructor then set a minimum size which overrode the fixed size that
was previously set. This then led to text that was cutoff.

---------

Co-authored-by: Michael Gregorius <michael.gregorius.git@arcor.de>
2024-09-28 13:18:02 +05:30
Michael Gregorius
20fec28bef Font size adjustments (#7185)
Adjust and rename the function `pointSize` so that it sets the font size in pixels. Rename `pointSize` to `adjustedToPixelSize` because that's what it does now. It returns a font adjusted to a given pixel size. Rename `fontPointer` to `font` because it's not a pointer but a copy. Rename `fontSize` to simply `size`.

This works if the intended model is that users use global fractional scaling. In that case pixel sized fonts are also scaled so that they should stay legible for different screen sizes and pixel densities.

## Adjust plugins with regards to adjustedToPixelSize

Adjust the plugins with regards to the use of `adjustedToPixelSize`.

Remove the explicit setting of the font size of combo boxes in the following places to make the combo boxes consistent:
* `AudioFileProcessorView.cpp`
* `DualFilterControlDialog.cpp`
* `Monstro.cpp` (does not even seem to use text)
* `Mallets.cpp`

Remove calls to `adjustedToPixelSize` in the following places because they can deal with different font sizes:
* `LadspaBrowser.cpp`

Set an explicit point sized font size for the "Show GUI" button in `ZynAddSubFx.cpp`

Increase the font size of the buttons in the Vestige plugin and reduce code repetition by introducing a single variable for the font size.

I was not able to find out where the font in `VstEffectControlDialog.cpp` is shown. So it is left as is for now.

## Adjust the font sizes in the area of GUI editors and instruments.

Increase the font size to 10 pixels in the following places:
* Effect view: "Controls" button and the display of the effect name at the bottom
* Automation editor: Min and max value display to the left of the editor
* InstrumentFunctionViews: Labels "Chord:", "Direction:" and "Mode:"
* InstrumentMidiIOView: Message display "Specify the velocity normalization base for MIDI-based instruments at 100% note velocity."
* InstrumentSoundShapingView: Message display "Envelopes, LFOs and filters are not supported by the current instrument."
* InstrumentTuningView: Message display "Enables the use of global transposition"

Increase the font size to 12 pixels in the mixer channel view, i.e. the display of the channel name.

Render messages in system font size in the following areas because there should be enough space for almost all sizes:
* Automation editor: Message display "Please open an automation clip by double-clicking on it!"
* Piano roll: Message display "Please open a clip by double-clicking on it!"

Use the application font for the line edit that can be used to change the instrument name.

Remove overrides which explicitly set the font size for LED check boxes in:
* EnvelopeAndLfoView: Labels "FREQ x 100" and "MODULATE ENV AMOUNT"

Remove overrides which explicitly set the font size for combo boxes in:
* InstrumentSoundShapingView: Filter combo box

## Adjust font sizes in widgets

Adjust the font sizes in the area of the custom GUI widgets.

Increase and unify the pixel font size to 10 pixels in the following classes:
* `ComboBox`
* `GroupBox`
* `Knob`
* `LcdFloatSpinBox`
* `LcdWidget`
* `LedCheckBox`
* `Oscilloscope`: Display of "Click to enable"
* `TabWidget`

Shorten the text in `EnvelopeAndLfoView` from "MODULATE ENV AMOUNT" to "MOD ENV AMOUNT" to make it fit with the new font size of `LedCheckBox`.

Remove the setting of the font size in pixels from `MeterDialog` because it's displayed in a layout and can accommodate all font sizes. Note: the dialog can be triggered from a LADSPA plugin with tempo sync, e.g. "Allpass delay line". Right click on the time parameter and select "Tempo Sync > Custom..." from the context menu.

Remove the setting of the font size in `TabBar` as none of the added `TabButton` instances displays text in the first place.

Remove the setting of the font size in `TabWidget::addTab` because the font size is already set in the constructor. It would be an unexpected size effect of setting a tab anyway. Remove a duplicate call to setting the font size in `TabWidget::paintEvent`.

Remove unnecessary includes of `gui_templates.h` wherever this is possible now.

## Direct use of setPixelSize

Directly use `setPixelSize` when drawing the "Note Velocity" and "Note Panning" strings as they will likely never be drawn using point sizes.
2024-04-04 21:40:31 +02:00
Rossmaxx
286d15724a Refactor gui_templates.h (#7159)
* remove the gui_templates header where functions not used

* refactor and replace template with function argument

* refactor: merge pointSizeF function with pointSize

* removed template per michael's review

* use std::max for more readability

* remove the QDesktopWidget header

* cleanup arguments and remove parentheses from return
2024-03-27 08:59:27 -04:00
Dominic Clark
f10277715f Classier enums (#6760) 2023-08-24 19:16:02 +01:00
saker
0b27497be2 clang-tidy: Apply modernize-use-auto everywhere (#6480)
Note: clang-tidy was run with `--format-style=file`.
2022-09-14 19:27:53 +02:00
Levin Oehlmann
7227c89847 Namespace lmms (#6174)
This PR places all LMMS symbols into namespaces to eliminate any potential future name collisions between LMMS and third-party modules.

Also, this PR changes back `LmmsCore` to `Engine`, reverting c519921306 .

Co-authored-by: allejok96 <allejok96@gmail.com>
2022-06-19 20:08:46 +02:00
Alex
33b44ec9c7 Disable tooltips through event filter (#6192)
* Control tooltip visibility using an event filter

...removing the need for a ToolTip helper class

* Remove whitespace
2022-04-15 14:04:52 +02:00
Johannes Lorenz
7db3fa94a1 Improve includes (#6320)
* Update ringbuffer submodule to fix includes

* Remove cyclic includes

* Remove Qt include prefixes

* Include C++ versions of C headers

E.g.: assert.h -> cassert

* Move CLIP_BORDER_WIDTH into ClipView

This allows to remove includes to TrackView.h in ClipView cpp files.

* Elliminate useless includes

This improves the include structure by elliminating includes that are
not used. Most of this was done by using `include-what-you-use` with
`CMAKE_C_INCLUDE_WHAT_YOU_USE` and `CMAKE_CXX_INCLUDE_WHAT_YOU_USE`
set to (broken down here):

```
include-what-you-use;
    -Xiwyu;--mapping_file=/usr/share/include-what-you-use/qt5_11.imp;
    -Xiwyu;--keep=*/xmmintrin.h;
    -Xiwyu;--keep=*/lmmsconfig.h;
    -Xiwyu;--keep=*/weak_libjack.h;
    -Xiwyu;--keep=*/sys/*;
    -Xiwyu;--keep=*/debug.h;
    -Xiwyu;--keep=*/SDL/*;
    -Xiwyu;--keep=*/alsa/*;
    -Xiwyu;--keep=*/FL/x.h;
    -Xiwyu;--keep=*/MidiApple.h;
    -Xiwyu;--keep=*/MidiWinMM.h;
    -Xiwyu;--keep=*/AudioSoundIo.h
```

* Fixup: Remove empty #if-#ifdef pairs

* Remove LMMS_HAVE_STD(LIB|INT)_H
2022-03-02 13:30:43 +01:00
Levin Oehlmann
f742710758 Macro cleanup (#6095)
Summary:

* `NULL` -> `nullptr`
* `gui` -> Function `getGUI()`
* `pluginFactory` -> Function `getPluginFactory()`
* `assert` (redefinition) -> using `NDEBUG` instead, which standard `assert` respects.
* `powf` (C stdlib symbol clash) -> removed and all expansions replaced with calls to `std::pow`.
* `exp10` (nonstandard function symbol clash) -> removed and all expansions replaced with calls to `std::pow`.
* `PATH_DEV_DSP` -> File-scope QString of identical name and value.
* `VST_SNC_SHM_KEY_FILE` -> constexpr char* with identical name and value.
* `MM_ALLOC` and `MM_FREE` -> Functions with identical name and implementation.
* `INVAL`, `OUTVAL`, etc. for automation nodes -> Functions with identical names and implementations.
* BandLimitedWave.h: All integer constant macros replaced with constexpr ints of same name and value.
* `FAST_RAND_MAX` -> constexpr int of same name and value.
* `QSTR_TO_STDSTR` -> Function with identical name and equivalent implementation.
* `CCONST` -> constexpr function template with identical name and implementation.
* `F_OPEN_UTF8` -> Function with identical name and equivalent implementation.
* `LADSPA_PATH_SEPARATOR` -> constexpr char with identical name and value.
* `UI_CTRL_KEY` -> constexpr char* with identical name and value.
* `ALIGN_SIZE` -> Renamed to `LMMS_ALIGN_SIZE` and converted from a macro to a constexpr size_t.
* `JACK_MIDI_BUFFER_MAX` -> constexpr size_t with identical name and value.
* versioninfo.h: `PLATFORM`, `MACHINE` and `COMPILER_VERSION` -> prefixed with `LMMS_BUILDCONF_` and converted from macros to constexpr char* literals.
* Header guard _OSCILLOSCOPE -> renamed to OSCILLOSCOPE_H
* Header guard _TIME_DISPLAY_WIDGET -> renamed to TIME_DISPLAY_WIDGET_H
* C-style typecasts in DrumSynth.cpp have been replaced with `static_cast`.
* constexpr numerical constants are initialized with assignment notation instead of curly brace intializers.
* In portsmf, `Alg_seq::operator[]` will throw an exception instead of returning null if the operator index is out of range.

Additionally, in many places, global constants that were declared as `const T foo = bar;` were changed from const to constexpr, leaving them const and making them potentially evaluable at compile time.

Some macros that only appeared in single source files and were unused in those files have been removed entirely.
2021-09-30 18:01:27 +02:00
Lukas W
fefec9a8c6 Fix cleanup logic error 2018-06-17 14:03:01 +02:00
Lukas W
da1c78ce86 Remove Qt4 compatibility code 2018-06-17 12:47:12 +02:00
Lukas W
a87aa7e356 Merge branch 'stable-1.2'
# Conflicts:
#	src/gui/widgets/EffectView.cpp
2018-06-17 11:51:50 +02:00
Hussam al-Homsi
6d46bd473f Remove "What's This?" and update tooltips (#4128) 2018-06-06 01:50:11 +03:00
Hyunin Song
235e8eef6f Allow controlling VST effects without own GUI 2018-05-30 09:02:05 +09:00
Hyunin Song
55d3fbc908 Fix RemoteVstPlugin not exiting when effect removed 2018-05-30 09:02:05 +09:00
Lukas W
b808631975 VST: Add workaround for small effect window on project load 2018-05-30 09:02:05 +09:00
DomClark
ee18011dc7 Fix toggling UI for non-embedded VST effects 2018-05-30 09:02:05 +09:00
DomClark
55da698d7c Fix X11 embedding on Qt4 2018-05-30 09:02:05 +09:00
Lukas W
a2cb7e96ea Fix VST sub-window creation glitches in project loading
Fixes bugs where during project loading (observed with VST effects), empty
widgets and sub-windows would be left floating around. These were caused by
inconsistencies between the way VST UIs were created when loading a project
and when adding an effect in an existing project. In some situations, this
caused createUI to be called twice, leaving over multiple empty widgets.

This commit refactors some code in order to avoid creating unnecessary sub-
windows, which aren't needed with VST effects, but were still created,
usually being invisible. All sub-window related code was moved out of
VstPlugin into vestige.cpp, which is the only place where sub-window VSTs
are actually used. A new sub-class of VstPlugin, VstInstrumentPlugin, now
handles VST sub-windows and is used by vestigeInstrument.

"guivisible" attribute loading was moved out of VstPlugin as well and is
now done in VstEffectControls' and vestigeInstrument's loadSettings method
respectively. This causes some minor code duplication unfortunately.

Closes #4110
2018-05-30 09:02:05 +09:00
Hyunin Song
0a5d056bdb Merge branch 'stable-1.2'
# Conflicts:
        #       .travis/osx..install.sh
        #       .travis/osx..script.sh
        #       cmake/linux/package_linux.sh.in
        #       data/locale/en.ts
        #       src/core/CMakeLists.txt
        #       src/core/ProjectRenderer.cpp
        #       src/gui/FileBrowser.cpp
2018-03-07 23:54:28 +09:00
Dominic Clark
27007c258a Fix command line rendering with VSTs (#4093)
Fix command line rendering with VSTs
2018-01-26 10:48:46 -05:00
Hyunin Song
59cfcf41a7 Merge branch 'stable-1.2'
# Conflicts:
#	.travis/linux..before_install.sh
#	.travis/linux..install.sh
#	.travis/linux..script.sh
#	cmake/linux/package_linux.sh.in
#	include/AudioWeakJack.def
#	plugins/vst_base/CMakeLists.txt
#	plugins/zynaddsubfx/zynaddsubfx
2017-12-20 14:16:16 +09:00
Lukas W
7ae348eb10 Vst refactorings 2017-11-29 15:33:44 +01:00
Lukas W
ae488b89cd Fix VstEffect width issue 2017-11-29 14:44:53 +01:00
Lukas W
f9f4d0cb9c VstEmbed: Store embed method on plugin start
Avoids bugs when embed method is changed in setup dialog while VSTs are
running.
2017-11-10 08:12:20 +01:00
Lukas W
6839746344 VstEmbed: Allow selecting method at runtime 2017-11-06 11:17:10 +01:00
Lukas W
ffa1b63f05 Fix VST effects embedding 2017-09-22 12:06:19 +02:00
Javier Serrano Polo
7a9396d6ea Let Wine handle the window interface 2017-09-01 12:18:46 +02:00
Javier Serrano Polo
f87f3638e1 Use window instead of embedder application 2017-09-01 12:18:46 +02:00
Javier Serrano Polo
878dd94e8d Embed in a separate window 2017-09-01 12:08:48 +02:00
Hyunin Song
cc3822141e Merge branch 'stable-1.2' into master (@liushuyu) 2017-07-15 08:08:07 +09:00
Karmo Rosental
afdd5ac8cb Fix for misaligned controls icon in VeSTige plugin. 2017-06-25 00:47:32 +03:00
Karmo Rosental
7ea92305bf Show missing pixmaps in VST effects dialog. 2017-05-12 21:41:00 +03:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Lukas W
5f4cdac802 Merge branch 'master' into rename
Conflicts:
	src/core/Song.cpp
	src/gui/LfoControllerDialog.cpp
	src/tracks/InstrumentTrack.cpp
2014-11-26 11:45:55 +01:00
Lukas W
1bbf7455a4 Rename a lot… 2014-11-26 10:09:49 +01:00
Vesa
ed11ccbf50 Fix conflict 2014-11-25 21:29:00 +02:00
Vesa
33665a2848 Merge branch 'stable-1.1'
Conflicts:
	include/Effect.h
	include/Plugin.h
2014-11-25 21:23:57 +02:00
Daniel Winzen
5c0829399f Fix moc_file inclusion in cmake files
This should fix the Windows builds
2014-11-21 07:16:45 +01:00
Lukas W
8e8879f735 Merge stable-1.1
Conflicts:
	include/ConfigManager.h
	include/MidiTime.h
	include/string_pair_drag.h
	src/gui/string_pair_drag.cpp
	src/gui/widgets/rubberband.cpp
2014-11-10 19:26:59 +01:00
Umcaruje
6fb923cba2 Correct the program name and site in the descriptions. 2014-11-04 22:56:50 +01:00
Tobias Doerffel
4cee046909 Added initial Qt5 support
LMMS now properly builds and runs with Qt5. Various deprecated functions
had to be replaced like QString::toAscii()/fromAscii(). Also occurences
of FALSE/TRUE have been replaced with false/true.

LmmsStyle now derives from QProxyStyle and sets a style instance as base
style (Plastique for Qt4, Fusion for Qt5).

MOC files are not included anymore but added as regular source files.

What's missing is support for embedding VST plugins into a subwindow
inside LMMS on Linux/X11 due to missing QX11EmbedContainer class in Qt5.

Build instructions can be found in INSTALL.Qt5

Minimum version requirement for Qt4 has been raised to 4.6.0 for best
API compatibility between Qt4 and Qt5.
2014-08-14 17:34:49 +02:00
Tobias Doerffel
408c98f473 VstEffect: fixed some messages 2014-02-23 15:08:19 +01:00