I'm pleased to announce that TChromeTabs has reached it's first non beta release (1.0). There are loads of bug fixes and a few new features including complete BiDi (Right to Left) support.

I'm pleased to announce that TChromeTabs has reached it's first non beta release (1.0). There are loads of bug fixes and a few new features including complete BiDi (Right to Left) support.

I've set up a new TChromeTabs homepage that lists most of the main features and includes a few screenshots. You can find it here http://www.easy-ip.net/tchrometabs.html.

Many thanks to everyone that has submitted bugs and feature requests. Please keep them coming!
http://www.easy-ip.net/tchrometabs.html

Comments

  1. Good job, will test it later today or tomorrow

    ReplyDelete
  2. Thanks Paul for your great job. I have downloaded the latest build and I saw that you have implemented the BidiMode property but when I have tested this property I found that it is not working the proper way as I mentioned in the previous post. May be my description was not clear, so I have uploaded an image with a table & illustration of each value of the property that show how it should be implement. 

    http://i49.tinypic.com/xefvwn.png

    I hope we can see this in the next build.

    Thanks again

    ReplyDelete
  3. Khalid Dawood - Hi. Thanks for the bug report. I'll get it fixed as soon as I get the chance.

    ReplyDelete
  4. Khalid Dawood - In your image both bdLeftToRight and bdRightToLeftReadingOnly are the same. Should the latter not have Left aligned tabs and Right aligned text?

    ReplyDelete
  5. Khalid Dawood - Hi again... I've just uploaded the fix. You will need to get the latest version from subversion to see the changes.

    ReplyDelete
  6. Hi Paul, I have downloaded the latest version  from subversion, there is still some minor changes needed and one bug is not related to the Bidi I think.

    *) BidiMode issues:
    ------------------------
    If you refer to the previous image in my above post and compare it with the last update you will find the following:
    1) in BidiMode = bdRightToLeftNoAlign : you need to add the DT_RTLREADING to represent RightToLeft text reading (no need to add DT_RIGHT flag)
    2) in BidiMode = bdRightToLeftReadingOnly : you need to add the DT_LEFT to DrawText flags or remove DT_RIGHT from DrawText flags to show text alignment in left side

    *) Scroll Buttons:
    -----------------------
    If you choose csbLeftAndRight you will see that closing tabs will be duplicated and it will take around 2 seconds to update it self (you can represent this issue by adding many tabs to activate the right and left scroll buttons and try to close a tab)

    ReplyDelete
  7. Khalid Dawood Hi... 

    1) I don't use the DT_RIGHT flag. I use GDI+, so it's actually StringFormatFlagsDirectionRightToLeft. Can you explain what the problem with the display is instead? To me it looks exactly like the image you posted.

    2) Can you explain why you would want the text to align to the left for dbRightToLeftAlignReadingOnly?  This makes it exactly the same as bdRightToLeftNoAlign. Am I missing something?

    The bug you reported doesn't seem to have anything to do with the scroll buttons. It happens when you close a tab that isn't the last tab and the tabs are compressed. I'll try to fix it for the next update.

    Cheers,
    Paul

    ReplyDelete
  8. Hi,
    If you refer to the image I have posted, there was a table in the above will show the effect of each property on:
    1) Tab Direction
    2) Text Reading
    3) Text Alignment

    The first two properties work as shown on the table, but the last two need small modification.
    1) bdRightToLeftNoAlign  :
    - Tabs Direction is OK
    - Text Reading is not OK (need to be RightToLeft)
    - Text Alignment is OK 

    2) bdRightToLeftReadingOnly :
    - Tabs Direction is OK
    - Text Reading is OK 
    - Text Alignment is not OK (need to be Left Alignment)

    Check the the effect of these properties in your demo and compare it with the image I have post:
     
    http://i49.tinypic.com/xefvwn.png

    You can use the following Arabic String for Tabs to see the effect:
    Tab1 : 1- اختبار ...
    Tab2 : 2- تبويب جوجل كروم

    Thanks & Regards,

    Khalid Dawood

    ReplyDelete
  9. Khalid Dawood - sorry, I missed the text reading direction column of your table. Not being an Arabic reader, the first and last examples look the same to me :) I don't remember seeing a property for reading direction in GDI+, but I'll take a look and see what's available.

    ReplyDelete
  10. Khalid Dawood - Hi again. Take a look here: http://msdn.microsoft.com/en-gb/library/windows/desktop/ms534181(v=vs.85).aspx. There's only one right to left option for rendering GDI+ text. Maybe I'm missing something due to my lack of understanding of the subject. If I am, can you point me in the right direction?

    ReplyDelete
  11. Paul Thornton - Hi,
    I have made small modification to your code and every thing works as expected, also I have added option to change the BidiMode to your demo to test it.
    To download the updates and the demo use the following link:
    https://www.box.com/s/7x56yvuz1x9olv6w3b92

    I have remarked the modification code by:
    //Updated by Khalid Dawood or // Added by Khalid Dawood

    The modification is:
    1) In ChromeTabsTypes Unit:
     const
      //Updated by Khalid Dawood
      BidiLeftToRightTabModes: TBiDiModes = [bdLeftToRight, bdRightToLeftReadingOnly];
      BidiRightToLeftTabModes: TBiDiModes = [bdRightToLeft, bdRightToLeftNoAlign];
      BidiLeftToRightTextModes: TBiDiModes = [bdLeftToRight];
      BidiRightToLeftTextModes: TBiDiModes = [bdRightToLeft, bdRightToLeftNoAlign, bdRightToLeftReadingOnly];
      // Added by Khalid Dawood
      BidiRightToLeftTextAlignmentModes: TBiDiModes = [bdLeftToRight, bdRightToLeft];

    2) In ChromeTabsControls Unit:
    In TChromeTabControl.DrawTo.DrawGDITextWithOffset the following was updated:
              // Set the vertical alignment  //Updated by Khalid Dawood
              case ChromeTabs.GetOptions.Display.Tabs.TextAlignmentHorizontal of
                taLeftJustify: if ChromeTabs.GetBidiMode in BidiRightToLeftTextAlignmentModes then
                                 TxtFormat.SetAlignment(StringAlignmentNear)
                               else
                                 TxtFormat.SetAlignment(StringAlignmentFar);
                taRightJustify: if ChromeTabs.GetBidiMode in BidiRightToLeftTextAlignmentModes then
                                 TxtFormat.SetAlignment(StringAlignmentFar)
                               else
                                 TxtFormat.SetAlignment(StringAlignmentNear);
                taCenter: TxtFormat.SetAlignment(StringAlignmentCenter);
              end;

    That's all,

    Regards,
    Khalid Dawood

    ReplyDelete
  12. Khalid Dawood - Thanks for the fix. I've commited the changes to the repository. When using Right to Left Reading Only Bibi Mode the text is is aligned to the left and also truncated (ellipses/fade etc) of the left. When using a western character set this looks wrong. Can you confirm that this is the correct behaviour or does it need to be fixed?

    ReplyDelete
  13. Paul Thornton You are right about that, I have updated the fix as following:

    1) In ChromeTabsTypes Unit:
    const
      BidiLeftToRightTabModes: TBiDiModes = [bdLeftToRight, bdRightToLeftReadingOnly];
      BidiRightToLeftTabModes: TBiDiModes = [bdRightToLeft, bdRightToLeftNoAlign];
      BidiLeftToRightTextModes: TBiDiModes = [bdLeftToRight];
      BidiRightToLeftTextModes: TBiDiModes = [bdRightToLeft, bdRightToLeftNoAlign, bdRightToLeftReadingOnly];
      BidiLeftTextAlignmentModes: TBiDiModes = [bdLeftToRight, bdRightToLeftNoAlign, bdRightToLeftReadingOnly];
      BidiRightTextAlignmentModes: TBiDiModes = [bdRightToLeft];


    2) In ChromeTabsControls Unit:
    In TChromeTabControl.DrawTo.DrawGDITextWithOffset the following was updated:

    2.1)
                if ChromeTabs.GetBiDiMode in BidiRightTextAlignmentModes then
                begin
                  BlendFactorsFade[0] := 1.0;
                  BlendFactorsFade[2] := 0.0;

                  BlendPositions[1] := 1 - BlendPositions[1];
                end
                else
                begin
                  BlendFactorsFade[0] := 0.0;
                  BlendFactorsFade[2] := 1.0;
                end;

    2.2)
              // Set the horizontal alignment
              case ChromeTabs.GetOptions.Display.Tabs.TextAlignmentHorizontal of
                taLeftJustify: if (ChromeTabs.GetBidiMode in BidiLeftToRightTextModes) or (ChromeTabs.GetBidiMode in BidiRightTextAlignmentModes) then
                                 TxtFormat.SetAlignment(StringAlignmentNear)
                               else
                                 TxtFormat.SetAlignment(StringAlignmentFar);
                taRightJustify: if (ChromeTabs.GetBidiMode in BidiLeftToRightTextModes) or (ChromeTabs.GetBidiMode in BidiRightTextAlignmentModes) then
                                 TxtFormat.SetAlignment(StringAlignmentFar)
                               else
                                 TxtFormat.SetAlignment(StringAlignmentNear);
                taCenter: TxtFormat.SetAlignment(StringAlignmentCenter);
              end;

    I have test it and it was fixed.

    ReplyDelete
  14. Khalid Dawood Fixed and committed :)

    ReplyDelete

Post a Comment