Commit 54c5c7c9 authored by Steve Revill's avatar Steve Revill
Browse files

Make colour used for the window outline configurable.

  Allow the outline to be plotted over the window tools.
Detail:
  The options available through WimpVisualFlags have been extended with two
  new options that control how the window outline is plotted.

  WimpVisualFlags -WindowOutlineColour <&RRGGBB> -WindowOutlineOver

  WindowOutlineColour defines the colour to be used for the window outline.
  It allows theme designers to choose a window outline colour that fits
  in with a theme's general colour scheme. Default value is black.

  WindowOutlineOver controls if the window outline is plotted over the
  toolicons. It can be used to ensure that there is a window outline
  visible even when the toolicons are borderless. Default value is off.
Admin:
  Tested on RO 5.11
Author:
  Fred Graute

Version 5.04. Tagged as 'Wimp-5_04'
parent 58925e79
No preview for this file type
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.03"
Module_Version SETA 503
Module_MajorVersion SETS "5.04"
Module_Version SETA 504
Module_MinorVersion SETS ""
Module_Date SETS "10 Sep 2008"
Module_ApplicationDate SETS "10-Sep-08"
Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "5.03"
Module_HelpVersion SETS "5.03 (10 Sep 2008)"
Module_FullVersion SETS "5.04"
Module_HelpVersion SETS "5.04 (10 Sep 2008)"
END
/* (5.03)
/* (5.04)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.03
#define Module_MajorVersion_CMHG 5.04
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 10 Sep 2008
#define Module_MajorVersion "5.03"
#define Module_Version 503
#define Module_MajorVersion "5.04"
#define Module_Version 504
#define Module_MinorVersion ""
#define Module_Date "10 Sep 2008"
......@@ -18,6 +18,6 @@
#define Module_ComponentName "Wimp"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "5.03"
#define Module_HelpVersion "5.03 (10 Sep 2008)"
#define Module_LibraryVersionInfo "5:3"
#define Module_FullVersion "5.04"
#define Module_HelpVersion "5.04 (10 Sep 2008)"
#define Module_LibraryVersionInfo "5:4"
......@@ -410,6 +410,7 @@ ThreeDFlags_TexturedMenus * 1<<4
ThreeDFlags_NoIconBgInTransWindows * 1<<5
ThreeDFlags_NoFontBlending * 1<<6
ThreeDFlags_FullIconClipping * 1<<7 ; we're just ignoring this flag
ThreeDFlags_WindowOutlineOver * 1<<8
arrowIconWidth_No3D * 24
arrowIconWidth_3D * 32
......@@ -794,6 +795,7 @@ truemenuborderfacecolour # 4
truemenuborderoppcolour # 4 ; colours to use for menu borders
truewindowborderfacecolour # 4
truewindowborderoppcolour # 4 ; colours to use for window borders
truewindowoutlinecolour # 4 ; colour to use for window outline
]
[ TrueIcon1
truefgcolour # 4 ; for 24-bit colour icons
......@@ -2178,6 +2180,8 @@ WimpVisualFlags_Help DCB "*WimpVisualFlags changes some aspects of the visual a
DCB " Make the iconbar have a full 3D border.",cr
DCB "-FontBlending",cr
DCB " Use font blending in icons.",cr
DCB "-WindowOutlineOver",cr
DCB " Plot the window outline over the tool icons.",cr
DCB "-All",cr
DCB " Turn all flags on.",cr
DCB "-WindowBorderFaceColour <&RRGGBB>",cr
......@@ -2187,7 +2191,9 @@ WimpVisualFlags_Help DCB "*WimpVisualFlags changes some aspects of the visual a
DCB "-MenuBorderFaceColour <&RRGGBB>",cr
DCB " Set the colour of the top left portion of the menu border.",cr
DCB "-MenuBorderOppColour <&RRGGBB>",cr
DCB " Set the colour of the bottom right portion of the menu border.",0
DCB " Set the colour of the bottom right portion of the menu border.",cr
DCB "-WindowOutlineColour <&RRGGBB>",cr
DCB " Set the colour of the window outline.",cr
WimpVisualFlags_Syntax DCB "Syntax: *WimpVisualFlags <options>",0
]
ALIGN
......@@ -7204,7 +7210,8 @@ WimpKillSprite_Code
DCB "NoIconBoxesInTransWindows=NIBITW/S,Fully3DIconBar=F3DIB/S,All=A/S,"
DCB "WindowBorderFaceColour=WBFC/E,WindowBorderOppColour=WBOC/E,"
DCB "MenuBorderFaceColour=MBFC/E,MenuBorderOppColour=MBOC/E,"
DCB "NoFontBlending=NFB/S,FontBlending=FB/S",0
DCB "NoFontBlending=NFB/S,FontBlending=FB/S,"
DCB "WindowOutlineColour=WOC/E,WindowOutlineOver=WOO/S",0
ALIGN
WimpVisualFlags_Code
......@@ -7256,6 +7263,10 @@ WimpVisualFlags_Code
TEQ r1,#0
BICNE r2,r2,#ThreeDFlags_NoFontBlending
LDR r1,[sp,#56]
TEQ r1,#0
ORRNE r2,r2,#ThreeDFlags_WindowOutlineOver
LDR r1,[sp,#28] ; window border face colour
BL %FT02
LDRNE r0,=&FFFFFF00
......@@ -7276,6 +7287,11 @@ WimpVisualFlags_Code
LDRNE r0,=&99999900
STR r0,truemenuborderoppcolour
LDR r1,[sp,#52] ; window outline colour
BL %FT02
LDRNE r0,=&00000000
STR r0,truewindowoutlinecolour
LDR r1,[sp,#24] ; all
TEQ r1,#0
MOVNE r2,#ThreeDFlags_All
......
......@@ -8106,6 +8106,8 @@ have_thin_border
[ TrueIcon3
LDR R0, truetitlefg ; set title foreground colour
CMP R0, #0 ; is foreground colour black?
LDREQ R0, truewindowoutlinecolour ; if so, get window outline colour
|
LDRB R0,[handle,#w_tfcol] ; set title foreground colour
]
......@@ -8681,6 +8683,10 @@ nohscroll
STRB R14, tinted_window
]
LDR R14,ThreeDFlags
TST R14,#ThreeDFlags_WindowOutlineOver
BLNE drawwindowoutline
doneborder
[ Autoscr
LDR R14, dragflags
......@@ -8784,6 +8790,55 @@ blankicon DCD &0D
LTORG
;-------------------------------------------------------------------------------
drawwindowoutline
Entry "r0-r9"
ADD R0,handle,#w_x0
LDMIA R0,{x0,y0,x1,y1}
;
; draw border round work area (unless w_tfcol = 255)
;
[ ChildWindows
LDRB R14,[handle,#w_tfcol]
TEQ R14,#255
BNE have_thin_outline
[ TrueIcon3
LDR R0, truetitlefg
|
MOV R0,#7 ; set black border in case toolsprites need it...
]
BL window_fg
B no_thin_outline
have_thin_outline
]
; LDR R14,dx
; ADD x0,x0,R14
; SUB x1,x1,R14
; LDR R14,dy
; ADD y0,y0,R14
; SUB y1,y1,R14
[ TrueIcon3
LDR R0, truetitlefg ; set title foreground colour
CMP R0, #0 ; is foreground colour black?
LDREQ R0, truewindowoutlinecolour ; if so, get window outline colour
|
LDRB R0,[handle,#w_tfcol] ; set title foreground colour
]
BL window_fg
BL hollowrectangle
[ ChildWindows
no_thin_outline
]
EXIT
;-------------------------------------------------------------------------------
[ TrueIcon3
;
; Ensures window tool tinting is on, if appropriate for this window
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment