mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
One font to rule the rulers.
Remove bold fonts for Bar/beats and font-size inconsistency on macOS (VerySmall, SmallBold). This reverts commite3dc0a24f2. and14318dd342anda76afae0e9and7c27f617dcand20029ec7e6
This commit is contained in:
parent
3ea0b11c7d
commit
58f1d46e31
4 changed files with 1 additions and 20 deletions
|
|
@ -139,7 +139,6 @@ Editor::initialize_rulers ()
|
|||
#else
|
||||
Pango::FontDescription font (UIConfiguration::instance().get_SmallFont());
|
||||
#endif
|
||||
Pango::FontDescription larger_font (UIConfiguration::instance().get_SmallBoldFont());
|
||||
|
||||
_timecode_metric = new TimecodeMetric (this);
|
||||
_bbt_metric = new BBTMetric (this);
|
||||
|
|
@ -166,7 +165,6 @@ Editor::initialize_rulers ()
|
|||
bbt_ruler = new ArdourCanvas::Ruler (_time_markers_group, _bbt_metric,
|
||||
ArdourCanvas::Rect (0, 0, ArdourCanvas::COORD_MAX, timebar_height));
|
||||
bbt_ruler->set_font_description (font);
|
||||
bbt_ruler->set_second_font_description (larger_font);
|
||||
CANVAS_DEBUG_NAME (bbt_ruler, "bbt ruler");
|
||||
timecode_nmarks = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -386,7 +386,6 @@ Pianoroll::build_canvas ()
|
|||
Pango::FontDescription larger_font (UIConfiguration::instance().get_SmallBoldFont());
|
||||
bbt_ruler = new ArdourCanvas::Ruler (time_line_group, &bbt_metric, ArdourCanvas::Rect (0, timebar_height * 2, ArdourCanvas::COORD_MAX, timebar_height * 3));
|
||||
bbt_ruler->set_font_description (font);
|
||||
bbt_ruler->set_second_font_description (larger_font);
|
||||
Gtkmm2ext::Color base = UIConfiguration::instance().color ("ruler base");
|
||||
Gtkmm2ext::Color text = UIConfiguration::instance().color ("ruler text");
|
||||
bbt_ruler->set_fill_color (base);
|
||||
|
|
|
|||
|
|
@ -67,7 +67,6 @@ public:
|
|||
|
||||
void set_range (int64_t lower, int64_t upper);
|
||||
void set_font_description (Pango::FontDescription);
|
||||
void set_second_font_description (Pango::FontDescription);
|
||||
void set_metric (const Metric *);
|
||||
|
||||
void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const;
|
||||
|
|
@ -86,7 +85,6 @@ private:
|
|||
Gtkmm2ext::Color _divider_color_bottom;
|
||||
|
||||
Pango::FontDescription* _font_description;
|
||||
Pango::FontDescription* _second_font_description;
|
||||
mutable std::vector<Mark> marks;
|
||||
mutable bool _need_marks;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ Ruler::Ruler (Canvas* c, const Metric* m)
|
|||
, _upper (0)
|
||||
, _divide_height (-1.0)
|
||||
, _font_description (0)
|
||||
, _second_font_description (0)
|
||||
, _need_marks (true)
|
||||
{
|
||||
}
|
||||
|
|
@ -50,7 +49,6 @@ Ruler::Ruler (Canvas* c, const Metric* m, Rect const& r)
|
|||
, _upper (0)
|
||||
, _divide_height (-1.0)
|
||||
, _font_description (0)
|
||||
, _second_font_description (0)
|
||||
, _need_marks (true)
|
||||
{
|
||||
}
|
||||
|
|
@ -62,7 +60,6 @@ Ruler::Ruler (Item* parent, const Metric* m)
|
|||
, _upper (0)
|
||||
, _divide_height (-1.0)
|
||||
, _font_description (0)
|
||||
, _second_font_description (0)
|
||||
, _need_marks (true)
|
||||
{
|
||||
}
|
||||
|
|
@ -74,7 +71,6 @@ Ruler::Ruler (Item* parent, const Metric* m, Rect const& r)
|
|||
, _upper (0)
|
||||
, _divide_height (-1.0)
|
||||
, _font_description (0)
|
||||
, _second_font_description (0)
|
||||
, _need_marks (true)
|
||||
{
|
||||
}
|
||||
|
|
@ -98,16 +94,6 @@ Ruler::set_font_description (Pango::FontDescription fd)
|
|||
end_visual_change ();
|
||||
}
|
||||
|
||||
void
|
||||
Ruler::set_second_font_description (Pango::FontDescription fd)
|
||||
{
|
||||
begin_visual_change ();
|
||||
delete _second_font_description;
|
||||
_second_font_description = new Pango::FontDescription (fd);
|
||||
end_visual_change ();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Ruler::render (Rect const & area, Cairo::RefPtr<Cairo::Context> cr) const
|
||||
{
|
||||
|
|
@ -167,7 +153,7 @@ Ruler::render (Rect const & area, Cairo::RefPtr<Cairo::Context> cr) const
|
|||
|
||||
for (vector<Mark>::const_iterator m = marks.begin(); m != marks.end(); ++m) {
|
||||
Duple pos;
|
||||
Pango::FontDescription* fd = (m->style == Mark::Major) ? (_second_font_description ? _second_font_description : _font_description) : _font_description;
|
||||
Pango::FontDescription* fd = _font_description;
|
||||
|
||||
pos.x = round (m->position/_metric->units_per_pixel) + self.x0;
|
||||
pos.y = self.y1; /* bottom edge */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue