[passepartout/passepartout-0-7: 8/9] Bug 452860 – Text in text frames outside the frames



commit c19829725857fae0f00cdb1043c15e418c460429
Author: Fredrik Arnerup <arnerup kth se>
Date:   Wed Apr 15 15:23:35 2009 +0200

    Bug 452860 â?? Text in text frames outside the frames
    
    * src/pptout/postscriptviewent.cc,
    * src/pptout/postscriptviewent.h: applied patch from Fredrik Arnerup; his
      comment:
      > PostscriptViewent used pixbuf sizes in Gnome::Canvas units instead of
      > pixels. This made the text in a frame move up and down when zooming. I
      > don't know when this error was introduced, or if it was a change in
      > Gnome::Canvas. Also, I don't know why we didn't use pixel sizes to begin
      > with. Perhaps it had something to do with groups, but then those don't
      > work very well anyway.
---
 src/pptout/postscriptviewent.cc |   17 +++--------------
 src/pptout/postscriptviewent.h  |    1 -
 2 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/src/pptout/postscriptviewent.cc b/src/pptout/postscriptviewent.cc
index 4567ed1..9b85e57 100644
--- a/src/pptout/postscriptviewent.cc
+++ b/src/pptout/postscriptviewent.cc
@@ -64,10 +64,8 @@ PostscriptViewent::PostscriptViewent(View& view, const FrameRef psframe,
   canvas_pixbuf.reset(new Gnome::Canvas::Pixbuf(*content_group));
   canvas_pixbuf->property_anchor() = Gtk::ANCHOR_SOUTH_WEST;
   canvas_pixbuf->property_x() = 0; canvas_pixbuf->property_y() = 0;
-  canvas_pixbuf->property_width_set() = true;
-  canvas_pixbuf->property_height_set() = true;
-  canvas_pixbuf->property_width_in_pixels() = false;
-  canvas_pixbuf->property_height_in_pixels() = false;
+  canvas_pixbuf->property_width_in_pixels() = true;
+  canvas_pixbuf->property_height_in_pixels() = true;
   on_properties_changed();
   on_geometry_changed();
   regenerate();
@@ -96,18 +94,9 @@ void PostscriptViewent::set_state(State state) {
   }
 }
 
-void PostscriptViewent::on_geometry_changed() {
-  Viewent::on_geometry_changed();
-
-  Vector size = frame->get_inherent_size();
-
-  canvas_pixbuf->property_width() = size.x;
-  canvas_pixbuf->property_height() = size.y;
-}
-
 void PostscriptViewent::regenerate() {
   if(pid != P_IDLE) {
-    //verbose << "PostscriptViewent allready running gs " << pid << std::endl;
+    //verbose << "PostscriptViewent already running gs " << pid << std::endl;
     redraw_requested = true;
     return;
   } else {
diff --git a/src/pptout/postscriptviewent.h b/src/pptout/postscriptviewent.h
index 6bd728b..d98c304 100644
--- a/src/pptout/postscriptviewent.h
+++ b/src/pptout/postscriptviewent.h
@@ -31,7 +31,6 @@ public:
 protected:
   const Pagent* get_frame() const { return frame; }
   void set_state(State state);
-  void on_geometry_changed();
 private:
   void process_stopped(pid_t _pid, bool exited_normally, int exit_code);
   bool regenerate_bg();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]