Skip to content

Instantly share code, notes, and snippets.

@bluecmd
Created October 2, 2020 11:48
Show Gist options
  • Save bluecmd/d27a18edfab1695bfdc5e05a5e1879c5 to your computer and use it in GitHub Desktop.
Save bluecmd/d27a18edfab1695bfdc5e05a5e1879c5 to your computer and use it in GitHub Desktop.
Patch to make MAGIC look more according to my taste
diff -ur orig/magic-8.3.61/graphics/grTk1.c magic-8.3.61/graphics/grTk1.c
--- orig/magic-8.3.61/graphics/grTk1.c 2020-05-24 09:00:08.000000000 +0200
+++ magic-8.3.61/graphics/grTk1.c 2020-10-02 13:02:37.152809300 +0200
@@ -1441,7 +1441,7 @@
else
GrTkInstalledCMap = FALSE;
- Tcl_EvalEx(consoleinterp, "catch repaintconsole", 20, 0);
+ //Tcl_EvalEx(consoleinterp, "catch repaintconsole", 20, 0);
}
WindowNumber++;
diff -ur orig/magic-8.3.61/scmos/mos.24bit.std.cmap magic-8.3.61/scmos/mos.24bit.std.cmap
--- orig/magic-8.3.61/scmos/mos.24bit.std.cmap 2020-04-08 17:45:13.000000000 +0200
+++ magic-8.3.61/scmos/mos.24bit.std.cmap 2020-10-02 13:47:00.834450100 +0200
@@ -3,21 +3,21 @@
#---------------------------------------
# R G B idx color-name
#---------------------------------------
-200 200 200 0 background_gray
+16 16 16 0 background # Window background
220 95 95 1 poly_red
66 213 66 2 diff_green
202 160 115 3 diff_brown
169 131 101 4 nfet_brown
184 73 83 5 pfet_brown
230 230 0 6 well_yellow
-0 0 0 7 contact_black
+128 128 128 7 contact_black # Background of wells
125 166 250 8 metal_blue
160 48 191 9 pc_purple
190 153 222 16 metal_purple
-255 255 255 32 cursor_white
+173 216 230 32 cursor_white
170 170 170 33 pale_gray
145 145 145 34 dark_gray
-0 0 0 35 box_black
+72 72 72 35 box # Grid
239 188 198 36 pale_red
239 125 162 37 medium_red
210 0 155 38 dark_red
@@ -37,9 +37,9 @@
139 108 0 52 medium_brown
255 119 202 53 bright_pink
50 228 225 54 port_cyan
-120 81 29 55 border_brown
-200 230 230 56 caption_blue
-180 210 180 57 window_gray
+200 200 200 55 border # This is the top menu
+0 0 0 56 caption # Text on the top menu
+200 200 200 57 window_gray
0 0 0 58
246 246 7 59 label_yellow
180 180 180 60 medium_gray
@@ -70,4 +70,4 @@
215 170 90 115 medium_tan
228 160 201 117 light_lavender
215 190 125 125 light_tan
-0 0 0 255
+100 100 100 255
diff -ur orig/magic-8.3.61/tcltk/wrapper.tcl magic-8.3.61/tcltk/wrapper.tcl
--- orig/magic-8.3.61/tcltk/wrapper.tcl 2020-05-24 09:00:08.000000000 +0200
+++ magic-8.3.61/tcltk/wrapper.tcl 2020-10-02 13:42:13.104974400 +0200
@@ -248,13 +248,13 @@
idle {
set dct [*bypass drc list count total]
if {$dct > 0} {
- ${framename}.titlebar.drcbutton configure -selectcolor red
+ ${framename}.titlebar.drcbutton configure -selectcolor orangered
} else {
- ${framename}.titlebar.drcbutton configure -selectcolor green
+ ${framename}.titlebar.drcbutton configure -selectcolor white
}
${framename}.titlebar.drcbutton configure -text "DRC=$dct"
}
- busy { ${framename}.titlebar.drcbutton configure -selectcolor yellow }
+ busy { ${framename}.titlebar.drcbutton configure -selectcolor PaleGoldenrod }
}
}
}
@@ -588,23 +588,9 @@
proc magic::repaintwrapper { win } {
set bgcolor [magic::magiccolor -]
- ${win}.xscroll configure -background $bgcolor
- ${win}.xscroll configure -highlightbackground $bgcolor
${win}.xscroll configure -highlightcolor [magic::magiccolor K]
- ${win}.yscroll configure -background $bgcolor
- ${win}.yscroll configure -highlightbackground $bgcolor
${win}.yscroll configure -highlightcolor [magic::magiccolor K]
-
- ${win}.titlebar.caption configure -background [magic::magiccolor w]
- ${win}.titlebar.caption configure -foreground [magic::magiccolor c]
-
- ${win}.titlebar.message configure -background [magic::magiccolor w]
- ${win}.titlebar.message configure -foreground [magic::magiccolor c]
-
- ${win}.titlebar.pos configure -background [magic::magiccolor w]
- ${win}.titlebar.pos configure -foreground [magic::magiccolor c]
-
}
# Coordinate display callback function
@@ -1169,32 +1155,30 @@
frame ${layoutframe}.titlebar
label ${layoutframe}.titlebar.caption -text "Loaded: none Editing: none Tool: box" \
- -foreground white -background sienna4 -anchor w -padx 15
- label ${layoutframe}.titlebar.message -text "" -foreground white \
- -background sienna4 -anchor w -padx 5
- label ${layoutframe}.titlebar.pos -text "" -foreground white \
- -background sienna4 -anchor w -padx 5
+ -anchor w -padx 15
+ label ${layoutframe}.titlebar.message -text "" -foreground white -anchor w -padx 5
+ label ${layoutframe}.titlebar.pos -text "" -anchor w -padx 5
# Menu buttons
frame ${layoutframe}.titlebar.mbuttons
# File
- menubutton ${layoutframe}.titlebar.mbuttons.file -text File -relief raised \
+ menubutton ${layoutframe}.titlebar.mbuttons.file -text File -relief groove \
-menu ${layoutframe}.titlebar.mbuttons.file.toolmenu -borderwidth 2
# Edit
- menubutton ${layoutframe}.titlebar.mbuttons.edit -text Edit -relief raised \
+ menubutton ${layoutframe}.titlebar.mbuttons.edit -text Edit -relief groove \
-menu ${layoutframe}.titlebar.mbuttons.edit.toolmenu -borderwidth 2
# Cell
- menubutton ${layoutframe}.titlebar.mbuttons.cell -text Cell -relief raised \
+ menubutton ${layoutframe}.titlebar.mbuttons.cell -text Cell -relief groove \
-menu ${layoutframe}.titlebar.mbuttons.cell.toolmenu -borderwidth 2
# Window
- menubutton ${layoutframe}.titlebar.mbuttons.win -text Window -relief raised \
+ menubutton ${layoutframe}.titlebar.mbuttons.win -text Window -relief groove \
-menu ${layoutframe}.titlebar.mbuttons.win.toolmenu -borderwidth 2
# Layers
- menubutton ${layoutframe}.titlebar.mbuttons.layers -text Layers -relief raised \
+ menubutton ${layoutframe}.titlebar.mbuttons.layers -text Layers -relief groove \
-menu ${layoutframe}.titlebar.mbuttons.layers.toolmenu -borderwidth 2
# DRC
- menubutton ${layoutframe}.titlebar.mbuttons.drc -text Drc -relief raised \
+ menubutton ${layoutframe}.titlebar.mbuttons.drc -text Drc -relief groove \
-menu ${layoutframe}.titlebar.mbuttons.drc.toolmenu -borderwidth 2
# Netlist
# menubutton ${layoutframe}.titlebar.mbuttons.netlist -text Neltist -relief raised \
@@ -1203,7 +1187,7 @@
# menubutton ${layoutframe}.titlebar.mbuttons.help -text Help -relief raised \
# -menu ${layoutframe}.titlebar.mbuttons.help.helpmenu -borderwidth 2
# Options
- menubutton ${layoutframe}.titlebar.mbuttons.opts -text Options -relief raised \
+ menubutton ${layoutframe}.titlebar.mbuttons.opts -text Options -relief groove \
-menu ${layoutframe}.titlebar.mbuttons.opts.toolmenu -borderwidth 2
pack ${layoutframe}.titlebar.mbuttons.file -side left
pack ${layoutframe}.titlebar.mbuttons.edit -side left
@@ -1217,8 +1201,8 @@
# DRC status button
checkbutton ${layoutframe}.titlebar.drcbutton -text "DRC" -anchor w \
- -borderwidth 2 -variable Opts(drc) \
- -foreground white -background sienna4 -selectcolor green \
+ -borderwidth 2 -relief flat -variable Opts(drc) \
+ -selectcolor white \
-command [subst { if { \$Opts(drc) } { drc on } else { drc off } }]
magic::openwindow $cell $winname
@bluecmd
Copy link
Author

bluecmd commented Oct 2, 2020

Screenshot:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment