diff options
author | csaba <csaba> | 2023-02-24 11:50:45 (GMT) |
---|---|---|
committer | csaba <csaba> | 2023-02-24 11:50:45 (GMT) |
commit | 934e368fe9a5bfbf2e35a40e4760acb458bee414 (patch) | |
tree | 5be986c59980ea5889132b06afe3682ae0552a5e /generic | |
parent | 4539a7f803166e1c6fcb8529bf2fe560386d56da (diff) | |
download | tk-934e368fe9a5bfbf2e35a40e4760acb458bee414.zip tk-934e368fe9a5bfbf2e35a40e4760acb458bee414.tar.gz tk-934e368fe9a5bfbf2e35a40e4760acb458bee414.tar.bz2 |
Hopefully final unification and cleanup of the SVG data used for drawing indicators
Diffstat (limited to 'generic')
-rw-r--r-- | generic/ttk/ttkClamTheme.c | 14 | ||||
-rw-r--r-- | generic/ttk/ttkDefaultTheme.c | 11 |
2 files changed, 7 insertions, 18 deletions
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c index 8613540..16330c2 100644 --- a/generic/ttk/ttkClamTheme.c +++ b/generic/ttk/ttkClamTheme.c @@ -281,12 +281,6 @@ static const Ttk_ElementSpec ComboboxFieldElementSpec = { /*------------------------------------------------------------------------ * +++ Indicator elements for check and radio buttons. - * - * The SVG images used here are partly based on some icons provided by - * the official open source SVG icon library for the Bootstrap project, - * licensed under the MIT license (https://opensource.org/licenses/MIT). - * - * See https://github.com/twbs/icons. */ /* @@ -311,7 +305,10 @@ static const char checkbtnOnData[] = "\ <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\ - <path d='m4.6263 4.6262a0.50294 0.50294 0 0 1 0.71217 0l2.6617 2.6627 2.6617-2.6627a0.50358 0.50358 0 0 1 0.71217 0.71217l-2.6627 2.6617 2.6627 2.6617a0.50358 0.50358 0 0 1-0.71217 0.71217l-2.6617-2.6627-2.6617 2.6627a0.50358 0.50358 0 0 1-0.71217-0.71217l2.6627-2.6617-2.6627-2.6617a0.50294 0.50294 0 0 1 0-0.71217z' fill='#000000' stroke='#000000' stroke-width='.942'/>\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 = { @@ -515,9 +512,8 @@ static void IndicatorElementDraw( memcpy(upperBdColorPtr, upperBdColorStr, 6); memcpy(lowerBdColorPtr, lowerBdColorStr, 6); memcpy(bgColorPtr, bgColorStr, 6); - while (fgColorPtr != NULL) { + if (fgColorPtr != NULL) { memcpy(fgColorPtr, fgColorStr, 6); - fgColorPtr = strstr(fgColorPtr + 6, "000000"); } /* diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c index 2d9946b..5d62fb7 100644 --- a/generic/ttk/ttkDefaultTheme.c +++ b/generic/ttk/ttkDefaultTheme.c @@ -374,12 +374,6 @@ static const Ttk_ElementSpec FieldElementSpec = { /*------------------------------------------------------------------------ * Indicators -- - * - * The SVG images used here are partly based on some icons provided by - * the official open source SVG icon library for the Bootstrap project, - * licensed under the MIT license (https://opensource.org/licenses/MIT). - * - * See https://github.com/twbs/icons. */ /* @@ -408,7 +402,7 @@ static const char checkbtnOnData[] = "\ <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='m10.857 5.2815a0.49452 0.49452 0 0 1 0.70636 0c0.19295 0.19497 0.19565 0.51003 0.0068 0.70838l-3.9892 4.7158a0.49452 0.49452 0 0 1-0.7185 0.01349l-2.4274-2.4598a0.51071 0.51071 0 0 1 0-0.71513 0.49452 0.49452 0 0 1 0.70636 0l2.059 2.0867 3.6431-4.3346a0.16664 0.16664 0 0 1 0.01349-0.014842z' fill='#000000' stroke='#000000' stroke-width='.7'/>\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 = { @@ -638,9 +632,8 @@ static void IndicatorElementDraw( memcpy(borderColorPtr, borderColorStr, 6); memcpy(bgColorPtr, bgColorStr, 6); memcpy(indicatorColorPtr, indicatorColorStr, 6); - while (fgColorPtr != NULL) { + if (fgColorPtr != NULL) { memcpy(fgColorPtr, fgColorStr, 6); - fgColorPtr = strstr(fgColorPtr + 6, "000000"); } /* |