From 76e106563ba626bb8ec98846dea583b02b870cbe Mon Sep 17 00:00:00 2001 From: Chayan Deb Date: Thu, 2 Jan 2025 18:46:46 +0530 Subject: [PATCH] [UI/UX Enhancement]: When the 'w'-key is pressed to enter wire-drawing mode, until drawing begins with an LMB-click - a new bottom status-bar entry will appear in deep blue color along with the text {WIRE READY TO DRAW! } - indicating the current editor mode. Either pressing 'Esc'-key, or starting the wire-drawing process with an LMB-click will cause this new status-bar entry to disappear. --- src/callback.c | 5 +++++ src/xschem.tcl | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/callback.c b/src/callback.c index 2ffefcc7..9a1f64d5 100644 --- a/src/callback.c +++ b/src/callback.c @@ -2070,6 +2070,11 @@ int rstate; /* (reduced state, without ShiftMask) */ } #endif + if((xctx->ui_state & MENUSTART) && (xctx->ui_state2 & MENUSTARTWIRE)) { + tclvareval(xctx->top_path, ".statusbar.10 configure -state active -text {WIRE READY TO DRAW! }", NULL); + } else { + tclvareval(xctx->top_path, ".statusbar.10 configure -state normal -text { }", NULL); + } tclvareval(xctx->top_path, ".statusbar.7 configure -text $netlist_type", NULL); tclvareval(xctx->top_path, ".statusbar.3 delete 0 end;", xctx->top_path, ".statusbar.3 insert 0 $cadsnap", diff --git a/src/xschem.tcl b/src/xschem.tcl index 1732f10e..867e5b9d 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -7731,6 +7731,7 @@ proc pack_widgets { { topwin {} } } { pack $topwin.statusbar.6 -side left pack $topwin.statusbar.7 -side left pack $topwin.statusbar.10 -side left + pack $topwin.statusbar.11 -side left pack $topwin.statusbar.9 -side left pack $topwin.statusbar.8 -side left pack $topwin.statusbar.1 -side left -fill x @@ -8471,7 +8472,8 @@ tclcommand=\"xschem raw_read \$netlist_dir/[file tail [file rootname [xschem get entry_replace_selection $topwin.statusbar.5 label $topwin.statusbar.6 -text "MODE:" label $topwin.statusbar.7 -width 7 - label $topwin.statusbar.10 -text {Stretch:} + label $topwin.statusbar.11 -text {Stretch:} + label $topwin.statusbar.10 -activebackground blue -text {} label $topwin.statusbar.9 -textvariable enable_stretch label $topwin.statusbar.8 -activebackground red -text {} add_toolbuttons $topwin