diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2018-11-06 18:25:30 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2018-11-06 18:25:30 +0000 |
| commit | 77f8d590d64320f587907322eb2aa9f88457e8c6 (patch) | |
| tree | d67777bb24f895f71528b1ff28971adb788d768f /src/ui/dialog/aboutbox.cpp | |
| parent | simple fix in french translation (diff) | |
| download | inkscape-77f8d590d64320f587907322eb2aa9f88457e8c6.tar.gz inkscape-77f8d590d64320f587907322eb2aa9f88457e8c6.zip | |
C++ify SVGViewWidget. Remove unused code.
Diffstat (limited to 'src/ui/dialog/aboutbox.cpp')
| -rw-r--r-- | src/ui/dialog/aboutbox.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index fd78540d5..b86bc02a4 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -31,12 +31,13 @@ #include "document.h" #include "inkscape-version.h" #include "path-prefix.h" -#include "svg-view-widget.h" #include "text-editing.h" #include "object/sp-text.h" #include "ui/icon-names.h" +#include "ui/view/svg-view-widget.h" + #include "util/units.h" @@ -122,21 +123,20 @@ void AboutBox::build_splash_widget() { } doc->ensureUpToDate(); - GtkWidget *v=sp_svg_view_widget_new(doc); + auto viewer = Gtk::manage(new Inkscape::UI::View::SVGViewWidget(doc)); // temporary hack: halve the dimensions so the dialog will fit - double width=doc->getWidth().value("px") / 2; - double height=doc->getHeight().value("px") / 2; + double width=doc->getWidth().value("px") / 2.0; + double height=doc->getHeight().value("px") / 2.0; + viewer->setResize(width, height); doc->doUnref(); - SP_SVG_VIEW_WIDGET(v)->setResize(false, static_cast<int>(width), static_cast<int>(height)); - _splash_widget = new Gtk::AspectFrame(); _splash_widget->unset_label(); _splash_widget->set_shadow_type(Gtk::SHADOW_NONE); _splash_widget->property_ratio() = width / height; - _splash_widget->add(*manage(Glib::wrap(v))); + _splash_widget->add(*viewer); } } |
