move velocity settings to new toolbar in the velocity editor
Fixes being unable to drag velocity bars when set to high values like 127. Fixes https://todo.sr.ht/~alextee/zrythm-bug/1020.
This commit is contained in:
parent
ebf724d5e8
commit
714b8ce9b2
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
|
||||
// SPDX-FileCopyrightText: © 2019-2023 Alexandros Theodotou <alex@zrythm.org>
|
||||
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
|
||||
|
||||
/**
|
||||
|
@ -27,7 +27,6 @@ TYPEDEF_STRUCT_UNDERSCORED (QuantizeMbWidget);
|
|||
TYPEDEF_STRUCT_UNDERSCORED (QuantizeBoxWidget);
|
||||
TYPEDEF_STRUCT_UNDERSCORED (SnapGridWidget);
|
||||
TYPEDEF_STRUCT_UNDERSCORED (PlayheadScrollButtonsWidget);
|
||||
TYPEDEF_STRUCT_UNDERSCORED (VelocitySettingsWidget);
|
||||
TYPEDEF_STRUCT_UNDERSCORED (ZoomButtonsWidget);
|
||||
|
||||
/**
|
||||
|
@ -54,9 +53,6 @@ typedef struct _EditorToolbarWidget
|
|||
GtkToggleButton * ghost_notes_btn;
|
||||
GtkSeparator * sep_after_ghost_notes;
|
||||
|
||||
VelocitySettingsWidget * velocity_settings;
|
||||
GtkSeparator * sep_after_velocity_settings;
|
||||
|
||||
PlayheadScrollButtonsWidget * playhead_scroll;
|
||||
ZoomButtonsWidget * zoom_buttons;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: © 2018-2019, 2021-2022 Alexandros Theodotou <alex@zrythm.org>
|
||||
// SPDX-FileCopyrightText: © 2018-2019, 2021-2023 Alexandros Theodotou <alex@zrythm.org>
|
||||
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
|
||||
|
||||
/**
|
||||
|
@ -23,6 +23,7 @@ G_DECLARE_FINAL_TYPE (
|
|||
|
||||
typedef struct _ArrangerWidget ArrangerWidget;
|
||||
typedef struct _PianoRollKeysWidget PianoRollKeysWidget;
|
||||
TYPEDEF_STRUCT_UNDERSCORED (VelocitySettingsWidget);
|
||||
|
||||
/**
|
||||
* @addtogroup widgets
|
||||
|
@ -55,8 +56,9 @@ typedef struct _MidiEditorSpaceWidget
|
|||
ArrangerWidget * arranger;
|
||||
ArrangerWidget * modifier_arranger;
|
||||
|
||||
GtkBox * midi_vel_chooser_box;
|
||||
GtkComboBoxText * midi_modifier_chooser;
|
||||
VelocitySettingsWidget * velocity_settings;
|
||||
GtkBox * midi_vel_chooser_box;
|
||||
GtkComboBoxText * midi_modifier_chooser;
|
||||
|
||||
/** Vertical size goup for the keys and the
|
||||
* arranger. */
|
||||
|
|
|
@ -97,18 +97,6 @@
|
|||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VelocitySettingsWidget" id="velocity_settings">
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator" id="sep_after_velocity_settings">
|
||||
<style>
|
||||
<class name="spacer"/>
|
||||
</style>
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PlayheadScrollButtonsWidget" id="playhead_scroll">
|
||||
</object>
|
||||
|
|
|
@ -69,7 +69,24 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="ArrangerWidget" id="modifier_arranger">
|
||||
<object class="GtkBox" id="midi_modifier_toolbar_and_arranger_box">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="midi_modifier_toolbar">
|
||||
<style>
|
||||
<class name="toolbar"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="VelocitySettingsWidget" id="velocity_settings">
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="ArrangerWidget" id="modifier_arranger">
|
||||
<property name="vexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
|
||||
// SPDX-FileCopyrightText: © 2019-2023 Alexandros Theodotou <alex@zrythm.org>
|
||||
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
|
||||
|
||||
#include "actions/actions.h"
|
||||
|
@ -14,7 +14,6 @@
|
|||
#include "gui/widgets/playhead_scroll_buttons.h"
|
||||
#include "gui/widgets/quantize_box.h"
|
||||
#include "gui/widgets/snap_grid.h"
|
||||
#include "gui/widgets/velocity_settings.h"
|
||||
#include "gui/widgets/zoom_buttons.h"
|
||||
#include "plugins/plugin_manager.h"
|
||||
#include "project.h"
|
||||
|
@ -171,10 +170,6 @@ editor_toolbar_widget_refresh (EditorToolbarWidget * self)
|
|||
GTK_WIDGET (self->ghost_notes_btn), false);
|
||||
gtk_widget_set_visible (
|
||||
GTK_WIDGET (self->sep_after_ghost_notes), false);
|
||||
gtk_widget_set_visible (
|
||||
GTK_WIDGET (self->velocity_settings), false);
|
||||
gtk_widget_set_visible (
|
||||
GTK_WIDGET (self->sep_after_velocity_settings), false);
|
||||
|
||||
switch (region->id.type)
|
||||
{
|
||||
|
@ -206,11 +201,6 @@ editor_toolbar_widget_refresh (EditorToolbarWidget * self)
|
|||
GTK_WIDGET (self->ghost_notes_btn), true);
|
||||
gtk_widget_set_visible (
|
||||
GTK_WIDGET (self->sep_after_ghost_notes), true);
|
||||
gtk_widget_set_visible (
|
||||
GTK_WIDGET (self->velocity_settings), true);
|
||||
gtk_widget_set_visible (
|
||||
GTK_WIDGET (self->sep_after_velocity_settings),
|
||||
true);
|
||||
}
|
||||
break;
|
||||
case REGION_TYPE_AUTOMATION:
|
||||
|
@ -335,7 +325,6 @@ editor_toolbar_widget_init (EditorToolbarWidget * self)
|
|||
{
|
||||
g_type_ensure (PLAYHEAD_SCROLL_BUTTONS_WIDGET_TYPE);
|
||||
g_type_ensure (SNAP_GRID_WIDGET_TYPE);
|
||||
g_type_ensure (VELOCITY_SETTINGS_WIDGET_TYPE);
|
||||
g_type_ensure (ZOOM_BUTTONS_WIDGET_TYPE);
|
||||
|
||||
gtk_widget_init_template (GTK_WIDGET (self));
|
||||
|
@ -415,8 +404,6 @@ editor_toolbar_widget_class_init (
|
|||
BIND_CHILD (audio_functions_btn);
|
||||
BIND_CHILD (midi_functions_btn);
|
||||
BIND_CHILD (automation_functions_btn);
|
||||
BIND_CHILD (velocity_settings);
|
||||
BIND_CHILD (sep_after_velocity_settings);
|
||||
BIND_CHILD (playhead_scroll);
|
||||
BIND_CHILD (zoom_buttons);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: © 2019, 2021-2022 Alexandros Theodotou <alex@zrythm.org>
|
||||
// SPDX-FileCopyrightText: © 2019, 2021-2023 Alexandros Theodotou <alex@zrythm.org>
|
||||
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
|
||||
|
||||
#include "audio/channel.h"
|
||||
|
@ -20,6 +20,7 @@
|
|||
#include "gui/widgets/midi_note.h"
|
||||
#include "gui/widgets/piano_roll_keys.h"
|
||||
#include "gui/widgets/ruler.h"
|
||||
#include "gui/widgets/velocity_settings.h"
|
||||
#include "project.h"
|
||||
#include "utils/flags.h"
|
||||
#include "utils/gtk.h"
|
||||
|
@ -174,6 +175,7 @@ static void
|
|||
midi_editor_space_widget_init (MidiEditorSpaceWidget * self)
|
||||
{
|
||||
g_type_ensure (PIANO_ROLL_KEYS_WIDGET_TYPE);
|
||||
g_type_ensure (VELOCITY_SETTINGS_WIDGET_TYPE);
|
||||
|
||||
gtk_widget_init_template (GTK_WIDGET (self));
|
||||
|
||||
|
@ -248,6 +250,7 @@ midi_editor_space_widget_class_init (
|
|||
BIND_CHILD (piano_roll_keys);
|
||||
BIND_CHILD (midi_arranger_velocity_paned);
|
||||
BIND_CHILD (arranger);
|
||||
BIND_CHILD (velocity_settings);
|
||||
BIND_CHILD (modifier_arranger);
|
||||
BIND_CHILD (midi_notes_box);
|
||||
BIND_CHILD (midi_vel_chooser_box);
|
||||
|
|
Loading…
Reference in New Issue