mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
fixed several qml warnings
This commit is contained in:
parent
ac4772812a
commit
97c788203c
@ -39,7 +39,6 @@ GridComicsView::GridComicsView(QWidget *parent) :
|
||||
|
||||
container->setMinimumSize(200, 200);
|
||||
container->setFocusPolicy(Qt::TabFocus);
|
||||
view->setSource(QUrl("qrc:/qml/GridComicsView.qml"));
|
||||
|
||||
createCoverSizeSliderWidget();
|
||||
|
||||
@ -81,6 +80,25 @@ GridComicsView::GridComicsView(QWidget *parent) :
|
||||
ctxt->setContextProperty("fontSpacing", 0.5);
|
||||
#endif
|
||||
|
||||
ctxt->setContextProperty("backgroundImage", QUrl());
|
||||
ctxt->setContextProperty("backgroundBlurOpacity", 0.0);
|
||||
ctxt->setContextProperty("backgroundBlurRadius", 0.0);
|
||||
ctxt->setContextProperty("backgroundBlurVisible", false);
|
||||
|
||||
ComicModel *model = new ComicModel();
|
||||
QItemSelectionModel *selectionModel = new QItemSelectionModel(model);
|
||||
ctxt->setContextProperty("comicsList", model);
|
||||
ctxt->setContextProperty("comicsSelection", selectionModel);
|
||||
ctxt->setContextProperty("contextMenuHelper",this);
|
||||
ctxt->setContextProperty("comicsSelectionHelper", this);
|
||||
ctxt->setContextProperty("comicRatingHelper", this);
|
||||
ctxt->setContextProperty("dummyValue", true);
|
||||
ctxt->setContextProperty("dragManager", this);
|
||||
ctxt->setContextProperty("dropManager", this);
|
||||
|
||||
view->setSource(QUrl("qrc:/qml/GridComicsView.qml"));
|
||||
|
||||
|
||||
setShowMarks(true);//TODO save this in settings
|
||||
|
||||
QVBoxLayout * l = new QVBoxLayout;
|
||||
@ -188,9 +206,9 @@ void GridComicsView::updateBackgroundConfig()
|
||||
}
|
||||
else
|
||||
{
|
||||
ctxt->setContextProperty("backgroundImage", QVariant());
|
||||
ctxt->setContextProperty("backgroundBlurOpacity", 0);
|
||||
ctxt->setContextProperty("backgroundBlurRadius", 0);
|
||||
ctxt->setContextProperty("backgroundImage", QUrl());
|
||||
ctxt->setContextProperty("backgroundBlurOpacity", 0.0);
|
||||
ctxt->setContextProperty("backgroundBlurRadius", 0.0);
|
||||
ctxt->setContextProperty("backgroundBlurVisible", false);
|
||||
}
|
||||
|
||||
|
@ -373,7 +373,7 @@ Rectangle {
|
||||
objectName: "grid"
|
||||
anchors.fill: parent
|
||||
cellHeight: cellCustomHeight
|
||||
highlight: appHighlight
|
||||
//highlight: appHighlight
|
||||
focus: true
|
||||
model: comicsList
|
||||
delegate: appDelegate
|
||||
@ -432,7 +432,7 @@ Rectangle {
|
||||
var rest = width - (cWidth * wholeCells)
|
||||
|
||||
grid.cellWidth = cWidth + Math.floor(rest / wholeCells);
|
||||
console.log("cWidth",cWidth,"wholeCells=",wholeCells,"rest=",rest,"cellWidth=",cellWidth,"width=",width);
|
||||
//console.log("cWidth",cWidth,"wholeCells=",wholeCells,"rest=",rest,"cellWidth=",cellWidth,"width=",width);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user