mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Fix #2947.
git-svn-id: svn://localhost/ardour2/branches/3.0@6266 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
9dddffcc8f
commit
3538c47d25
3 changed files with 11 additions and 6 deletions
|
|
@ -107,7 +107,7 @@ TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group&
|
|||
|
||||
group = new ArdourCanvas::Group (parent);
|
||||
|
||||
init (it_name, spu, base_color, start, duration, vis);
|
||||
init (it_name, spu, base_color, start, duration, vis, true);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -128,11 +128,11 @@ TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
|
|||
|
||||
group = new ArdourCanvas::Group (*parent);
|
||||
|
||||
init (other.item_name, other.samples_per_unit, c, other.frame_position, other.item_duration, other.visibility);
|
||||
init (other.item_name, other.samples_per_unit, c, other.frame_position, other.item_duration, other.visibility, other.wide_enough_for_name);
|
||||
}
|
||||
|
||||
void
|
||||
TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color const & base_color, nframes64_t start, nframes64_t duration, Visibility vis)
|
||||
TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color const & base_color, nframes64_t start, nframes64_t duration, Visibility vis, bool wide)
|
||||
{
|
||||
item_name = it_name ;
|
||||
samples_per_unit = spu ;
|
||||
|
|
@ -149,6 +149,7 @@ TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color const & ba
|
|||
_sensitive = true;
|
||||
name_pixbuf_width = 0;
|
||||
last_item_width = 0;
|
||||
wide_enough_for_name = wide;
|
||||
|
||||
if (duration == 0) {
|
||||
warning << "Time Axis Item Duration == 0" << endl ;
|
||||
|
|
@ -554,7 +555,9 @@ TimeAxisViewItem::set_height (double height)
|
|||
|
||||
} else {
|
||||
name_highlight->show();
|
||||
name_pixbuf->show();
|
||||
if (wide_enough_for_name) {
|
||||
name_pixbuf->show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -896,9 +899,11 @@ TimeAxisViewItem::reset_name_width (double /*pixel_width*/)
|
|||
}
|
||||
|
||||
if (pb_width <= 0 || it_width <= NAME_X_OFFSET) {
|
||||
wide_enough_for_name = false;
|
||||
name_pixbuf->hide();
|
||||
return;
|
||||
} else {
|
||||
wide_enough_for_name = true;
|
||||
name_pixbuf->show();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ class TimeAxisViewItem : public Selectable
|
|||
|
||||
TimeAxisViewItem (const TimeAxisViewItem& other);
|
||||
|
||||
void init (const std::string& it_name, double spu, Gdk::Color const & base_color, nframes64_t start, nframes64_t duration, Visibility vis);
|
||||
void init (const std::string& it_name, double spu, Gdk::Color const & base_color, nframes64_t start, nframes64_t duration, Visibility vis, bool);
|
||||
|
||||
/**
|
||||
* Calculates some contrasting color for displaying various parts of this item, based upon the base color
|
||||
|
|
@ -456,6 +456,7 @@ class TimeAxisViewItem : public Selectable
|
|||
uint32_t lock_handle_color_b ;
|
||||
uint32_t last_item_width;
|
||||
int name_pixbuf_width;
|
||||
bool wide_enough_for_name;
|
||||
|
||||
ArdourCanvas::Group* group;
|
||||
ArdourCanvas::SimpleRect* vestigial_frame;
|
||||
|
|
|
|||
|
|
@ -991,7 +991,6 @@ pixbuf_from_ustring(const ustring& name, Pango::FontDescription* font, int clip_
|
|||
empty_pixbuf = new Glib::RefPtr<Gdk::Pixbuf>;
|
||||
*empty_pixbuf = Gdk::Pixbuf::create(Gdk::COLORSPACE_RGB, true, 8, clip_width, clip_height);
|
||||
}
|
||||
cerr << "\n\nUSE EMPTY PIXBUF\n";
|
||||
return *empty_pixbuf;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue