imp: ui: mouse-clicking below the list no longer navigates back

I and mail list think it's too obtrusive, eg sometimes it navigates
when you just want to focus the window.
This commit is contained in:
Simon Michael 2022-09-08 09:00:32 -10:00
parent 975522e759
commit 6737bb3d38
4 changed files with 0 additions and 12 deletions

View File

@ -267,9 +267,6 @@ asHandle ev = do
VtyEvent e | e `elem` moveLeftEvents -> put' $ popScreen ui
-- or on a click in the app's left margin. This is a VtyEvent since not in a clickable widget.
VtyEvent (EvMouseUp x _y (Just BLeft)) | x==0 -> put' $ popScreen ui
-- or on clicking a blank list item.
MouseUp _ (Just BLeft) Location{loc=(_,y)} | clickedacct == "" -> put' $ popScreen ui
where clickedacct = maybe "" asItemAccountName $ listElements (_assList sst) !? y
-- RIGHT enters register screen for selected account (if there is one),
-- centering its selected transaction if possible

View File

@ -267,9 +267,6 @@ bsHandle ev = do
VtyEvent e | e `elem` moveLeftEvents -> put' $ popScreen ui
-- or on a click in the app's left margin. This is a VtyEvent since not in a clickable widget.
VtyEvent (EvMouseUp x _y (Just BLeft)) | x==0 -> put' $ popScreen ui
-- or on clicking a blank list item.
MouseUp _ (Just BLeft) Location{loc=(_,y)} | clickedacct == "" -> put' $ popScreen ui
where clickedacct = maybe "" asItemAccountName $ listElements (_bssList sst) !? y
-- enter register screen for selected account (if there is one),
-- centering its selected transaction if possible

View File

@ -276,9 +276,6 @@ rsHandle ev = do
VtyEvent e | e `elem` moveLeftEvents -> put' $ popScreen ui
-- or on a click in the app's left margin. This is a VtyEvent since not in a clickable widget.
VtyEvent (EvMouseUp x _y (Just BLeft)) | x==0 -> put' $ popScreen ui
-- or on clicking a blank list item.
MouseUp _ (Just BLeft) Location{loc=(_,y)} | clickeddate == "" -> put' $ popScreen ui
where clickeddate = maybe "" rsItemDate $ listElements _rssList !? y
-- enter transaction screen on RIGHT
VtyEvent e | e `elem` moveRightEvents ->

View File

@ -170,9 +170,6 @@ tsHandle ev = do
VtyEvent e | e `elem` moveLeftEvents -> put' . popScreen $ tsSelect i t ui -- Probably not necessary to tsSelect here, but it's safe.
-- or on a click in the app's left margin.
VtyEvent (EvMouseUp x _y (Just BLeft)) | x==0 -> put' . popScreen $ tsSelect i t ui
-- or on clicking the blank area below the transaction.
MouseUp _ (Just BLeft) Location{loc=(_,y)} | y+1 > numentrylines -> put' . popScreen $ tsSelect i t ui
where numentrylines = length (T.lines $ showTxn ropts rspec j t) - 1
VtyEvent (EvKey (KChar 'l') [MCtrl]) -> redraw
VtyEvent (EvKey (KChar 'z') [MCtrl]) -> suspend ui