From ef5a9e66a5943a2f68efc0071ab0622495b3a32e Mon Sep 17 00:00:00 2001 From: Robert Sprowson <rsprowson@gitlab.riscosopen.org> Date: Sun, 30 Apr 2023 15:33:31 +0100 Subject: [PATCH] Add WimpVisualFlag to turn off icon bar borders Given it's now possible to have a different tile sprite for the icon bar background, it may look wrong to have a black border around that window. Allow it to be turned off. --- Resources/UK/CmdHelp | Bin 7413 -> 7472 bytes s/Iconbar | 19 ++++++++++++++++--- s/Wimp01 | 8 +++++++- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/Resources/UK/CmdHelp b/Resources/UK/CmdHelp index 5d6490c1683ef47284b4f6895d0d15ece1fc3e30..f82c9273ec52cbd2bc6ac4ec02f6f0d69394eeb4 100644 GIT binary patch delta 68 zcmexrxxs3~ZV7Y0e9z?kJg3AWr~IOn)FNp{1qFqm)ZF~CRE3g^RE7M~lAO%ERE4yn T{9Ld=CQx-!V$tU95_T*AaKaew delta 12 TcmdmB_0@92Zi&s`B&=8fDWL_M diff --git a/s/Iconbar b/s/Iconbar index e4bc6b4..e29cc2e 100644 --- a/s/Iconbar +++ b/s/Iconbar @@ -124,7 +124,7 @@ addtoR1 SUBVC R14,R14,R2 STRVC R14,iconbarheight ; used later [ HideIconBar - MOV R2, #-3 + MOVVC R2, #-3 | LDRVC R2,iconbarhandle ; open at same height ] @@ -321,11 +321,24 @@ openiconbar Entry "R1-R9,R11" LDMIA R14,{cx0,cy0,cx1,cy1} ; always open iconbar at bottom LDR R14,iconbarheight ADD cy1,cy0,R14 + [ ThreeDPatch + LDR R14,ThreeDFlags + TST R14,#ThreeDFlags_NoIconBarBorder + MOVNE R14,#255 ; no border special value + MOVEQ R14,#sc_black + STRB R14,[handle,#w_tfcol] ; transfer border visual flag to window definition + + MOVNE R14,#0 ; no left/right border allowance + MOVNE R11,#0 + LDREQ R14,dx + LDREQ R11,dy + | LDR R14,dx + LDR R11,dy + ] ADD cx0,cx0,R14 SUB cx1,cx1,R14 - LDR R14,dy - ADD cy0,cy0,R14 ; cx0,cy0,cx1,cy1 = screen posn + ADD cy0,cy0,R11 ; cx0,cy0,cx1,cy1 = screen posn LDR x0,[handle,#w_wex0] ; try to keep extent the same SUB x1,cx1,cx0 ADD x1,x0,x1 ; x0,x1 = extent diff --git a/s/Wimp01 b/s/Wimp01 index bdc7d2b..1fc4412 100644 --- a/s/Wimp01 +++ b/s/Wimp01 @@ -383,6 +383,7 @@ ThreeDFlags_NoIconBgInTransWindows * 1<<5 ThreeDFlags_NoFontBlending * 1<<6 ThreeDFlags_FullIconClipping * 1<<7 ; we're just ignoring this flag ThreeDFlags_WindowOutlineOver * 1<<8 +ThreeDFlags_NoIconBarBorder * 1<<9 arrowIconWidth_No3D * 24 arrowIconWidth_3D * 32 @@ -2344,6 +2345,8 @@ WimpVisualFlags_Help DCB "*WimpVisualFlags changes some aspects of the visual a DCB " Use font blending in icons.",cr DCB "-WindowOutlineOver",cr DCB " Plot the window outline over the tool icons.",cr + DCB "-NoIconBarBorder",cr + DCB " Remove the outline from the iconbar.",cr DCB "-All",cr DCB " Turn all flags on.",cr DCB "-WindowBorderFaceColour <&RRGGBB>",cr @@ -7651,7 +7654,7 @@ WimpKillSprite_Code DCB "ButtonBorderFaceColour=BBFC/E,ButtonBorderShallowColour=BBSC/E,ButtonBorderOppColour=BBOC/E," DCB "ButtonColour=BC/E,ButtonWellColour=BWC/E,ButtonHighlightColour=BHC/E," DCB "NoFontBlending=NFB/S,FontBlending=FB/S," - DCB "WindowOutlineColour=WOC/E,WindowOutlineOver=WOO/S",0 + DCB "WindowOutlineColour=WOC/E,WindowOutlineOver=WOO/S,NoIconBarBorder=NIBB/S",0 ALIGN WimpVisualFlags_Code @@ -7706,6 +7709,9 @@ WimpVisualFlags_Code LDR r1,[sp,#80] TEQ r1,#0 ORRNE r2,r2,#ThreeDFlags_WindowOutlineOver + LDR r1,[sp,#84] + TEQ r1,#0 + ORRNE r2,r2,#ThreeDFlags_NoIconBarBorder LDR r1,[sp,#28] ; window border face colour BL %FT02 -- GitLab