We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 742cffd + 291eadf commit 1d1bed7Copy full SHA for 1d1bed7
1 file changed
Toyota Widget/MyToyota.js
@@ -65,6 +65,21 @@ function addDetailsGrid(widget) {
65
addDetailBlock(row2, "Status", carInfo.status)
66
}
67
68
+// Toyota Car Widget - Part 6: Text-only layout for small/medium
69
+function buildCompactWidget(widget) {
70
+ widget.setPadding(12, 14, 12, 14)
71
+
72
+ const title = widget.addText(`${carInfo.brand} ${carInfo.model}`)
73
+ title.font = Font.boldSystemFont(16)
74
+ title.textColor = textColor
75
+ widget.addSpacer(6)
76
77
+ addDetailText(widget, "Year", carInfo.year)
78
+ addDetailText(widget, "Mileage", carInfo.mileage)
79
+ addDetailText(widget, "Fuel", carInfo.fuel)
80
+ addDetailText(widget, "Status", carInfo.status)
81
+}
82
83
84
// Toyota Car Widget - Part 5: Add key-value detail box
85
function addDetailBlock(stack, label, value) {
0 commit comments