Skip to content

Commit e2a7196

Browse files
committed
Update code docs
1 parent 2be35a0 commit e2a7196

4 files changed

Lines changed: 21 additions & 6 deletions

File tree

docs/components_ItemGrid_Alpha.bs.html

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55

66
m.alphaText = m.top.findNode("alphaText")
77
m.alphaMenu = m.top.findNode("alphaMenu")
8-
98
m.alphaMenu.setFocus(false)
10-
m.alphaMenu.focusedFont.size = 25
11-
m.alphaMenu.font.size = 25
9+
10+
applyTheme()
1211

1312
' show mic icon above alpha menu if remote supports voice commands
1413
if m.global.device.hasVoiceRemote
@@ -17,6 +16,22 @@
1716
end if
1817
end sub
1918

19+
sub applyTheme()
20+
constants = m.global.constants
21+
22+
' font sizes
23+
m.alphaMenu.focusedFont.size = constants.fontSizeSmaller
24+
m.alphaMenu.font.size = constants.fontSizeSmaller
25+
' font colors
26+
m.alphaMenu.focusedColor = constants.colorTextPrimary
27+
m.alphaMenu.color = constants.colorTextSecondary
28+
' focus 9patch and color
29+
m.alphaMenu.focusBitmapUri = "pkg:/images/9patch/border-6px.9.png"
30+
m.alphaMenu.focusBitmapBlendColor = constants.colorPrimary
31+
' focus footprint 9patch
32+
m.alphaMenu.focusFootprintBitmapUri = "pkg:/images/1px-transparent.png"
33+
end sub
34+
2035
function onKeyEvent(key as string, press as boolean) as boolean
2136
if not press then return false
2237
if not m.alphaMenu.isInFocusChain() then return false

docs/components_ItemGrid_ItemGrid.bs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@
806806
m.swapAnimation.state = "stop"
807807
m.queuedBGUri = ""
808808
' use a 1px image because we can't use the animation to fade into a blank uri string
809-
SetBackground("pkg:/images/1px-000000.png")
809+
SetBackground("pkg:/images/1px-transparent.png")
810810
end if
811811

812812
m.log.debug("end alphaActiveChanged()")

docs/data/search.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/module-Alpha.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)