diff options
| author | Andrew rugby471@gmail.com <> | 2011-03-25 20:08:46 +0000 |
|---|---|---|
| committer | Andrew rugby471@gmail.com <> | 2011-03-25 20:08:46 +0000 |
| commit | f560bad9a92209e596e8394023b4af96d630d8e1 (patch) | |
| tree | 9f615dfedb43f51f9555a23caf01927bf859b869 /src | |
| parent | Change menutems and title to "Import Clip Art" (diff) | |
| download | inkscape-f560bad9a92209e596e8394023b4af96d630d8e1.tar.gz inkscape-f560bad9a92209e596e8394023b4af96d630d8e1.zip | |
Increased size of OCAL logo and removed "Powered by" text
Removed border of LoadingBox on startup
(bzr r10092.1.21)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/dialog/ocaldialogs.cpp | 30 | ||||
| -rw-r--r-- | src/ui/dialog/ocaldialogs.h | 2 | ||||
| -rw-r--r-- | src/verbs.cpp | 2 |
3 files changed, 7 insertions, 27 deletions
diff --git a/src/ui/dialog/ocaldialogs.cpp b/src/ui/dialog/ocaldialogs.cpp index 0a65ffb47..75b5e077a 100644 --- a/src/ui/dialog/ocaldialogs.cpp +++ b/src/ui/dialog/ocaldialogs.cpp @@ -374,6 +374,8 @@ PreviewWidget::PreviewWidget() : Gtk::VBox(false, 12) label_time->set_line_wrap(true); label_time->set_line_wrap_mode(Pango::WRAP_WORD_CHAR); + box_loading->set_no_show_all(true); + image->set_no_show_all(true); label_title->set_size_request(90, -1); label_description->set_size_request(90, -1); label_time->set_size_request(90, -1); @@ -381,6 +383,8 @@ PreviewWidget::PreviewWidget() : Gtk::VBox(false, 12) set_border_width(12); signal_expose_event().connect(sigc::mem_fun(*this, &PreviewWidget::_on_expose_event), false); + + clear(); } void PreviewWidget::set_metadata(Glib::ustring description, Glib::ustring creator, @@ -567,20 +571,9 @@ LogoArea::LogoArea() : Gtk::EventBox() draw_logo = false; } signal_expose_event().connect(sigc::mem_fun(*this, &LogoArea::_on_expose_event)); - signal_realize().connect(sigc::mem_fun(*this, &LogoArea::_on_realize)); set_visible_window(false); } -void LogoArea::_on_realize() -{ - Gdk::Color color = get_style()->get_mid(get_state()); - layout = this->create_pango_layout(""); - Glib::ustring markup = Glib::ustring::compose("<span color=\"%1\" size=\"large\">%2</span>", - color.to_string(), _("Powered by")); - - layout->set_markup(markup); -} - bool LogoArea::_on_expose_event(GdkEventExpose* event) { if (draw_logo) { @@ -588,28 +581,17 @@ bool LogoArea::_on_expose_event(GdkEventExpose* event) int y = get_allocation().get_y(); int width = get_allocation().get_width(); int height = get_allocation().get_height(); + int x_logo = x + (width - 220) / 2; + int y_logo = y + (height - 76) / 2; Cairo::RefPtr<Cairo::Context> cr = get_window()->create_cairo_context(); // Draw logo, we mask [read fill] it with the mid colour from the // user's GTK theme Gdk::Color logo_fill = get_style()->get_mid(get_state()); - int x_logo = x + width - 12 - 127; - int y_logo = y + height - 12 - 44; Gdk::Cairo::set_source_color(cr, logo_fill); cr->mask(logo_mask, x_logo, y_logo); - - // Draw text - Pango::Rectangle extents = layout->get_pixel_logical_extents(); - int text_width = extents.get_width(); - int text_height = extents.get_height(); - - int x_text = x_logo - text_width - 12; - int y_text = y + height - text_height - 12; - - get_style()->paint_layout(get_window(), get_state(), true, - Gdk::Rectangle(x, y, width, height), *this, "", x_text, y_text, layout); } return false; diff --git a/src/ui/dialog/ocaldialogs.h b/src/ui/dialog/ocaldialogs.h index d0784dfb6..40cd3e867 100644 --- a/src/ui/dialog/ocaldialogs.h +++ b/src/ui/dialog/ocaldialogs.h @@ -340,10 +340,8 @@ public: LogoArea(); private: bool _on_expose_event(GdkEventExpose* event); - void _on_realize(); bool draw_logo; Cairo::RefPtr<Cairo::ImageSurface> logo_mask; - Glib::RefPtr<Pango::Layout> layout; }; /** diff --git a/src/verbs.cpp b/src/verbs.cpp index db0659d2c..f31a3df58 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2257,7 +2257,7 @@ Verb *Verb::_base_verbs[] = { N_("Import a bitmap or SVG image into this document"), INKSCAPE_ICON_DOCUMENT_IMPORT), new FileVerb(SP_VERB_FILE_EXPORT, "FileExport", N_("_Export Bitmap..."), N_("Export this document or a selection as a bitmap image"), INKSCAPE_ICON_DOCUMENT_EXPORT), - new FileVerb(SP_VERB_FILE_IMPORT_FROM_OCAL, "FileImportFromOCAL", N_("Import Clip Art"), N_("Import clipart from Open Clip Art Library"), INKSCAPE_ICON_DOCUMENT_IMPORT_OCAL), + new FileVerb(SP_VERB_FILE_IMPORT_FROM_OCAL, "FileImportFromOCAL", N_("Import Clip Art..."), N_("Import clipart from Open Clip Art Library"), INKSCAPE_ICON_DOCUMENT_IMPORT_OCAL), // new FileVerb(SP_VERB_FILE_EXPORT_TO_OCAL, "FileExportToOCAL", N_("Export To Open Clip Art Library"), N_("Export this document to Open Clip Art Library"), INKSCAPE_ICON_DOCUMENT_EXPORT_OCAL), new FileVerb(SP_VERB_FILE_NEXT_DESKTOP, "NextWindow", N_("N_ext Window"), N_("Switch to the next document window"), INKSCAPE_ICON_WINDOW_NEXT), |
