+2006-08-12 Chris Toshok <toshok@ximian.com>
+
+ * ThemeWin32Classic.cs: fix the bottom right corner painting. had
+ the VScrollBar and HScrollbar reversed. oops.
+
+ * DataGrid.cs: fix the logic that assigns sizes to the implicit
+ scrollbars. we were assigning them twice (once in
+ Calc{Horiz,Vertical}Scrollbar, and once in CalcGridAreas),
+ therefore causing two scrollbar resizes (and redraws?) to happen
+ per grid resize.
+
2006-08-12 Chris Toshok <toshok@ximian.com>
* ToolBarButton.cs: redraw the entire button if the theme tells us
rowhdrs_area.Height -= horiz_scrollbar.Height;
}
- vert_scrollbar.Height = vert_scrollbar_height;
+ vert_scrollbar.Size = new Size (vert_scrollbar.Width,
+ vert_scrollbar_height);
+
vert_scrollbar.Maximum = vert_scrollbar_maximum;
Controls.Add (vert_scrollbar);
vert_scrollbar.Visible = true;
}
if (needHoriz) {
- horiz_scrollbar.Width = horiz_scrollbar_width;
+ horiz_scrollbar.Size = new Size (horiz_scrollbar_width,
+ horiz_scrollbar.Height);
+
horiz_scrollbar.Maximum = horiz_scrollbar_maximum;
Controls.Add (horiz_scrollbar);
horiz_scrollbar.Visible = true;
horiz_scrollbar.Location = new Point (ClientRectangle.X, ClientRectangle.Y +
ClientRectangle.Height - horiz_scrollbar.Height);
- horiz_scrollbar.Size = new Size (ClientRectangle.Width,
- horiz_scrollbar.Height);
-
horiz_scrollbar.LargeChange = cells_area.Width;
}
{
int y;
- if (caption_visible) {
- y = ClientRectangle.Y + caption_area.Height;
- height = ClientRectangle.Height - caption_area.Height;
- } else {
- y = ClientRectangle.Y;
- height = ClientRectangle.Height;
- }
+ y = ClientRectangle.Y + parent_rows.Y + parent_rows.Height;
+ height = ClientRectangle.Height - parent_rows.Y - parent_rows.Height;
vert_scrollbar.Location = new Point (ClientRectangle.X +
ClientRectangle.Width - vert_scrollbar.Width, y);
- vert_scrollbar.Size = new Size (vert_scrollbar.Width,
- height);
-
maximum = RowsCount;
if (ShowEditRow && RowsCount > 0) {
// Paint scrollBar corner
if (grid.VScrollBar.Visible && grid.HScrollBar.Visible) {
- Rectangle corner = new Rectangle (grid.ClientRectangle.X + grid.ClientRectangle.Width - grid.HScrollBar.Width,
- grid.ClientRectangle.Y + grid.ClientRectangle.Height - grid.VScrollBar.Height,
+ Rectangle corner = new Rectangle (grid.ClientRectangle.X + grid.ClientRectangle.Width - grid.VScrollBar.Width,
+ grid.ClientRectangle.Y + grid.ClientRectangle.Height - grid.HScrollBar.Height,
grid.VScrollBar.Width, grid.HScrollBar.Height);
if (pe.ClipRectangle.IntersectsWith (corner)) {