Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
c4f6b338
Commit
c4f6b338
authored
Nov 30, 2020
by
Christoffer Ackelman
Committed by
Esteban Blanc
Dec 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QT: Fixed drawing rotated text in Glow, QT rotates clockwise, not anti-clockwise like GTK.
parent
13ca247b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
xtt/lib/glow/qt/glow_draw_qt.cqt
xtt/lib/glow/qt/glow_draw_qt.cqt
+6
-9
No files found.
xtt/lib/glow/qt/glow_draw_qt.cqt
View file @
c4f6b338
...
...
@@ -2917,10 +2917,7 @@ int GlowDrawQt::text_qt(GlowWind* wind, int x, int y, char* text, int len,
str = QString::fromUtf8(text);
}
if (rot != 0) {
rot = 360 - rot;
painter->rotate(rot);
}
painter->rotate(rot);
painter->setFont(get_font(font_idx, painter_type, size));
...
...
@@ -2932,19 +2929,19 @@ int GlowDrawQt::text_qt(GlowWind* wind, int x, int y, char* text, int len,
int px, py;
if (rot == 180) {
px = -x - width;
py =
(int)(-y - FONT_DESCENT * height)
;
} else if (rot ==
9
0) {
py =
-y - FONT_DESCENT * height
;
} else if (rot ==
27
0) {
px = -y - width + height / 2;
py = x;
} else if (rot ==
27
0) {
} else if (rot ==
9
0) {
px = y - width;
py = -x - height;
} else {
px = x;
py =
(int)(y - (1.0 - FONT_DESCENT) * height)
;
py =
y - (1.0 - FONT_DESCENT) * height
;
}
painter->drawText(px, py, rect.width(), rect.height(), Qt::TextDontClip, str);
painter->rotate(-rot);
return 1;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment