This commit is contained in:
Sebastian Kügler 2013-03-07 02:42:13 +01:00
parent 5a30426e07
commit 1a31c22e57
4 changed files with 10 additions and 12 deletions

View File

@ -161,7 +161,7 @@ bool DialogProxy::isVisible() const
void DialogProxy::setVisible(const bool visible)
{
qDebug() << visible;
//qDebug() << visible;
QRect avail = QRect(400, 300, 1200, 800);
if (visible) {
@ -208,16 +208,15 @@ QPoint DialogProxy::popupPosition(QQuickItem *item, Qt::AlignmentFlag alignment)
//If no item was specified try to align at the center of the parent view
QQuickItem *parentItem = qobject_cast<QQuickItem *>(parent());
if (parentItem && parentItem->window()) {
qDebug() << "NO visual parent ... Centering at " << (parentItem->window()->geometry().center() - QPoint(width()/2, height()/2));
//qDebug() << "NO visual parent ... Centering at " << (parentItem->window()->geometry().center() - QPoint(width()/2, height()/2));
return parentItem->window()->geometry().center() - QPoint(width()/2, height()/2);
} else {
qDebug() << "No QQuickItem as parent found";
//qDebug() << "No QQuickItem as parent found";
return QPoint();
}
}
qDebug() << "I've an Item";
QPointF pos = item->mapToScene(QPointF(0, 0));
qDebug() << "I've an Item at " << pos;
//qDebug() << "I've an Item at " << pos;
if (item->window() && item->window()->screen()) {
pos = item->window()->mapToGlobal(pos.toPoint());
} else {
@ -297,10 +296,10 @@ QPoint DialogProxy::popupPosition(QQuickItem *item, Qt::AlignmentFlag alignment)
} else {
menuPos.setY(avail.height() - item->boundingRect().height() + bottomMargin);
}
qDebug() << menuPos;
//qDebug() << menuPos;
}
qDebug() << "Popup position" << menuPos << " Location: Plasma::" <<locString(l);
//qDebug() << "Popup position" << menuPos << " Location: Plasma::" <<locString(l);
return menuPos;
}
@ -311,7 +310,7 @@ bool DialogProxy::isActiveWindow() const
void DialogProxy::activateWindow()
{
qDebug();
//qDebug();
//setWindowState(Qt::WindowActive);
}

View File

@ -94,7 +94,6 @@ PlasmaComponents.Dialog {
root.close()
}
}
Component.onCompleted: print("++++++++++++++++++++++ COmpleted button")
}
}

View File

@ -228,8 +228,8 @@ Item {
}
sourceComponent: {
print(" XXX Loading Source component XXX");
print(" root: " + rootItem.width + "x" + rootItem.height + " dlg: " + dialogLayout.width + "x" + dialogLayout.height);
//print(" XXX Loading Source component XXX");
//print(" root: " + rootItem.width + "x" + rootItem.height + " dlg: " + dialogLayout.width + "x" + dialogLayout.height);
if (loadCompleted) {
if (true || rootItem == null || dialogLayout.width > rootItem.width || dialogLayout.height > rootItem.height) {
print(" in external window");

View File

@ -160,7 +160,7 @@ FocusScope {
Private.TabBarLayout {
id: tabBarLayout
//A bit of snap before scolling the layout
//A bit of snap before scrolling the layout
width: (implicitWidth - parent.width < theme.defaultFont.mSize.width*4) ? parent.width : implicitWidth
anchors {
top: parent.top