resize some widgets, add femto and tera for x/y axis units
This commit is contained in:
parent
3e6815ccc5
commit
25f0334110
|
|
@ -1685,6 +1685,7 @@ static int axis_within_range(double x, double a, double b)
|
||||||
static double get_unit(const char *val)
|
static double get_unit(const char *val)
|
||||||
{
|
{
|
||||||
if(!val) return 1.0;
|
if(!val) return 1.0;
|
||||||
|
else if(val[0] == 'f') return 1e15;
|
||||||
else if(val[0] == 'p') return 1e12;
|
else if(val[0] == 'p') return 1e12;
|
||||||
else if(val[0] == 'n') return 1e9;
|
else if(val[0] == 'n') return 1e9;
|
||||||
else if(val[0] == 'u') return 1e6;
|
else if(val[0] == 'u') return 1e6;
|
||||||
|
|
@ -1692,6 +1693,7 @@ static double get_unit(const char *val)
|
||||||
else if(val[0] == 'k') return 1e-3;
|
else if(val[0] == 'k') return 1e-3;
|
||||||
else if(val[0] == 'M') return 1e-6;
|
else if(val[0] == 'M') return 1e-6;
|
||||||
else if(val[0] == 'G') return 1e-9;
|
else if(val[0] == 'G') return 1e-9;
|
||||||
|
else if(val[0] == 'T') return 1e-12;
|
||||||
return 1.0;
|
return 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1714,7 +1714,7 @@ proc graph_edit_properties {n} {
|
||||||
button .graphdialog.center.left.add -text Add -command {
|
button .graphdialog.center.left.add -text Add -command {
|
||||||
graph_add_nodes; graph_update_nodelist
|
graph_add_nodes; graph_update_nodelist
|
||||||
}
|
}
|
||||||
listbox .graphdialog.center.left.list1 -width 20 -height 10 -selectmode extended \
|
listbox .graphdialog.center.left.list1 -width 20 -height 5 -selectmode extended \
|
||||||
-yscrollcommand {.graphdialog.center.left.yscroll set} \
|
-yscrollcommand {.graphdialog.center.left.yscroll set} \
|
||||||
-xscrollcommand {.graphdialog.center.left.xscroll set}
|
-xscrollcommand {.graphdialog.center.left.xscroll set}
|
||||||
scrollbar .graphdialog.center.left.yscroll -command {.graphdialog.center.left.list1 yview}
|
scrollbar .graphdialog.center.left.yscroll -command {.graphdialog.center.left.list1 yview}
|
||||||
|
|
@ -1723,13 +1723,13 @@ proc graph_edit_properties {n} {
|
||||||
grid .graphdialog.center.left.list1 - .graphdialog.center.left.yscroll -sticky nsew
|
grid .graphdialog.center.left.list1 - .graphdialog.center.left.yscroll -sticky nsew
|
||||||
grid .graphdialog.center.left.xscroll - -sticky nsew
|
grid .graphdialog.center.left.xscroll - -sticky nsew
|
||||||
grid rowconfig .graphdialog.center.left 0 -weight 0
|
grid rowconfig .graphdialog.center.left 0 -weight 0
|
||||||
grid rowconfig .graphdialog.center.left 1 -weight 1 -minsize 100
|
grid rowconfig .graphdialog.center.left 1 -weight 1 -minsize 2c
|
||||||
grid columnconfig .graphdialog.center.left 0 -weight 1
|
grid columnconfig .graphdialog.center.left 0 -weight 1
|
||||||
grid columnconfig .graphdialog.center.left 1 -weight 1
|
grid columnconfig .graphdialog.center.left 1 -weight 1
|
||||||
|
|
||||||
# center right frame
|
# center right frame
|
||||||
label .graphdialog.center.right.lab1 -text {Signals in graph}
|
label .graphdialog.center.right.lab1 -text {Signals in graph}
|
||||||
text .graphdialog.center.right.text1 -wrap none -width 50 -height 10 -bg grey70 -fg black \
|
text .graphdialog.center.right.text1 -wrap none -width 50 -height 5 -bg grey70 -fg black \
|
||||||
-insertbackground grey40 -exportselection 1 \
|
-insertbackground grey40 -exportselection 1 \
|
||||||
-yscrollcommand {.graphdialog.center.right.yscroll set} \
|
-yscrollcommand {.graphdialog.center.right.yscroll set} \
|
||||||
-xscrollcommand {.graphdialog.center.right.xscroll set}
|
-xscrollcommand {.graphdialog.center.right.xscroll set}
|
||||||
|
|
@ -1740,7 +1740,7 @@ proc graph_edit_properties {n} {
|
||||||
grid .graphdialog.center.right.text1 - .graphdialog.center.right.yscroll -sticky nsew
|
grid .graphdialog.center.right.text1 - .graphdialog.center.right.yscroll -sticky nsew
|
||||||
grid .graphdialog.center.right.xscroll - -sticky nsew
|
grid .graphdialog.center.right.xscroll - -sticky nsew
|
||||||
grid rowconfig .graphdialog.center.right 0 -weight 0
|
grid rowconfig .graphdialog.center.right 0 -weight 0
|
||||||
grid rowconfig .graphdialog.center.right 1 -weight 1 -minsize 100
|
grid rowconfig .graphdialog.center.right 1 -weight 1 -minsize 3c
|
||||||
grid columnconfig .graphdialog.center.right 0 -weight 1
|
grid columnconfig .graphdialog.center.right 0 -weight 1
|
||||||
grid columnconfig .graphdialog.center.right 1 -weight 1
|
grid columnconfig .graphdialog.center.right 1 -weight 1
|
||||||
|
|
||||||
|
|
@ -1802,14 +1802,14 @@ proc graph_edit_properties {n} {
|
||||||
|
|
||||||
# top2 frame
|
# top2 frame
|
||||||
label .graphdialog.top2.labunitx -text {X units}
|
label .graphdialog.top2.labunitx -text {X units}
|
||||||
spinbox .graphdialog.top2.unitx -values {p n u m 1 k M G} -width 2 \
|
spinbox .graphdialog.top2.unitx -values {f p n u m 1 k M G T} -width 2 \
|
||||||
-command {
|
-command {
|
||||||
xschem setprop rect 2 $graph_selected unitx [.graphdialog.top2.unitx get]
|
xschem setprop rect 2 $graph_selected unitx [.graphdialog.top2.unitx get]
|
||||||
xschem draw_graph $graph_selected
|
xschem draw_graph $graph_selected
|
||||||
}
|
}
|
||||||
|
|
||||||
label .graphdialog.top2.labunity -text { Y units}
|
label .graphdialog.top2.labunity -text { Y units}
|
||||||
spinbox .graphdialog.top2.unity -values {p n u m 1 k M G} -width 2 \
|
spinbox .graphdialog.top2.unity -values {f p n u m 1 k M G T} -width 2 \
|
||||||
-command {
|
-command {
|
||||||
xschem setprop rect 2 $graph_selected unity [.graphdialog.top2.unity get]
|
xschem setprop rect 2 $graph_selected unity [.graphdialog.top2.unity get]
|
||||||
xschem draw_graph $graph_selected
|
xschem draw_graph $graph_selected
|
||||||
|
|
@ -2406,7 +2406,7 @@ proc load_file_dialog {{msg {}} {ext {}} {global_initdir {INITIALINSTDIR}}
|
||||||
set myload_index1 0
|
set myload_index1 0
|
||||||
}
|
}
|
||||||
set_ne myload_files2 {}
|
set_ne myload_files2 {}
|
||||||
panedwindow .load.l -orient horizontal
|
panedwindow .load.l -orient horizontal -height 8c
|
||||||
if { $loadfile == 2} {frame .load.l.recent}
|
if { $loadfile == 2} {frame .load.l.recent}
|
||||||
frame .load.l.paneleft
|
frame .load.l.paneleft
|
||||||
eval [subst {listbox .load.l.paneleft.list -listvariable myload_files1 -width 20 -height 12 \
|
eval [subst {listbox .load.l.paneleft.list -listvariable myload_files1 -width 20 -height 12 \
|
||||||
|
|
@ -2435,7 +2435,7 @@ proc load_file_dialog {{msg {}} {ext {}} {global_initdir {INITIALINSTDIR}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
frame .load.l.paneright
|
frame .load.l.paneright
|
||||||
frame .load.l.paneright.draw -background white -width 200 -height 200
|
frame .load.l.paneright.draw -background white -height 3.8c
|
||||||
listbox .load.l.paneright.list -listvariable myload_files2 -width 20 -height 12\
|
listbox .load.l.paneright.list -listvariable myload_files2 -width 20 -height 12\
|
||||||
-yscrollcommand ".load.l.paneright.yscroll set" -selectmode browse \
|
-yscrollcommand ".load.l.paneright.yscroll set" -selectmode browse \
|
||||||
-xscrollcommand ".load.l.paneright.xscroll set" -exportselection 0
|
-xscrollcommand ".load.l.paneright.xscroll set" -exportselection 0
|
||||||
|
|
@ -2528,9 +2528,9 @@ proc load_file_dialog {{msg {}} {ext {}} {global_initdir {INITIALINSTDIR}}
|
||||||
# pack .load.recent -side left -fill y
|
# pack .load.recent -side left -fill y
|
||||||
# c_toolbar::display
|
# c_toolbar::display
|
||||||
# }
|
# }
|
||||||
|
pack .load.buttons_bot -side bottom -fill x
|
||||||
|
pack .load.buttons -side bottom -fill x
|
||||||
pack .load.l -expand true -fill both
|
pack .load.l -expand true -fill both
|
||||||
pack .load.buttons -side top -fill x
|
|
||||||
pack .load.buttons_bot -side top -fill x
|
|
||||||
if { [info exists myload_default_geometry]} {
|
if { [info exists myload_default_geometry]} {
|
||||||
wm geometry .load "${myload_default_geometry}"
|
wm geometry .load "${myload_default_geometry}"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue