Changeset View
Changeset View
Standalone View
Standalone View
ui/pageviewannotator.cpp
Show First 20 Lines • Show All 169 Lines • ▼ Show 20 Line(s) | 168 | { | |||
---|---|---|---|---|---|
170 | f.fromString( m_annotElement.attribute( QStringLiteral("font") ) ); | 170 | f.fromString( m_annotElement.attribute( QStringLiteral("font") ) ); | ||
171 | ta->setTextFont( f ); | 171 | ta->setTextFont( f ); | ||
172 | } | 172 | } | ||
173 | //set width | 173 | //set width | ||
174 | if ( m_annotElement.hasAttribute( QStringLiteral ( "width" ) ) ) | 174 | if ( m_annotElement.hasAttribute( QStringLiteral ( "width" ) ) ) | ||
175 | { | 175 | { | ||
176 | ta->style().setWidth( m_annotElement.attribute( QStringLiteral ( "width" ) ).toDouble() ); | 176 | ta->style().setWidth( m_annotElement.attribute( QStringLiteral ( "width" ) ).toDouble() ); | ||
177 | } | 177 | } | ||
178 | // set font color | ||||
179 | if ( m_engineElement.hasAttribute( QStringLiteral("color") ) ) | ||||
180 | { | ||||
181 | if ( inplaceIntent == Okular::TextAnnotation::TypeWriter ) | ||||
182 | ta->setTextColor( m_engineElement.attribute( QStringLiteral("color") ) ); | ||||
183 | else | ||||
184 | ta->setTextColor( Qt::black ); | ||||
185 | } | ||||
178 | //set boundary | 186 | //set boundary | ||
179 | rect.left = qMin(startpoint.x,point.x); | 187 | rect.left = qMin(startpoint.x,point.x); | ||
180 | rect.top = qMin(startpoint.y,point.y); | 188 | rect.top = qMin(startpoint.y,point.y); | ||
181 | rect.right = qMax(startpoint.x,point.x); | 189 | rect.right = qMax(startpoint.x,point.x); | ||
182 | rect.bottom = qMax(startpoint.y,point.y); | 190 | rect.bottom = qMax(startpoint.y,point.y); | ||
183 | qCDebug(OkularUiDebug).nospace() << "xyScale=" << xscale << "," << yscale; | 191 | qCDebug(OkularUiDebug).nospace() << "xyScale=" << xscale << "," << yscale; | ||
184 | static const int padding = 2; | 192 | static const int padding = 2; | ||
185 | const QFontMetricsF mf(ta->textFont()); | 193 | const QFontMetricsF mf(ta->textFont()); | ||
▲ Show 20 Lines • Show All 1093 Lines • Show Last 20 Lines |