@@ -353,18 +353,15 @@ protected override void OnPaint(PaintEventArgs e) {
353
353
if ( fATabStripItem . Visible || base . DesignMode ) {
354
354
OnCalcTabPage ( e . Graphics , fATabStripItem ) ;
355
355
fATabStripItem . IsDrawn = false ;
356
- OnDrawTabButton ( e . Graphics , fATabStripItem ) ;
356
+ DrawSingleTabButton ( e . Graphics , fATabStripItem ) ;
357
357
}
358
358
}
359
359
360
360
//--------------------------------------------------------
361
- // DRAW BOTTOM LINE to tabButtons, Except Active Tab.
361
+ // DRAW BOTTOM LINE on the left/right side of the selected tab
362
362
363
- if ( Items . DrawnCount == 0 || Items . VisibleCount == 0 ) {
364
- e . Graphics . DrawLine ( Pens . Red , new Point ( 0 , BrowserTabStyle . TabHeight ) , new Point ( base . ClientRectangle . Width , BrowserTabStyle . TabHeight ) ) ;
365
- }
366
- else if ( SelectedTab != null && SelectedTab . IsDrawn ) {
367
- var lineColorPen = new Pen ( BrowserTabStyle . NormalTabBackColor ) ;
363
+ if ( SelectedTab != null && SelectedTab . IsDrawn ) {
364
+ var lineColorPen = new Pen ( BrowserTabStyle . TabBorderColor , BrowserTabStyle . TabBorderThickness ) ;
368
365
369
366
Point point = new Point ( ( int ) SelectedTab . StripRect . Left - TabRadius , BrowserTabStyle . TabHeight ) ;
370
367
e . Graphics . DrawLine ( lineColorPen , new Point ( 0 , BrowserTabStyle . TabHeight ) , point ) ;
@@ -415,9 +412,9 @@ private void OnCalcTabPage(Graphics g, BrowserTabPage currentItem) {
415
412
416
413
417
414
/// <summary>
418
- /// Draws The Tab Header button
415
+ /// Draws a single tab header button.
419
416
/// </summary>
420
- private void OnDrawTabButton ( Graphics g , BrowserTabPage tab ) {
417
+ private void DrawSingleTabButton ( Graphics g , BrowserTabPage tab ) {
421
418
Items . IndexOf ( tab ) ;
422
419
Font font = Font ;
423
420
@@ -427,7 +424,7 @@ private void OnDrawTabButton(Graphics g, BrowserTabPage tab) {
427
424
RectangleF stripRect = tab . StripRect ;
428
425
var sr = stripRect ;
429
426
SolidBrush brush = new SolidBrush ( ( tab == SelectedTab ) ? BrowserTabStyle . SelectedTabBackColor : BrowserTabStyle . NormalTabBackColor ) ;
430
- Pen pen = new Pen ( ( tab == SelectedTab ) ? BrowserTabStyle . SelectedTabBackColor : BrowserTabStyle . NormalTabBackColor ) ;
427
+ Pen pen = new Pen ( ( tab == SelectedTab ) ? BrowserTabStyle . TabBorderColor : BrowserTabStyle . NormalTabBackColor , BrowserTabStyle . TabBorderThickness ) ;
431
428
432
429
//--------------------------------------------------------
433
430
// Calc Rect for the Tab
@@ -449,18 +446,16 @@ private void OnDrawTabButton(Graphics g, BrowserTabPage tab) {
449
446
//g.DrawRoundRectangle(SystemPens.ControlDark, tabDrawnRect, TabRadius);
450
447
451
448
//--------------------------------------------------------
452
- //// Rounded Chrome Tabs
449
+ // Rounded Chrome Tabs
453
450
//--------------------------------------------------------
454
451
var tabpathNew =
455
452
isActiveTab ?
456
453
tabDrawnRect . CreateTabPath_Roundtop_RoundBottomOut ( TabRadius ) :
457
454
tabDrawnRect . CreateTabPath_roundAll ( TabRadius ) ;
458
455
459
456
g . FillPath ( brush , tabpathNew ) ;
460
- //g.DrawPath(SystemPens.ControlDark, tabpathNew);
461
- //--white color requires more work...
462
457
g . DrawPath ( pen , tabpathNew ) ;
463
- //-- draw , tab seperator line: | TAB1 | TAB2
458
+ // draw tab seperator line: | TAB1 | TAB2
464
459
if ( ! isActiveTab && ! is_atRightof_ActiveTab ) {
465
460
int margin = 14 ;
466
461
sr . Y += 2 ; //move rect down
0 commit comments