summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcsaba <csaba>2023-02-15 10:04:14 (GMT)
committercsaba <csaba>2023-02-15 10:04:14 (GMT)
commitc7585d524aa41e56c6599ce80bbcefc49ee8c30c (patch)
treec89bc6b895e0901c793a27a53d231c821fe0cd9e
parentc62e04bb1e4cfa63457d3b6594ac5b21db33a5ed (diff)
downloadtk-c7585d524aa41e56c6599ce80bbcefc49ee8c30c.zip
tk-c7585d524aa41e56c6599ce80bbcefc49ee8c30c.tar.gz
tk-c7585d524aa41e56c6599ce80bbcefc49ee8c30c.tar.bz2
Provided SVG images for the Tk widget demonstration application
-rw-r--r--library/demos/widget45
-rw-r--r--library/icons.tcl2
-rw-r--r--library/tkfbox.tcl6
3 files changed, 31 insertions, 22 deletions
diff --git a/library/demos/widget b/library/demos/widget
index 35173da..3b8f5eb 100644
--- a/library/demos/widget
+++ b/library/demos/widget
@@ -1,6 +1,6 @@
#!/bin/sh
# the next line restarts using wish \
-exec wish "$0" ${1+"$@"}
+exec wish8.7 "$0" ${1+"$@"}
# widget --
# This script demonstrates the various widgets provided by Tk, along with many
@@ -57,28 +57,39 @@ if {"defaultFont" ni [font names]} {
set widgetDemo 1
set font mainFont
-image create photo ::img::refresh -format GIF -data {
- R0lGODlhEAAQAJEDAP///wAAACpnKv///yH5BAEAAAMALAAAAAAQABAAAAI63IKp
- xgcPH2ouwgBCw1HIxHCQ4F3hSJKmwZXqWrmWxj7lKJ2dndcon9EBUq+gz3brVXAR
- 2tICU0gXBQA7
+# The SVG images used below are 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.
+
+image create photo ::img::refresh -format $::tk::svgFmt -data {
+ <?xml version="1.0" encoding="UTF-8"?>
+ <svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
+ <path d="M11 5.466V4H5a4 4 0 0 0-3.584 5.777.5.5 0 1 1-.896.446A5 5 0 0 1 5 3h6V1.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384l-2.36 1.966a.25.25 0 0 1-.41-.192Zm3.81.086a.5.5 0 0 1 .67.225A5 5 0 0 1 11 13H5v1.466a.25.25 0 0 1-.41.192l-2.36-1.966a.25.25 0 0 1 0-.384l2.36-1.966a.25.25 0 0 1 .41.192V12h6a4 4 0 0 0 3.585-5.777.5.5 0 0 1 .225-.67Z"/>
+ </svg>
}
-image create photo ::img::view -format GIF -data {
- R0lGODlhEAAQAKIHAP///wwMDAAAAMDAwNnZ2SYmJmZmZv///yH5BAEAAAcALAAA
- AAAQABAAAANMKLos90+ASamDRxJCgw9YVnlDOXiQBgRDBRgHKE6sW8QR3doPKK27
- yg33q/GIOhdg6OsEJzeZykiBSUcs06e56Xx6np8ScIkFGuhQAgA7
+image create photo ::img::view -format $::tk::svgFmt -data {
+ <?xml version="1.0" encoding="UTF-8"?>
+ <svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
+ <path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/>
+ </svg>
}
-image create photo ::img::delete -format GIF -data {
- R0lGODlhEAAQAIABAIQAAP///yH5BAEAAAEALAAAAAAQABAAAAIjjI+pmwAc3HGy
- PUSvqYpuvWQg40FfSVacBa5nN6JYDI3mzRQAOw==
+image create photo ::img::delete -format $::tk::svgFmt -data {
+ <?xml version="1.0" encoding="UTF-8"?>
+ <svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
+ <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z" fill="#800000"/>
+ </svg>
}
-image create photo ::img::print -format GIF -data {
- R0lGODlhEAAQALMKAAAAAP///52VunNkl8C82Yl+qldBgq+pyrOzs1fYAP///wAA
- AAAAAAAAAAAAAAAAACH5BAEAAAoALAAAAAAQABAAAARGUMlJKwU4AztB+ODGeUiJ
- fGLlgeEYmGWQXmx7aXgmAUTv/74N4EAsGhOJg1DAbDqbwoJ0Sp0KB9isNis0eL/g
- ryhH5pgnEQA7
+image create photo ::img::print -format $::tk::svgFmt -data {
+ <?xml version="1.0" encoding="UTF-8"?>
+ <svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
+ <path d="M2.5 8a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z"/>
+ <path d="M5 1a2 2 0 0 0-2 2v2H2a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h1v1a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-1h1a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-1V3a2 2 0 0 0-2-2H5zM4 3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2H4V3zm1 5a2 2 0 0 0-2 2v1H2a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-1v-1a2 2 0 0 0-2-2H5zm7 2v3a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1z"/>
+ </svg>
}
# Note that this is run through the message catalog! This is because this is
diff --git a/library/icons.tcl b/library/icons.tcl
index a88a362..cf8b525 100644
--- a/library/icons.tcl
+++ b/library/icons.tcl
@@ -56,7 +56,7 @@ image create photo ::tk::icons::information -format $::tk::svgFmt -data {
image create photo ::tk::icons::question -format $::tk::svgFmt -data {
<?xml version="1.0" encoding="UTF-8"?>
- <svg width="32" height="32" version="1" xmlns="http://www.w3.org/2000/svg">
+ <svg width="32" height="32" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(.8 0 0 .8 -3.2 -3.2)">
<circle cx="24" cy="24" r="20" fill="#78c367"/>
<path d="m26 38h-4v-4h4zm4.14-15.5-1.8 1.84c-1.44 1.46-2.34 2.66-2.34 5.66h-4v-1c0-2.2 0.9-4.2 2.34-5.66l2.48-2.52a3.91 3.91 0 0 0 1.18-2.82c0-2.2-1.8-4-4-4s-4 1.8-4 4h-4c0-4.42 3.58-8 8-8s8 3.58 8 8c0 1.76-0.72 3.36-1.86 4.5z" fill="#fff"/>
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index baf0f93..fbaa25a 100644
--- a/library/tkfbox.tcl
+++ b/library/tkfbox.tcl
@@ -43,8 +43,7 @@ namespace eval ::tk::dialog::file {
# See https://github.com/thecheis/Boston-Icons
set ::tk::Priv(folderImage) [image create photo -format $::tk::svgFmt -data {
<?xml version="1.0" encoding="UTF-8"?>
- <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
- <title>Boston Icons</title>
+ <svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g>
<path d="m2 1a2 2 0 0 0-0.51758 0.068359 2 2 0 0 0-0.48242 0.19922 2 2 0 0 0-0.41406 0.31836 2 2 0 0 0-0.31836 0.41406 2 2 0 0 0-0.19922 0.48242 2 2 0 0 0-0.068359 0.51758v13h2 12 2v-11-0.96094a1 1 0 0 0 0-0.039062 1 1 0 0 0 0-0.0058594 1 1 0 0 0 0-0.0097656 1 1 0 0 0 0-0.0058594 1 1 0 0 0 0-0.0097656 1 1 0 0 0 0-0.0097656 1 1 0 0 0-0.001953-0.0097656 1 1 0 0 0 0-0.0058594 1 1 0 0 0 0-0.0097656 1 1 0 0 0 0-0.0097657 1 1 0 0 0-0.001953-0.0097656 1 1 0 0 0 0-0.0058594 1 1 0 0 0 0-0.0097656 1 1 0 0 0-0.001953-0.0097656 1 1 0 0 0 0-0.0058594 1 1 0 0 0-0.001953-0.0097656 1 1 0 0 0 0-0.0039063 1 1 0 0 0-0.025391-0.12891 1 1 0 0 0-0.042969-0.12305 1 1 0 0 0-0.058594-0.11719 1 1 0 0 0-0.072265-0.10938 1 1 0 0 0-0.085938-0.097656 1 1 0 0 0-0.097656-0.085938 1 1 0 0 0-0.10938-0.072266 1 1 0 0 0-0.11719-0.058594 1 1 0 0 0-0.12305-0.042969 1 1 0 0 0-0.12891-0.025391 1 1 0 0 0-0.13086-0.0078125h-6l-2-2h-5zm13.99 3.1367a1 1 0 0 1-0.001953 0.019531 1 1 0 0 0 0.001953-0.019531zm-0.019531 0.10547a1 1 0 0 1-0.005859 0.019531 1 1 0 0 0 0.005859-0.019531z" fill="#2d8cff"/>
<path d="m9.5996 4-2.5 3h-6.0996v8h14v-10.471a0.5 0.5 0 0 1-0.001953 0.011719 0.5 0.5 0 0 0 0.001953-0.011719 0.5 0.5 0 0 0 0-0.0019531 0.5 0.5 0 0 0 0-0.027344 0.5 0.5 0 0 0-0.007812-0.085938 0.5 0.5 0 0 0-0.021485-0.085938 0.5 0.5 0 0 0-0.037109-0.078125 0.5 0.5 0 0 0-0.050782-0.072266 0.5 0.5 0 0 0-0.060546-0.060547 0.5 0.5 0 0 0-0.072266-0.050781 0.5 0.5 0 0 0-0.078125-0.037109 0.5 0.5 0 0 0-0.085937-0.021484 0.5 0.5 0 0 0-0.085938-0.0078125h-4.9004z" fill="#6fb7ff"/>
@@ -58,8 +57,7 @@ namespace eval ::tk::dialog::file {
# See https://github.com/thecheis/Boston-Icons
set ::tk::Priv(fileImage) [image create photo -format $::tk::svgFmt -data {
<?xml version="1.0" encoding="UTF-8"?>
- <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
- <title>Boston Icons</title>
+ <svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path d="m2 0h9l3 3v13h-12z" fill="#556e81"/>
<path d="m3 1h7.5l2.5 2.5v11.5h-10z" fill="#fff"/>
<g fill="#556e81">