Application.VisualStyleState == VisualStyleState.ClientAreaEnabled);
render_non_client_areas =
visual_styles_is_enabled_by_user &&
- (Application.VisualStyleState == VisualStyleState.ClientAndNonClientAreasEnabled ||
- Application.VisualStyleState == VisualStyleState.NonClientAreaEnabled);
+ (Application.VisualStyleState == VisualStyleState.ClientAndNonClientAreasEnabled/* ||
+ Application.VisualStyleState == VisualStyleState.NonClientAreaEnabled*/);
}
public static bool RenderClientAreas {
#endif
default: // Blocks
int block_width = renderer.GetInteger (IntegerProperty.ProgressChunkSize);
+ block_width = Math.Max (block_width, 0); // block_width is used to break out the loop below, it must be >= 0!
int first_pixel_outside_filled_area = (int)(((double)(ctrl.Value - ctrl.Minimum) * client_area.Width) / (Math.Max (ctrl.Maximum - ctrl.Minimum, 1))) + client_area.X;
int block_count = 0;
int increment = block_width + renderer.GetInteger (IntegerProperty.ProgressSpaceSize);
if (bar.Enabled && bar.ThumbPos.Height >= 20) {
element = VisualStyleElement.ScrollBar.GripperVertical.Normal;
- renderer = new VisualStyleRenderer (element);
- renderer.DrawBackground (dc, bar.ThumbPos, clip);
+ if (VisualStyleRenderer.IsElementDefined (element)) {
+ renderer = new VisualStyleRenderer (element);
+ renderer.DrawBackground (dc, bar.ThumbPos, clip);
+ }
}
#endregion
} else {
if (bar.Enabled && bar.ThumbPos.Height >= 20) {
element = VisualStyleElement.ScrollBar.GripperHorizontal.Normal;
- renderer = new VisualStyleRenderer (element);
- renderer.DrawBackground (dc, bar.ThumbPos, clip);
+ if (VisualStyleRenderer.IsElementDefined (element)) {
+ renderer = new VisualStyleRenderer (element);
+ renderer.DrawBackground (dc, bar.ThumbPos, clip);
+ }
}
#endregion
}
get {
return
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.ArrowButton.DownDisabled) &&
- VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.GripperHorizontal.Normal) &&
- VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.GripperVertical.Normal) &&
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.LeftTrackHorizontal.Disabled) &&
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.LowerTrackVertical.Disabled) &&
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.RightTrackHorizontal.Disabled) &&
- VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.SizeBox.LeftAlign) &&
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Disabled) &&
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.ThumbButtonVertical.Disabled) &&
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.UpperTrackVertical.Disabled);
base.ToolTipDrawBackground (dc, clip_rectangle, control);
return;
}
- new VisualStyleRenderer (element).DrawBackground (dc, control.Bounds);
+ new VisualStyleRenderer (element).DrawBackground (dc, control.ClientRectangle);
}
public override bool ToolTipTransparentBackground {
get {
}
#endregion
}
-}
\ No newline at end of file
+}