equal
deleted
inserted
replaced
177 thumb_rect.width, thumb_rect.height) |
177 thumb_rect.width, thumb_rect.height) |
178 |
178 |
179 dc.EndDrawing() |
179 dc.EndDrawing() |
180 event.Skip() |
180 event.Skip() |
181 |
181 |
|
182 |
182 BUTTON_SIZE = (70, 15) |
183 BUTTON_SIZE = (70, 15) |
183 |
184 |
184 |
185 |
185 class LogButton(): |
186 class LogButton(): |
186 |
187 |
220 |
221 |
221 w, h = dc.GetTextExtent(self.Label) |
222 w, h = dc.GetTextExtent(self.Label) |
222 dc.DrawText(self.Label, |
223 dc.DrawText(self.Label, |
223 self.Position.x + (self.Size.width - w) / 2, |
224 self.Position.x + (self.Size.width - w) / 2, |
224 self.Position.y + (self.Size.height - h) / 2) |
225 self.Position.y + (self.Size.height - h) / 2) |
|
226 |
225 |
227 |
226 DATE_INFO_SIZE = 10 |
228 DATE_INFO_SIZE = 10 |
227 MESSAGE_INFO_SIZE = 18 |
229 MESSAGE_INFO_SIZE = 18 |
228 |
230 |
229 |
231 |
272 |
274 |
273 def GetHeight(self, draw_date): |
275 def GetHeight(self, draw_date): |
274 if draw_date: |
276 if draw_date: |
275 return DATE_INFO_SIZE + MESSAGE_INFO_SIZE |
277 return DATE_INFO_SIZE + MESSAGE_INFO_SIZE |
276 return MESSAGE_INFO_SIZE |
278 return MESSAGE_INFO_SIZE |
|
279 |
277 |
280 |
278 SECOND = 1 |
281 SECOND = 1 |
279 MINUTE = 60 * SECOND |
282 MINUTE = 60 * SECOND |
280 HOUR = 60 * MINUTE |
283 HOUR = 60 * MINUTE |
281 DAY = 24 * HOUR |
284 DAY = 24 * HOUR |