Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Hopefully final unification and cleanup of the SVG data used for drawing indicators |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk | main |
Files: | files | file ages | folders |
SHA3-256: |
118c0b44f69c49054e3afe544718bcbb |
User & Date: | csaba 2023-02-24 11:50:45.869 |
Context
2023-02-27
| ||
20:43 | Fix [6cd4762798]: Crash using tk busy hold check-in: b73c04cd user: fvogel tags: trunk, main | |
2023-02-24
| ||
14:39 | merge trunk check-in: 3b74e887 user: dgp tags: core-8-7-b1-rc | |
11:50 | Hopefully final unification and cleanup of the SVG data used for drawing indicators check-in: 118c0b44 user: csaba tags: trunk, main | |
2023-02-20
| ||
13:49 | Further work on scalability of the Tk widget demo GUI check-in: ae5acb5a user: csaba tags: trunk, main | |
Changes
Changes to generic/ttk/ttkClamTheme.c.
︙ | ︙ | |||
277 278 279 280 281 282 283 | FieldElementOptions, FieldElementSize, ComboboxFieldElementDraw }; /*------------------------------------------------------------------------ * +++ Indicator elements for check and radio buttons. | < < < < < < | 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | FieldElementOptions, FieldElementSize, ComboboxFieldElementDraw }; /*------------------------------------------------------------------------ * +++ Indicator elements for check and radio buttons. */ /* * Indicator image descriptor: */ typedef struct { int width; /* unscaled width */ |
︙ | ︙ | |||
307 308 309 310 311 312 313 | </svg>"; static const char checkbtnOnData[] = "\ <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\ <path d='m0 0v16h1v-15h15v-1z' fill='#9e9a91'/>\n\ <path d='m15 1v14h-14v1h15v-15z' fill='#cfcdc8'/>\n\ <rect x='1' y='1' width='14' height='14' fill='#ffffff'/>\n\ | | > > > | 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | </svg>"; static const char checkbtnOnData[] = "\ <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\ <path d='m0 0v16h1v-15h15v-1z' fill='#9e9a91'/>\n\ <path d='m15 1v14h-14v1h15v-15z' fill='#cfcdc8'/>\n\ <rect x='1' y='1' width='14' height='14' fill='#ffffff'/>\n\ <g fill='none' stroke='#000000' stroke-linecap='round' stroke-width='2'>\n\ <path d='m5 5 6 6'/>\n\ <path d='m5 11 6-6'/>\n\ </g>\n\ </svg>"; static const IndicatorSpec checkbutton_spec = { 16, 16, checkbtnOffData, checkbtnOnData }; |
︙ | ︙ | |||
511 512 513 514 515 516 517 | assert(upperBdColorPtr); assert(lowerBdColorPtr); assert(bgColorPtr); memcpy(upperBdColorPtr, upperBdColorStr, 6); memcpy(lowerBdColorPtr, lowerBdColorStr, 6); memcpy(bgColorPtr, bgColorStr, 6); | | < | 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 | assert(upperBdColorPtr); assert(lowerBdColorPtr); assert(bgColorPtr); memcpy(upperBdColorPtr, upperBdColorStr, 6); memcpy(lowerBdColorPtr, lowerBdColorStr, 6); memcpy(bgColorPtr, bgColorStr, 6); if (fgColorPtr != NULL) { memcpy(fgColorPtr, fgColorStr, 6); } /* * Create an SVG photo image from svgDataCopy */ cmdFmt = "image create photo %s -format $::tk::svgFmt -data {%s}"; scriptSize = strlen(cmdFmt) + strlen(imgName) + svgDataLen; |
︙ | ︙ |
Changes to generic/ttk/ttkDefaultTheme.c.
︙ | ︙ | |||
370 371 372 373 374 375 376 | FieldElementOptions, FieldElementSize, FieldElementDraw }; /*------------------------------------------------------------------------ * Indicators -- | < < < < < < | 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | FieldElementOptions, FieldElementSize, FieldElementDraw }; /*------------------------------------------------------------------------ * Indicators -- */ /* * Indicator image descriptor: */ typedef struct { int width; /* unscaled width */ |
︙ | ︙ | |||
404 405 406 407 408 409 410 | static const char checkbtnOnData[] = "\ <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\ <path d='m0 0v15h1v-14h14v-1z' fill='#888888'/>\n\ <path d='m1 1v13h1v-12h12v-1z' fill='#414141'/>\n\ <path d='m14 1v13h-13v1h14v-14z' fill='#d9d9d9'/>\n\ <path d='m15 0v15h-15v1h16v-16z' fill='#eeeeee'/>\n\ <rect x='2' y='2' width='12' height='12' fill='#ffffff'/>\n\ | | | 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | static const char checkbtnOnData[] = "\ <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\ <path d='m0 0v15h1v-14h14v-1z' fill='#888888'/>\n\ <path d='m1 1v13h1v-12h12v-1z' fill='#414141'/>\n\ <path d='m14 1v13h-13v1h14v-14z' fill='#d9d9d9'/>\n\ <path d='m15 0v15h-15v1h16v-16z' fill='#eeeeee'/>\n\ <rect x='2' y='2' width='12' height='12' fill='#ffffff'/>\n\ <path d='m4.5 8 3 3 4-6' fill='none' stroke='#000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/>\n\ </svg>"; static const IndicatorSpec checkbutton_spec = { 16, 16, checkbtnOffData, checkbtnOnData }; |
︙ | ︙ | |||
634 635 636 637 638 639 640 | assert(indicatorColorPtr); memcpy(shadeColorPtr, shadeColorStr, 6); memcpy(highlightColorPtr, indicatorColorStr, 6); memcpy(borderColorPtr, borderColorStr, 6); memcpy(bgColorPtr, bgColorStr, 6); memcpy(indicatorColorPtr, indicatorColorStr, 6); | | < | 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 | assert(indicatorColorPtr); memcpy(shadeColorPtr, shadeColorStr, 6); memcpy(highlightColorPtr, indicatorColorStr, 6); memcpy(borderColorPtr, borderColorStr, 6); memcpy(bgColorPtr, bgColorStr, 6); memcpy(indicatorColorPtr, indicatorColorStr, 6); if (fgColorPtr != NULL) { memcpy(fgColorPtr, fgColorStr, 6); } /* * Create an SVG photo image from svgDataCopy */ cmdFmt = "image create photo %s -format $::tk::svgFmt -data {%s}"; scriptSize = strlen(cmdFmt) + strlen(imgName) + svgDataLen; |
︙ | ︙ |
Changes to unix/tkUnixButton.c.
︙ | ︙ | |||
80 81 82 83 84 85 86 | " <stop stop-color='#ffffff' offset='1'/>\n" " </linearGradient>\n" " <linearGradient id='linearGradientTop' x1='7.5' x2='7.5' y1='2' y2='2' gradientUnits='userSpaceOnUse'>\n" " <stop stop-color='#DARKKK' offset='1'/>\n" " <stop stop-color='#000000' offset='0'/>\n" " </linearGradient>\n" " </defs>\n" | > | < | | | | | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | " <stop stop-color='#ffffff' offset='1'/>\n" " </linearGradient>\n" " <linearGradient id='linearGradientTop' x1='7.5' x2='7.5' y1='2' y2='2' gradientUnits='userSpaceOnUse'>\n" " <stop stop-color='#DARKKK' offset='1'/>\n" " <stop stop-color='#000000' offset='0'/>\n" " </linearGradient>\n" " </defs>\n" " <g style='paint-order:stroke markers fill'>\n" " <rect id='rectbackdrop' x='2' y='2' width='12' height='12' fill='#INTROR'/>\n" " <path id='recttopside' d='m0 0h16l-1 1h-14l-1-1' fill='url(#linearGradientTop)'/>\n" " <path id='rectleftside' d='m0 0 1 1v14l-1 1' fill='url(#linearGradientLeft)'/>\n" " <path id='rectrightside' d='m16 0-1 1v14l1 1v-16' fill='url(#linearGradientRight)'/>\n" " <path id='rectbottomside' d='m0 16 1-1h14l1 1h-16' fill='url(#linearGradientBottom)'/>\n" " </g>\n" "</svg>"; static const char checkbtnOnData[] = "<svg id='checkbutton' width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n" " <defs>\n" " <linearGradient id='linearGradientLeft' x1='2' x2='2' y1='7.5' y2='7.5' gradientUnits='userSpaceOnUse'>\n" |
︙ | ︙ | |||
109 110 111 112 113 114 115 | " <stop stop-color='#ffffff' offset='1'/>\n" " </linearGradient>\n" " <linearGradient id='linearGradientTop' x1='7.5' x2='7.5' y1='2' y2='2' gradientUnits='userSpaceOnUse'>\n" " <stop stop-color='#DARKKK' offset='1'/>\n" " <stop stop-color='#000000' offset='0'/>\n" " </linearGradient>\n" " </defs>\n" | > | < | | | | > < > | | > | | | | | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | " <stop stop-color='#ffffff' offset='1'/>\n" " </linearGradient>\n" " <linearGradient id='linearGradientTop' x1='7.5' x2='7.5' y1='2' y2='2' gradientUnits='userSpaceOnUse'>\n" " <stop stop-color='#DARKKK' offset='1'/>\n" " <stop stop-color='#000000' offset='0'/>\n" " </linearGradient>\n" " </defs>\n" " <g style='paint-order:stroke markers fill'>\n" " <rect id='rectbackdrop' x='2' y='2' width='12' height='12' fill='#INTROR'/>\n" " <path id='recttopside' d='m0 0h16l-1 1h-14l-1-1' fill='url(#linearGradientTop)'/>\n" " <path id='rectleftside' d='m0 0 1 1v14l-1 1' fill='url(#linearGradientLeft)'/>\n" " <path id='rectrightside' d='m16 0-1 1v14l1 1v-16' fill='url(#linearGradientRight)'/>\n" " <path id='rectbottomside' d='m0 16 1-1h14l1 1h-16' fill='url(#linearGradientBottom)'/>\n" " <path id='indicator' d='m4.5 8 3 3 4-6' fill='none' stroke='#INDCTR' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/>\n" " </g>\n" "</svg>"; static const char radiobtnOffData[] = "<svg id='radiobutton' width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n" " <defs>\n" " <linearGradient id='gradient1' x1='2' x2='11' y1='2' y2='11' gradientUnits='userSpaceOnUse'>\n" " <stop stop-color='#DARKKK' offset='0'/>\n" " <stop stop-color='#LIGHTT' stop-opacity='0' offset='1'/>\n" " </linearGradient>\n" " </defs>\n" " <g fill-rule='evenodd'>\n" " <circle cx='8' cy='8' r='8' fill='url(#gradient1)'/>\n" " <circle cx='8' cy='8' r='6.5' fill='#INTROR'/>\n" " </g>\n" "</svg>"; static const char radiobtnOnData[] = "<svg id='radiobutton' width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n" " <defs>\n" " <linearGradient id='gradient1' x1='2' x2='11' y1='2' y2='11' gradientUnits='userSpaceOnUse'>\n" " <stop stop-color='#DARKKK' offset='0'/>\n" " <stop stop-color='#LIGHTT' stop-opacity='0' offset='1'/>\n" " </linearGradient>\n" " </defs>\n" " <g fill-rule='evenodd'>\n" " <circle cx='8' cy='8' r='8' fill='url(#gradient1)'/>\n" " <circle cx='8' cy='8' r='7' fill='#INTROR'/>\n" " <circle cx='8' cy='8' r='4' fill='#INDCTR'/>\n" " </g>\n" "</svg>"; static const char menuOffData[] = "<svg width='8' height='8' version='1.1' xmlns='http://www.w3.org/2000/svg'></svg>"; static const char checkmenuOnData[] = "<svg width='8' height='8' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n" " <path id='indicator' d='m1 3.5 2.5 3 3.5-5' fill='none' stroke='#INDCTR' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.975' style='paint-order:stroke markers fill'/>\n" "</svg>"; static const char radiomenuOnData[] = "<svg width='8' height='8' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n" " <circle cx='4' cy='4' r='3' fill='#INDCTR' fill-rule='evenodd'/>\n" "</svg>"; /* *---------------------------------------------------------------------- * |
︙ | ︙ |
Changes to win/tkWinButton.c.
︙ | ︙ | |||
43 44 45 46 47 48 49 | BOOLEAN initialized; DWORD boxSize; /* Width & height of the box. */ } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; /* * Data of the SVG images used for drawing the indicators | < < < < < < | | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | BOOLEAN initialized; DWORD boxSize; /* Width & height of the box. */ } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; /* * Data of the SVG images used for drawing the indicators */ static const char checkbtnOffData[] = "\ <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\ <path d='m0 0v15h1v-14h14v-1z' fill='#a0a0a0'/>\n\ <path d='m1 1v13h1v-12h12v-1z' fill='#696969'/>\n\ <path d='m14 1v13h-13v1h14v-14z' fill='#e3e3e3'/>\n\ <path d='m15 0v15h-15v1h16v-16z' fill='#eeeeee'/>\n\ <rect x='2' y='2' width='12' height='12' fill='#ffffff'/>\n\ </svg>"; static const char checkbtnOnData[] = "\ <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\ <path d='m0 0v15h1v-14h14v-1z' fill='#a0a0a0'/>\n\ <path d='m1 1v13h1v-12h12v-1z' fill='#696969'/>\n\ <path d='m14 1v13h-13v1h14v-14z' fill='#e3e3e3'/>\n\ <path d='m15 0v15h-15v1h16v-16z' fill='#eeeeee'/>\n\ <rect x='2' y='2' width='12' height='12' fill='#ffffff'/>\n\ <path d='m4.5 8 3 3 4-6' fill='none' stroke='#000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/>\n\ </svg>"; static const char radiobtnOffData[] = "\ <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\ <defs>\n\ <linearGradient id='linearGradientOuter' x1='7' x2='9' y1='8' y2='8' gradientTransform='rotate(45,8,8)' gradientUnits='userSpaceOnUse'>\n\ <stop stop-color='#a0a0a0' offset='0'/>\n\ |
︙ | ︙ | |||
490 491 492 493 494 495 496 | assert(interiorColorPtr); memcpy(topOuterColorPtr, topOuterColorStr, 6); memcpy(btmOuterColorPtr, btmOuterColorStr, 6); memcpy(topInnerColorPtr, topInnerColorStr, 6); memcpy(btmInnerColorPtr, btmInnerColorStr, 6); memcpy(interiorColorPtr, interiorColorStr, 6); | | < | 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 | assert(interiorColorPtr); memcpy(topOuterColorPtr, topOuterColorStr, 6); memcpy(btmOuterColorPtr, btmOuterColorStr, 6); memcpy(topInnerColorPtr, topInnerColorStr, 6); memcpy(btmInnerColorPtr, btmInnerColorStr, 6); memcpy(interiorColorPtr, interiorColorStr, 6); if (checkColorPtr != NULL) { memcpy(checkColorPtr, checkColorStr, 6); } /* * Create an SVG photo image from svgDataCopy */ cmdFmt = "image create photo %s -format $::tk::svgFmt -data {%s}"; |
︙ | ︙ |