equal
deleted
inserted
replaced
142 |
142 |
143 gc = wx.GCDC(dc) |
143 gc = wx.GCDC(dc) |
144 |
144 |
145 width, height = self.GetClientSize() |
145 width, height = self.GetClientSize() |
146 |
146 |
147 gc.SetPen(wx.Pen(wx.NamedColour("GREY"), 3)) |
147 gc.SetPen(wx.Pen(wx.Colour("GREY"), 3)) |
148 gc.SetBrush(wx.GREY_BRUSH) |
148 gc.SetBrush(wx.GREY_BRUSH) |
149 |
149 |
150 gc.DrawLines(ArrowPoints(wx.TOP, width * 0.75, width * 0.5, 2, (width + height) // 4 - 3)) |
150 gc.DrawLines(ArrowPoints(wx.TOP, width * 0.75, width * 0.5, 2, (width + height) // 4 - 3)) |
151 gc.DrawLines(ArrowPoints(wx.TOP, width * 0.75, width * 0.5, 2, (width + height) // 4 + 3)) |
151 gc.DrawLines(ArrowPoints(wx.TOP, width * 0.75, width * 0.5, 2, (width + height) // 4 + 3)) |
152 |
152 |
159 if self.Parent.IsMessagePanelTop(): |
159 if self.Parent.IsMessagePanelTop(): |
160 exclusion_rect.y, exclusion_rect.height = width, exclusion_rect.y + exclusion_rect.height - width |
160 exclusion_rect.y, exclusion_rect.height = width, exclusion_rect.y + exclusion_rect.height - width |
161 if self.Parent.IsMessagePanelBottom(): |
161 if self.Parent.IsMessagePanelBottom(): |
162 exclusion_rect.height = height - width - exclusion_rect.y |
162 exclusion_rect.height = height - width - exclusion_rect.y |
163 if exclusion_rect != thumb_rect: |
163 if exclusion_rect != thumb_rect: |
164 colour = wx.NamedColour("LIGHT GREY") |
164 colour = wx.Colour("LIGHT GREY") |
165 gc.SetPen(wx.Pen(colour)) |
165 gc.SetPen(wx.Pen(colour)) |
166 gc.SetBrush(wx.Brush(colour)) |
166 gc.SetBrush(wx.Brush(colour)) |
167 |
167 |
168 gc.DrawRectangle(exclusion_rect.x, exclusion_rect.y, |
168 gc.DrawRectangle(exclusion_rect.x, exclusion_rect.y, |
169 exclusion_rect.width, exclusion_rect.height) |
169 exclusion_rect.width, exclusion_rect.height) |
213 if self.Callback is not None: |
213 if self.Callback is not None: |
214 wx.CallAfter(self.Callback) |
214 wx.CallAfter(self.Callback) |
215 |
215 |
216 def Draw(self, dc): |
216 def Draw(self, dc): |
217 dc.SetPen(wx.TRANSPARENT_PEN) |
217 dc.SetPen(wx.TRANSPARENT_PEN) |
218 dc.SetBrush(wx.Brush(wx.NamedColour("LIGHT GREY"))) |
218 dc.SetBrush(wx.Brush(wx.Colour("LIGHT GREY"))) |
219 |
219 |
220 dc.DrawRectangle(self.Position.x, self.Position.y, |
220 dc.DrawRectangle(self.Position.x, self.Position.y, |
221 self.Size.width, self.Size.height) |
221 self.Size.width, self.Size.height) |
222 |
222 |
223 w, h = dc.GetTextExtent(self.Label) |
223 w, h = dc.GetTextExtent(self.Label) |