13
0

L: horizontally center meters

This commit is contained in:
Robin Gareus 2024-05-13 19:41:58 +02:00
parent b1bcb7f9fc
commit 73c1860704
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1,6 +1,7 @@
#include "ardour/logmeter.h" #include "ardour/logmeter.h"
#include "ardour/audioengine.h" #include "ardour/audioengine.h"
#include <gtkmm/alignment.h>
#include <gtkmm/viewport.h> #include <gtkmm/viewport.h>
#include "widgets/fastmeter.h" #include "widgets/fastmeter.h"
@ -18,9 +19,13 @@ LiveTraxMeters::LiveTraxMeters ()
{ {
set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_NEVER); set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_NEVER);
Gtk::Alignment* container = manage (new Gtk::Alignment (.5, .5, 0, 0));
_meter_box.set_border_width (PX_SCALE (10)); _meter_box.set_border_width (PX_SCALE (10));
_meter_box.set_spacing (PX_SCALE (10)); _meter_box.set_spacing (PX_SCALE (10));
add (_meter_box);
add (*container);
container->add (_meter_box);
Gtk::Viewport *vp = dynamic_cast<Gtk::Viewport*> (get_child()); Gtk::Viewport *vp = dynamic_cast<Gtk::Viewport*> (get_child());
vp->set_shadow_type(Gtk::SHADOW_NONE); vp->set_shadow_type(Gtk::SHADOW_NONE);