Commit 18031756 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Fix for missing window gadgets when no tool sprites are loaded

When 'outlinefont' is enabled, the drawicon_system function used to plot the close/back/resize etc icons tries to do so from the currently selected outline font.
This usually results in various top bit set characters inappropriately being shown.
Now, when there are no tool sprites loaded the gadgets are forced to be plotted in the system font (where the Wimp has carefully redefined the font), but the remainder of the desktop (eg. the title bar, user text) stays in the selected desktop font.

Version 5.28. Tagged as 'Wimp-5_28'
parent aa599e8c
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.27"
Module_Version SETA 527
Module_MajorVersion SETS "5.28"
Module_Version SETA 528
Module_MinorVersion SETS ""
Module_Date SETS "11 May 2013"
Module_ApplicationDate SETS "11-May-13"
Module_Date SETS "18 May 2013"
Module_ApplicationDate SETS "18-May-13"
Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "5.27"
Module_HelpVersion SETS "5.27 (11 May 2013)"
Module_FullVersion SETS "5.28"
Module_HelpVersion SETS "5.28 (18 May 2013)"
END
/* (5.27)
/* (5.28)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.27
#define Module_MajorVersion_CMHG 5.28
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 11 May 2013
#define Module_Date_CMHG 18 May 2013
#define Module_MajorVersion "5.27"
#define Module_Version 527
#define Module_MajorVersion "5.28"
#define Module_Version 528
#define Module_MinorVersion ""
#define Module_Date "11 May 2013"
#define Module_Date "18 May 2013"
#define Module_ApplicationDate "11-May-13"
#define Module_ApplicationDate "18-May-13"
#define Module_ComponentName "Wimp"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "5.27"
#define Module_HelpVersion "5.27 (11 May 2013)"
#define Module_LibraryVersionInfo "5:27"
#define Module_FullVersion "5.28"
#define Module_HelpVersion "5.28 (18 May 2013)"
#define Module_LibraryVersionInfo "5:28"
......@@ -7992,13 +7992,6 @@ SWIWimp_RedrawWindow
; internal entry point - called by Poll_Wimp sometimes
;-----------------------------------------------------------------------------
[ ChildWindows
backicon DCD &0D85 ; moved from the end
quiticon DCD &0D84
toggleicon1 DCD &0D81
toggleicon2 DCD &0D82
]
int_redraw_window
Push LR
;
......@@ -8240,10 +8233,10 @@ redrawoutlp_done_tracing
;
MOV R2,#windowicon_back
BL plot_windowglyph ; plot a window glyph
ADREQ R2,backicon
ADREQL R2,backicon
LDREQ R1,=sysicon
BLEQ drawicon_system ; preserves flags
BLEQ drawicon_system_sysf ; preserves flags
01
TST R3,#wf_icon2
BEQ %FT01 ; no close icon
......@@ -8253,8 +8246,8 @@ redrawoutlp_done_tracing
MOV R2,#windowicon_close
BL plot_windowglyph
LDREQ R1,=sysicon
ADREQ R2,quiticon
BLEQ drawicon_system ; preserves flags
ADREQL R2,quiticon
BLEQ drawicon_system_sysf ; preserves flags
01
TST R3,#wf_icon3
BEQ %FT01 ; ignore the title bar if one not being plotted
......@@ -8334,10 +8327,10 @@ redrawoutlp_done_tracing
|
TST R3,#ws_toggled
]
ADREQ R2,toggleicon1
ADRNE R2,toggleicon2
ADREQL R2,toggleicon1
ADRNEL R2,toggleicon2
LDR R1,=sysicon
BL drawicon_system ; plot as a normal VDU 5 glyph otherwise
BL drawicon_system_sysf ; plot as a normal VDU 5 glyph otherwise
[ IconiseButton
01 TST R3,#wf_icon2 ; have an iconise button iff we have a close button
......@@ -8355,7 +8348,7 @@ redrawoutlp_done_tracing
BL plot_windowglyph
LDREQ R1,=sysicon
ADREQL R2,iconiseicon
BLEQ drawicon_system ; preserves flags
BLEQ drawicon_system_sysf ; preserves flags
]
01 TST R3,#wf_icon5
BEQ novscroll
......@@ -8427,7 +8420,7 @@ redrawoutlp_done_tracing
BL plot_windowglyph_vscaled
LDREQ R1,=sysicon ; if not then use the normal text glyph!
ADREQ R2,uparrowicon
BLEQ drawicon_system ; this should at least centre and clip the arrow
BLEQ drawicon_system_sysf ; this should at least centre and clip the arrow
LDR R14,dy
ADD y1,y0,R14 ; overlap by one pixel
......@@ -8438,7 +8431,7 @@ redrawoutlp_done_tracing
BL plot_windowglyph_vscaled ; plot the down arrow (if possible)
LDREQ R1,=sysicon
ADREQ R2,downarrowicon
BLEQ drawicon_system ; otherwise use VDU 5
BLEQ drawicon_system_sysf ; otherwise use VDU 5
B novscroll
vscrollfits
......@@ -8452,7 +8445,7 @@ vscrollfits
BL plot_windowglyph
LDREQ R1,=sysicon ; if not then use the normal text glyph!
ADREQ R2,uparrowicon
BLEQ drawicon_system
BLEQ drawicon_system_sysf
;
Pull "y0,y1"
LDR R1,dy
......@@ -8464,7 +8457,7 @@ vscrollfits
BL plot_windowglyph ; plot the down arrow (if possible)
LDREQ R1,=sysicon
ADREQ R2,downarrowicon
BLEQ drawicon_system ; otherwise use VDU 5
BLEQ drawicon_system_sysf ; otherwise use VDU 5
;
Push "R3-R4"
MOVS R0,R4
......@@ -8520,7 +8513,7 @@ novscroll
BL plot_windowglyph
LDREQ R1,=sysicon
ADREQ R2,sizeicon
BLEQ drawicon_system ; plot using a VDU 5 glyph
BLEQ drawicon_system_sysf ; plot using a VDU 5 glyph
B %FT01
00
TST R3,#wf_icon5 ; if both scroll bars, draw blank
......@@ -8537,7 +8530,7 @@ novscroll
BLNE draw_spriteglyph ; plot the sprite if thats present
LDREQ R1,=sysicon
ADREQ R2,blankicon
BLEQ drawicon_system
BLEQ drawicon_system_sysf
01
TST R3,#wf_icon7
BEQ nohscroll
......@@ -8608,7 +8601,7 @@ novscroll
BL plot_windowglyph_hscaled
LDREQ R1,=sysicon ; if not then use the normal text glyph!
ADREQ R2,leftarrowicon
BLEQ drawicon_system ; this should at least centre and clip the arrow
BLEQ drawicon_system_sysf ; this should at least centre and clip the arrow
LDR R14,dx
SUB x0,x1,R14 ; overlap by one pixel
......@@ -8619,7 +8612,7 @@ novscroll
BL plot_windowglyph_hscaled ; plot the right arrow (if possible)
LDREQ R1,=sysicon
ADREQ R2,rightarrowicon
BLEQ drawicon_system ; otherwise use VDU 5
BLEQ drawicon_system_sysf ; otherwise use VDU 5
B nohscroll
hscrollfits
......@@ -8633,7 +8626,7 @@ hscrollfits
BL plot_windowglyph ; plot sprite if possible
LDREQ R1,=sysicon
ADREQ R2,leftarrowicon
BLEQ drawicon_system ; otherwise, use VDU 5 glyphs
BLEQ drawicon_system_sysf ; otherwise, use VDU 5 glyphs
;
Pull "x0,x1"
LDR R1,dx
......@@ -8645,7 +8638,7 @@ hscrollfits
BL plot_windowglyph ; plot sprite if possible
LDREQ R1,=sysicon
ADREQ R2,rightarrowicon
BLEQ drawicon_system
BLEQ drawicon_system_sysf
;
MOVS R0,R4
LDRNE R14,[R0,#tool_hwelllcap]
......@@ -8775,15 +8768,11 @@ endredrawoutlp
sysicon * if_text:OR:if_filled:OR:if_border:OR:if_hcentred
sysicon2 * if_sprite:OR:if_filled:OR:if_border:OR:if_hcentred
[ ChildWindows
sizeicon DCD &0D83
|
backicon DCD &0D85 ; moved to the start
backicon DCD &0D85
quiticon DCD &0D84
sizeicon DCD &0D83
toggleicon1 DCD &0D81
toggleicon2 DCD &0D82
]
uparrowicon DCD &0D8B
downarrowicon DCD &0D8A
leftarrowicon DCD &0D88
......
......@@ -1573,6 +1573,20 @@ findeorvalues
; [iconhandle] = handle of icon
;-----------------------------------------------------------------------------
drawicon_system_sysf
[ outlinefont
Push "LR"
LDR R14,systemfont
Push "R14"
MOV R14,#0
STR R14,systemfont ; Force this icon to use system font
BL drawicon_system
Pull "R14"
STR R14,systemfont
Pull "PC"
|
; Fall through, it's already system font
]
drawicon_system
; R1 = icon flags
......
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