Alexey-T / ATFlatControls

Controls for Delphi/Lazarus, used in CudaText: ATTabs, ATButton, ATListbox, ATScrollbar, ATStatusbar, ATGroups, ATGauge
Other
101 stars 29 forks source link

ATTABS new version ellipse issue #63

Closed srd-software closed 3 years ago

srd-software commented 3 years ago

Hi Alexey,

I have a strange issue with the latest version of ATTABS. If I have tabs with no ellipsis in them the tab captions are OK. However, if the tab captions are longer than will fit in the tabs, I get odd characters where I should be getting ellipsis (should be these: ... ). I'll put in some screen shots below. The first one is how it should look, the second one is what I'm now getting. As far as I can see in my code, I'm not drawing any text myself, it's all in the tab control. If I maximize the app so some of the tabs no longer need ellipsis, those tabs are then OK until I restore the app to normal size. I have no idea what the problem is or even where to start looking!

CORRECT:

image

The one below is INCORRECT and what I get with the latest version:

image

Alexey-T commented 3 years ago

UTF8Decode / UTF8Encode is missed for rendeding... will check it.. What Delphi version?

Alexey-T commented 3 years ago

check ATCanvasPrimitives.pas is it in OK coding? dots is OK?

function CanvasCollapseStringByDots(C: TCanvas;
  const Text: string;
  Mode: TATCollapseStringMode;
  Width: integer;
  DotsString: string='…'): string;
const                                   
Alexey-T commented 3 years ago

did my fix help? @srd-software

srd-software commented 3 years ago

check ATCanvasPrimitives.pas is it in OK coding? dots is OK?

function CanvasCollapseStringByDots(C: TCanvas;
  const Text: string;
  Mode: TATCollapseStringMode;
  Width: integer;
  DotsString: string='…'): string;
const                                   

My ATCanvasPrimitives.pas has that function in it. Do I need to call that from my app somewhere?

Alexey-T commented 3 years ago

no, please test my fix (added today).

srd-software commented 3 years ago

Oh, OK. I'll try it and let you know in a minute.

srd-software commented 3 years ago

OK, yes, that's working now and so is the cursor! Thanks Alexey