make canvas flag use NoEventText for its label, and try to set the font (unsuccessfully, it seems) to the same TimeAxisViewItem::NAME_FONT
git-svn-id: svn://localhost/ardour2/branches/3.0@12664 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
24a2688765
commit
c816917411
@ -1,6 +1,8 @@
|
|||||||
#include "canvas-flag.h"
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "ardour_ui.h"
|
#include "ardour_ui.h"
|
||||||
|
#include "canvas-flag.h"
|
||||||
|
#include "time_axis_view_item.h"
|
||||||
|
|
||||||
using namespace Gnome::Canvas;
|
using namespace Gnome::Canvas;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -43,9 +45,10 @@ CanvasFlag::set_text(const string& a_text)
|
|||||||
{
|
{
|
||||||
delete_allocated_objects();
|
delete_allocated_objects();
|
||||||
|
|
||||||
_text = new Text (*this, 0.0, 0.0, a_text);
|
_text = new NoEventText (*this, 0.0, 0.0, a_text);
|
||||||
_text->property_justification() = Gtk::JUSTIFY_CENTER;
|
_text->property_justification() = Gtk::JUSTIFY_CENTER;
|
||||||
_text->property_fill_color_rgba() = _outline_color_rgba;
|
_text->property_fill_color_rgba() = _outline_color_rgba;
|
||||||
|
_text->property_font_desc() = TimeAxisViewItem::NAME_FONT;
|
||||||
double flagwidth = _text->property_text_width() + 10.0;
|
double flagwidth = _text->property_text_width() + 10.0;
|
||||||
double flagheight = _text->property_text_height() + 3.0;
|
double flagheight = _text->property_text_height() + 3.0;
|
||||||
_text->property_x() = flagwidth / 2.0;
|
_text->property_x() = flagwidth / 2.0;
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include "simplerect.h"
|
#include "simplerect.h"
|
||||||
#include "simpleline.h"
|
#include "simpleline.h"
|
||||||
|
#include "canvas-noevent-text.h"
|
||||||
|
|
||||||
class MidiRegionView;
|
class MidiRegionView;
|
||||||
|
|
||||||
@ -33,7 +34,7 @@ public:
|
|||||||
virtual void set_height (double);
|
virtual void set_height (double);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Text* _text;
|
NoEventText* _text;
|
||||||
double _height;
|
double _height;
|
||||||
guint _outline_color_rgba;
|
guint _outline_color_rgba;
|
||||||
guint _fill_color_rgba;
|
guint _fill_color_rgba;
|
||||||
|
Loading…
Reference in New Issue
Block a user