Window 3D Borders
Alan Robertson (52) 420 posts |
Functionality was added to OS back in RISC OS 4 that allowed windows to have 3D borders. The functionality only seems to work if the window is configured as follows:
Any other combinations and it does not work. I tried forcing it always to be a 3D bordered window using the extra flag in the window block to no avail when using other window configurations. Is this a bug? ps. I’m using RISC OS 5.25 |
Rick Murray (539) 13404 posts |
Hmmm, couldn’t get any 3D borders until I remembered I turned it off. Needed to give “-3DWindowBorders” to *WimpVisualFlags. The code starts at https://www.riscosopen.org/viewer/view/castle/RiscOS/Sources/Desktop/Wimp/s/Wimp02?rev=4.55#l6863 The tests are:
Otherwise, it’s a 3D border… This test is replicated in CheckIfWindowRequires3DBorders. I’m not sure why it checks if the background is colour 1. Maybe it’s related to the "if the background colour is 1 then tile a sprite as the background (you’ll note that this doesn’t work for other colours)? |
André Timmermans (100) 620 posts |
Basically they tried to give the dialog boxes of pre-OS 3.5 applications a 3D look while avoiding as much as possible messing up other windows: background colour 1 was basically use for “non-editor” windows such as dialog boxes and toolboxes, toolboxes are usually made of pane windows (or of nested windows once support was added) covered which tools sprites which would look bad with a 3D border applied to them.
I presume it checks for colour 1, since it applies colour 0 (white) and 2 (darker grey) for the the border colours, otherwise you would need to tell it which colours to use for the borders lighter and darker shades. |
Alan Robertson (52) 420 posts |
Thanks guys for the info and suggestions. I guess the Wimp could be extended in the future to work with:
Thanks again. |
Steve Fryatt (216) 2046 posts |
I’m not sure why it checks if the background is colour 1. Maybe it’s related to the "if the background colour is 1 then tile a sprite as the background (you’ll note that this doesn’t work for other colours)? I think it’s a combination of both. As with the tiled backgrounds, the intention was to only apply the effect to dialogue boxes – but since RISC OS has no way to identify the purpose of a window, the system was hacked around “what a typical Style Guide compliant dialogue box looks like”. A key indicator is the background colour being 1, and the lack of scroll bars.
Pretty much. At the time it was described as integrating Matthew Bullock’s 3D border patch into the OS, but I suspect that reality forced them to use the same tests as the original patch had done. |