on xenial help sign in
Update cardCreator cache con artShapeStyle changes
3598567Andrea Cimitan
plugins/Dash/CardCreatorCache.qml+1−1
@@ -29,7 +29,7 @@ QtObject {
29
29
30 var tString = JSON.stringify(template);
30 var tString = JSON.stringify(template);
31 var cString = JSON.stringify(components);
31 var cString = JSON.stringify(components);
32− var allString = tString + cString + isCardTool;
32+ var allString = tString + cString + artShapeStyle + isCardTool;
33 var component = cache[allString];
33 var component = cache[allString];
34 if (component === undefined) {
34 if (component === undefined) {
35 component = CardCreator.createCardComponent(root, template, components, isCardTool, artShapeStyle, allString);
35 component = CardCreator.createCardComponent(root, template, components, isCardTool, artShapeStyle, allString);
qml/Dash/CardTool.qml+2−2
@@ -70,7 +70,7 @@ Item {
70 // Not readonly because gets overwritten from GenericScopeView in some cases
70 // Not readonly because gets overwritten from GenericScopeView in some cases
71 property string artShapeStyle: categoryLayout === "carousel" ? "shadow" : "inset"
71 property string artShapeStyle: categoryLayout === "carousel" ? "shadow" : "inset"
72
72
73− property var cardComponent: CardCreatorCache.getCardComponent(cardTool.template, cardTool.components, false, artShapeStyle);
73+ property var cardComponent: CardCreatorCache.getCardComponent(cardTool.template, cardTool.components, false, cardTool.artShapeStyle);
74
74
75 // FIXME: Saviq
75 // FIXME: Saviq
76 // Only way for the card below to actually be laid out completely.
76 // Only way for the card below to actually be laid out completely.
@@ -212,7 +212,7 @@ Item {
212 "attributes": attributesModel.model,
212 "attributes": attributesModel.model,
213 "socialActions": socialActionsModel.model
213 "socialActions": socialActionsModel.model
214 }
214 }
215− sourceComponent: CardCreatorCache.getCardComponent(cardTool.template, cardTool.components, true, artShapeStyle);
215+ sourceComponent: CardCreatorCache.getCardComponent(cardTool.template, cardTool.components, true, cardTool.artShapeStyle);
216 onLoaded: {
216 onLoaded: {
217 item.objectName = "cardToolCard";
217 item.objectName = "cardToolCard";
218 item.width = Qt.binding(function() { return cardTool.cardWidth !== -1 ? cardTool.cardWidth : item.implicitWidth; });
218 item.width = Qt.binding(function() { return cardTool.cardWidth !== -1 ? cardTool.cardWidth : item.implicitWidth; });