y += operation[CWINDOW_TOOL_WINDOW]->get_h();
subwindow->add_subwindow(operation[CWINDOW_TITLESAFE] = new CPanelTitleSafe(mwindow, this, x, y));
y += operation[CWINDOW_TITLESAFE]->get_h();
- x += (w - BC_Slider::get_span(1)) / 2;
- subwindow->add_subwindow(cpanel_zoom = new CPanelZoom(mwindow, this, x, y+15, h-y-15));
+ x += (w - BC_Slider::get_span(1)) / 2; y += 15;
+ subwindow->add_subwindow(cpanel_zoom = new CPanelZoom(mwindow, this, x, y, h-y-20));
}
-void CPanel::reposition_buttons(int x, int y)
+void CPanel::reposition_buttons(int x, int y, int h)
{
this->x = x;
this->y = y;
+ this->h = h;
for(int i = 0; i < CPANEL_OPERATIONS; i++)
{
y += operation[i]->get_h();
}
x += (w - BC_Slider::get_span(1)) / 2;
- cpanel_zoom->reposition_window(x, y+15);
+ y += 15;
+ h = this->h - this->y;
+ cpanel_zoom->reposition_window(x, y, w, h-y-20);
+ cpanel_zoom->set_pointer_motion_range(h);
}
{
this->mwindow = mwindow;
this->gui = gui;
- set_tooltip(_("Protect video from changes"));
+ set_tooltip(_("Protect video from changes (F1)"));
}
CPanelProtect::~CPanelProtect()
{
{
this->mwindow = mwindow;
this->gui = gui;
- set_tooltip(_("Edit mask"));
+ set_tooltip(_("Edit mask (F3)"));
}
CPanelMask::~CPanelMask()
{
{
this->mwindow = mwindow;
this->gui = gui;
- set_tooltip(_("Ruler"));
+ set_tooltip(_("Ruler (F4)"));
}
CPanelRuler::~CPanelRuler()
{
{
this->mwindow = mwindow;
this->gui = gui;
- set_tooltip(_("Zoom view"));
+ set_tooltip(_("Zoom view (F2)"));
}
CPanelMagnify::~CPanelMagnify()
{
{
this->mwindow = mwindow;
this->gui = gui;
- set_tooltip(_("Adjust camera automation"));
+ set_tooltip(_("Adjust camera automation (F5)"));
}
CPanelCamera::~CPanelCamera()
{
{
this->mwindow = mwindow;
this->gui = gui;
- set_tooltip(_("Adjust projector automation"));
+ set_tooltip(_("Adjust projector automation (F6)"));
}
CPanelProj::~CPanelProj()
{
{
this->mwindow = mwindow;
this->gui = gui;
- set_tooltip(_("Crop a layer or output"));
+ set_tooltip(_("Crop a layer or output (F7)"));
}
CPanelCrop::~CPanelCrop()
{
this->mwindow = mwindow;
this->gui = gui;
- set_tooltip(_("Get color"));
+ set_tooltip(_("Get color (F8)"));
}
CPanelEyedrop::~CPanelEyedrop()
{
this->mwindow = mwindow;
this->gui = gui;
- set_tooltip(_("Show tool info"));
+ set_tooltip(_("Show tool info (F9)"));
}
CPanelToolWindow::~CPanelToolWindow()
{
this->mwindow = mwindow;
this->gui = gui;
- set_tooltip(_("Show safe regions"));
+ set_tooltip(_("Show safe regions (F10)"));
}
CPanelTitleSafe::~CPanelTitleSafe()
{
}
CPanelZoom::CPanelZoom(MWindow *mwindow, CPanel *gui, int x, int y, int h)
- : BC_FSlider(x, y, 1, h-30, h, -2., 2., 0, 0)
+ : BC_FSlider(x, y, 1, h, h, -2., 2., 0, 0)
{
this->mwindow = mwindow;
this->gui = gui;
int CPanelZoom::set_shown(int shown)
{
if( shown ) {
- show_window();
+ show();
update(gui->subwindow->canvas->get_zoom());
}
else
- hide_window();
+ hide();
return 1;
}
{
if( !is_hidden() ) {
if( zoom < 0.01 ) zoom = 0.01;
- float value = log(zoom) / log(10.);
+ float value = log10f(zoom);
BC_FSlider::update(value);
}
}