mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
attempt at fixing text extent for gtk
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@400 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -235,8 +235,11 @@ double RotatedDC::getFontSizeStep() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RealSize RotatedDC::GetTextExtent(const String& text) const {
|
RealSize RotatedDC::GetTextExtent(const String& text) const {
|
||||||
int w, h;
|
int w, h, descend;
|
||||||
dc.GetTextExtent(text, &w, &h);
|
dc.GetTextExtent(text, &w, &h, &descend);
|
||||||
|
#ifdef __WXGTK__
|
||||||
|
h += descend; /// wxGTK seems to think character height does not include the descender.
|
||||||
|
#endif
|
||||||
if (quality == QUALITY_LOW) {
|
if (quality == QUALITY_LOW) {
|
||||||
return RealSize(w,h) / zoom;
|
return RealSize(w,h) / zoom;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user