Commit c7bbe2b5 authored by Ben Avison's avatar Ben Avison
Browse files

Menu-related tinkering.

Detail:
  * Keyboard shortcuts in menus are now correctly aligned (and menus will
    be one pixel wider to compensate for the downwards rounding in SWI
    Font_ConverttoOS).
  * There is no longer any danger of menu titles being treated as though
    they contain a keyboard shortcut.
  * Dialogue boxes may now contain nested windows.
Admin:
  Tested on a Risc PC.

Version 4.72. Tagged as 'Wimp-4_72'
parent 9536a690
......@@ -11,14 +11,14 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "4.71"
Module_Version SETA 471
Module_MajorVersion SETS "4.72"
Module_Version SETA 472
Module_MinorVersion SETS ""
Module_Date SETS "30 Nov 2001"
Module_ApplicationDate2 SETS "30-Nov-01"
Module_ApplicationDate4 SETS "30-Nov-2001"
Module_Date SETS "11 Jan 2002"
Module_ApplicationDate2 SETS "11-Jan-02"
Module_ApplicationDate4 SETS "11-Jan-2002"
Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "4.71"
Module_HelpVersion SETS "4.71 (30 Nov 2001)"
Module_FullVersion SETS "4.72"
Module_HelpVersion SETS "4.72 (11 Jan 2002)"
END
/* (4.71)
/* (4.72)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.61.
*
*/
#define Module_MajorVersion_CMHG 4.71
#define Module_MajorVersion_CMHG 4.72
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 30 Nov 2001
#define Module_Date_CMHG 11 Jan 2002
#define Module_MajorVersion "4.71"
#define Module_Version 471
#define Module_MajorVersion "4.72"
#define Module_Version 472
#define Module_MinorVersion ""
#define Module_Date "30 Nov 2001"
#define Module_Date "11 Jan 2002"
#define Module_ApplicationDate2 "30-Nov-01"
#define Module_ApplicationDate4 "30-Nov-2001"
#define Module_ApplicationDate2 "11-Jan-02"
#define Module_ApplicationDate4 "11-Jan-2002"
#define Module_ComponentName "Wimp"
#define Module_ComponentPath "RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "4.71"
#define Module_HelpVersion "4.71 (30 Nov 2001)"
#define Module_LibraryVersionInfo "4:71"
#define Module_FullVersion "4.72"
#define Module_HelpVersion "4.72 (11 Jan 2002)"
#define Module_LibraryVersionInfo "4:72"
......@@ -7968,6 +7968,7 @@ redrawoutlp_done_tracing
LDREQB R2, fontbackground
ORREQ R1, R1, R2, LSL #ib_bcol
]
ORR R1, R1, #15 :SHL: ib_buttontype ; pretend it's writeable, so that if this is a menu, we don't attempt keyboard shortcut justification
Trace fcol, "redrawoutlp: title flags faked to ", X, R1
[ TrueIcon3 :LAND: :LNOT: colourmoreborder
......
......@@ -3950,7 +3950,9 @@ fixupmenuwidth_item_loop
;Convert R6 to OSU and store it back in the menu definition
MOV R1, R6
SWI XFont_ConverttoOS
ADD R1, R1, #16 ;add 16 OSU for good luck
ADD R1, R1, #18 ; add 16 OSU for space round text, and 2 OSU to compensate for Font_ConverttoOS
; rounding down to pixel boundaries (we need to round up so that keyboard
; shortcuts are right-justified outside any long menu items)
LDRB R6,auto_menu_flag
CMP R6, #0
LDRNE R6, [userblk, #m_width] ;320nk
......@@ -4638,7 +4640,18 @@ mousetrap
;-----------------------------------------------------------------------------
findmenu
[ ChildWindows
Push "R3,LR"
; Step up parents until we reach the ancestor
Abs R3,R3
01 LDR R14,[R3,#w_parent]
CMP R14,#nullptr
MOVNE R3,R14
BNE %BT01
Rel R3,R3
|
Push "LR"
]
LDR R1,menuSP
findmlp
......@@ -4651,7 +4664,11 @@ findmlp
SUBNE R1,R1,#4 ; try again
BNE findmlp
foundm
[ ChildWindows
Pull "R3,PC" ; on exit, Z set ==> found
|
Pull "PC" ; on exit, Z set ==> found
]
scanmenus
Push "R0-R5,LR"
......@@ -5337,7 +5354,7 @@ fixupfontstring_end
LDR R1, redrawhandle
BIC R1, R1, #3
LDR R1, [R1, #w_x1]
SUB R1, R1, #24 + 16 ;width of arrow + fudge factor
SUB R1, R1, #24 + (16 - 6) ;width of arrow + portion of excess text icon width on right
TraceK menuw, "fixupfontstring: moving to ("
TraceD menuw, R1
TraceK menuw, ", "
......
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