bool MainWnd::on_stat_size_channged(int size)
{
//return false;
Gdk::Rectangle rect;
Gtk::Orientation orie;
int wx = 0;
int wy = 0;
int ww = 0;
int wh = 0;
this->get_size(ww, wh);
if (stat->get_geometry(screen, rect, orie)) {
if (orie == Gtk::ORIENTATION_HORIZONTAL) { // 面板是水平的
if (rect.get_y() < screen->get_height()/2) // 面板在上面
wy = rect.get_y() + size;
else
wy = rect.get_y() - wh;
wx = rect.get_x() - size;
} else {
if (rect.get_x() < screen->get_width()/2) // 面板在左边
wx = rect.get_x() + size;
else
wx = rect.get_x() - ww;
wy = rect.get_y() - size;
}
this->move(wx, wy);
}
return false;
}