* BUG: TextLabel with AutoResize set takes the WordWrap property into 
  account correctly now.


git-svn-id: svn://localhost/gambas/trunk@3759 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2011-04-12 22:38:32 +00:00
parent 350c5d8cef
commit 319036d197
3 changed files with 22 additions and 11 deletions

4
TODO
View file

@ -27,6 +27,10 @@ INTERPRETER
- select() system call can fail if a watched file descriptor is in error. But how can I know
the offending file descritor? Maybe by using poll() instead.
DEBUGGER
- Add/Remove a breakpoint without pausing the program!
DEVELOPMENT ENVIRONMENT
- Bookmarks in editor.

View file

@ -265,23 +265,30 @@ void MyLabel::calcMinimumHeight(bool adjust)
doc.setDocumentMargin(0);
doc.setHtml(text());
w = width() - f * 2;
if (adjust)
if (wordWrap())
{
//doc.adjustSize();
w = width() - f * 2;
doc.setTextWidth(w);
nw = doc.idealWidth();
doc.setTextWidth(nw);
nh = doc.size().height(); // Why (- 6) ? Don't know...
nw = doc.size().width();
if (adjust)
{
//doc.adjustSize();
nw = doc.idealWidth();
doc.setTextWidth(nw);
nh = doc.size().height(); // Why (- 6) ? Don't know...
nw = doc.size().width();
}
else
{
nh = doc.size().height(); // Why (- 6) ? Don't know...
nw = w;
}
}
else
{
doc.setTextWidth(w);
nh = doc.size().height(); // Why (- 6) ? Don't know...
nw = w;
nw = doc.size().width();
}
}
else

View file

@ -129,7 +129,7 @@ GEditor::GEditor(QWidget *parent)
setKeyCompression(true);
setFocusPolicy(Qt::WheelFocus);
setAttribute(Qt::WA_InputMethodEnabled, true);
//setAttribute(Qt::WA_StaticContents, true);
setAttribute(Qt::WA_StaticContents, true);
setMouseTracking(true);
viewport()->setMouseTracking(true);