mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Replace MathData::kerning_ member by a function
This allows to make kerning depend on the BufferView? This is not useful right now, but may become useful for multimonotor setting with different dpi.
This commit is contained in:
parent
d1a678563e
commit
4cc4663262
@ -48,7 +48,7 @@ namespace lyx {
|
||||
|
||||
MathData::MathData(Buffer * buf, const_iterator from, const_iterator to)
|
||||
: base_type(from, to), minasc_(0), mindes_(0), slevel_(0),
|
||||
sshift_(0), kerning_(0), buffer_(buf)
|
||||
sshift_(0), buffer_(buf)
|
||||
{}
|
||||
|
||||
|
||||
@ -282,7 +282,6 @@ void MathData::metrics(MetricsInfo & mi, Dimension & dim, bool tight) const
|
||||
|
||||
MathRow mrow(mi, this);
|
||||
mrow.metrics(mi, dim);
|
||||
kerning_ = mrow.kerning(bv);
|
||||
|
||||
// Set a minimal ascent/descent for the cell
|
||||
if (tight)
|
||||
@ -381,6 +380,12 @@ void MathData::drawT(TextPainter & pain, int x, int y) const
|
||||
}
|
||||
|
||||
|
||||
int MathData::kerning(BufferView const * bv) const
|
||||
{
|
||||
return bv->mathRow(this).kerning(bv);
|
||||
}
|
||||
|
||||
|
||||
void MathData::updateBuffer(ParIterator const & it, UpdateType utype)
|
||||
{
|
||||
// pass down
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
public:
|
||||
///
|
||||
MathData(Buffer * buf = 0) : minasc_(0), mindes_(0), slevel_(0),
|
||||
sshift_(0), kerning_(0), buffer_(buf) {}
|
||||
sshift_(0), buffer_(buf) {}
|
||||
///
|
||||
MathData(Buffer * buf, const_iterator from, const_iterator to);
|
||||
///
|
||||
@ -170,7 +170,7 @@ public:
|
||||
/// additional super/subscript shift
|
||||
int sshift() const { return sshift_; }
|
||||
/// Italic correction as described in InsetMathScript.h
|
||||
int kerning(BufferView const *) const { return kerning_; }
|
||||
int kerning(BufferView const *) const;
|
||||
///
|
||||
void swap(MathData & ar) { base_type::swap(ar); }
|
||||
|
||||
@ -188,7 +188,6 @@ protected:
|
||||
mutable int mindes_;
|
||||
mutable int slevel_;
|
||||
mutable int sshift_;
|
||||
mutable int kerning_;
|
||||
Buffer * buffer_;
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user