Today we tweak the grid for the Motif look, so that all columns and rows are fully displayed.
Simple Design
There are any number of ways to deal with the problem, but the simplest is simply to change the size of the grid for the specific look. Currently, the grid is offset 25 from the top, and 5 from the bottom. That is fine for the Windows look, but not in the Motif look, the bottom row displays partially below the bottom edge of the grid. After a bit of research, it turns out that the grid is about 7 pixels too short in height.
If we clip 4 pixels from the top and 3 from the bottom, we'll be just fine. Here we'll finally make real use of our MotifCalendarArtist. But first, let's get the basics done.
For the standard/Windows look, we'll add two methods to the CalendarArtist:
The work we already have done to change the Artist when the look changes takes care of making the right method is called and the look specific value is used.
Yes, the fix is just that easy...
What we could have done is gone and asked the Grid what the size of all the lines it displayed were, and then change the size of the Grid based on that calculation... But I'm feeling lazy as the end of the year comes near, so I leave that as an exercise for you my gentle reader, if you so want.
The above is published as version 1.19 in the Package named "Pollock-Calendar" on the Cincom public repository.
Announcement
Now that VisualWorks 7.3 NC has been made publicly available, I have published the version of Pollock that goes with 7.3 on the VisualWorks Public Repository. It is published as version 5.40.1, and is the same version that is on the 7.3 disk, but with a handful of fixes that didn't make it between then and now.
For those using an earlier version of VisualWorks, I haven't tested 5.40.1 against anything but 7.3. It may work fine, it may not. I did make some changes along the way to accommodate changes in 7.3 itself, so I can't be fully sure if those changes affect using 5.40.1 on 7.2.1 or earlier.
Solstice Sign Off
Yesterday, being the shortest daylight day of the year here in the northern hemisphere, has, as it at this time every year, triggered my hibernation instinct. So, I'll be taking a few weeks off to sleep and recharge for 2005.
When I return in late January, we'll tackle doing all the fancy MacOSX look issues.