On 09/15/2010 01:42 PM, Abdelrazak Younes wrote:
On 09/15/2010 01:39 PM, Richard Heck wrote:
On 09/15/2010 07:28 AM, Abdelrazak Younes wrote:
void InsetLine::draw(PainterInfo& pi, int x, int y) const
{
- frontend::FontMetrics const& fm = theFontMetrics(pi.base.font);
+ // FIXME: We cannot use InsetCommand::dimension() as this
returns the dimension
+ // of the button, which is not used here!
+ Dimension const dim =
pi.base.bv->coordCache().getInsets().dim(this);
+ int const max_width = dim.width();
What about overriding InsetCommand::dimension() here? I.e., by
default that returns the size of the button, but can be overridden if
that isn't relevant.
Actually Inset::dimension() does exactly what we want. But calling
Inset::dimension() doesn't work, don't know why, maybe some virtual
keyword missing somewhere...
Hum weird... it works now under Linux but it didn't work yesterday...
OK, I'll commit that.
Abdel.