Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Add the ability to specify circle-nodes and omit arrowheads on the timeline using the "details.txt" skin file. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | improved-skin-edit |
| Files: | files | file ages | folders |
| SHA1: |
d4c2e8db08f041e2b19b26477bbe3179 |
| User & Date: | drh 2015-03-30 15:26:22.349 |
Context
|
2015-03-30
| ||
| 16:57 | Add the ability to draw graph rail lines in node color. check-in: 675f8c7d29 user: drh tags: improved-skin-edit | |
| 15:26 | Add the ability to specify circle-nodes and omit arrowheads on the timeline using the "details.txt" skin file. check-in: d4c2e8db08 user: drh tags: improved-skin-edit | |
| 14:08 | Add the "skins/details.txt" file to the skins. Change the skin editors so that they can show a diff of the current configuration against any built-in. check-in: 31a337f0c2 user: drh tags: improved-skin-edit | |
Changes
Changes to skins/aht/details.txt.
|
| > > > | < | 1 2 3 4 | timeline-arrowheads: 1 timeline-circle-nodes: 0 timeline-colored-lines: 0 white-foreground: 0 |
Changes to skins/black_and_white/details.txt.
|
| > > > | < | 1 2 3 4 | timeline-arrowheads: 1 timeline-circle-nodes: 0 timeline-colored-lines: 0 white-foreground: 0 |
Changes to skins/blitz/details.txt.
|
| > > > | < | 1 2 3 4 | timeline-arrowheads: 1 timeline-circle-nodes: 0 timeline-colored-lines: 0 white-foreground: 0 |
Changes to skins/blitz_no_logo/details.txt.
|
| > > > | < | 1 2 3 4 | timeline-arrowheads: 1 timeline-circle-nodes: 0 timeline-colored-lines: 0 white-foreground: 0 |
Changes to skins/default/details.txt.
|
| > > > | < | 1 2 3 4 | timeline-arrowheads: 1 timeline-circle-nodes: 0 timeline-colored-lines: 0 white-foreground: 0 |
Changes to skins/eagle/details.txt.
|
| > > > | < | 1 2 3 4 | timeline-arrowheads: 1 timeline-circle-nodes: 0 timeline-colored-lines: 0 white-foreground: 1 |
Changes to skins/enhanced1/details.txt.
|
| > > > | < | 1 2 3 4 | timeline-arrowheads: 1 timeline-circle-nodes: 0 timeline-colored-lines: 0 white-foreground: 0 |
Changes to skins/khaki/details.txt.
|
| > > > | < | 1 2 3 4 | timeline-arrowheads: 1 timeline-circle-nodes: 0 timeline-colored-lines: 0 white-foreground: 0 |
Changes to skins/original/details.txt.
|
| > > > | < | 1 2 3 4 | timeline-arrowheads: 1 timeline-circle-nodes: 0 timeline-colored-lines: 0 white-foreground: 0 |
Changes to skins/plain_gray/details.txt.
|
| > > > | < | 1 2 3 4 | timeline-arrowheads: 1 timeline-circle-nodes: 0 timeline-colored-lines: 0 white-foreground: 0 |
Changes to skins/rounded1/details.txt.
|
| > > > | < | 1 2 3 4 | timeline-arrowheads: 1 timeline-circle-nodes: 0 timeline-colored-lines: 0 white-foreground: 0 |
Changes to skins/xekri/details.txt.
|
| > > > | < | 1 2 3 4 | timeline-arrowheads: 1 timeline-circle-nodes: 0 timeline-colored-lines: 0 white-foreground: 0 |
Changes to src/skins.c.
| ︙ | ︙ | |||
73 74 75 76 77 78 79 |
**
** The following array holds the value for all known skin details.
*/
static struct SkinDetail {
const char *zName; /* Name of the detail */
char *zValue; /* Value of the detail */
} aSkinDetail[] = {
| | > > | | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
**
** The following array holds the value for all known skin details.
*/
static struct SkinDetail {
const char *zName; /* Name of the detail */
char *zValue; /* Value of the detail */
} aSkinDetail[] = {
{ "timeline-arrowheads", "1" },
{ "timeline-circle-nodes", "0" },
{ "timeline-multicolor", "0" },
{ "white-foreground", "0" }
};
/*
** Invoke this routine to set the alternative skin. Return NULL if the
** alternative was successfully installed. Return a string listing all
** available skins if zName does not match an available skin. Memory
** for the returned string comes from fossil_malloc() and should be freed
|
| ︙ | ︙ | |||
595 596 597 598 599 600 601 |
zBasis = PD("basis","default");
zDflt = mprintf("skins/%s/%s.txt", zBasis, aSkinAttr[ii].zFile);
db_begin_transaction();
if( P("revert")!=0 ){
db_multi_exec("DELETE FROM config WHERE name=%Q", aSkinAttr[ii].zFile);
cgi_replace_parameter(aSkinAttr[ii].zFile, builtin_text(zDflt));
}
| | | 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 |
zBasis = PD("basis","default");
zDflt = mprintf("skins/%s/%s.txt", zBasis, aSkinAttr[ii].zFile);
db_begin_transaction();
if( P("revert")!=0 ){
db_multi_exec("DELETE FROM config WHERE name=%Q", aSkinAttr[ii].zFile);
cgi_replace_parameter(aSkinAttr[ii].zFile, builtin_text(zDflt));
}
style_header("%s", aSkinAttr[ii].zTitle);
for(j=0; j<ArraySize(aSkinAttr); j++){
if( j==ii ) continue;
style_submenu_element(aSkinAttr[j].zSubmenu, 0,
"%R/setup_skinedit?w=%d&basis=%h",j,zBasis);
}
style_submenu_element("Skins", 0, "%R/setup_skin");
@ <form action="%s(g.zTop)/setup_skinedit" method="post"><div>
|
| ︙ | ︙ |
Changes to src/timeline.c.
| ︙ | ︙ | |||
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 |
){
if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
GraphRow *pRow;
int i;
char cSep;
int mergeOffset; /* Pixel offset from rail to merge riser */
int iRailPitch; /* Pixels between consecutive rails */
iRailPitch = pGraph->iRailPitch;
/* Number of pixels that the thin merge lines are offset from the
** the center of the think rail lines. If zero, then the vertical
** merge lines overlap with the thicker rail lines.
*/
mergeOffset = iRailPitch>=14 ? 4 : iRailPitch>=13 ? 3 : 0;
if( PB("nomo") ) mergeOffset = 0;
| > > > > > > > > | 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 |
){
if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
GraphRow *pRow;
int i;
char cSep;
int mergeOffset; /* Pixel offset from rail to merge riser */
int iRailPitch; /* Pixels between consecutive rails */
int showArrowheads; /* True to draw arrowheads. False to omit. */
int circleNodes; /* True for circle nodes. False for square nodes */
int multicolorLines; /* Use colors for graph lines */
iRailPitch = pGraph->iRailPitch;
showArrowheads = skin_detail_boolean("timeline-arrowheads");
circleNodes = skin_detail_boolean("timeline-circle-nodes");
multicolorLines = skin_detail_boolean("timeline-multicolor");
(void)multicolorLines; /* Not currently used */
/* Number of pixels that the thin merge lines are offset from the
** the center of the think rail lines. If zero, then the vertical
** merge lines overlap with the thicker rail lines.
*/
mergeOffset = iRailPitch>=14 ? 4 : iRailPitch>=13 ? 3 : 0;
if( PB("nomo") ) mergeOffset = 0;
|
| ︙ | ︙ | |||
749 750 751 752 753 754 755 |
@ if( obj.offsetParent ){
@ do{
@ left += obj.offsetLeft;
@ }while( obj = obj.offsetParent );
@ }
@ return left;
@ }
| > | | | | | | | | | | | | | | | | | | | | | | | | > > > > > | 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 |
@ if( obj.offsetParent ){
@ do{
@ left += obj.offsetLeft;
@ }while( obj = obj.offsetParent );
@ }
@ return left;
@ }
if( showArrowheads ){
@ function drawUpArrow(x,y0,y1){
@ drawBox(lineClr,x,y0+4,x+1,y1);
@ var n = document.createElement("div"),
@ l = x-2,
@ t = y0;
@ n.style.position = "absolute";
@ n.style.left = l+"px";
@ n.style.top = t+"px";
@ n.style.width = 0;
@ n.style.height = 0;
@ n.style.transform = "scale(.999)";
@ n.style.borderWidth = 0;
@ n.style.borderStyle = "solid";
@ n.style.borderColor = "transparent";
@ n.style.borderRightWidth = "3px";
@ n.style.borderBottomColor = lineClr;
@ n.style.borderLeftWidth = "3px";
@ if( y0+10>=y1 ){
@ n.style.borderBottomWidth = "5px";
@ } else {
@ n.style.borderBottomWidth = "7px";
@ }
@ cDiv.appendChild(n);
@ }
}else{
@ function drawUpArrow(x,y0,y1){
@ drawBox(lineClr,x,y0+1,x+1,y1);
@ }
}
@ function drawThinArrow(y,xFrom,xTo){
@ var n = document.createElement("div"),
@ t = y-2;
@ n.style.position = "absolute";
@ n.style.top = t+"px";
@ n.style.width = 0;
@ n.style.height = "1px";
|
| ︙ | ︙ | |||
803 804 805 806 807 808 809 |
@ }
@ cDiv.appendChild(n);
@ }
@ function drawThinLine(x0,y0,x1,y1){
@ drawBox(lineClr,x0,y0,x1,y1);
@ }
@ function drawNodeBox(color,x0,y0,x1,y1){
| > | > > > | 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 |
@ }
@ cDiv.appendChild(n);
@ }
@ function drawThinLine(x0,y0,x1,y1){
@ drawBox(lineClr,x0,y0,x1,y1);
@ }
@ function drawNodeBox(color,x0,y0,x1,y1){
@ var n = drawBox(color,x0,y0,x1,y1);
@ n.style.cursor = "pointer";
if( circleNodes ){
@ n.style.borderRadius = "6px";
}
@ }
@ function drawNode(p, left, btm){
@ drawNodeBox(boxColor,p.x-5,p.y-5,p.x+6,p.y+6);
@ drawNodeBox(p.bg||bgClr,p.x-4,p.y-4,p.x+5,p.y+5);
@ if( p.u>0 ) drawUpArrow(p.x, rowinfo[p.u-1].y+6, p.y-5);
@ if( p.f&1 ) drawNodeBox(boxColor,p.x-1,p.y-1,p.x+2,p.y+2);
if( !omitDescenders ){
|
| ︙ | ︙ | |||
922 923 924 925 926 927 928 929 930 931 932 933 934 935 |
@ break;
@ }
@ }
@ }
@ function clickOnRow(p){
@ if( selRow==null ){
@ selBox = drawBox("red",p.x-2,p.y-2,p.x+3,p.y+3);
@ selRow = p;
@ }else if( selRow==p ){
@ var canvasDiv = gebi("canvas");
@ canvasDiv.removeChild(selBox);
@ selBox = null;
@ selRow = null;
@ }else{
| > > > | 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 |
@ break;
@ }
@ }
@ }
@ function clickOnRow(p){
@ if( selRow==null ){
@ selBox = drawBox("red",p.x-2,p.y-2,p.x+3,p.y+3);
if( circleNodes ){
@ selBox.style.borderRadius="6px";
}
@ selRow = p;
@ }else if( selRow==p ){
@ var canvasDiv = gebi("canvas");
@ canvasDiv.removeChild(selBox);
@ selBox = null;
@ selRow = null;
@ }else{
|
| ︙ | ︙ |