Ticket #7275: magnify-about-update.patch

File magnify-about-update.patch, 1.3 KB (added by Karvjorm, 9 years ago)

A About box update for Magnify! application

  • src/apps/magnify/Magnify.cpp

     
    1818#include <Directory.h>
    1919#include <File.h>
    2020#include <FindDirectory.h>
    21 #include <Locale.h>
    2221#include <MenuItem.h>
    2322#include <MenuField.h>
    2423#include <Path.h>
     
    227226void
    228227TApp::AboutRequested()
    229228{
    230     (new BAlert("", B_TRANSLATE("Magnify!\n\n" B_UTF8_COPYRIGHT
    231         "2002-2006 Haiku\n(C)1999 Be Inc.\n\n"
    232         "Now with even more features and recompiled for Haiku."),
    233         B_TRANSLATE("OK")))->Go();
     229    BString aboutText(B_TRANSLATE("Magnify!"));
     230    int32 titleLength = aboutText.Length();
     231    aboutText << "\n\n";
     232    aboutText << B_UTF8_COPYRIGHT;
     233    aboutText << " 2002-2006 Haiku\n";
     234    aboutText << B_UTF8_COPYRIGHT;
     235    aboutText << " 1999 Be Inc.\n\n";
     236    aboutText << B_TRANSLATE("Now with even more features and recompiled for "
     237        "Haiku.\n");
     238    BAlert* alert = new BAlert(B_TRANSLATE("About Magnify!"),
     239        aboutText.String(), B_TRANSLATE("OK"));
     240    BTextView* view = alert->TextView();
     241    BFont font;
     242   
     243    view->SetStylable(true);
     244
     245    view->GetFont(&font);
     246    font.SetSize(18);
     247    font.SetFace(B_BOLD_FACE);
     248    view->SetFontAndColor(0, titleLength, &font);
     249    alert->Go();
    234250}
    235251
    236252