mirror of https://github.com/rusefi/KiCad-Diff.git
Merged in Tk interface changes (removal of resolution and layers selection). Added SCM detection logic
This commit is contained in:
commit
e1827b99a8
|
@ -65,7 +65,7 @@ Dependencies
|
|||
Possibly support other VCS tools. DONE
|
||||
Mechanism to select layer sets and resolution. DONE
|
||||
Improvement in parsing and meaning of text diffs. IN PROGRESS
|
||||
|
||||
|
||||
## screenshots
|
||||
GUI
|
||||
![GUI](/Documents/Screen%20Shot%202018-06-04%20at%2022.28.05.png)
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
Binary file not shown.
After Width: | Height: | Size: 118 KiB |
1442
kidiff_gui.py
1442
kidiff_gui.py
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
#!/Applications/kicad.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python
|
||||
#!/Applications/KiCad/kicad.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python
|
||||
|
||||
'''
|
||||
Kicad plot pcb file.
|
||||
|
@ -22,7 +22,8 @@ print(reqLayers)
|
|||
|
||||
|
||||
board = LoadBoard(boardName)
|
||||
|
||||
nets = pcbnew.NETINFO_LIST(board)
|
||||
print(nets)
|
||||
pctl = pcbnew.PLOT_CONTROLLER(board)
|
||||
pctl.SetColorMode(True)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/Applications/Kicad/kicad.app/Contents/Applications/pcbnew.app/Contents/MacOS/Python
|
||||
#!/Applications/KiCad/kicad.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python
|
||||
|
||||
'''
|
||||
Kicad plot pcb file.
|
||||
|
|
643
style.css
643
style.css
|
@ -1,433 +1,598 @@
|
|||
/* style.css */
|
||||
|
||||
body {
|
||||
background-color: #282C35;
|
||||
body
|
||||
{
|
||||
background-color: #002b36;
|
||||
margin: 0 auto;
|
||||
max-width: 45cm;
|
||||
border: 1pt solid #586e75;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.gallery {
|
||||
.gallery
|
||||
{
|
||||
border: 1px solid #ccc;
|
||||
background-color: #222;
|
||||
}
|
||||
|
||||
.gallery:hover {
|
||||
.gallery:hover
|
||||
{
|
||||
border: 1px solid #777;
|
||||
}
|
||||
|
||||
.gallery img {
|
||||
.gallery img
|
||||
{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.desc {
|
||||
.desc,.title
|
||||
{
|
||||
padding: 15px;
|
||||
text-align: center;
|
||||
font: 15px arial, sans-serif;
|
||||
font: 15px arial,sans-serif;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding: 15px;
|
||||
.title
|
||||
{
|
||||
text-align: left;
|
||||
font: 25px arial, sans-serif;
|
||||
font: 25px arial,sans-serif;
|
||||
color: #202b34;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
.details,.subtitle
|
||||
{
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
font: 20px arial, sans-serif;
|
||||
color: #000000;
|
||||
font: 20px arial,sans-serif;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.details {
|
||||
.details
|
||||
{
|
||||
padding: 20px;
|
||||
text-align: left;
|
||||
font: 15px arial, sans-serif;
|
||||
color: #000000;
|
||||
font: 15px arial,sans-serif;
|
||||
}
|
||||
|
||||
.differences{
|
||||
.differences
|
||||
{
|
||||
font: 12px courier,monospace;
|
||||
}
|
||||
|
||||
.differences,.td,.th
|
||||
{
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
font: 18px courier, monospace;
|
||||
color: #000000;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
.th {
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
font: 20px arial, sans-serif;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
.th
|
||||
{
|
||||
font-weight: 700;
|
||||
font: 20px arial,sans-serif;
|
||||
}
|
||||
|
||||
.td {
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
font: 15px arial, sans-serif;
|
||||
color: #000000;
|
||||
.td
|
||||
{
|
||||
font: 15px arial,sans-serif;
|
||||
}
|
||||
|
||||
* {
|
||||
*
|
||||
{
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
.responsive {
|
||||
.responsive
|
||||
{
|
||||
padding: 0 6px;
|
||||
float: left;
|
||||
width: 19.99999%;
|
||||
margin: 6px 0;
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (max-width: 700px) {
|
||||
.responsive {
|
||||
@media only screen and (max-width:700px)
|
||||
{
|
||||
.responsive
|
||||
{
|
||||
width: 49.98%;
|
||||
margin: 6px 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 500px) {
|
||||
.responsive {
|
||||
@media only screen and (max-width:500px)
|
||||
{
|
||||
.responsive
|
||||
{
|
||||
width: 100%;
|
||||
margin: 6px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
.responsivefull {
|
||||
padding: 0 6px;
|
||||
float: left;
|
||||
width: 100%;
|
||||
margin: 6px 0;
|
||||
}
|
||||
|
||||
.clearfix:after
|
||||
{
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.box {
|
||||
.box
|
||||
{
|
||||
float: left;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 5px;
|
||||
border: 1px solid rgba(0, 0, 0, .2);
|
||||
border: 1px solid rgba(0,0,0,.2);
|
||||
}
|
||||
|
||||
.red {
|
||||
background: #F40008;
|
||||
.red
|
||||
{
|
||||
background: #ba312d;
|
||||
}
|
||||
|
||||
.green {
|
||||
background: #43ff01;
|
||||
.green
|
||||
{
|
||||
background: #5eb6c4;
|
||||
}
|
||||
|
||||
.white {
|
||||
background: #ffffff;
|
||||
.white
|
||||
{
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.added {
|
||||
color: #5EB6C4;
|
||||
.added
|
||||
{
|
||||
color: #5eb6c4;
|
||||
}
|
||||
|
||||
.removed {
|
||||
color: #BA312D;
|
||||
.removed
|
||||
{
|
||||
color: #ba312d;
|
||||
}
|
||||
@import url(http://fonts.googleapis.com/css?family=Inconsolata);
|
||||
@import url(http://fonts.googleapis.com/css?family=PT+Sans);
|
||||
@import url(http://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700);
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
nav,
|
||||
section,
|
||||
summary {
|
||||
|
||||
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
audio,
|
||||
canvas,
|
||||
video {
|
||||
|
||||
audio,canvas,video
|
||||
{
|
||||
display: inline-block;
|
||||
}
|
||||
audio:not([controls]) {
|
||||
|
||||
audio:not([controls])
|
||||
{
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
[hidden] {
|
||||
|
||||
[hidden]
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
|
||||
html
|
||||
{
|
||||
-webkit-text-size-adjust: 80%;
|
||||
-ms-text-size-adjust: 90%;
|
||||
font-family: 'PT Sans',sans-serif;
|
||||
background-color: #073642;
|
||||
color: #e2e3e3;
|
||||
margin: 1em;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
a:focus {
|
||||
|
||||
a:focus
|
||||
{
|
||||
outline: thin dotted;
|
||||
}
|
||||
a:active,
|
||||
a:hover {
|
||||
|
||||
a:active,a:hover
|
||||
{
|
||||
outline: 0;
|
||||
}
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
}
|
||||
abbr[title] {
|
||||
|
||||
abbr[title]
|
||||
{
|
||||
border-bottom: 1px dotted;
|
||||
}
|
||||
b,
|
||||
strong {
|
||||
font-weight: bold;
|
||||
|
||||
b,strong
|
||||
{
|
||||
font-weight: 700;
|
||||
}
|
||||
dfn {
|
||||
|
||||
dfn
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
mark {
|
||||
|
||||
mark
|
||||
{
|
||||
background: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, serif;
|
||||
|
||||
code,kbd,pre,samp
|
||||
{
|
||||
font-size: 1em;
|
||||
}
|
||||
pre {
|
||||
|
||||
kbd,samp
|
||||
{
|
||||
font-family: monospace,serif;
|
||||
}
|
||||
|
||||
pre
|
||||
{
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
q {
|
||||
|
||||
q
|
||||
{
|
||||
quotes: "\201C" "\201D" "\2018" "\2019";
|
||||
}
|
||||
small {
|
||||
|
||||
small
|
||||
{
|
||||
font-size: 80%;
|
||||
}
|
||||
sub,
|
||||
sup {
|
||||
|
||||
sub,sup
|
||||
{
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
sup {
|
||||
top: -0.5em;
|
||||
|
||||
sup
|
||||
{
|
||||
top: -.5em;
|
||||
}
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
|
||||
sub
|
||||
{
|
||||
bottom: -.25em;
|
||||
}
|
||||
img {
|
||||
|
||||
img
|
||||
{
|
||||
border: 0;
|
||||
}
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
|
||||
svg:not(:root)
|
||||
{
|
||||
overflow: visible;
|
||||
}
|
||||
figure {
|
||||
|
||||
.F_Cu
|
||||
{
|
||||
filter: invert(28%) sepia(50%) saturate(2065%) hue-rotate(334deg) brightness(73%) contrast(97%);
|
||||
}
|
||||
|
||||
.B_Cu
|
||||
{
|
||||
filter: invert(44%) sepia(14%) saturate(2359%) hue-rotate(70deg) brightness(103%) contrast(82%);
|
||||
}
|
||||
|
||||
.B_Paste
|
||||
{
|
||||
filter: invert(91%) sepia(47%) saturate(4033%) hue-rotate(139deg) brightness(82%) contrast(91%);
|
||||
}
|
||||
|
||||
.F_Paste
|
||||
{
|
||||
filter: invert(57%) sepia(60%) saturate(6%) hue-rotate(314deg) brightness(92%) contrast(99%);
|
||||
}
|
||||
|
||||
.F_SilkS
|
||||
{
|
||||
filter: invert(46%) sepia(44%) saturate(587%) hue-rotate(132deg) brightness(101%) contrast(85%);
|
||||
}
|
||||
|
||||
.B_SilkS
|
||||
{
|
||||
filter: invert(14%) sepia(27%) saturate(2741%) hue-rotate(264deg) brightness(95%) contrast(102%);
|
||||
}
|
||||
|
||||
.B_Mask
|
||||
{
|
||||
filter: invert(22%) sepia(56%) saturate(2652%) hue-rotate(277deg) brightness(94%) contrast(87%);
|
||||
}
|
||||
|
||||
.F_Mask
|
||||
{
|
||||
filter: invert(27%) sepia(51%) saturate(1920%) hue-rotate(269deg) brightness(89%) contrast(96%);
|
||||
}
|
||||
|
||||
.Edge_Cuts
|
||||
{
|
||||
filter: invert(79%) sepia(79%) saturate(401%) hue-rotate(6deg) brightness(88%) contrast(88%);
|
||||
}
|
||||
|
||||
.Margin
|
||||
{
|
||||
filter: invert(74%) sepia(71%) saturate(5700%) hue-rotate(268deg) brightness(89%) contrast(84%);
|
||||
}
|
||||
|
||||
.In1_Cu
|
||||
{
|
||||
filter: invert(69%) sepia(39%) saturate(1246%) hue-rotate(17deg) brightness(97%) contrast(104%);
|
||||
}
|
||||
|
||||
.In2_Cu
|
||||
{
|
||||
filter: invert(14%) sepia(79%) saturate(5231%) hue-rotate(293deg) brightness(91%) contrast(119%);
|
||||
}
|
||||
|
||||
.Dwgs_User
|
||||
{
|
||||
filter: invert(40%) sepia(68%) saturate(7431%) hue-rotate(203deg) brightness(89%) contrast(98%);
|
||||
}
|
||||
|
||||
.Cmts_User
|
||||
{
|
||||
filter: invert(73%) sepia(10%) saturate(1901%) hue-rotate(171deg) brightness(95%) contrast(102%);
|
||||
}
|
||||
|
||||
.Eco1_User
|
||||
{
|
||||
filter: invert(25%) sepia(98%) saturate(2882%) hue-rotate(109deg) brightness(90%) contrast(104%);
|
||||
}
|
||||
|
||||
.Eco2_User
|
||||
{
|
||||
filter: invert(85%) sepia(21%) saturate(5099%) hue-rotate(12deg) brightness(91%) contrast(102%);
|
||||
}
|
||||
|
||||
.B_Fab
|
||||
{
|
||||
filter: invert(60%) sepia(0%) saturate(0%) hue-rotate(253deg) brightness(87%) contrast(90%);
|
||||
}
|
||||
|
||||
.F_Fab
|
||||
{
|
||||
filter: invert(71%) sepia(21%) saturate(4662%) hue-rotate(21deg) brightness(103%) contrast(100%);
|
||||
}
|
||||
|
||||
.B_Adhes
|
||||
{
|
||||
filter: invert(24%) sepia(48%) saturate(2586%) hue-rotate(218deg) brightness(88%) contrast(92%);
|
||||
}
|
||||
|
||||
.F_Adhes
|
||||
{
|
||||
filter: invert(38%) sepia(49%) saturate(1009%) hue-rotate(254deg) brightness(88%) contrast(86%);
|
||||
}
|
||||
|
||||
.B_CrtYd
|
||||
{
|
||||
filter: invert(79%) sepia(92%) saturate(322%) hue-rotate(3deg) brightness(89%) contrast(92%);
|
||||
}
|
||||
|
||||
.F_CrtYd
|
||||
{
|
||||
filter: invert(73%) sepia(1%) saturate(0%) hue-rotate(116deg) brightness(92%) contrast(91%);
|
||||
}
|
||||
|
||||
.section
|
||||
{
|
||||
margin: 0 0 1em;
|
||||
}
|
||||
|
||||
figure
|
||||
{
|
||||
margin: 0;
|
||||
}
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
|
||||
fieldset
|
||||
{
|
||||
border: 1px solid silver;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
padding: .35em .625em .75em;
|
||||
}
|
||||
legend {
|
||||
|
||||
legend
|
||||
{
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
|
||||
button,input,select,textarea
|
||||
{
|
||||
font-family: inherit;
|
||||
font-size: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
button,
|
||||
input {
|
||||
|
||||
button,input
|
||||
{
|
||||
line-height: normal;
|
||||
}
|
||||
button,
|
||||
html input[type="button"],
|
||||
input[type="reset"],
|
||||
input[type="submit"] {
|
||||
|
||||
button,html input[type=button],input[type=reset],input[type=submit]
|
||||
{
|
||||
-webkit-appearance: button;
|
||||
cursor: pointer;
|
||||
}
|
||||
button[disabled],
|
||||
input[disabled] {
|
||||
|
||||
button[disabled],input[disabled]
|
||||
{
|
||||
cursor: default;
|
||||
}
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
|
||||
input[type=checkbox],input[type=radio]
|
||||
{
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
input[type="search"] {
|
||||
|
||||
input[type=search]
|
||||
{
|
||||
-webkit-appearance: textfield;
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-decoration {
|
||||
|
||||
input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration
|
||||
{
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
|
||||
button::-moz-focus-inner,input::-moz-focus-inner
|
||||
{
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
textarea {
|
||||
|
||||
textarea
|
||||
{
|
||||
overflow: auto;
|
||||
vertical-align: top;
|
||||
}
|
||||
table {
|
||||
|
||||
table
|
||||
{
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
html {
|
||||
font-family: 'PT Sans', sans-serif;
|
||||
}
|
||||
pre,
|
||||
code {
|
||||
font-family: 'Inconsolata', sans-serif;
|
||||
}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-family: 'PT Sans Narrow', sans-serif;
|
||||
font-weight: 700;
|
||||
}
|
||||
html {
|
||||
background-color: #073642;
|
||||
color: #839496;
|
||||
margin: 1em;
|
||||
}
|
||||
body {
|
||||
background-color: #002b36;
|
||||
margin: 0 auto;
|
||||
max-width: 40cm;
|
||||
border: 1pt solid #586e75;
|
||||
padding: 1em;
|
||||
|
||||
code,pre
|
||||
{
|
||||
font-family: 'Inconsolata',sans-serif;
|
||||
}
|
||||
|
||||
code {
|
||||
h1,h2,h3,h4,h5,h6
|
||||
{
|
||||
font-family: 'PT Sans Narrow',sans-serif;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
code
|
||||
{
|
||||
background-color: #073642;
|
||||
padding: 2px;
|
||||
}
|
||||
a {
|
||||
|
||||
a
|
||||
{
|
||||
color: #b58900;
|
||||
}
|
||||
a:visited {
|
||||
|
||||
a:hover,a:visited
|
||||
{
|
||||
color: #cb4b16;
|
||||
}
|
||||
a:hover {
|
||||
color: #cb4b16;
|
||||
}
|
||||
h1 {
|
||||
|
||||
.tag,h1
|
||||
{
|
||||
color: #d33682;
|
||||
}
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
|
||||
h1
|
||||
{
|
||||
font-size: 2.4em;
|
||||
}
|
||||
|
||||
h2,h3,h4,h5,h6
|
||||
{
|
||||
|
||||
color: #859900;
|
||||
}
|
||||
pre {
|
||||
background-color: #002b36;
|
||||
|
||||
pre
|
||||
{
|
||||
color: #839496;
|
||||
border: 1pt solid #586e75;
|
||||
padding: 1em;
|
||||
box-shadow: 5pt 5pt 8pt #073642;
|
||||
}
|
||||
pre code {
|
||||
|
||||
pre,pre code
|
||||
{
|
||||
background-color: #002b36;
|
||||
}
|
||||
h1 {
|
||||
font-size: 2.8em;
|
||||
|
||||
h2
|
||||
{
|
||||
font-size: 2em;
|
||||
}
|
||||
h2 {
|
||||
font-size: 2.4em;
|
||||
|
||||
h3
|
||||
{
|
||||
font-size: 1.1em;
|
||||
}
|
||||
h3 {
|
||||
font-size: 1.8em;
|
||||
|
||||
h4
|
||||
{
|
||||
font-size: 1.0em;
|
||||
}
|
||||
h4 {
|
||||
font-size: 1.4em;
|
||||
|
||||
h5
|
||||
{
|
||||
font-size: 0.9em;
|
||||
}
|
||||
h5 {
|
||||
font-size: 1.3em;
|
||||
|
||||
h6
|
||||
{
|
||||
font-size: .8em;
|
||||
}
|
||||
h6 {
|
||||
font-size: 1.15em;
|
||||
}
|
||||
.tag {
|
||||
|
||||
.tag
|
||||
{
|
||||
background-color: #073642;
|
||||
color: #d33682;
|
||||
padding: 0 0.2em;
|
||||
padding: 0 .2em;
|
||||
}
|
||||
.todo,
|
||||
.next,
|
||||
.done {
|
||||
|
||||
.done,.next,.todo
|
||||
{
|
||||
color: #002b36;
|
||||
background-color: #dc322f;
|
||||
padding: 0 0.2em;
|
||||
padding: 0 .2em;
|
||||
}
|
||||
.tag {
|
||||
-webkit-border-radius: 0.35em;
|
||||
-moz-border-radius: 0.35em;
|
||||
border-radius: 0.35em;
|
||||
|
||||
.tag
|
||||
{
|
||||
-webkit-border-radius: .35em;
|
||||
-moz-border-radius: .35em;
|
||||
border-radius: .35em;
|
||||
}
|
||||
.TODO {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
|
||||
.ACTIVE,.CANCELLED,.DONE,.HOLD,.NEXT,.NOTE,.TODO,.WAITING
|
||||
{
|
||||
-webkit-border-radius: .2em;
|
||||
-moz-border-radius: .2em;
|
||||
border-radius: .2em;
|
||||
background-color: #2aa198;
|
||||
}
|
||||
.NEXT {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
|
||||
.ACTIVE,.CANCELLED,.DONE,.HOLD,.NEXT,.NOTE,.WAITING
|
||||
{
|
||||
background-color: #268bd2;
|
||||
}
|
||||
.ACTIVE {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
background-color: #268bd2;
|
||||
}
|
||||
.DONE {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
|
||||
.CANCELLED,.DONE,.HOLD,.NOTE,.WAITING
|
||||
{
|
||||
background-color: #859900;
|
||||
}
|
||||
.WAITING {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
|
||||
.CANCELLED,.HOLD,.NOTE,.WAITING
|
||||
{
|
||||
background-color: #cb4b16;
|
||||
}
|
||||
.HOLD {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
|
||||
.CANCELLED,.HOLD,.NOTE
|
||||
{
|
||||
background-color: #d33682;
|
||||
}
|
||||
.NOTE {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
background-color: #d33682;
|
||||
}
|
||||
.CANCELLED {
|
||||
-webkit-border-radius: 0.2em;
|
||||
-moz-border-radius: 0.2em;
|
||||
border-radius: 0.2em;
|
||||
|
||||
.CANCELLED
|
||||
{
|
||||
background-color: #859900;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
</div><div class="differences added"> (fp_line (start 23.25 -1.7) (end 25.05 -1.7) (layer F.SilkS) (width 0.12))
|
||||
</div><div class="differences added"> (fp_line (start 25.05 -1.7) (end 25.05 -2.45) (layer F.SilkS) (width 0.12))
|
||||
</div><div class="differences added"> (fp_line (start 25.05 -2.45) (end 23.25 -2.45) (layer F.SilkS) (width 0.12))
|
||||
</div><div class="differences removed"> (fp_line (start -1.8 2.75) (end 13.75 2.75) (layer F.SilkS) (width 0.12))
|
||||
</div><div class="differences removed"> (fp_line (start 30.05 -0.2) (end 29.3 -0.2) (layer F.SilkS) (width 0.12))
|
||||
</div><div class="differences removed"> (fp_line (start 29.3 -0.2) (end 29.3 2.75) (layer F.SilkS) (width 0.12))
|
||||
</div><div class="differences removed"> (fp_line (start 29.3 2.75) (end 13.75 2.75) (layer F.SilkS) (width 0.12))
|
||||
</div><div class="differences added"> (fp_line (start -1.8 2.75) (end 11.25 2.75) (layer F.SilkS) (width 0.12))
|
||||
</div><div class="differences added"> (fp_line (start 25.05 -0.2) (end 24.3 -0.2) (layer F.SilkS) (width 0.12))
|
||||
</div><div class="differences added"> (fp_line (start 24.3 -0.2) (end 24.3 2.75) (layer F.SilkS) (width 0.12))
|
||||
</div><div class="differences added"> (fp_line (start 24.3 2.75) (end 11.25 2.75) (layer F.SilkS) (width 0.12))
|
||||
</div><div class="differences removed"> (fp_text reference C13 (at 0 -1.65 270) (layer F.SilkS)
|
||||
</div><div class="differences added"> (fp_text reference C13 (at 0 -1.65) (layer F.SilkS)
|
143
tkUI.py
143
tkUI.py
|
@ -5,7 +5,7 @@ import tkinter as tk
|
|||
from tkinter import *
|
||||
from tkinter import filedialog, ttk, messagebox
|
||||
|
||||
global resolution, buttons, root, commitTop, commitBottom
|
||||
global root, commitTop, commitBottom
|
||||
|
||||
|
||||
def runProgram():
|
||||
|
@ -13,16 +13,16 @@ def runProgram():
|
|||
root.quit()
|
||||
|
||||
|
||||
class Splash(tk.Toplevel):
|
||||
def __init__(self, parent):
|
||||
tk.Toplevel.__init__(self, parent)
|
||||
self.title("Kicad Visual Diff")
|
||||
action = messagebox.askokcancel(self,
|
||||
message="Select a *.kicad_pcb file under version control", detail="Git, Fossil or SVN supported")
|
||||
# class Splash(tk.Toplevel):
|
||||
# def __init__(self, parent):
|
||||
# tk.Toplevel.__init__(self, parent)
|
||||
# self.title("Kicad Visual Diff")
|
||||
# action = messagebox.askokcancel(self,
|
||||
# message="Select a *.kicad_pcb file under version control", detail="Git, Fossil or SVN supported")
|
||||
|
||||
self.update()
|
||||
if action == "cancel":
|
||||
self.quit()
|
||||
# self.update()
|
||||
# if action == "cancel":
|
||||
# self.quit()
|
||||
|
||||
|
||||
def CurSelect(event):
|
||||
|
@ -32,16 +32,16 @@ def CurSelect(event):
|
|||
picked = widget.get(selection)
|
||||
source = ((str(widget).split('.'))[1])[-1:]
|
||||
# TOP window is 3
|
||||
if source == '3':
|
||||
if source == '2':
|
||||
commitTop = picked
|
||||
# BOTTOM window is 4
|
||||
elif source == '4':
|
||||
elif source == '3':
|
||||
commitBottom = picked
|
||||
|
||||
|
||||
def runGUI(checkouts_top, prjctName, prjctPath, scm):
|
||||
|
||||
global resolution, buttons, root, commitTop, commitBottom
|
||||
global root, commitTop, commitBottom
|
||||
|
||||
checkouts_bottom = checkouts_top[:]
|
||||
|
||||
|
@ -50,27 +50,24 @@ def runGUI(checkouts_top, prjctName, prjctPath, scm):
|
|||
root.configure(background='#ececec')
|
||||
|
||||
root.title("Kicad Visual Diff")
|
||||
root.geometry('1200x700')
|
||||
# root.geometry('1200x700')
|
||||
|
||||
frame1 = tk.LabelFrame(root, text=scm, width=1000,
|
||||
height=50, bd=1, background='#ececec')
|
||||
frame2 = tk.LabelFrame(root, text="Layers", width=200,
|
||||
frame2 = tk.LabelFrame(root, text="Commit 1", width=1000,
|
||||
height=200, bd=1, background='#ececec')
|
||||
frame3 = tk.LabelFrame(root, text="Commit 1", width=400,
|
||||
frame3 = tk.LabelFrame(root, text="Commit 2", width=1000,
|
||||
height=200, bd=1, background='#ececec')
|
||||
frame4 = tk.LabelFrame(root, text="Commit 2", width=400,
|
||||
height=200, bd=1, background='#ececec')
|
||||
frame5 = tk.LabelFrame(root, text="Resolution (dpi)", width=1000,
|
||||
frame4 = tk.LabelFrame(root, width=1000,
|
||||
height=50, bd=0, background='#ececec')
|
||||
|
||||
frame1.grid(row=0, column=0, columnspan=2, padx=5, sticky='N E W S')
|
||||
frame2.grid(row=1, column=0, rowspan=2, padx=5, sticky='N E W S')
|
||||
frame3.grid(row=1, column=1, padx=5, sticky='N E W S')
|
||||
frame4.grid(row=2, column=1, padx=5, sticky='N E W S')
|
||||
frame5.grid(row=3, column=0, columnspan=2, padx=5, sticky='N E W S')
|
||||
frame1.grid(row=0, column=0, padx=25, sticky='N E W S')
|
||||
frame2.grid(row=1, column=0, padx=25, sticky='N E W')
|
||||
frame3.grid(row=2, column=0, padx=25, sticky='N EW')
|
||||
frame4.grid(row=3, column=0, padx=25, sticky='N E W S')
|
||||
|
||||
root.grid_columnconfigure(0, weight=1)
|
||||
root.grid_columnconfigure(1, weight=10)
|
||||
# root.grid_columnconfigure(0, weight=1)
|
||||
# root.grid_columnconfigure(1, weight=10)
|
||||
|
||||
root.grid_rowconfigure(0, minsize=50, weight=1)
|
||||
root.grid_rowconfigure(1, minsize=200, weight=2)
|
||||
|
@ -80,98 +77,56 @@ def runGUI(checkouts_top, prjctName, prjctPath, scm):
|
|||
tk.Label(frame1, text=prjctPath, bg='#ececec').pack(side=LEFT, padx=10)
|
||||
tk.Label(frame1, text=prjctName, bg='#ececec').pack(side=LEFT, padx=10)
|
||||
|
||||
buttons = {'Top layer': '1',
|
||||
'Bottom layer': '1',
|
||||
'Paste bottom': '1',
|
||||
'Paste top': '1',
|
||||
'Silk top': '1',
|
||||
'Silk bottom': '1',
|
||||
'Mask top': '1',
|
||||
'Mask bottom': '1',
|
||||
'Edge cuts': '1',
|
||||
'Margin': '1',
|
||||
'Inner1': '1',
|
||||
'Inner2': '1',
|
||||
'Dwgs_User': '1',
|
||||
'Comments_User': '1',
|
||||
'ECO1': '1',
|
||||
'ECO2': '1',
|
||||
'Fab bottom': '1',
|
||||
'Fab top': '1',
|
||||
'Adhesive bottom': '1',
|
||||
'Adhesive top': '1',
|
||||
'Courtyard bottom': '1',
|
||||
'Courtyard top': '1'
|
||||
}
|
||||
|
||||
initLayers = []
|
||||
|
||||
for b in buttons:
|
||||
buttons[b] = Variable()
|
||||
buttons[b].set(1)
|
||||
l = ttk.Checkbutton(
|
||||
frame2, text=b, variable=buttons[b], onvalue=1, offvalue=0).pack(anchor='w')
|
||||
|
||||
commitTop = Variable()
|
||||
listTop = Listbox(frame3, bd=0, selectmode=SINGLE, exportselection=False)
|
||||
listTop = Listbox(
|
||||
frame2,
|
||||
bd=0,
|
||||
selectmode=SINGLE,
|
||||
exportselection=False,
|
||||
font='TkFixedFont')
|
||||
listTop.grid(column=0, row=0, sticky=(N, E, W))
|
||||
scrollTop = ttk.Scrollbar(frame3, orient=VERTICAL, command=listTop.yview)
|
||||
scrollTop = ttk.Scrollbar(frame2, orient=VERTICAL, command=listTop.yview)
|
||||
scrollTop.grid(column=1, row=0, sticky=(N, E, W))
|
||||
listTop['yscrollcommand'] = scrollTop.set
|
||||
|
||||
listTop.bind('<<ListboxSelect>>', CurSelect)
|
||||
|
||||
commitBottom = Variable()
|
||||
listBottom = Listbox(frame4, bd=0, selectmode=SINGLE,
|
||||
exportselection=False)
|
||||
listBottom = Listbox(
|
||||
frame3,
|
||||
bd=0,
|
||||
selectmode=SINGLE,
|
||||
exportselection=False,
|
||||
font='TkFixedFont')
|
||||
listBottom.grid(column=0, row=0, sticky=(N, E, W))
|
||||
scrollBottom = ttk.Scrollbar(
|
||||
frame4, orient=VERTICAL, command=listBottom.yview)
|
||||
frame3, orient=VERTICAL, command=listBottom.yview)
|
||||
scrollBottom.grid(column=1, row=0, sticky=(N, E, W))
|
||||
listBottom['yscrollcommand'] = scrollBottom.set
|
||||
listBottom.bind('<<ListboxSelect>>', CurSelect)
|
||||
|
||||
frame2.grid_columnconfigure(0, weight=1)
|
||||
frame2.grid_columnconfigure(1, weight=0)
|
||||
frame2.grid_rowconfigure(0, weight=1)
|
||||
|
||||
frame3.grid_columnconfigure(0, weight=1)
|
||||
frame3.grid_columnconfigure(1, weight=0)
|
||||
frame3.grid_rowconfigure(0, weight=1)
|
||||
|
||||
frame4.grid_columnconfigure(0, weight=1)
|
||||
frame4.grid_columnconfigure(1, weight=0)
|
||||
frame4.grid_rowconfigure(0, weight=1)
|
||||
|
||||
buttonOK = ttk.Button(
|
||||
frame5, text="OK", command=runProgram, default='active')
|
||||
buttonOK.grid(column=7, row=0, sticky='w', pady=10)
|
||||
frame4, text="OK", command=runProgram, default='active')
|
||||
buttonOK.grid(column=2, row=0, sticky='w', pady=10)
|
||||
|
||||
buttonCancel = ttk.Button(frame5, text="Cancel", command=quit)
|
||||
buttonCancel.grid(column=6, row=0, sticky='e', pady=10)
|
||||
buttonCancel = ttk.Button(frame4, text="Cancel", command=quit)
|
||||
buttonCancel.grid(column=1, row=0, sticky='e', pady=10)
|
||||
|
||||
resolution = IntVar()
|
||||
resolution.set(300)
|
||||
|
||||
button100 = ttk.Radiobutton(
|
||||
frame5, text="100", variable=resolution, value=100)
|
||||
button300 = ttk.Radiobutton(
|
||||
frame5, text="300", variable=resolution, value=300, )
|
||||
button600 = ttk.Radiobutton(
|
||||
frame5, text="600", variable=resolution, value=600)
|
||||
button1000 = ttk.Radiobutton(
|
||||
frame5, text="1000", variable=resolution, value=1000)
|
||||
frame4.grid_columnconfigure(0, weight=0)
|
||||
frame4.grid_columnconfigure(1, weight=0)
|
||||
frame4.grid_columnconfigure(2, weight=10)
|
||||
|
||||
button100.grid(column=1, row=0)
|
||||
button300.grid(column=2, row=0)
|
||||
button600.grid(column=3, row=0)
|
||||
button1000.grid(column=4, row=0)
|
||||
|
||||
frame5.grid_columnconfigure(0, weight=0)
|
||||
frame5.grid_columnconfigure(1, weight=0)
|
||||
frame5.grid_columnconfigure(2, weight=0)
|
||||
frame5.grid_columnconfigure(3, weight=0)
|
||||
frame5.grid_columnconfigure(4, weight=0)
|
||||
frame5.grid_columnconfigure(5, weight=5)
|
||||
frame5.grid_columnconfigure(6, weight=0)
|
||||
frame5.grid_columnconfigure(7, weight=1)
|
||||
frame5.grid_rowconfigure(0, weight=1)
|
||||
|
||||
for line in checkouts_top:
|
||||
listTop.insert(END, line)
|
||||
|
@ -194,4 +149,4 @@ def runGUI(checkouts_top, prjctName, prjctPath, scm):
|
|||
root.update()
|
||||
root.mainloop()
|
||||
|
||||
return(resolution, commitTop, commitBottom, buttons)
|
||||
return(commitTop, commitBottom)
|
||||
|
|
Loading…
Reference in New Issue