作者 Anonymous [c] 2008-02-03 20:35 (点击下载)

  1. bool MainWnd::on_stat_size_channged(int size)
  2. {
  3. //return false;
  4. Gdk::Rectangle rect;
  5. Gtk::Orientation orie;
  6. int wx = 0;
  7. int wy = 0;
  8. int ww = 0;
  9. int wh = 0;
  10. this->get_size(ww, wh);
  11. if (stat->get_geometry(screen, rect, orie)) {
  12. if (orie == Gtk::ORIENTATION_HORIZONTAL) { // 面板是水平的
  13. if (rect.get_y() < screen->get_height()/2) // 面板在上面
  14. wy = rect.get_y() + size;
  15. else
  16. wy = rect.get_y() - wh;
  17. wx = rect.get_x() - size;
  18. } else {
  19. if (rect.get_x() < screen->get_width()/2) // 面板在左边
  20. wx = rect.get_x() + size;
  21. else
  22. wx = rect.get_x() - ww;
  23. wy = rect.get_y() - size;
  24. }
  25. this->move(wx, wy);
  26. }
  27.  
  28. return false;
  29. }

提交下面的校正或者修改. (点击这里开始一个新的帖子)
姓名: 在 cookie 中记住我的名字

屏幕抓图:(jpeg 或 png)