zui 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Components/Builtins/Support/ChartCanvas.qml +9 -1
- data/README.md +8 -6
- data/lib/zui.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0999bab5076e4e21bf90ec3640b66299b922f06b5b1365f77a3e2c8535c4b483'
|
|
4
|
+
data.tar.gz: fdd3778327cc3fac59b2b3017e2b181bff8e6965cd88a34248b4204e2954b6d1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6742f765a1b83dd292971a800e84b4e83ddd0d7c69c9ec8b42dc921850a8f73a095c436118fa403d1dc90400535b7191bd61e844c8950e74e1c2ef98bf695cd3
|
|
7
|
+
data.tar.gz: 4d39a113ac0d61a0a2373101b79e5807c19642b657965675f77871f54cfcbf744dbb14f7b2501a9af3940d6c6d28bbd1f39cf7daa0bf07653780789e98dcc642
|
|
@@ -6,6 +6,13 @@ Item {
|
|
|
6
6
|
|
|
7
7
|
required property var renderer
|
|
8
8
|
required property string chartType
|
|
9
|
+
readonly property string requestedFontFamily: String(renderer.prop("font_family", renderer.fontFamily))
|
|
10
|
+
|
|
11
|
+
Text {
|
|
12
|
+
id: fontResolver
|
|
13
|
+
visible: false
|
|
14
|
+
font.family: chartRoot.requestedFontFamily
|
|
15
|
+
}
|
|
9
16
|
|
|
10
17
|
function colors() {
|
|
11
18
|
var result = renderer.prop("colors", []);
|
|
@@ -52,7 +59,8 @@ Item {
|
|
|
52
59
|
|
|
53
60
|
function textStyle(ctx, color) {
|
|
54
61
|
ctx.fillStyle = color || renderer.prop("label_color", renderer.foreground);
|
|
55
|
-
|
|
62
|
+
var resolvedFamily = String(fontResolver.fontInfo.family || chartRoot.requestedFontFamily);
|
|
63
|
+
ctx.font = Number(renderer.prop("font_size", 12)) + "px " + JSON.stringify(resolvedFamily);
|
|
56
64
|
ctx.textAlign = "center";
|
|
57
65
|
ctx.textBaseline = "middle";
|
|
58
66
|
}
|
data/README.md
CHANGED
|
@@ -29,11 +29,13 @@ module Counter
|
|
|
29
29
|
state :count, 0
|
|
30
30
|
|
|
31
31
|
app :main, title: "Counter", width: 640, height: 420 do
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
container padding: 24 do
|
|
33
|
+
column spacing: 16 do
|
|
34
|
+
label "Counter"
|
|
35
|
+
text { "Count: #{state.count}" }
|
|
36
|
+
button "Increment" do
|
|
37
|
+
state.count += 1
|
|
38
|
+
end
|
|
37
39
|
end
|
|
38
40
|
end
|
|
39
41
|
end
|
|
@@ -59,7 +61,7 @@ Build and install the gem directly from a checkout:
|
|
|
59
61
|
|
|
60
62
|
```bash
|
|
61
63
|
gem build zui.gemspec
|
|
62
|
-
gem install ./zui-0.0.
|
|
64
|
+
gem install ./zui-0.0.5.gem
|
|
63
65
|
```
|
|
64
66
|
|
|
65
67
|
`zui doctor --fix` is the one-time setup for each Zui version and platform. It downloads the
|
data/lib/zui.rb
CHANGED