return;
hilight = value;
- InvalidateBorder ();
+ Invalidate ();
}
}
if (Parent.TextAlign == ToolBarTextAlign.Underneath) {
new_image_rect = new Rectangle ((bounds.Size.Width - image_size.Width) / 2 - grip, 0, image_size.Width + 2 + grip, image_size.Height + 2 * grip);
- new_text_rect = new Rectangle (0, new_image_rect.Height, bounds.Size.Width, bounds.Size.Height - new_image_rect.Height);
+ new_text_rect = new Rectangle (0, new_image_rect.Height, bounds.Size.Width, bounds.Size.Height - new_image_rect.Height - 2 * grip);
} else {
new_image_rect = new Rectangle (0, 0, image_size.Width + 2 * grip, image_size.Height + 2 * grip);
- new_text_rect = new Rectangle (new_image_rect.Width, 0, bounds.Size.Width - new_image_rect.Width, bounds.Size.Height);
+ new_text_rect = new Rectangle (new_image_rect.Width, 0, bounds.Size.Width - new_image_rect.Width, bounds.Size.Height - 2 * grip);
}
bool changed = false;
return size;
}
- internal void InvalidateBorder ()
- {
- 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));
-
- if ((Style == ToolBarButtonStyle.DropDownButton) && Parent.DropDownArrows)
- Parent.Invalidate (new Rectangle (Rectangle.Width - ThemeEngine.Current.ToolBarDropDownWidth - 2,
- Rectangle.Y - 2, 6, Rectangle.Height + 4));
- }
- }
-
- void Invalidate ()
+ internal void Invalidate ()
{
if (Parent != null)
Parent.Invalidate (Rectangle);