Update AxisView API: name_label is owned by the axis

This commit is contained in:
Robin Gareus 2020-12-07 23:41:55 +01:00
parent 13e6fdb6b3
commit 2a011e19cb
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
4 changed files with 18 additions and 17 deletions

View File

@ -41,6 +41,7 @@
#include "ardour_ui.h"
#include "gui_object.h"
#include "axis_view.h"
#include "ui_config.h"
#include "utils.h"
#include "pbd/i18n.h"
@ -145,3 +146,19 @@ AxisView::set_selected (bool yn)
Selectable::set_selected (yn);
}
void
AxisView::set_name_ellipsize_mode ()
{
switch (UIConfiguration::instance().get_time_axis_name_ellipsize_mode()) {
case -1:
name_label.set_ellipsize (Pango::ELLIPSIZE_START);
break;
case 1:
name_label.set_ellipsize (Pango::ELLIPSIZE_END);
break;
default:
name_label.set_ellipsize (Pango::ELLIPSIZE_MIDDLE);
break;
}
}

View File

@ -136,6 +136,7 @@ protected:
static std::list<Gdk::Color> used_colors;
Gtk::Label name_label;
void set_name_ellipsize_mode ();
Gtk::Label inactive_label;
Gtk::Table inactive_table;

View File

@ -1413,19 +1413,3 @@ TrackViewList::filter_to_unique_playlists ()
}
return ts;
}
void
TimeAxisView::set_name_ellipsize_mode ()
{
switch (UIConfiguration::instance().get_time_axis_name_ellipsize_mode()) {
case -1:
name_label.set_ellipsize (Pango::ELLIPSIZE_START);
break;
case 1:
name_label.set_ellipsize (Pango::ELLIPSIZE_END);
break;
default:
name_label.set_ellipsize (Pango::ELLIPSIZE_MIDDLE);
break;
}
}

View File

@ -336,7 +336,6 @@ private:
void compute_heights ();
bool maybe_set_cursor (int y);
void set_name_ellipsize_mode ();
}; /* class TimeAxisView */