mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 13:19:18 +02:00
Merged revision(s) 44094 #914402e8f9 from trunk:
Qt: draw rotated text on buttons via Themes.second part of issue #25253 ........ git-svn-id: branches/fixes_1_2@44186 -
This commit is contained in:
parent
1f1a8fb4b7
commit
0738460479
@ -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