=== applets/AlarmSnooze/AlarmSnoozeApplet.lua ================================================================== --- applets/AlarmSnooze/AlarmSnoozeApplet.lua (revision 49028) +++ applets/AlarmSnooze/AlarmSnoozeApplet.lua (local) @@ -549,13 +549,12 @@ return end - local window = Window('alarm_popup', self:string('ALARM_SNOOZE_ALARM')) + local window = Window('alarm_popup') - self.time = datetime:getCurrentTime() - local icon = Icon('icon_alarm') + 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,7 +653,20 @@ 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 log:error('No self.localPlayer found!') === applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua ================================================================== --- applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua (revision 49028) +++ applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua (local) @@ -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 = _font(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, === applets/QVGAportraitSkin/QVGAportraitSkinApplet.lua ================================================================== --- applets/QVGAportraitSkin/QVGAportraitSkinApplet.lua (revision 49028) +++ applets/QVGAportraitSkin/QVGAportraitSkinApplet.lua (local) @@ -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) === applets/WQVGAlargeSkin/WQVGAlargeSkinApplet.lua ================================================================== --- applets/WQVGAlargeSkin/WQVGAlargeSkinApplet.lua (revision 49028) +++ applets/WQVGAlargeSkin/WQVGAlargeSkinApplet.lua (local) @@ -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, === applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua ================================================================== --- applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua (revision 49028) +++ applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua (local) @@ -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 = { === jive/utils/datetime.lua ================================================================== --- jive/utils/datetime.lua (revision 49028) +++ jive/utils/datetime.lua (local) @@ -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) + 9:57 ('%I:%M' format sent as optional argument) =cut --]] -function getCurrentTime() +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")