update add_custom_menu.tcl for new menu system
This commit is contained in:
parent
b23b162f2c
commit
05dc1a4772
|
|
@ -1,67 +1,14 @@
|
|||
## Add a custom menu in xschem
|
||||
|
||||
## Create a menu entry 'Test'. '.menubar' is xschem's main menu frame.
|
||||
menubutton .menubar.test -text "Test" -menu .menubar.test.menu -padx 3 -pady 0
|
||||
menu .menubar.test.menu -tearoff 0
|
||||
## Create a menu entry 'Test' before 'Netlist'. '.menubar' is xschem's main menu.
|
||||
.menubar insert Netlist cascade -label Test -menu .menubar.test
|
||||
menu .menubar.test -tearoff 0
|
||||
|
||||
## Create a couple of entries
|
||||
.menubar.test.menu add command -label "Test entry 1" -command {
|
||||
.menubar.test add command -label "Test entry 1" -command {
|
||||
puts Hello
|
||||
}
|
||||
.menubar.test.menu add command -label "Test entry 2" -command {
|
||||
.menubar.test add command -label "Test entry 2" -command {
|
||||
puts World
|
||||
}
|
||||
|
||||
## make the menu appear in xschem window
|
||||
pack .menubar.test -side left
|
||||
## or place it before some other menu entry:
|
||||
# pack .menubar.test -before .menubar.file -side left
|
||||
|
||||
## To remove the menu without destroying it:
|
||||
# pack forget .menubar.test
|
||||
|
||||
|
||||
################################################################
|
||||
## adding a button in the menubar (not in the toolbar)
|
||||
################################################################
|
||||
# button .menubar.test -pady 0 -highlightthickness 0 -text Test -command {puts Test}
|
||||
# pack .menubar.test -side left
|
||||
|
||||
|
||||
## create a menu 'PDK' with radiobutton entries
|
||||
# proc menupdk {} {
|
||||
# global libptr dark_gui_colorscheme
|
||||
# if { $dark_gui_colorscheme} {
|
||||
# set selectcolor white
|
||||
# } else {
|
||||
# set selectcolor black
|
||||
# }
|
||||
#
|
||||
# ## Create a menu entry 'Test'. '.menubar' is xschem's main menu frame.
|
||||
# menubutton .menubar.pdk -text "PDK" -menu .menubar.pdk.menu -padx 3 -pady 0
|
||||
# menu .menubar.pdk.menu -tearoff 0
|
||||
#
|
||||
# .menubar.pdk.menu add radiobutton -selectcolor $selectcolor -variable libptr \
|
||||
# -value gf180mcu -label "GF180MCU" -command {
|
||||
# set_env gf180mcu
|
||||
# }
|
||||
#
|
||||
# .menubar.pdk.menu add radiobutton -selectcolor $selectcolor -variable libptr \
|
||||
# -value sky130 -label "SKY130" -command {
|
||||
# set_env sky130
|
||||
# }
|
||||
#
|
||||
# .menubar.pdk.menu add radiobutton -selectcolor $selectcolor -variable libptr \
|
||||
# -value repo -label "xschem repo" -command {
|
||||
# set_env repo
|
||||
# }
|
||||
# ## make the menu appear in xschem window
|
||||
# pack .menubar.pdk -side left
|
||||
# ## or place it before some other menu entry:
|
||||
# # pack .menubar.pdk -before .menubar.file -side left
|
||||
#
|
||||
# ## To remove the menu without destroying it:
|
||||
# # pack forget .menubar.pdk
|
||||
# }
|
||||
# menupdk
|
||||
|
||||
|
|
|
|||
|
|
@ -8696,8 +8696,8 @@ if { [info exists has_x]} {
|
|||
if { $dark_gui_colorscheme == 0 } { ;# normal GUI
|
||||
option add *foreground black startupFile
|
||||
option add *activeForeground black startupFile
|
||||
option add *background {grey90} startupFile
|
||||
option add *activeBackground {#ececec} startupFile
|
||||
option add *background {grey80} startupFile
|
||||
option add *activeBackground {#f8f8f8} startupFile
|
||||
option add *disabledForeground {black} startupFile
|
||||
option add *disabledBackground {grey70} startupFile
|
||||
option add *readonlyBackground {grey70} startupFile
|
||||
|
|
@ -8715,7 +8715,7 @@ if { [info exists has_x]} {
|
|||
option add *foreground white startupFile
|
||||
option add *activeForeground white startupFile
|
||||
option add *background {grey20} startupFile
|
||||
option add *activeBackground {grey20} startupFile
|
||||
option add *activeBackground {grey10} startupFile
|
||||
option add *disabledForeground {white} startupFile
|
||||
option add *disabledBackground {grey20} startupFile
|
||||
option add *readonlyBackground {grey20} startupFile
|
||||
|
|
|
|||
Loading…
Reference in New Issue