Author: bklaas
Date: Tue Jan 25 07:47:44 2011
New Revision: 9298
URL: http://svn.slimdevices.com/jive?rev=9298&view=rev
Log:
Fixed Bug: 16312
Description: increase font size of the current time in alarm popup on all skins
Remove am/pm designation when in 12h mode to maximize space for clock digits
Remove alarm icon to maximize space for clock digits
Remove title "Alarm" from window, since the intention of the window is obvious
when the alarm is firing
Add ability to send a strftime format as an optional argument to the
datetime:getCurrentTime() method
Modified:
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAportraitSkin/QVGAportraitSkinApplet.lua
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAlargeSkin/WQVGAlargeSkinApplet.lua
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua
7.6/trunk/squeezeplay/src/squeezeplay/share/jive/utils/datetime.lua
Modified:
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua?rev=9298&r1=9297&r2=9298&view=diff
==============================================================================
---
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
(original)
+++
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
Tue Jan 25 07:47:44 2011
@@ -549,13 +549,12 @@
return
end
- local window = Window('alarm_popup', self:string('ALARM_SNOOZE_ALARM'))
-
- self.time = datetime:getCurrentTime()
- local icon = Icon('icon_alarm')
+ local window = Window('alarm_popup')
+
+ self.time = self:_formattedTime()
+
local label = Label('alarm_time', self.time)
local headerGroup = Group('alarm_header', {
- icon = icon,
time = label,
})
@@ -646,7 +645,7 @@
function _updateTime(self)
- local time = datetime:getCurrentTime()
+ local time = self:_formattedTime()
if time ~= self.time then
log:debug('updating time in alarm window')
self.time = time
@@ -654,6 +653,19 @@
end
end
+function _formattedTime(self)
+ if not self.clockFormat then
+ self.clockFormat = datetime:getHours()
+ end
+
+ local time
+ if self.clockFormat == '12' then
+ time = datetime:getCurrentTime('%I:%M')
+ else
+ time = datetime:getCurrentTime()
+ end
+ return time
+end
function _silenceFallbackAlarm(self)
if not self.localPlayer then
Modified:
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua?rev=9298&r1=9297&r2=9298&view=diff
==============================================================================
---
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua
(original)
+++
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua
Tue Jan 25 07:47:44 2011
@@ -1702,13 +1702,9 @@
s.context_menu.menu.selected.item_no_arrow =
_uses(s.context_menu.menu.selected.item_play)
s.alarm_header = {
- w = screenWidth,
- padding = { 50, 0, 50, 0 },
- order = { 'icon', 'time' },
- icon = {
- h = WH_FILL,
- w = 34,
- },
+ w = screenWidth - 20,
+ padding = { 0, 0, 0, 30 },
+ order = { 'time' },
time = {
h = WH_FILL,
w = WH_FILL,
@@ -1719,8 +1715,8 @@
w = WH_FILL,
fg = c.TEXT_COLOR,
sh = c.TEXT_SH_COLOR,
- align = "left",
- font = _font(32),
+ align = "center",
+ font = _boldfont(92),
}
s.preview_text = _uses(s.alarm_time, {
font = _boldfont(c.TITLE_FONT_SIZE),
@@ -1739,27 +1735,14 @@
layer = LAYER_TITLE,
title = {
- layer = LAYER_TITLE,
- w = WH_FILL,
- h = 35,
- padding = { 10, 20, 10, 0 },
- text = {
- w = WH_FILL,
- h = WH_FILL,
- align = 'center',
- font = _boldfont(18),
- },
- bgImg = false,
- border = { 0, 0, 10, 0 },
+ hidden = 1,
},
menu = {
-
-
h = c.CM_MENU_HEIGHT * 5,
w = screenWidth - 34,
x = 7,
- y = 65,
+ y = 53,
border = 0,
itemHeight = c.CM_MENU_HEIGHT,
position = LAYOUT_NORTH,
Modified:
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAportraitSkin/QVGAportraitSkinApplet.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAportraitSkin/QVGAportraitSkinApplet.lua?rev=9298&r1=9297&r2=9298&view=diff
==============================================================================
---
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAportraitSkin/QVGAportraitSkinApplet.lua
(original)
+++
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAportraitSkin/QVGAportraitSkinApplet.lua
Tue Jan 25 07:47:44 2011
@@ -161,6 +161,7 @@
s.icon_battery_low.padding = { 0, 42, 0, 0 }
s.waiting_popup.text.padding = { 0, 42, 0, 0 }
s.waiting_popup.subtext.padding = { 0, 0, 0, 46 }
+ s.alarm_time.font = _font(72)
s.toast_popup_mixed.text.font = _boldfont(14)
s.toast_popup_mixed.subtext.font = _boldfont(14)
Modified:
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAlargeSkin/WQVGAlargeSkinApplet.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAlargeSkin/WQVGAlargeSkinApplet.lua?rev=9298&r1=9297&r2=9298&view=diff
==============================================================================
---
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAlargeSkin/WQVGAlargeSkinApplet.lua
(original)
+++
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAlargeSkin/WQVGAlargeSkinApplet.lua
Tue Jan 25 07:47:44 2011
@@ -1595,6 +1595,7 @@
-- alarm popup
s.alarm_header = {
+ border = { 0, 4, 0, 0 },
w = screenWidth - 16,
align = 'center',
layer = LAYER_TITLE,
@@ -1607,8 +1608,8 @@
sh = TEXT_SH_COLOR,
layer = LAYER_TITLE,
align = "center",
- font = _boldfont(62),
- border = { 0, 14, 0, 0 },
+ font = _boldfont(82),
+ border = { 0, 2, 0, 0 },
}
s.preview_text = _uses(s.alarm_time, {
font = _boldfont(TITLE_FONT_SIZE),
@@ -1619,7 +1620,7 @@
x = 8,
y = 21,
w = screenWidth - 16,
- h = screenHeight - 42,
+ h = screenHeight - 36,
bgImg = contextMenuBox,
layer = LAYER_TITLE,
@@ -1628,7 +1629,7 @@
},
menu = {
- border = { 7, 7, 7, 0 },
+ border = { 7, 12, 7, 0 },
padding = { 0, 0, 0, 100 },
scrollbar = {
h = CM_MENU_HEIGHT * 3 - 8,
Modified:
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua?rev=9298&r1=9297&r2=9298&view=diff
==============================================================================
---
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua
(original)
+++
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua
Tue Jan 25 07:47:44 2011
@@ -2148,9 +2148,8 @@
-- alarm popup
s.alarm_header = {
w = screenWidth,
- --padding = { 50, 0, 50, 0 },
- --order = { 'icon', 'time' },
order = { 'time' },
+ padding = { 0, 0, 0, 50 },
}
s.alarm_time = {
@@ -2158,7 +2157,7 @@
fg = TEXT_COLOR,
sh = TEXT_SH_COLOR,
align = "center",
- font = _boldfont(62),
+ font = _boldfont(120),
}
s.preview_text = _uses(s.alarm_time, {
@@ -2177,12 +2176,7 @@
layer = LAYER_TITLE,
title = {
- layer = LAYER_TITLE,
- w = WH_FILL,
- h = 52,
- --padding = { 0, 10, 0, 0 },
- padding = { 10, 10, 10, 5 },
- bgImg = false,
+ hidden = 1,
},
menu = {
Modified: 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/utils/datetime.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/jive/utils/datetime.lua?rev=9298&r1=9297&r2=9298&view=diff
==============================================================================
--- 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/utils/datetime.lua
(original)
+++ 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/utils/datetime.lua Tue Jan
25 07:47:44 2011
@@ -500,15 +500,18 @@
--[[
-=head2 getCurrentTime()
+=head2 getCurrentTime(self, format)
Returns the current, formatted time.
+If date format given, return the time in that format.
Example: 21:57 (24h format)
9:57PM (AM/PM)
-=cut
---]]
-function getCurrentTime()
+ 9:57 ('%I:%M' format sent as optional argument)
+=cut
+--]]
+function getCurrentTime(self, format)
+
-- if the time has not been set, return an empty string
if not timeSet then
if tonumber(os.date("%Y")) < 2010 then
@@ -519,7 +522,9 @@
end
local str
- if globalHours == "12" then
+ if format then
+ str = os.date(format)
+ elseif globalHours == "12" then
str = os.date("%I:%M%p")
else
str = os.date("%H:%M")
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins