sigc::signal<void> AudioClock::ModeChanged;
vector<AudioClock*> AudioClock::clocks;
-const double AudioClock::info_font_scale_factor = 0.60;
+const double AudioClock::info_font_scale_factor = 0.68;
const double AudioClock::separator_height = 0.0;
const double AudioClock::x_leading_padding = 6.0;
#define TXTSPAN "<span font-family=\"Sans\" foreground=\"white\">"
AudioClock::AudioClock (const string& clock_name, bool transient, const string& widget_name,
- bool allow_edit, bool follows_playhead, bool duration, bool with_info)
+ bool allow_edit, bool follows_playhead, bool duration, bool with_info,
+ bool accept_on_focus_out)
: ops_menu (0)
, _name (clock_name)
, is_transient (transient)
, is_duration (duration)
, editable (allow_edit)
, _follows_playhead (follows_playhead)
+ , _accept_on_focus_out (accept_on_focus_out)
, _off (false)
, em_width (0)
, _edit_by_click_field (false)
if (mode_based_info_ratio != 1.0) {
- double left_rect_width = round (((get_width() - separator_height) * mode_based_info_ratio) + 0.5);
+ double left_rect_width = get_left_rect_width();
if (_need_bg) {
if (corner_radius) {
tmp->set_font_description (font);
/* this string is the longest thing we will ever display */
- tmp->set_text (" 88:88:88,888");
+ if (_mode == MinSec)
+ tmp->set_text (" 88:88:88,888 ");
+ else
+ tmp->set_text (" 88:88:88,88 ");
tmp->get_pixel_size (req.width, req.height);
layout_height = req.height;
bool ret = CairoWidget::on_focus_out_event (ev);
if (editing) {
- end_edit (false);
+ end_edit (_accept_on_focus_out);
}
return ret;
_layout->set_text ("");
+ Gtk::Requisition req;
+ set_clock_dimensions (req);
+
if (_left_layout) {
_left_layout->set_attributes (info_attributes);