[Kst] branches/work/kst/portto4/kst/src/libkstapp
Barth Netterfield
netterfield at astro.utoronto.ca
Mon Jun 18 19:43:10 UTC 2012
SVN commit 1301729 by netterfield:
Respect Bold or Italic if selected in the dialog. It now gets 'or'ed
with 'latex' requests like \Textbf{...} instead of being overridden.
M +1 -0 labelitem.cpp
M +4 -2 labelrenderer.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/labelitem.cpp #1301728:1301729
@@ -78,6 +78,7 @@
parsed->chunk->attributes.color = _color;
_dirty = false;
QFont font(_font);
+
if (_resized) {
font.setPointSizeF(view()->scaledFontSize(_scale, *p->device()));
Label::RenderContext *tmpRc = new Label::RenderContext(font, p);
--- branches/work/kst/portto4/kst/src/libkstapp/labelrenderer.cpp #1301728:1301729
@@ -40,6 +40,8 @@
int oldSize = rc.size = rc.fontSize();
int oldY = rc.y;
int oldX = rc.x;
+ bool boldFont = rc.font().bold();
+ bool italicFont = rc.font().italic();
Kst::Document *doc = kstApp->mainWindow()->document();
Q_ASSERT(doc);
@@ -64,8 +66,8 @@
f.setPointSizeF(rc.size);
}
- f.setBold(fi->attributes.bold);
- f.setItalic(fi->attributes.italic);
+ f.setBold(fi->attributes.bold || boldFont);
+ f.setItalic(fi->attributes.italic || italicFont);
f.setUnderline(fi->attributes.underline);
f.setOverline(fi->attributes.overline);
More information about the Kst
mailing list