@@ -38,11 +38,11 @@ AboutView::Draw(BRect updateRect)
3838 DrawBitmap (m_logo);
3939 MovePenTo ((updateRect.Width () - m_logo->Bounds ().Width ()) / 4 , 0 );
4040
41- MovePenBy (0 , 100 );
41+ MovePenBy (0 , 90 );
4242 BPoint p = PenLocation ();
4343
4444 BString about_line;
45- // about_line << "BeTeX " << BETEX_VERSION << " by Brent Miszalski";
45+ about_line << " BeTeX " /* << BETEX_VERSION <<*/ " by Brent Miszalski" ;
4646 DrawString (about_line.String ()); // .\nThanks to:\n\tEli Dayan\n\tMichael Pfeiffer\n");
4747 MovePenTo (p);
4848 MovePenBy (0 , 20 );
@@ -51,6 +51,9 @@ AboutView::Draw(BRect updateRect)
5151 MovePenTo (p);
5252 MovePenBy (font.StringWidth (" Thanks To: " ), 20 );
5353 DrawString (" Michael Pfeiffer" );
54+ MovePenTo (p);
55+ MovePenBy (0 , 40 );
56+ DrawString (" Adapted to Haiku by Sylvain Kerjean" );
5457
5558 updateRect = Bounds ();
5659 SetHighColor (tint_color (ui_color (B_PANEL_BACKGROUND_COLOR), B_LIGHTEN_2_TINT));
@@ -94,51 +97,46 @@ AboutWindow::AboutWindow(BRect frame, BMessenger* messenger)
9497 AddChild (m_gradient = new GradientView (specRect, m_top, m_bottom));
9598
9699 BRect aboutRect = Bounds ();
97- aboutRect.InsetBy (80 , 60 );
100+ aboutRect.InsetBy (70 , 60 );
98101 m_about = new AboutView (aboutRect);
99102 m_about->SetViewColor (ui_color (B_PANEL_BACKGROUND_COLOR));
100103 m_gradient->AddChild (m_about);
101104
102105 int bwidth = 50 ;
103106 int bheight = 30 ;
104- int bpad = 10 ;
105- BRect btnRect (frame. right - ( 2 * bpad) - bwidth, frame. bottom - ( 2 * bpad) - bheight,
106- frame .right - ( 2 * bpad) , frame.bottom - ( 2 * bpad) );
107+ int bpad = (aboutRect. Width () - ( 60 + 120 + 50 )) / 2 ;
108+ BRect btnRect (
109+ aboutRect .right - bwidth , frame.bottom - 15 - bheight, aboutRect. right , frame. bottom - 15 );
107110 m_quit
108111 = new BButton (btnRect, " quitbtn" , " OK" , new BMessage (AboutMessages::K_ABOUT_WINDOW_QUIT));
109112 m_quit->MakeDefault (true );
110- m_gradient->AddChild (m_quit);
111-
112- bwidth = 100 ;
113- btnRect = BRect (frame.right - (2 * bpad) - bwidth, frame.bottom - (2 * bpad) - bheight,
114- frame.right - (2 * bpad), frame.bottom - (2 * bpad));
115- btnRect.OffsetBy (-(50 + (2 * bpad)), 0 );
116113
114+ bwidth = 120 ;
115+ btnRect = BRect (
116+ aboutRect.right - bwidth, frame.bottom - 15 - bheight, aboutRect.right , frame.bottom - 15 );
117+ btnRect.OffsetBy (-(50 + bpad), 0 );
117118 m_homePage = new BButton (btnRect, " homepagebtn" , " BeTeX Homepage" ,
118119 new BMessage (AboutMessages::K_GOTO_BETEX_HOMEPAGE));
119- m_gradient->AddChild (m_homePage);
120120
121- btnRect.OffsetBy (-(80 + (2 * bpad)), 0 );
122- btnRect.right = btnRect.left + 80 ;
123- m_beBits = new BButton (
124- btnRect, " fBeBitsbtn" , " BeBits Page" , new BMessage (AboutMessages::K_GOTO_BETEX_BEBITSPAGE));
125- m_gradient->AddChild (m_beBits);
126-
127- btnRect.OffsetBy (-(60 + (2 * bpad)), 0 );
128- btnRect.right = btnRect.left + 60 ;
121+ btnRect.OffsetBy (-(120 + bpad), 0 );
122+ btnRect.left = btnRect.right - 60 ;
129123 m_donate = new BButton (
130124 btnRect, " fDonatebtn" , " Donate" , new BMessage (AboutMessages::K_GOTO_BETEX_DONATEPAGE));
125+
131126 m_gradient->AddChild (m_donate);
127+ m_gradient->AddChild (m_homePage);
128+ m_gradient->AddChild (m_quit);
132129
133130 BMessenger mymsnger (this );
134131 BMessage increment (UPDATE_COLORS);
135-
132+ m_run = new BMessageRunner (mymsnger, &increment, UPDATE_TIME, - 1 );
136133 m_msgr = messenger;
137134}
138135
139136AboutWindow::~AboutWindow ()
140137{
141138 delete m_msgr;
139+ delete m_run;
142140}
143141
144142void
@@ -195,19 +193,13 @@ AboutWindow::MessageReceived(BMessage* msg)
195193 } break ;
196194 case AboutMessages::K_GOTO_BETEX_HOMEPAGE:
197195 {
198- const char * url = " http://misza.beosjournal.org" ;
199- be_roster->Launch (" text/html" , 1 , (char **)&url);
200- Quit ();
201- } break ;
202- case AboutMessages::K_GOTO_BETEX_BEBITSPAGE:
203- {
204- const char * url = " http://www.bebits.com/app/3919" ;
196+ const char * url = " https://github.com/HaikuArchives/BeTeX" ;
205197 be_roster->Launch (" text/html" , 1 , (char **)&url);
206198 Quit ();
207199 } break ;
208200 case AboutMessages::K_GOTO_BETEX_DONATEPAGE:
209201 {
210- const char * url = " http ://misza.beosjournal .org/donate.html " ;
202+ const char * url = " https ://www.haiku-inc .org/donate" ;
211203 be_roster->Launch (" text/html" , 1 , (char **)&url);
212204 Quit ();
213205 } break ;
0 commit comments