Ticket #7275: codycam-about-update.patch

File codycam-about-update.patch, 1.2 KB (added by Karvjorm, 13 years ago)

About box update for the CodyCam application

  • src/apps/codycam/CodyCam.cpp

     
    1818#include <scheduler.h>
    1919#include <TabView.h>
    2020#include <TextControl.h>
     21#include <TextView.h>
    2122#include <TimeSource.h>
    2223#include <TranslationKit.h>
    2324
     
    255256        }
    256257
    257258        case msg_about:
    258             (new BAlert(B_TRANSLATE("About CodyCam"), B_TRANSLATE("CodyCam\n\n"
    259                 "The Original BeOS webcam"), B_TRANSLATE("Close")))->Go();
     259            {
     260                BString aboutText(B_TRANSLATE("CodyCam"));
     261                int32 titleLength = aboutText.Length();
     262                aboutText << "\n\n";
     263                aboutText << B_TRANSLATE("The Original BeOS webcam\n");
     264                BAlert* alert = new (std::nothrow) BAlert(B_TRANSLATE("About CodyCam"),
     265                    aboutText.String(), B_TRANSLATE("Close"));
     266                BTextView* view = alert->TextView();
     267                BFont font;
     268           
     269                view->SetStylable(true);
     270           
     271                view->GetFont(&font);
     272                font.SetSize(18);
     273                font.SetFace(B_BOLD_FACE);
     274                view->SetFontAndColor(0, titleLength, &font);
     275                alert->SetShortcut(0, B_ESCAPE);
     276                alert->Go(NULL);
     277            }
    260278            break;
    261279
    262280        case msg_control_win: