|
|
@ -128,7 +128,7 @@ function ReaderProgress:genSingleHeader(title)
|
|
|
|
local padding_span = HorizontalSpan:new{ width = self.padding }
|
|
|
|
local padding_span = HorizontalSpan:new{ width = self.padding }
|
|
|
|
local line_width = (self.screen_width - header_title:getSize().w) / 2 - self.padding * 2
|
|
|
|
local line_width = (self.screen_width - header_title:getSize().w) / 2 - self.padding * 2
|
|
|
|
local line_container = LeftContainer:new{
|
|
|
|
local line_container = LeftContainer:new{
|
|
|
|
dimen = Geom:new{ w = line_width, h = self.screen_height / 25 },
|
|
|
|
dimen = Geom:new{ w = line_width, h = self.screen_height * (1/25) },
|
|
|
|
LineWidget:new{
|
|
|
|
LineWidget:new{
|
|
|
|
background = BG_COLOR,
|
|
|
|
background = BG_COLOR,
|
|
|
|
dimen = Geom:new{
|
|
|
|
dimen = Geom:new{
|
|
|
@ -139,7 +139,7 @@ function ReaderProgress:genSingleHeader(title)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return VerticalGroup:new{
|
|
|
|
return VerticalGroup:new{
|
|
|
|
VerticalSpan:new{ width = Screen:scaleBySize(self.header_span), height = self.screen_height / 25 },
|
|
|
|
VerticalSpan:new{ width = Screen:scaleBySize(self.header_span), height = self.screen_height * (1/25) },
|
|
|
|
HorizontalGroup:new{
|
|
|
|
HorizontalGroup:new{
|
|
|
|
align = "center",
|
|
|
|
align = "center",
|
|
|
|
padding_span,
|
|
|
|
padding_span,
|
|
|
@ -150,7 +150,7 @@ function ReaderProgress:genSingleHeader(title)
|
|
|
|
line_container,
|
|
|
|
line_container,
|
|
|
|
padding_span,
|
|
|
|
padding_span,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
VerticalSpan:new{ width = Size.span.vertical_large, height = self.screen_height / 25 },
|
|
|
|
VerticalSpan:new{ width = Size.span.vertical_large, height = self.screen_height * (1/25) },
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
@ -168,7 +168,7 @@ function ReaderProgress:genDoubleHeader(title_left, title_right)
|
|
|
|
local padding_span = HorizontalSpan:new{ width = self.padding }
|
|
|
|
local padding_span = HorizontalSpan:new{ width = self.padding }
|
|
|
|
local line_width = (self.screen_width - header_title_left:getSize().w - header_title_right:getSize().w - self.padding * 7) / 4
|
|
|
|
local line_width = (self.screen_width - header_title_left:getSize().w - header_title_right:getSize().w - self.padding * 7) / 4
|
|
|
|
local line_container = LeftContainer:new{
|
|
|
|
local line_container = LeftContainer:new{
|
|
|
|
dimen = Geom:new{ w = line_width, h = self.screen_height / 25 },
|
|
|
|
dimen = Geom:new{ w = line_width, h = self.screen_height * (1/25) },
|
|
|
|
LineWidget:new{
|
|
|
|
LineWidget:new{
|
|
|
|
background = BG_COLOR,
|
|
|
|
background = BG_COLOR,
|
|
|
|
dimen = Geom:new{
|
|
|
|
dimen = Geom:new{
|
|
|
@ -179,7 +179,7 @@ function ReaderProgress:genDoubleHeader(title_left, title_right)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return VerticalGroup:new{
|
|
|
|
return VerticalGroup:new{
|
|
|
|
VerticalSpan:new{ width = Screen:scaleBySize(25), height = self.screen_height / 25 },
|
|
|
|
VerticalSpan:new{ width = Screen:scaleBySize(25), height = self.screen_height * (1/25) },
|
|
|
|
HorizontalGroup:new{
|
|
|
|
HorizontalGroup:new{
|
|
|
|
align = "center",
|
|
|
|
align = "center",
|
|
|
|
padding_span,
|
|
|
|
padding_span,
|
|
|
@ -196,7 +196,7 @@ function ReaderProgress:genDoubleHeader(title_left, title_right)
|
|
|
|
line_container,
|
|
|
|
line_container,
|
|
|
|
padding_span,
|
|
|
|
padding_span,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
VerticalSpan:new{ width = Size.span.vertical_large, height = self.screen_height / 25 },
|
|
|
|
VerticalSpan:new{ width = Size.span.vertical_large, height = self.screen_height * (1/25) },
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
@ -251,7 +251,7 @@ function ReaderProgress:genWeekStats(stats_day)
|
|
|
|
align = "center",
|
|
|
|
align = "center",
|
|
|
|
padding = Size.padding.small,
|
|
|
|
padding = Size.padding.small,
|
|
|
|
LeftContainer:new{
|
|
|
|
LeftContainer:new{
|
|
|
|
dimen = Geom:new{ w = self.screen_width , h = height / 3 },
|
|
|
|
dimen = Geom:new{ w = self.screen_width , h = height * (1/3) },
|
|
|
|
TextWidget:new{
|
|
|
|
TextWidget:new{
|
|
|
|
padding = Size.padding.small,
|
|
|
|
padding = Size.padding.small,
|
|
|
|
text = date_format_show .. " - " .. util.secondsToClockDuration(user_duration_format, select_day_time, true),
|
|
|
|
text = date_format_show .. " - " .. util.secondsToClockDuration(user_duration_format, select_day_time, true),
|
|
|
@ -262,7 +262,7 @@ function ReaderProgress:genWeekStats(stats_day)
|
|
|
|
local titles_group = HorizontalGroup:new{
|
|
|
|
local titles_group = HorizontalGroup:new{
|
|
|
|
align = "center",
|
|
|
|
align = "center",
|
|
|
|
LeftContainer:new{
|
|
|
|
LeftContainer:new{
|
|
|
|
dimen = Geom:new{ w = self.screen_width , h = height / 3 },
|
|
|
|
dimen = Geom:new{ w = self.screen_width , h = height * (1/3) },
|
|
|
|
ProgressWidget:new{
|
|
|
|
ProgressWidget:new{
|
|
|
|
width = math.floor((self.screen_width * 0.005) + (self.screen_width * 0.9 * select_day_time / max_week_time)),
|
|
|
|
width = math.floor((self.screen_width * 0.005) + (self.screen_width * 0.9 * select_day_time / max_week_time)),
|
|
|
|
height = Screen:scaleBySize(14),
|
|
|
|
height = Screen:scaleBySize(14),
|
|
|
@ -291,8 +291,8 @@ function ReaderProgress:genSummaryDay(width)
|
|
|
|
dimen = Geom:new{ w = width, h = height },
|
|
|
|
dimen = Geom:new{ w = width, h = height },
|
|
|
|
}
|
|
|
|
}
|
|
|
|
local statistics_group = VerticalGroup:new{ align = "left" }
|
|
|
|
local statistics_group = VerticalGroup:new{ align = "left" }
|
|
|
|
local tile_width = width / 4
|
|
|
|
local tile_width = width * (1/4)
|
|
|
|
local tile_height = height / 3
|
|
|
|
local tile_height = height * (1/3)
|
|
|
|
local user_duration_format = G_reader_settings:readSetting("duration_format")
|
|
|
|
local user_duration_format = G_reader_settings:readSetting("duration_format")
|
|
|
|
|
|
|
|
|
|
|
|
local titles_group = HorizontalGroup:new{
|
|
|
|
local titles_group = HorizontalGroup:new{
|
|
|
@ -386,8 +386,8 @@ function ReaderProgress:genSummaryWeek(width)
|
|
|
|
dimen = Geom:new{ w = width, h = height },
|
|
|
|
dimen = Geom:new{ w = width, h = height },
|
|
|
|
}
|
|
|
|
}
|
|
|
|
local statistics_group = VerticalGroup:new{ align = "left" }
|
|
|
|
local statistics_group = VerticalGroup:new{ align = "left" }
|
|
|
|
local tile_width = width / 4
|
|
|
|
local tile_width = width * (1/4)
|
|
|
|
local tile_height = height / 3
|
|
|
|
local tile_height = height * (1/3)
|
|
|
|
local user_duration_format = G_reader_settings:readSetting("duration_format")
|
|
|
|
local user_duration_format = G_reader_settings:readSetting("duration_format")
|
|
|
|
local total_group = HorizontalGroup:new{
|
|
|
|
local total_group = HorizontalGroup:new{
|
|
|
|
align = "center",
|
|
|
|
align = "center",
|
|
|
@ -457,14 +457,14 @@ function ReaderProgress:genSummaryWeek(width)
|
|
|
|
CenterContainer:new{
|
|
|
|
CenterContainer:new{
|
|
|
|
dimen = Geom:new{ w = tile_width, h = tile_height },
|
|
|
|
dimen = Geom:new{ w = tile_width, h = tile_height },
|
|
|
|
TextWidget:new{
|
|
|
|
TextWidget:new{
|
|
|
|
text = tostring(math.floor(total_pages / 7)),
|
|
|
|
text = tostring(math.floor(total_pages * (1/7))),
|
|
|
|
face = self.medium_font_face,
|
|
|
|
face = self.medium_font_face,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
CenterContainer:new{
|
|
|
|
CenterContainer:new{
|
|
|
|
dimen = Geom:new{ w = tile_width, h = tile_height },
|
|
|
|
dimen = Geom:new{ w = tile_width, h = tile_height },
|
|
|
|
TextWidget:new{
|
|
|
|
TextWidget:new{
|
|
|
|
text = util.secondsToClockDuration(user_duration_format, math.floor(total_time) / 7, true),
|
|
|
|
text = util.secondsToClockDuration(user_duration_format, math.floor(total_time) * (1/7), true),
|
|
|
|
face = self.medium_font_face,
|
|
|
|
face = self.medium_font_face,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|