[GB.QT4]
* BUG: ScrollView: Layout is now correct if the ScrollBar property is set to Scroll.None. git-svn-id: svn://localhost/gambas/trunk@6695 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
dfc8140da0
commit
64ac98d336
@ -75,6 +75,16 @@ void MyScrollView::doUpdateScrollbars()
|
|||||||
qApp->sendEvent(this, &e);
|
qApp->sendEvent(this, &e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int MyScrollView::getScrollbar()
|
||||||
|
{
|
||||||
|
int scroll = 0;
|
||||||
|
if (horizontalScrollBarPolicy() == Qt::ScrollBarAsNeeded)
|
||||||
|
scroll += 1;
|
||||||
|
if (verticalScrollBarPolicy() == Qt::ScrollBarAsNeeded)
|
||||||
|
scroll += 2;
|
||||||
|
return scroll;
|
||||||
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
|
||||||
class MyContents
|
class MyContents
|
||||||
@ -291,7 +301,10 @@ void MyContents::autoResize(void)
|
|||||||
qDebug("autoResize: (%s %p)", THIS->widget.name, THIS);
|
qDebug("autoResize: (%s %p)", THIS->widget.name, THIS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sbsize = qApp->style()->pixelMetric(QStyle::PM_ScrollBarExtent) + QMAX(0, qApp->style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing));
|
if (sw->getScrollbar())
|
||||||
|
sbsize = qApp->style()->pixelMetric(QStyle::PM_ScrollBarExtent) + QMAX(0, qApp->style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing));
|
||||||
|
else
|
||||||
|
sbsize = 0;
|
||||||
|
|
||||||
locked = THIS->arrangement.locked;
|
locked = THIS->arrangement.locked;
|
||||||
THIS->arrangement.locked = true;
|
THIS->arrangement.locked = true;
|
||||||
@ -665,15 +678,7 @@ BEGIN_PROPERTY(CSCROLLVIEW_scrollbar)
|
|||||||
int scroll;
|
int scroll;
|
||||||
|
|
||||||
if (READ_PROPERTY)
|
if (READ_PROPERTY)
|
||||||
{
|
GB.ReturnInteger(WIDGET->getScrollbar());
|
||||||
scroll = 0;
|
|
||||||
if (WIDGET->horizontalScrollBarPolicy() == Qt::ScrollBarAsNeeded)
|
|
||||||
scroll += 1;
|
|
||||||
if (WIDGET->verticalScrollBarPolicy() == Qt::ScrollBarAsNeeded)
|
|
||||||
scroll += 2;
|
|
||||||
|
|
||||||
GB.ReturnInteger(scroll);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
scroll = VPROP(GB_INTEGER) & 3;
|
scroll = VPROP(GB_INTEGER) & 3;
|
||||||
|
@ -68,6 +68,7 @@ public:
|
|||||||
bool _scroll_sent;
|
bool _scroll_sent;
|
||||||
|
|
||||||
void doUpdateScrollbars();
|
void doUpdateScrollbars();
|
||||||
|
int getScrollbar();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user