Added small toolbar into project tree

This commit is contained in:
Sergey Kalinin 2018-03-13 18:13:06 +03:00
parent ace5dc22f4
commit 41c83d175a
10 changed files with 23 additions and 2 deletions

View File

@ -6,6 +6,9 @@
########################################################## ##########################################################
0.4.5 0.4.5
13.03.2018
- Added small toolbar into project tree
12.03.2018 12.03.2018
- Added insert base64 encoded image into source code (press "Control+I" or popup menu) - Added insert base64 encoded image into source code (press "Control+I" or popup menu)
@ -432,3 +435,4 @@ characters to the right of the insertion cursor.

BIN
img/del_project.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
img/new_project.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 B

BIN
img/project_settings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 845 B

BIN
img/sort.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 710 B

View File

@ -230,6 +230,15 @@ set nbFiles [$noteBookFiles insert end files -text [::msgcat::mc "Files"] \
-activebackground $editor(bg) -activeforeground $editor(fg)] -activebackground $editor(bg) -activeforeground $editor(fg)]
#set frmButtonBoxTreeProj [frame $nbFiles.frmButtonBoxTreeProj]
#pack $frmButtonBoxTreeProj -side top -fill both -expand true
set bBoxProjectTree [ButtonBox $nbProjects.bboxProjectTree -spacing 0 -padx 1 -pady 1 -bg $editor(bg)]
#add_toolbar_button $bBoxProjectTree new_project.png {NewProj new "" ""} [::msgcat::mc "New project"]
#add_toolbar_button $bBoxProjectTree del_project.png DelProj [::msgcat::mc "Delete project"]
add_toolbar_button $bBoxProjectTree project_settings.png {NewProj edit $activeProject ""} [::msgcat::mc "Project settings"]
add_toolbar_button $bBoxProjectTree sort.png SortTree [::msgcat::mc "Sort tree"]
pack $bBoxProjectTree -side top -pady 4 -anchor w
# Create FileTree # Create FileTree
#FileTree::create $nbFiles #FileTree::create $nbFiles
set frmTreeFiles [ScrolledWindow $nbFiles.frmTreeFiles -bd 0 -bg $editor(bg) -background $editor(bg)] set frmTreeFiles [ScrolledWindow $nbFiles.frmTreeFiles -bd 0 -bg $editor(bg) -background $editor(bg)]
@ -368,3 +377,6 @@ if {[info exists workingProject]} {
} }
} }

View File

@ -180,3 +180,4 @@ proc GetFileMenu {m} {

View File

@ -102,3 +102,4 @@ namespace eval pane {

View File

@ -83,7 +83,7 @@ proc add_toolbar_button {path icon command helptext} {
image create photo $icon -format png -file [file join $imgDir $icon] image create photo $icon -format png -file [file join $imgDir $icon]
$path add -image $icon \ $path add -image $icon \
-highlightthickness 0 -takefocus 0 -relief link -bd 1 -activebackground $editor(bg)\ -highlightthickness 0 -takefocus 0 -relief link -bd 1 -activebackground $editor(bg)\
-padx 1 -pady 1 -command $command -helptext $helptext -padx 2 -pady 2 -command $command -helptext $helptext
} }
# Separator for toolbar # Separator for toolbar
proc GoToLineButton {w} { proc GoToLineButton {w} {
@ -98,3 +98,5 @@ proc GoToLineButton {w} {
} }

View File

@ -84,3 +84,4 @@ proc Translit {line} {