diff --git a/lib/gui.tcl b/lib/gui.tcl index eb27b0d..2f76379 100644 --- a/lib/gui.tcl +++ b/lib/gui.tcl @@ -74,14 +74,19 @@ ttk::frame .frmBody -border 0 -relief raised ttk::frame .frmStatus -border 0 -relief raised if {$cfgVariables(menuShow) eq "true"} { - pack .frmMenu -side top -padx 1 -fill x + # pack -side top -padx 1 -fill x + grid .frmMenu -row 0 -column 0 -sticky new } -pack .frmBody -side top -padx 1 -fill both -expand true +# pack .frmBody -side top -padx 1 -fill both -expand true +grid .frmBody -row 1 -column 0 -sticky nsew if {$cfgVariables(statusBarShow) eq "true"} { - pack .frmStatus -side top -padx 1 -fill x + # pack .frmStatus -side top -padx 1 -fill x + grid .frmStatus -row 2 -column 0 -sticky sew } +grid columnconfigure . .frmBody -weight 1 +grid rowconfigure . .frmBody -weight 1 # pack .panel -expand true -fill both # pack propagate .panel false @@ -119,12 +124,16 @@ GetViewMenu .popup set frmTool [ttk::frame .frmBody.frmTool] ttk::panedwindow .frmBody.panel -orient horizontal -style TPanedwindow -pack propagate .frmBody.panel false +# pack propagate .frmBody.panel false if {$cfgVariables(toolBarShow) eq "true"} { - pack .frmBody.frmTool -side left -fill y + # pack .frmBody.frmTool -side left -fill y + grid .frmBody.frmTool -row 0 -column 0 -sticky nsw } -pack .frmBody.panel -side left -fill both -expand true +# pack .frmBody.panel -side left -fill both -expand true +grid .frmBody.panel -row 0 -column 1 -sticky nesw +grid columnconfigure .frmBody .frmBody.panel -weight 1 +grid rowconfigure .frmBody .frmBody.panel -weight 1 ttk::button $frmTool.btn_tree -command "ViewFilesTree true" -image tree_24x24 ttk::button $frmTool.btn_search -command FileOper::FindInFiles -image search_24x24 diff --git a/lib/menu.tcl b/lib/menu.tcl index 8b6986b..14a5a8f 100644 --- a/lib/menu.tcl +++ b/lib/menu.tcl @@ -79,7 +79,7 @@ proc GetViewMenu {m} { $m.panelSide add radiobutton -label [::msgcat::mc "Right"] \ -variable cfgVariables(filesPanelPlace) -value right - $m add checkbutton -label [::msgcat::mc "Show the Menu"] -command ViewMenu \ + $m add checkbutton -label [::msgcat::mc "Show the Menu"] -command ViewMenuBar \ -variable cfgVariables(menuShow) -onvalue true -offvalue false $m add checkbutton -label [::msgcat::mc "Toolbar"] -command ViewToolBar \ -variable cfgVariables(toolBarShow) -onvalue true -offvalue false diff --git a/lib/procedure.tcl b/lib/procedure.tcl index 81a910c..1844c84 100644 --- a/lib/procedure.tcl +++ b/lib/procedure.tcl @@ -44,43 +44,58 @@ proc ViewFilesTree {{hotkey "false"}} { } } } -proc ViewToolBar {} { + +proc ViewMenuBar {{hotkey "false"}} { global cfgVariables - if {$cfgVariables(toolBarShow) eq "false"} { - pack forget .frmBody.frmTool - } else { - # pack + if {$hotkey eq "true"} { + if {$cfgVariables(menuShow) eq "false"} { + set cfgVariables(menuShow) true + } else { + set cfgVariables(menuShow) false + } } -} -proc ViewStatusBar {} { - global cfgVariables - if {$cfgVariables(statusBarShow) eq "false"} { - pack forget .frmStatus - } else { - # pack - } -} -proc ViewMenu {} { - global cfgVariables if {$cfgVariables(menuShow) eq "false"} { - pack forget .frmMenu + grid remove .frmMenu } else { - # pack + grid .frmMenu -row 0 -column 0 -sticky new } } +proc ViewStatusBar {{hotkey "false"}} { + global cfgVariables + if {$hotkey eq "true"} { + if {$cfgVariables(statusBarShow) eq "false"} { + set cfgVariables(statusBarShow) true + } else { + set cfgVariables(statusBarShow) false + } + } + if {$cfgVariables(statusBarShow) eq "false"} { + grid remove .frmStatus + } else { + grid .frmStatus -row 2 -column 0 -sticky sew + } +} + +proc ViewToolBar {{hotkey "false"}} { + global cfgVariables + if {$hotkey eq "true"} { + if {$cfgVariables(toolBarShow) eq "false"} { + set cfgVariables(toolBarShow) true + } else { + set cfgVariables(toolBarShow) false + } + } + if {$cfgVariables(toolBarShow) eq "false"} { + grid remove .frmBody.frmTool + } else { + grid .frmBody.frmTool -row 0 -column 0 -sticky nsw + } +} # Enable/Disabled line numbers in editor proc ViewLineNumbers {} { global cfgVariables nbEditor - - # Changed global settigs - # if {$cfgVariables(lineNumberShow) eq "true"} { - # set cfgVariables(lineNumberShow) false - # } else { - # set cfgVariables(lineNumberShow) true - # } - # apply changes for opened tabs foreach node [$nbEditor tabs] { if [winfo exists $node.frmText.t] { $node.frmText.t configure -linemap $cfgVariables(lineNumberShow) @@ -97,6 +112,7 @@ proc ViewHelper {helper} { set cfgVariables($helper) true } } + proc Del {} { return } diff --git a/projman.tcl b/projman.tcl index 1e86dc1..85194c5 100755 --- a/projman.tcl +++ b/projman.tcl @@ -10,7 +10,7 @@ exec wish "$0" -- "$@" ###################################################### # Version: 2.0.0 # Release: alpha -# Build: 22112022130912 +# Build: 22112022145344 ###################################################### # определим текущую версию, релиз и т.д.