- Posts: 4
- Thank you received: 0
- Forum
- CodeTyphon Studio
- CodeTyphon Studio Components and Libraries
- General Purpose
- [LAB] Cindy components
×
General Purpose Components and Libraries, discussions, problems and suggestions
Question [LAB] Cindy components
- chor
- Offline
- New Member
-
Less
More
3 years 4 months ago #11044
by chor
Replied by chor on topic [LAB] Cindy components
Hi Sternas, thanks for looking into this. I am using v6.00 with GTK2, hosted by Ubuntu 16.04 64bits, is there a patch I can apply to my current setup? Attached is an 'about' screen dump.
Many thanks,
Chor
Many thanks,
Chor
Please Log in or Create an account to join the conversation.
- Sternas Stefanos
-
Topic Author
- Offline
- Moderator
-
- Ex Pilot, M.Sc, Ph.D
3 years 4 months ago - 3 years 4 months ago #11045
by Sternas Stefanos
PilotLogic Architect and Core Programmer
Replied by Sternas Stefanos on topic [LAB] Cindy components
unit cyBaseSpeedButton.pas
replace
procedure TcyBaseSpeedButton.DrawCaption
with this code
replace
procedure TcyBaseSpeedButton.DrawCaption
with this code
//--- ct9999 -----------------
procedure TcyBaseSpeedButton.DrawCaption(aRect: TRect; aState: TButtonState; Hot: Boolean; GlyphExists: Boolean);
var
aAlignment: TAlignment;
aTextLayout: TTextLayout;
DrawStyle: LongInt;
TmpFont: TFont;
xTextStyle:TTextStyle;
begin
if Caption = '' then EXIT;
aAlignment := taCenter;
aTextLayout := tlCenter;
if GlyphExists
then
case Layout of
blGlyphLeft: aAlignment := taLeftJustify;
blGlyphRight: aAlignment := taRightJustify;
blGlyphTop: aTextLayout := tlTop;
blGlyphBottom: aTextLayout := tlBottom;
end;
DrawStyle := cyGraphics.DrawTextFormatFlags(0, aAlignment, aTextLayout, FWordWrap);
// DrawStyle := DrawTextBiDiModeFlags(DrawStyle); ct9999
if FCaptionOrientation = coHorizontal
then begin
xTextStyle:=Canvas.TextStyle;
xTextStyle.Alignment:=taCenter;
xTextStyle.Layout:= tlCenter;
Canvas.TextRect(aRect,0,0,Caption,xTextStyle);
end
else begin
// Use Canvas.Font because already assigned on DrawButton and can be changed on BeforePaint event !
TmpFont := cyCreateFontIndirect(Canvas.Font, FCaptionOrientation);
try
Canvas.Font.Assign(TmpFont);
cyDrawVerticalText(Canvas, Caption, aRect, DrawStyle, FCaptionOrientation, aAlignment, aTextLayout);
finally
TmpFont.Free;
end;
end;
end;
//---------------------------
PilotLogic Architect and Core Programmer
Last edit: 3 years 4 months ago by Sternas Stefanos.
The following user(s) said Thank You: chor
Please Log in or Create an account to join the conversation.
- chor
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
3 years 4 months ago #11059
by chor
Replied by chor on topic [LAB] Cindy components
The patch has side effects on some of the cindy button, have worked round it for now. Many thanks for all your help. Really appreciate all the wonderful work you are putting into CodeTyphon. Looking forward to the new release!
Best Regards,
Chor
Best Regards,
Chor
Please Log in or Create an account to join the conversation.
- Sternas Stefanos
-
Topic Author
- Offline
- Moderator
-
- Ex Pilot, M.Sc, Ph.D
3 years 4 months ago #11060
by Sternas Stefanos
PilotLogic Architect and Core Programmer
Replied by Sternas Stefanos on topic [LAB] Cindy components
Thanks Sir
have fun
have fun
PilotLogic Architect and Core Programmer
Please Log in or Create an account to join the conversation.