+2006-08-12 Chris Toshok <toshok@ximian.com>
+
+ * ToolBarButton.cs: redraw the entire button if the theme tells us
+ to.
+
+ * Theme.cs: add ToolBarInvalidateEntireButton.
+
+ * ThemeWin32Classic.cs: we don't need to redraw the entire toolbar
+ buttons, just the border.
+
+ * ThemeNice.cs: redraw the entire toolbar button since we need to
+ draw the highlight image.
+
+ * ThemeClearlooks.cs: the rounded corners of toolbar buttons mean
+ we need to redraw the entire button (not just the border).
+
2006-08-11 Peter Dennis Bartok <pbartok@novell.com>
* TextBoxBase.cs (CalculateScrollbars): Set the proper thumb size
}
#region ToolBar
+ public override bool ToolBarInvalidateEntireButton {
+ get { return true; }
+ }
+
public override void DrawToolBar (Graphics dc, Rectangle clip_rectangle, ToolBar control)
{
StringFormat format = new StringFormat ();
else
CPDrawStringDisabled (dc, button.Text, control.Font, ColorControlLight, button.TextRectangle, format);
}
+
#endregion // ToolBar
// public override void CPDrawBorder3D (Graphics graphics, Rectangle rectangle, Border3DStyle style, Border3DSide sides) {
internal void InvalidateBorder ()
{
- if (Rectangle == Rectangle.Empty)
- return;
+ if (ThemeEngine.Current.ToolBarInvalidateEntireButton) {
+ Invalidate ();
+ }
+ else {
+ if (Rectangle == Rectangle.Empty)
+ return;
- /* invalidate the four sides of our border */
- Parent.Invalidate (new Rectangle (Rectangle.X - 2, Rectangle.Y - 2, Rectangle.Width + 4, 4));
- Parent.Invalidate (new Rectangle (Rectangle.X - 2, Rectangle.Y - 2, 4, Rectangle.Height + 4));
- Parent.Invalidate (new Rectangle (Rectangle.X - 2, Rectangle.Y + Rectangle.Height - 2, Rectangle.Width + 4, 4));
- Parent.Invalidate (new Rectangle (Rectangle.X + Rectangle.Width - 2, Rectangle.Y - 2, 4, Rectangle.Height + 4));
+ /* invalidate the four sides of our border */
+ Parent.Invalidate (new Rectangle (Rectangle.X - 2, Rectangle.Y - 2,
+ Rectangle.Width + 4, 4));
+ Parent.Invalidate (new Rectangle (Rectangle.X - 2, Rectangle.Y - 2,
+ 4, Rectangle.Height + 4));
+ Parent.Invalidate (new Rectangle (Rectangle.X - 2, Rectangle.Y + Rectangle.Height - 2,
+ Rectangle.Width + 4, 4));
+ Parent.Invalidate (new Rectangle (Rectangle.X + Rectangle.Width - 2, Rectangle.Y - 2,
+ 4, Rectangle.Height + 4));
+ }
}
void Invalidate ()