mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-13 13:29:34 +02:00
Qt: draw rotated text on buttons via Themes.second part of issue #25253
git-svn-id: trunk@44094 -
This commit is contained in:
parent
204e1058b2
commit
914402e8f9
@ -580,9 +580,22 @@ begin
|
||||
if Details.Element in [teButton, teComboBox] then
|
||||
QPalette_setColor(Palette, ATextPalette, @AQColor); // issue #25253
|
||||
|
||||
if Context.font.Angle <> 0 then
|
||||
begin
|
||||
Context.Translate(R.Left, R.Top);
|
||||
Context.Rotate(-0.1 * Context.Font.Angle);
|
||||
OffsetRect(R, -R.Left, -R.Top);
|
||||
end;
|
||||
|
||||
QStyle_drawItemText(Style, Context.Widget, @R,
|
||||
DTFlagsToQtFlags(Flags), Palette,
|
||||
not IsDisabled(Details), @W, ATextPalette);
|
||||
|
||||
if Context.font.Angle <> 0 then
|
||||
begin
|
||||
Context.Translate(-R.Left, -R.Top);
|
||||
Context.Rotate(0.1 * Context.Font.Angle);
|
||||
end;
|
||||
Context.SetBkMode(AOldMode);
|
||||
finally
|
||||
QPalette_destroy(Palette);
|
||||
|
Loading…
Reference in New Issue
Block a user