├── a-tree.png ├── .gitattributes ├── feet-yaru.png ├── media-arc.png ├── media-blue.png ├── media-yaru.png ├── feet-breeze.png ├── media-adapta.png ├── media-black.png ├── media-breeze.png ├── media-equilux.png ├── media-plastik.png ├── media-ubuntu.png ├── mediaplayer.png ├── tree-columns.png ├── treeview-yaru.png ├── feet-to-meters.png ├── media-aquativo.png ├── media-radiance.png ├── treeview-forest.png ├── media-clearlooks.png ├── media-forest-light.png ├── media-lightbrown.png ├── Forest-ttk-theme ├── forest-light │ ├── up.png │ ├── card.png │ ├── down.png │ ├── empty.png │ ├── right.png │ ├── notebook.png │ ├── on-basic.png │ ├── on-hover.png │ ├── sizegrip.png │ ├── down-focus.png │ ├── hor-accent.png │ ├── hor-basic.png │ ├── hor-hover.png │ ├── off-accent.png │ ├── off-basic.png │ ├── off-hover.png │ ├── on-accent.png │ ├── rect-basic.png │ ├── rect-hover.png │ ├── scale-hor.png │ ├── scale-vert.png │ ├── separator.png │ ├── tab-accent.png │ ├── tab-basic.png │ ├── tab-hover.png │ ├── tree-basic.png │ ├── vert-basic.png │ ├── vert-hover.png │ ├── border-accent.png │ ├── border-basic.png │ ├── border-hover.png │ ├── check-accent.png │ ├── check-basic.png │ ├── check-hover.png │ ├── radio-accent.png │ ├── radio-basic.png │ ├── radio-hover.png │ ├── rect-accent.png │ ├── right-focus.png │ ├── tree-pressed.png │ ├── vert-accent.png │ ├── border-invalid.png │ ├── check-tri-basic.png │ ├── check-tri-hover.png │ ├── radio-tri-basic.png │ ├── radio-tri-hover.png │ ├── spin-button-up.png │ ├── thumb-hor-basic.png │ ├── thumb-hor-hover.png │ ├── check-tri-accent.png │ ├── check-unsel-accent.png │ ├── check-unsel-basic.png │ ├── check-unsel-hover.png │ ├── combo-button-basic.png │ ├── combo-button-focus.png │ ├── combo-button-hover.png │ ├── radio-tri-accent.png │ ├── radio-unsel-accent.png │ ├── radio-unsel-basic.png │ ├── radio-unsel-hover.png │ ├── rect-accent-hover.png │ ├── thumb-hor-accent.png │ ├── thumb-vert-accent.png │ ├── thumb-vert-basic.png │ ├── thumb-vert-hover.png │ ├── border-accent-hover.png │ ├── check-unsel-pressed.png │ ├── radio-unsel-pressed.png │ ├── spin-button-down-basic.png │ └── spin-button-down-focus.png └── forest-light.tcl ├── ttkthemes └── ttkthemes │ └── png │ └── yaru │ ├── yaru │ ├── plus.png │ ├── empty.png │ ├── minus.png │ ├── radio-mix.png │ ├── separator.png │ ├── sizegrip.png │ ├── tab-basic.png │ ├── tab-hover.png │ ├── entry-basic.png │ ├── entry-focus.png │ ├── entry-hover.png │ ├── radio-basic.png │ ├── tab-current.png │ ├── tree-basic.png │ ├── arrow-up-basic.png │ ├── arrow-up-hover.png │ ├── button-basic.png │ ├── button-pressed.png │ ├── checkbox-basic.png │ ├── entry-disabled.png │ ├── radio-selected.png │ ├── scale-slider.png │ ├── scale-trough.png │ ├── tree-pressed.png │ ├── arrow-down-basic.png │ ├── arrow-down-hover.png │ ├── button-disabled.png │ ├── progressbar-hor.png │ ├── progressbar-vert.png │ ├── checkbox-selected.png │ ├── radio-selected-dis.png │ ├── scale-slider-hover.png │ ├── scrollbar-hor-gray.png │ ├── scrollbar-vert-gray.png │ ├── checkbox-selected-dis.png │ ├── scale-trough-disabled.png │ ├── scrollbar-hor-orange.png │ ├── scrollbar-hor-purple.png │ ├── scrollbar-hor-trough.png │ ├── scrollbar-vert-orange.png │ ├── scrollbar-vert-purple.png │ ├── scrollbar-vert-trough.png │ ├── progressbar-trough-hor.png │ └── progressbar-trough-vert.png │ └── yaru.tcl ├── nodgui.lisp ├── README.md ├── musicplayer.lisp ├── gui.lisp └── musicplayer-nodgui.lisp /a-tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/a-tree.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ttkthemes/ linguist-vendored 2 | Forest-ttk-theme/ linguist-vendored -------------------------------------------------------------------------------- /feet-yaru.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/feet-yaru.png -------------------------------------------------------------------------------- /media-arc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/media-arc.png -------------------------------------------------------------------------------- /media-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/media-blue.png -------------------------------------------------------------------------------- /media-yaru.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/media-yaru.png -------------------------------------------------------------------------------- /feet-breeze.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/feet-breeze.png -------------------------------------------------------------------------------- /media-adapta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/media-adapta.png -------------------------------------------------------------------------------- /media-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/media-black.png -------------------------------------------------------------------------------- /media-breeze.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/media-breeze.png -------------------------------------------------------------------------------- /media-equilux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/media-equilux.png -------------------------------------------------------------------------------- /media-plastik.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/media-plastik.png -------------------------------------------------------------------------------- /media-ubuntu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/media-ubuntu.png -------------------------------------------------------------------------------- /mediaplayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/mediaplayer.png -------------------------------------------------------------------------------- /tree-columns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/tree-columns.png -------------------------------------------------------------------------------- /treeview-yaru.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/treeview-yaru.png -------------------------------------------------------------------------------- /feet-to-meters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/feet-to-meters.png -------------------------------------------------------------------------------- /media-aquativo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/media-aquativo.png -------------------------------------------------------------------------------- /media-radiance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/media-radiance.png -------------------------------------------------------------------------------- /treeview-forest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/treeview-forest.png -------------------------------------------------------------------------------- /media-clearlooks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/media-clearlooks.png -------------------------------------------------------------------------------- /media-forest-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/media-forest-light.png -------------------------------------------------------------------------------- /media-lightbrown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/media-lightbrown.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/up.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/card.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/down.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/empty.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/right.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/notebook.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/on-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/on-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/on-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/on-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/sizegrip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/sizegrip.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/plus.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/down-focus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/down-focus.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/hor-accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/hor-accent.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/hor-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/hor-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/hor-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/hor-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/off-accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/off-accent.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/off-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/off-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/off-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/off-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/on-accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/on-accent.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/rect-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/rect-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/rect-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/rect-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/scale-hor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/scale-hor.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/scale-vert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/scale-vert.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/separator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/separator.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/tab-accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/tab-accent.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/tab-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/tab-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/tab-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/tab-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/tree-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/tree-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/vert-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/vert-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/vert-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/vert-hover.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/empty.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/minus.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/border-accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/border-accent.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/border-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/border-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/border-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/border-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/check-accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/check-accent.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/check-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/check-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/check-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/check-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/radio-accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/radio-accent.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/radio-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/radio-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/radio-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/radio-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/rect-accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/rect-accent.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/right-focus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/right-focus.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/tree-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/tree-pressed.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/vert-accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/vert-accent.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/radio-mix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/radio-mix.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/separator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/separator.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/sizegrip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/sizegrip.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/tab-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/tab-basic.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/tab-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/tab-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/border-invalid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/border-invalid.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/check-tri-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/check-tri-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/check-tri-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/check-tri-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/radio-tri-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/radio-tri-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/radio-tri-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/radio-tri-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/spin-button-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/spin-button-up.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/thumb-hor-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/thumb-hor-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/thumb-hor-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/thumb-hor-hover.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/entry-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/entry-basic.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/entry-focus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/entry-focus.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/entry-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/entry-hover.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/radio-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/radio-basic.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/tab-current.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/tab-current.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/tree-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/tree-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/check-tri-accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/check-tri-accent.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/check-unsel-accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/check-unsel-accent.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/check-unsel-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/check-unsel-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/check-unsel-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/check-unsel-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/combo-button-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/combo-button-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/combo-button-focus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/combo-button-focus.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/combo-button-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/combo-button-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/radio-tri-accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/radio-tri-accent.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/radio-unsel-accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/radio-unsel-accent.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/radio-unsel-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/radio-unsel-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/radio-unsel-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/radio-unsel-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/rect-accent-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/rect-accent-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/thumb-hor-accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/thumb-hor-accent.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/thumb-vert-accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/thumb-vert-accent.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/thumb-vert-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/thumb-vert-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/thumb-vert-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/thumb-vert-hover.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/arrow-up-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/arrow-up-basic.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/arrow-up-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/arrow-up-hover.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/button-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/button-basic.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/button-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/button-pressed.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/checkbox-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/checkbox-basic.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/entry-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/entry-disabled.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/radio-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/radio-selected.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/scale-slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/scale-slider.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/scale-trough.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/scale-trough.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/tree-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/tree-pressed.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/border-accent-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/border-accent-hover.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/check-unsel-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/check-unsel-pressed.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/radio-unsel-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/radio-unsel-pressed.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/arrow-down-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/arrow-down-basic.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/arrow-down-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/arrow-down-hover.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/button-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/button-disabled.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/progressbar-hor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/progressbar-hor.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/progressbar-vert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/progressbar-vert.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/spin-button-down-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/spin-button-down-basic.png -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light/spin-button-down-focus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/Forest-ttk-theme/forest-light/spin-button-down-focus.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/checkbox-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/checkbox-selected.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/radio-selected-dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/radio-selected-dis.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/scale-slider-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/scale-slider-hover.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-hor-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-hor-gray.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-vert-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-vert-gray.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/checkbox-selected-dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/checkbox-selected-dis.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/scale-trough-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/scale-trough-disabled.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-hor-orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-hor-orange.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-hor-purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-hor-purple.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-hor-trough.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-hor-trough.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-vert-orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-vert-orange.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-vert-purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-vert-purple.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-vert-trough.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/scrollbar-vert-trough.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/progressbar-trough-hor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/progressbar-trough-hor.png -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru/progressbar-trough-vert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vindarel/ltk-tests/HEAD/ttkthemes/ttkthemes/png/yaru/yaru/progressbar-trough-vert.png -------------------------------------------------------------------------------- /nodgui.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defpackage nodgui-example 3 | (:use :cl 4 | :nodgui)) 5 | 6 | (in-package :nodgui-example) 7 | 8 | 9 | (defun calculate (feet-widget meter-widget) 10 | (let ((feet-input (text feet-widget))) 11 | (when (and feet-input (str:non-blank-string-p feet-input)) 12 | (log:info feet-input) 13 | (setf (text meter-widget) (format nil "~,2F" (* 14 | (read-from-string feet-input) 15 | 0.3048d0)))))) 16 | 17 | (defun theme-directory (theme) 18 | (if (member theme (list "aquativo" "black" "blue" "clearlooks" "elegance" "plastik" 19 | "radiance") 20 | :test #'equal) 21 | "themes" 22 | ;; other themes include: 23 | ;; adapta, arc, 24 | ;; breeze (renders OK) 25 | ;; equilux, scid, ubuntu, 26 | ;; yaru (renders OK) 27 | "png")) 28 | 29 | (defun nodgui-gui (&key debug (theme "yaru")) 30 | (let ((nodgui:*debug-tk* debug)) 31 | (with-nodgui () 32 | 33 | ;; load a theme 34 | ;; (eval-tcl-file "ttkthemes/ttkthemes/png/adapta/adapta.tcl") 35 | ;; (use-theme "adapta") 36 | 37 | ;; (eval-tcl-file "ttkthemes/ttkthemes/png/breeze/breeze.tcl") 38 | ;; (use-theme "breeze") 39 | 40 | ;; below theme in png/ directory. 41 | (eval-tcl-file (format nil "ttkthemes/ttkthemes/~a/~a/~a.tcl" (theme-directory theme) theme theme)) 42 | (use-theme (format nil "~a" theme)) 43 | 44 | (wm-title *tk* (format nil "Feet to Meters - theme ~a" theme)) 45 | (let ((c (make-instance 'frame))) 46 | (grid c 0 0 :sticky "ne") 47 | (grid-columnconfigure *tk* 0 :weight 1) 48 | (grid-rowconfigure *tk* 0 :weight 1) 49 | (let* ((c.feet (grid (make-instance 'entry :width 7) 50 | 1 2 :sticky "we" :padx 5 :pady 5)) 51 | (c.meters (grid (make-instance 'entry :state "readonly") 52 | 2 2 :sticky "we" :padx 5 :pady 5))) 53 | (grid (make-instance 'button 54 | :text "Calculate" 55 | :command (lambda () (calculate c.feet c.meters))) 56 | 3 3 :sticky "w" :padx 5 :pady 5) 57 | (grid (make-instance 'label :text "feet") 58 | 1 3 :sticky "w" :padx 5 :pady 5) 59 | (grid (make-instance 'label :text "is equivalent to") 60 | 2 1 :sticky "w" :padx 5 :pady 5) 61 | (grid (make-instance 'label :text "meters") 62 | 2 3 :sticky "w" :padx 5 :pady 5)))))) 63 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | A noob trying out Tk GUIs in Common Lisp. 3 | 4 | Nothing fancy, private tests, hopefully helping someone to getting 5 | started, until they make it to a proper tutorial. 6 | 7 | **NEW!** Peter Lane assembled an excellent resource for Ltk and Nodgui: 8 | 9 | - https://peterlane.codeberg.page/ltk-examples/ 10 | 11 | **NEW!** nodgui supports custom Tk themes!! See gallery below. 12 | 13 | To test: 14 | 15 | git clone https://github.com/TkinterEP/ttkthemes/ 16 | 17 | at this project's root (or use the "yaru" theme, commited). 18 | 19 | 20 | # Quick Insights 21 | 22 | How to create widgets: `(make-instance 'widget-name)`, for example 23 | 24 | ~~~lisp 25 | (make-instance 'frame) 26 | (make-instance 'treeview) 27 | ~~~ 28 | 29 | How to place them on the grid: 30 | 31 | ~~~lisp 32 | ;; (grid &options) 33 | (grid c 0 0 :sticky "n" ;; north 34 | :padx 5 :pady 5) 35 | ~~~ 36 | 37 | The rest is discoverable ! 38 | 39 | 40 | ![](feet-to-meters.png) 41 | 42 | With nodgui, yaru and breeze theme (more below): 43 | 44 | ![](feet-yaru.png) 45 | 46 | ![](feet-breeze.png) 47 | 48 | https://gist.github.com/jasom/4c4bf02e60d85f2644f99ce7be5dce17 49 | 50 | ## Tree widget 51 | 52 | 53 | ![](a-tree.png) 54 | 55 | 56 | ~~~lisp 57 | (make-instance 'treeview) 58 | ;; and 59 | (treeview-insert c.tree :text "some text")) 60 | ~~~ 61 | 62 | With columns: 63 | 64 | ![](tree-columns.png) 65 | 66 | (commented sources) 67 | 68 | A simple example: 69 | 70 | ~~~lisp 71 | ;; Always use with-nodgui or with-ltk. 72 | (with-nodgui () 73 | (let ((tree (make-instance 'scrolled-treeview 74 | ;; a treeview always has a first column. 75 | :columns (list "col2")))) 76 | ;; We place our widget on the grid to see it. 77 | (grid tree 1 0) 78 | (loop for data in '("aaa" "bbb" "ccc") 79 | do (treeview-insert-item tree 80 | ;; text of the first column. 81 | :text data 82 | ;; text of the other columns. 83 | :column-values (list "val2"))))) 84 | ~~~ 85 | 86 | For collapsable rows, the use of `parents` and `children`, an example: https://notabug.org/cage/nodgui/src/7e6da313d99d4b260aadab595fe4b0f843520da7/src/demo-tests.lisp 87 | 88 | Another example showing a treeview, with columns, inserting content 89 | from a searchbox, clearing the tree's content, and others (resizing, 90 | etc): see `example-treeview-search-display`. 91 | 92 | 93 | ## Media player 94 | 95 | Using Peter Lane's listbox example: https://peterlane.codeberg.page/ltk-examples/#_more_widgets 96 | 97 | We display a list of strings (file names), we add a select box (select 98 | media player), a button (listen), and we play the file with an 99 | external program. 100 | 101 | Might become a general utility in my growing scripts: send a list of something, decide of the action, do it. 102 | 103 | ![](mediaplayer.png) 104 | 105 | ## Media player (nodgui, themes) 106 | 107 | See musicplayer-nodgui.lisp. 108 | 109 | We can use Tk themes, that's huge! 110 | 111 | 112 | ![](media-equilux.png) 113 | ![](media-adapta.png) 114 | ![](media-yaru.png) 115 | ![](media-arc.png) 116 | ![](media-aquativo.png) 117 | ![](media-black.png) 118 | ![](media-breeze.png) 119 | ![](media-blue.png) 120 | ![](media-clearlooks.png) 121 | ![](media-radiance.png) 122 | ![](media-plastik.png) 123 | ![](media-ubuntu.png) 124 | 125 | I cloned [ttkthemes](https://github.com/TkinterEP/ttkthemes/) ([gallery](https://ttkthemes.readthedocs.io/en/latest/themes.html#elegance)) locally. 126 | 127 | We need to eval a tcl file, and set the theme: 128 | 129 | ~~~lisp 130 | ;; inside nodgui:with-nodgui main loop. 131 | (eval-tcl-file "ttkthemes/ttkthemes/png/yaru/yaru.tcl") 132 | (use-theme "yaru") 133 | ~~~ 134 | 135 | and that's it. 136 | 137 | The [awthemes](https://sourceforge.net/projects/tcl-awthemes/) are supposed to be supported (didn't try yet). 138 | 139 | List of Tcl/Tk themes: https://wiki.tcl-lang.org/page/List+of+ttk+Themes 140 | 141 | The gif themes of ttkthemes are not yet supported, but will be when `tklib` lands in Debian. Read [nodgui #13](https://wiki.tcl-lang.org/page/List+of+ttk+Themes). 142 | 143 | note: the "scid" and "smog" themes bugged. 144 | 145 | ### More themes 146 | 147 | [Forest theme](https://github.com/rdbende/Forest-ttk-theme) 148 | 149 | ![](media-forest-light.png) 150 | 151 | Screenshot from its readme: 152 | 153 | ![](https://raw.githubusercontent.com/rdbende/Forest-ttk-theme/master/Forest-light%20screenshot.png) 154 | 155 | (by the same author, [Azure](https://github.com/rdbende/Azure-ttk-theme) and [Sun Valley](https://github.com/rdbende/Sun-Valley-ttk-theme) themes didn't load) 156 | 157 | [Ale themes](https://github.com/aplsimple/ale_themes) 158 | 159 | ![](media-lightbrown.png) 160 | 161 | 162 | 163 | ## Interactively building the GUI 164 | 165 | http://www.peter-herth.de/ltk/ltkdoc/node8.html 166 | 167 | run `(start-wish)` and start building interactively ! 168 | 169 | (defparameter *button* (make-instance 'button :text "OK")) 170 | (grid *button* 1 0 :sticky "e") 171 | 172 | and voilà, you didn't have to restart the main loop to see the new 173 | button into the interface. 174 | 175 | We didn't have to use the `with-ltk` macro too. 176 | 177 | Then `(exit-wish)`. 178 | 179 | 180 | ## Demo 181 | 182 | The nodgui demo shows a lot of widgets: 183 | 184 | ![](nodgui-demo-style-clam.png) 185 | 186 | Try it out with 187 | 188 | (ql:quickload :nodgui) 189 | (nodgui.demo:demo) 190 | 191 | 192 | # Links 193 | 194 | - https://peterlane.codeberg.page/ltk-examples/ NEW(er) and awesome. 195 | - https://github.com/LispCookbook/cl-cookbook/issues/31 196 | - https://github.com/CodyReichert/awesome-cl#gui 197 | - http://www.peter-herth.de/ltk/ 198 | - https://notabug.org/cage/nodgui.git = based on ltk with syntax sugar and more widgets (calendar, completion,…). 199 | 200 | Tk tutorials used: 201 | 202 | - https://tkdocs.com/tutorial/index.html 203 | - https://www.effbot.org/tkinterbook/grid.htm 204 | 205 | ## Example apps 206 | 207 | - https://github.com/lisp-mirror/fulci (by the author of nodgui) 208 | 209 | ![](https://www.autistici.org/interzona/img/fulci/search-frame.png) 210 | -------------------------------------------------------------------------------- /musicplayer.lisp: -------------------------------------------------------------------------------- 1 | ;; #!/usr/bin/env ciel 2 | 3 | ;; from https://peterlane.codeberg.page/ltk-examples/#_basic_widgets 4 | ;; 5 | ;; Simple dumb player: 6 | ;; - show list of files 7 | ;; - "listen" button. 8 | ;; 9 | ;; The goal is to display a list of something and make something with it. 10 | ;; 11 | ;; The original example is a list of countries. 12 | ;; 13 | ;; Depends-on: 14 | ;; FOF (file-object finder) 15 | 16 | (uiop:define-package :ltk-tests 17 | (:shadow :listen) 18 | (:use :cl :ltk)) 19 | 20 | (in-package :ltk-tests) 21 | 22 | 23 | ;; unused 24 | (defparameter *players* '("mpv" 25 | "vlc" 26 | "smplayer" 27 | "clementine")) 28 | 29 | (defparameter *data* nil 30 | "internal cache. List of strings.") 31 | 32 | ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 33 | ;; Find some files. 34 | ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 35 | 36 | (defun find-music (directory search) 37 | "Search recursively on this directory for files whose basename contain \"search\". 38 | 39 | Return: list of FOF file objects. Use fof:basename or fof:path to get strings." 40 | (let ((str:*ignore-case* t)) 41 | (fof:finder* :root directory :predicates (fof/p:every-path~ search)))) 42 | ;; (fof:finder* :root directory :predicates (fof/p:path~ search)))) 43 | #+(or) 44 | (fof:finder* :root "~/zique/" :predicates (fof/p:every-path~ "Forr" "mp3")) 45 | 46 | (defun get-player-name (obj) 47 | "The value is upper cased when set with Ltk. Return the lowercase value. 48 | 49 | Ex: \"VLC\" (would not work) => \"vlc\"." 50 | (string-downcase (string obj))) 51 | 52 | ;; External command: read this file with a media player. 53 | (defun listen (index player notification-label) 54 | (when (= 1 (length index)) 55 | (let* ((idx (first index)) 56 | (player (get-player-name player)) 57 | (item (nth idx *data*))) 58 | 59 | (setf (text notification-label) 60 | (format nil "Listening to ~a with ~a…" (fof:path item) player)) 61 | 62 | ;; Run async: 63 | (uiop:launch-program (list player (fof:path item)))))) 64 | 65 | (defun normalize-item (item) 66 | "In our case: FOF file object -> file name (sans full path)." 67 | (fof:basename item)) 68 | 69 | (defun show-songname (index status-label) 70 | "Updates status label (window bottom)" 71 | ;; nice status at the window bottom. 72 | ;; 73 | (when (= 1 (length index)) 74 | (let* ((idx (first index)) 75 | ;; (code (nth idx *country-codes*)) 76 | (file (nth idx *data*))) 77 | (setf (text status-label) 78 | (format nil "Song: ~s" (normalize-item file))))) 79 | ) 80 | 81 | ;; GUI: 82 | (defun musicplayer (&optional (data *data* data-p)) 83 | (when data-p 84 | (setf *data* data)) 85 | (with-ltk () 86 | (wm-title *tk* "Listbox Example: media player") 87 | ;; create the outer content frame and other widgets 88 | (let* ((content (make-instance 'frame)) 89 | (data-listbox (make-instance 'scrolled-listbox :master content)) 90 | (player-1 (make-instance 'radio-button :master content 91 | :text "vlc" 92 | :value "vlc" :variable "player")) 93 | (player-2 (make-instance 'radio-button :master content 94 | :text "mpv" 95 | :value "mpv" :variable "player")) 96 | (status-label (make-instance 'label :master content :text "" :anchor "w")) 97 | (listen-btn (make-instance 'button 98 | :master content :text "Listen" 99 | :command (lambda () 100 | (listen (listbox-get-selection data-listbox) 101 | (value player-1) 102 | status-label)) 103 | :default :active))) 104 | 105 | ;; grid the outer content frame 106 | (configure content :padding "5 5 12 0") 107 | (grid content 0 0 :sticky "nwes") 108 | (grid-columnconfigure *tk* 0 :weight 1) 109 | (grid-rowconfigure *tk* 0 :weight 1) 110 | (grid-columnconfigure content 0 :weight 1) 111 | (grid-rowconfigure content 5 :weight 1) 112 | 113 | ;; grid the other widgets 114 | (listbox-append data-listbox data) 115 | (grid data-listbox 0 0 :rowspan 6 :sticky "nsew") 116 | (grid player-1 1 1 :sticky "w" :padx 20) 117 | (grid player-2 2 1 :sticky "w" :padx 20) 118 | 119 | (grid listen-btn 5 2 :sticky "se") 120 | (grid status-label 6 0 :columnspan 2 :sticky "we") 121 | 122 | ;; Set event bindings for when the selection in the listbox changes, 123 | ;; when the user double clicks the list, and when they hit the Return key 124 | (bind (listbox data-listbox) "<>" 125 | #'(lambda (evt) 126 | (declare (ignorable evt)) 127 | (show-songname (listbox-get-selection data-listbox) 128 | status-label))) 129 | (bind (listbox data-listbox) "" 130 | #'(lambda (evt) 131 | (declare (ignorable evt)) 132 | (listen (listbox-get-selection data-listbox) 133 | (value player-1) 134 | (value player-1)))) 135 | (bind *tk* "" 136 | #'(lambda (evt) 137 | (declare (ignorable evt)) 138 | (listen (listbox-get-selection data-listbox) 139 | (value player-1) 140 | (value player-1)))) 141 | 142 | (setf (value player-1) "vlc") ;; gives us upper case. 143 | (listbox-select data-listbox 0) 144 | (show-songname (listbox-get-selection data-listbox) status-label) 145 | ;; alternate colours in listbox 146 | (dotimes (i (length data)) 147 | (when (evenp i) 148 | (listbox-configure (listbox data-listbox) i :background "#f0f0ff"))))) 149 | ) 150 | 151 | #+(or) 152 | (musicplayer (find-music "~/music/" "mp3")) 153 | #+(or) 154 | (musicplayer (find-music "~/zique/" "mp3")) 155 | 156 | #+ciel 157 | (musicplayer (find-music "~/zique/" (second ciel-user:*script-args*))) 158 | -------------------------------------------------------------------------------- /gui.lisp: -------------------------------------------------------------------------------- 1 | 2 | ;; quickload ltk before. 3 | ;; we also use nodgui below. 4 | (defpackage ltk-first-example 5 | (:use :cl 6 | :ltk)) 7 | 8 | (in-package :ltk-first-example) 9 | 10 | (defun calculate (feet-widget meter-widget) 11 | (let ((feet-input (text feet-widget))) 12 | (when (and feet-input (str:non-blank-string-p feet-input)) 13 | (log:info feet-input) 14 | (setf (text meter-widget) (format nil "~,2F" (* 15 | (read-from-string feet-input) 16 | 0.3048d0)))))) 17 | 18 | (defun gui () 19 | (let ((ltk:*debug-tk* t)) 20 | (with-ltk () 21 | (wm-title *tk* "Feet to Meters") 22 | (let ((c (make-instance 'frame))) 23 | (grid c 0 0 :sticky "ne") 24 | (grid-columnconfigure *tk* 0 :weight 1) 25 | (grid-rowconfigure *tk* 0 :weight 1) 26 | (let* ((c.feet (grid (make-instance 'entry :width 7) 27 | 1 2 :sticky "we" :padx 5 :pady 5)) 28 | (c.meters (grid (make-instance 'entry :state "readonly") 29 | 2 2 :sticky "we" :padx 5 :pady 5))) 30 | (grid (make-instance 'button 31 | :text "Calculate" 32 | :command (lambda () (calculate c.feet c.meters))) 33 | 3 3 :sticky "w" :padx 5 :pady 5) 34 | (grid (make-instance 'label :text "feet") 35 | 1 3 :sticky "w" :padx 5 :pady 5) 36 | (grid (make-instance 'label :text "is equivalent to") 37 | 2 1 :sticky "w" :padx 5 :pady 5) 38 | (grid (make-instance 'label :text "meters") 39 | 2 3 :sticky "w" :padx 5 :pady 5)))))) 40 | 41 | 42 | (defun tree () 43 | (let ((ltk:*debug-tk* t) 44 | (dummy-data '("foo" 45 | "bar" 46 | "team" 47 | ))) 48 | (with-ltk () 49 | (wm-title *tk* "A tree") 50 | (let ((c (make-instance 'frame))) 51 | (grid c 0 0 :sticky "ne") 52 | (grid-columnconfigure *tk* 0 :weight 1) 53 | (grid-rowconfigure *tk* 0 :weight 1) 54 | (let* ((c.searchbox (grid (make-instance 'entry :width 7) 55 | 0 0 :sticky "we" :padx 5 :pady 5)) 56 | (c.tree (grid (make-instance 'scrolled-treeview 57 | :columns (list "col1" "col2")) 58 | 1 0 :sticky "we" :padx 5 :pady 5))) 59 | (loop for row in dummy-data 60 | do (treeview-insert c.tree 61 | :text row 62 | :column-values (list "two"))) 63 | (grid (make-instance 'button 64 | :text "foo" 65 | :command (lambda () 66 | (format t "the treeview selection is: ~a~&" 67 | (treeview-get-selection c.tree)) 68 | (format t "text is: ~a~&" (text c.searchbox)))) 69 | 2 0 :sticky "w" :padx 5 :pady 5) 70 | ))))) 71 | 72 | (defun treeview-with-columns () 73 | ;; With nodgui (because of the examples I have at hand. 74 | ;; Its api is different sometimes (he says): 75 | ;; - we use scrolled-treeview, says that treeview is broken. 76 | ;; - it's treeview-insert-<>. 77 | (with-nodgui () 78 | (let ((c (make-instance 'frame))) 79 | (grid c 0 0 :sticky "ne") 80 | (let* ((c.searchbox (grid (make-instance 'entry :width 7) 81 | 0 0 :sticky "we" :padx 5 :pady 5)) 82 | (c.tree (grid (make-instance 'scrolled-treeview 83 | :columns (list "col1" "col2")) 84 | 1 0 :sticky "we" :padx 5 :pady 5))) 85 | (loop for row in '("aaa") 86 | do (treeview-insert-item c.tree 87 | ;; text of the first column: 88 | :text row 89 | ;; text of the other columns: 90 | :column-values (list "two" "three"))) 91 | (grid (make-instance 'button 92 | :text "foo" 93 | :command (lambda () 94 | (format t "the treeview selection is: ~a~&" 95 | (treeview-get-selection c.tree)) 96 | (format t "text is: ~a~&" (text c.searchbox)))) 97 | 2 0 :sticky "w" :padx 5 :pady 5))))) 98 | 99 | (defpackage nodgui-examples 100 | (:use :cl 101 | :nodgui)) 102 | 103 | (in-package :nodgui-examples) 104 | 105 | (defun example-treeview-with-columns-simplest () 106 | (with-nodgui () 107 | (let ((tree (make-instance 'scrolled-treeview 108 | :columns (list "col2")))) 109 | ;; the configuration to set the title of the firts column: 110 | (treeview-heading tree 111 | +treeview-first-column-id+ 112 | :text "col1") 113 | ;; place our widget, or we won't see it. 114 | (grid tree 1 0) 115 | (loop for data in '("aaa" "bbb" "ccc") 116 | do (treeview-insert-item tree 117 | :text data 118 | :column-values (list "val2")))))) 119 | 120 | (defun example-treeview-search-display () 121 | "A searchbox, a button, and display results in the treeview. 122 | We did it in nodgui: for the examples at hand, and the author's support." 123 | (with-nodgui () 124 | ;; Windows' title. 125 | (wm-title *tk* "My GUI") 126 | (let* ((tree (make-instance 'scrolled-treeview 127 | ;; These are the second and third columns. 128 | :columns (list "col2" 129 | "col3"))) 130 | (searchbox (grid (make-instance 'entry :width 7) 131 | 0 0 :sticky "we" :padx 5 :pady 5)) 132 | (button 133 | (make-instance 134 | 'button 135 | :text "OK" 136 | :command (lambda () 137 | (format t "the treeview selection is: ~a~&" 138 | (treeview-get-selection tree)) 139 | (format t "text is: ~a~&" (text searchbox)) 140 | (insert-results tree 141 | (list "hey" 142 | "that's cool" 143 | (format nil "you searched: ~a" (text searchbox)))))))) 144 | 145 | ;; Name the first column: 146 | (treeview-heading tree +treeview-first-column-id+ :text "col1") 147 | ;; For resizing to do something: weight > 0 148 | (grid-columnconfigure *tk* 0 :weight 1) 149 | (grid searchbox 0 0 150 | ;; it goes below the button :S 151 | :columnspan 2) 152 | (grid button 0 1 153 | ;; stick to the right (east). 154 | :sticky "e") 155 | (grid tree 1 0 156 | ;; so the button doesn't have a column by itself. 157 | :columnspan 2 158 | ;; sticky by all sides, for resizing to do something. 159 | :sticky "nsew")))) 160 | 161 | (defun insert-results (tree results) 162 | "Insert results into that treeview. Clear contents beforehand." 163 | ;; Clear content. 164 | ;; this needs nodgui newer than feb, 24th 2019 165 | ;; with commit c9ae0ec389. 166 | (treeview-delete-all tree) 167 | (loop for result in results 168 | do (treeview-insert-item tree 169 | :text result 170 | :column-values (list (format nil "length: ~a" (length result)) 171 | (format nil "first letter: ~a" (aref result 0)))))) 172 | -------------------------------------------------------------------------------- /musicplayer-nodgui.lisp: -------------------------------------------------------------------------------- 1 | ;; #!/usr/bin/env ciel 2 | 3 | ;; Same as musicplayer.lisp, for Ltk, here with nodgui. 4 | ;; Goal: use other Tk themes \o/ 5 | ;; 6 | ;; Differences: 7 | ;; - in show-songname and listen, the index is given inside a nested list: ((0)) 8 | ;; instead of (0) in Ltk. We use CAAR instead of FIRST. 9 | ;; - use with-nodgui instead of WITH-LTK, and that's it. 10 | 11 | ;; from https://peterlane.codeberg.page/ltk-examples/#_basic_widgets 12 | ;; 13 | ;; Simple dumb player: 14 | ;; - show list of files 15 | ;; - "listen" button. 16 | ;; 17 | ;; The goal is to display a list of something and make something with it. 18 | ;; 19 | ;; The original example is a list of countries. 20 | ;; 21 | ;; Depends-on: 22 | ;; FOF (file-object finder) 23 | 24 | (uiop:define-package :ltk-tests 25 | (:shadow :listen) 26 | (:use :cl 27 | ;; :ltk)) 28 | :nodgui)) 29 | 30 | (in-package :ltk-tests) 31 | 32 | 33 | ;; unused 34 | (defparameter *players* '("mpv" 35 | "vlc" 36 | "smplayer" 37 | "clementine")) 38 | 39 | (defparameter *data* nil 40 | "internal cache. List of strings.") 41 | 42 | ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 43 | ;; Find some files. 44 | ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 45 | 46 | (defun find-music (directory search) 47 | "Search recursively on this directory for files whose basename contain \"search\". 48 | 49 | Return: list of FOF file objects. Use fof:basename or fof:path to get strings." 50 | (let ((str:*ignore-case* t)) 51 | ;; XXX: still a pending MR. 52 | (fof:finder* :root directory :predicates (fof/p:every-path~ search)))) 53 | ;; (fof:finder* :root directory :predicates (fof/p:path~ search)))) 54 | #+(or) 55 | (fof:finder* :root "~/zique/" :predicates (fof/p:every-path~ "Forr" "mp3")) 56 | 57 | (defun get-player-name (obj) 58 | "The value is upper cased when set with Ltk. Return the lowercase value. 59 | 60 | Ex: \"VLC\" (would not work) => \"vlc\"." 61 | (string-downcase (string obj))) 62 | 63 | ;; External command: read this file with a media player. 64 | (defun listen (index player notification-label) 65 | (when (= 1 (length index)) 66 | (let* ((idx (caar index)) ;; Ltk: first 67 | (player (get-player-name player)) 68 | (item (nth idx *data*))) 69 | 70 | (setf (text notification-label) 71 | (format nil "Listening to ~a with ~a…" (fof:path item) player)) 72 | 73 | ;; Run async: 74 | (uiop:launch-program (list player (fof:path item)))))) 75 | 76 | (defun normalize-item (item) 77 | "In our case: FOF file object -> file name (sans full path)." 78 | (fof:basename item)) 79 | 80 | (defun show-songname (index status-label) 81 | "Updates status label (window bottom)" 82 | ;; nice status at the window bottom. 83 | (when (= 1 (length index)) 84 | (let* ((idx (caar index)) ;; in Ltk: "first" is enough. nodgui: caar. 85 | ;; (code (nth idx *country-codes*)) 86 | (file (nth idx *data*))) 87 | (setf (text status-label) 88 | (format nil "Song: ~s" (normalize-item file))))) 89 | ) 90 | 91 | ;; Adapted from nodgui.lisp 92 | (defun theme-directory (theme) 93 | "I cloned ttkthemes to this project's root. Some themes are under png/ other under themes/ 94 | The gif/ ones are not yet supported by nodgui 95 | https://notabug.org/cage/nodgui/issues/13" 96 | (cond 97 | 98 | ;; Forest 99 | ;; the light one is good. 100 | ;; https://github.com/rdbende/Forest-ttk-theme 101 | ((str:starts-with-p "forest-dark" theme) 102 | (error "forest-dark is not supported")) 103 | ((str:starts-with-p "forest-light" theme) 104 | "Forest-ttk-theme/forest-light.tcl") 105 | 106 | ;; Sun-Valley 107 | ;; https://github.com/rdbende/Sun-Valley-ttk-theme 108 | ;; fails to load. 109 | ((str:starts-with-p "sv_" theme) 110 | (log:error "Sun-Valley themes do not work, it seems") 111 | (cond 112 | ((equal theme "sv_light") 113 | "Sun-Valley-ttk-theme/theme/light.tcl") 114 | ((equal theme "sv_dark") 115 | "Sun-Valley-ttk-theme/theme/dark.tcl") 116 | (t 117 | (error "we don't know such Sun-Valley theme. Available: sv_light, sv_dark")))) 118 | 119 | ;; Azure - NOT OK 120 | ;; https://github.com/rdbende/Azure-ttk-theme 121 | ;; doesn't render properly. 122 | ((str:starts-with-p "azure" theme) 123 | (cond 124 | ;; from ale_themes 125 | ((equal theme "azure") 126 | "ale_themes/azure/azure.tcl") 127 | ;; azure-ttk-themes 128 | ((equal theme "azure-light") 129 | "Azure-ttk-theme/theme/light.tcl") 130 | ((equal theme "azure-dark") 131 | "Azure-ttk-theme/theme/dark.tcl") 132 | (t 133 | (error "we don't know such Azure them.")))) 134 | 135 | ;; Ale themes 136 | ;; https://github.com/aplsimple/ale_themes/ 137 | ;; OK 138 | ((str:s-member (list "darkbrown" "lightbrown") theme) 139 | (cond 140 | ((equal theme "lightbrown") 141 | "ale_themes/lightbrown/lightbrown.tcl") 142 | ((equal theme "darkbrown") 143 | "ale_themes/darkbrown/darkbrown.tcl") 144 | (t 145 | (error "we don't know such Ale them.")))) 146 | 147 | ;; ttkthemes 148 | ;; Good ones. 149 | ((member theme (list "aquativo" ;; OK 150 | "black" ;; OK 151 | "blue" ;; OK 152 | "clearlooks" ;; OK 153 | "elegance" ;; OK but ugly 154 | "plastik" ;; OK 155 | "radiance" ;; OK 156 | ) 157 | :test #'equal) 158 | (format nil "ttkthemes/ttkthemes/themes/~a/~a.tcl" theme theme)) 159 | (t 160 | ;; other themes include: 161 | ;; adapta (renders OK) 162 | ;; arc (OK too!!) 163 | ;; breeze (renders OK) 164 | ;; equilux (renders !) 165 | ;; scid (BUGS) 166 | ;; ubuntu (renders !) 167 | ;; yaru (renders OK) 168 | ;; 169 | ;; in png/ directory. 170 | (format nil "ttkthemes/ttkthemes/png/~a/~a.tcl" theme theme)))) 171 | 172 | 173 | ;; GUI: 174 | (defun musicplayer (&optional (data *data* data-p) &key (theme "yaru")) 175 | (when data-p 176 | (setf *data* data)) 177 | (with-nodgui () 178 | 179 | ;; (ltk::use-theme "clam") 180 | 181 | ;; (eval-tcl-file "ttkthemes/ttkthemes/png/yaru/yaru.tcl") 182 | ;; (use-theme "yaru") 183 | 184 | (log:info (theme-directory theme)) 185 | (eval-tcl-file (theme-directory theme)) 186 | (use-theme theme) 187 | 188 | ;; (eval-tcl-file "Forest-ttk-theme/forest-light.tcl") 189 | ;; (use-theme "forest-dark") 190 | 191 | (wm-title *tk* (format nil "Listbox Example: media player. Theme: ~a" theme)) 192 | 193 | ;; create the outer content frame and other widgets 194 | (let* ((content (make-instance 'frame)) 195 | (data-listbox (make-instance 'scrolled-listbox :master content)) 196 | (player-1 (make-instance 'radio-button :master content 197 | :text "vlc" 198 | :value "vlc" :variable "player")) 199 | (player-2 (make-instance 'radio-button :master content 200 | :text "mpv" 201 | :value "mpv" :variable "player")) 202 | (status-label (make-instance 'label :master content :text "" :anchor "w")) 203 | (listen-btn (make-instance 'button 204 | :master content :text "Listen" 205 | :command (lambda () 206 | (listen (listbox-get-selection data-listbox) 207 | (value player-1) 208 | status-label)) 209 | :default :active))) 210 | 211 | ;; grid the outer content frame 212 | (configure content :padding "5 5 12 0") 213 | (grid content 0 0 :sticky "nwes") 214 | (grid-columnconfigure *tk* 0 :weight 1) 215 | (grid-rowconfigure *tk* 0 :weight 1) 216 | (grid-columnconfigure content 0 :weight 1) 217 | (grid-rowconfigure content 5 :weight 1) 218 | 219 | ;; grid the other widgets 220 | (listbox-append data-listbox data) 221 | (grid data-listbox 0 0 :rowspan 6 :sticky "nsew") 222 | (grid player-1 1 1 :sticky "w" :padx 20) 223 | (grid player-2 2 1 :sticky "w" :padx 20) 224 | 225 | (grid listen-btn 5 2 :sticky "se") 226 | (grid status-label 6 0 :columnspan 2 :sticky "we") 227 | 228 | ;; Set event bindings for when the selection in the listbox changes, 229 | ;; when the user double clicks the list, and when they hit the Return key 230 | (bind (listbox data-listbox) "<>" 231 | #'(lambda (evt) 232 | (declare (ignorable evt)) 233 | (show-songname (listbox-get-selection data-listbox) 234 | status-label))) 235 | (bind (listbox data-listbox) "" 236 | #'(lambda (evt) 237 | (declare (ignorable evt)) 238 | (listen (listbox-get-selection data-listbox) 239 | (value player-1) 240 | (value player-1)))) 241 | (bind *tk* "" 242 | #'(lambda (evt) 243 | (declare (ignorable evt)) 244 | (listen (listbox-get-selection data-listbox) 245 | (value player-1) 246 | (value player-1)))) 247 | 248 | (setf (value player-1) "vlc") ;; gives us upper case. 249 | (listbox-select data-listbox 0) 250 | (show-songname (listbox-get-selection data-listbox) status-label) 251 | ;; alternate colours in listbox 252 | (dotimes (i (length data)) 253 | (when (evenp i) 254 | (listbox-configure (listbox data-listbox) i :background "#f0f0ff"))))) 255 | ) 256 | 257 | #+(or) 258 | (musicplayer (find-music "~/music/" "mp3")) 259 | 260 | #+(or) 261 | (musicplayer (find-music "~/zique/" "forr")) 262 | 263 | #+ciel 264 | (musicplayer (find-music "~/zique/" (second ciel-user:*script-args*))) 265 | -------------------------------------------------------------------------------- /ttkthemes/ttkthemes/png/yaru/yaru.tcl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 rdbende 2 | # Copyright (c) 2020 RedFantom 3 | # Derived from Ubuntu Yaru theme, Copyright (c) 2018-2020 The Yaru theme authors 4 | # See for a list of authors for the Yaru theme 5 | 6 | package require Tk 8.6 7 | 8 | namespace eval ttk::theme::yaru { 9 | 10 | variable version 1.2 11 | package provide ttk::theme::yaru $version 12 | variable colors 13 | array set colors { 14 | -fg "#3d3d3d" 15 | -bg "#f7f7f7" 16 | -disabledfg "#8b8e8f" 17 | -disabledbg "#f7f7f7" 18 | -selectfg "#f7f7f7" 19 | -selectbg "#e95420" 20 | } 21 | 22 | proc LoadImages {imgdir} { 23 | variable I 24 | foreach file [glob -directory $imgdir *.png] { 25 | set img [file tail [file rootname $file]] 26 | set I($img) [image create photo -file $file -format png] 27 | } 28 | } 29 | 30 | LoadImages [file join [file dirname [info script]] yaru] 31 | 32 | # Settings 33 | ttk::style theme create yaru -parent default -settings { 34 | ttk::style configure . \ 35 | -background $colors(-bg) \ 36 | -foreground $colors(-fg) \ 37 | -troughcolor $colors(-bg) \ 38 | -focuscolor $colors(-selectbg) \ 39 | -selectbackground $colors(-selectbg) \ 40 | -selectforeground $colors(-selectfg) \ 41 | -fieldbackground $colors(-selectbg) \ 42 | -font TkDefaultFont \ 43 | -borderwidth 1 \ 44 | -relief flat 45 | 46 | ttk::style map . -foreground [list disabled $colors(-disabledfg)] 47 | 48 | tk_setPalette background [ttk::style lookup . -background] \ 49 | foreground [ttk::style lookup . -foreground] \ 50 | highlightColor [ttk::style lookup . -focuscolor] \ 51 | selectBackground [ttk::style lookup . -selectbackground] \ 52 | selectForeground [ttk::style lookup . -selectforeground] \ 53 | activeBackground [ttk::style lookup . -selectbackground] \ 54 | activeForeground [ttk::style lookup . -selectforeground] 55 | option add *font [ttk::style lookup . -font] 56 | 57 | 58 | # Layouts 59 | ttk::style layout TButton { 60 | Button.button -children { 61 | Button.padding -children { 62 | Button.label -side left -expand true 63 | } 64 | } 65 | } 66 | 67 | ttk::style layout Toolbutton { 68 | Toolbutton.button -children { 69 | Toolbutton.padding -children { 70 | Toolbutton.label -side left -expand true 71 | } 72 | } 73 | } 74 | 75 | ttk::style layout TMenubutton { 76 | Menubutton.button -children { 77 | Menubutton.padding -children { 78 | Menubutton.indicator -side right 79 | Menubutton.label -side right -expand true 80 | } 81 | } 82 | } 83 | 84 | ttk::style layout TOptionMenu { 85 | OptionMenu.button -children { 86 | OptionMenu.padding -children { 87 | OptionMenu.indicator -side right 88 | OptionMenu.label -side right -expand true 89 | } 90 | } 91 | } 92 | 93 | ttk::style layout TCheckbutton { 94 | Checkbutton.button -children { 95 | Checkbutton.padding -children { 96 | Checkbutton.indicator -side left 97 | Checkbutton.label -side right -expand true 98 | } 99 | } 100 | } 101 | 102 | ttk::style layout TRadiobutton { 103 | Radiobutton.button -children { 104 | Radiobutton.padding -children { 105 | Radiobutton.indicator -side left 106 | Radiobutton.label -side right -expand true 107 | } 108 | } 109 | } 110 | 111 | ttk::style layout Vertical.TScrollbar { 112 | Vertical.Scrollbar.trough -sticky ns -children { 113 | Vertical.Scrollbar.thumb -expand true 114 | } 115 | } 116 | 117 | ttk::style layout Horizontal.TScrollbar { 118 | Horizontal.Scrollbar.trough -sticky ew -children { 119 | Horizontal.Scrollbar.thumb -expand true 120 | } 121 | } 122 | 123 | ttk::style layout TCombobox { 124 | Combobox.field -children { 125 | Combobox.downarrow -side right -sticky {} 126 | Combobox.padding -expand 1 -children { 127 | Combobox.textarea 128 | } 129 | } 130 | } 131 | 132 | ttk::style layout TSpinbox { 133 | Spinbox.field -children { 134 | null -side right -children { 135 | Spinbox.uparrow -side top -sticky e 136 | Spinbox.downarrow -side bottom -sticky s 137 | } 138 | Spinbox.padding -expand 0 -children { 139 | Spinbox.textarea 140 | } 141 | } 142 | } 143 | 144 | ttk::style layout Horizontal.TSeparator { 145 | Horizontal.separator -sticky nswe 146 | } 147 | 148 | ttk::style layout Vertical.TSeparator { 149 | Vertical.separator -sticky nswe 150 | } 151 | 152 | ttk::style layout TLabelframe { 153 | Labelframe.border { 154 | Labelframe.padding -expand 1 -children { 155 | Labelframe.label -side right 156 | } 157 | } 158 | } 159 | 160 | ttk::style layout TNotebook.Tab { 161 | Notebook.tab -children { 162 | Notebook.padding -side top -children { 163 | Notebook.label -side top -sticky {} 164 | } 165 | } 166 | } 167 | 168 | ttk::style layout Treeview.Item { 169 | Treeitem.padding -sticky nswe -children { 170 | Treeitem.indicator -side left -sticky {} 171 | Treeitem.image -side left -sticky {} 172 | Treeitem.text -side left -sticky {} 173 | } 174 | } 175 | 176 | # Button 177 | ttk::style configure TButton -padding 4 -width 10 -anchor center 178 | 179 | ttk::style element create Button.button \ 180 | image [list $I(button-basic) \ 181 | disabled $I(button-disabled) \ 182 | pressed $I(button-pressed) \ 183 | active $I(button-basic) \ 184 | ] -border 4 -sticky news 185 | 186 | # Toolbutton 187 | ttk::style configure Toolbutton -padding 4 -width 10 -anchor center 188 | 189 | ttk::style element create Toolbutton.button \ 190 | image [list $I(empty) \ 191 | disabled $I(empty) \ 192 | pressed $I(button-pressed) \ 193 | active $I(button-pressed) \ 194 | ] -border 4 -sticky news 195 | 196 | # Menubutton 197 | ttk::style configure TMenubutton -padding 4 198 | 199 | ttk::style element create Menubutton.button \ 200 | image [list $I(button-basic) \ 201 | disabled $I(button-disabled) \ 202 | pressed $I(button-pressed) \ 203 | active $I(button-basic) \ 204 | ] -border 4 -sticky news 205 | 206 | ttk::style element create Menubutton.indicator image $I(arrow-down-basic) -width 25 -sticky e 207 | 208 | # OptionMenu 209 | ttk::style configure TOptionMenu -padding 4 210 | 211 | ttk::style element create OptionMenu.button \ 212 | image [list $I(button-basic) \ 213 | disabled $I(button-disabled) \ 214 | pressed $I(button-pressed) \ 215 | active $I(button-basic) \ 216 | ] -border 4 -sticky news 217 | 218 | ttk::style element create OptionMenu.indicator image $I(arrow-down-basic) -width 25 -sticky e 219 | 220 | # Checkbutton 221 | ttk::style configure TCheckbutton -padding 4 222 | 223 | ttk::style element create Checkbutton.indicator \ 224 | image [list $I(checkbox-basic) \ 225 | disabled $I(checkbox-basic) \ 226 | {selected disabled} $I(checkbox-selected-dis) \ 227 | {pressed selected} $I(checkbox-selected) \ 228 | {active selected} $I(checkbox-selected) \ 229 | selected $I(checkbox-selected) \ 230 | {pressed !selected} $I(checkbox-basic) \ 231 | active $I(checkbox-basic) \ 232 | ] -width 20 -sticky w 233 | 234 | # Radiobutton 235 | ttk::style configure TRadiobutton -padding 4 236 | 237 | ttk::style element create Radiobutton.indicator \ 238 | image [list $I(radio-basic) \ 239 | disabled $I(radio-basic) \ 240 | {selected disabled} $I(radio-selected-dis) \ 241 | {pressed selected} $I(radio-selected) \ 242 | {active selected} $I(radio-selected) \ 243 | selected $I(radio-selected) \ 244 | {pressed !selected} $I(radio-basic) \ 245 | active $I(radio-basic) \ 246 | ] -width 20 -sticky w 247 | 248 | # Scrollbar 249 | ttk::style element create Horizontal.Scrollbar.trough image $I(scrollbar-hor-trough) \ 250 | -border 2 -sticky ew 251 | 252 | ttk::style element create Horizontal.Scrollbar.thumb \ 253 | image [list $I(scrollbar-hor-gray) \ 254 | disabled $I(scrollbar-hor-gray) \ 255 | pressed $I(scrollbar-hor-orange) \ 256 | active $I(scrollbar-hor-orange) \ 257 | ] -border 1 -sticky ew 258 | 259 | ttk::style element create Vertical.Scrollbar.trough image $I(scrollbar-vert-trough) \ 260 | -border 2 -sticky ns 261 | 262 | ttk::style element create Vertical.Scrollbar.thumb \ 263 | image [list $I(scrollbar-vert-gray) \ 264 | disabled $I(scrollbar-vert-gray) \ 265 | pressed $I(scrollbar-vert-orange) \ 266 | active $I(scrollbar-vert-orange) \ 267 | ] -border 1 -sticky ns 268 | 269 | # Scale 270 | ttk::style element create Horizontal.Scale.trough \ 271 | image [ list $I(scale-trough) \ 272 | disabled $I(scale-trough-disabled) 273 | ] -border 9 -padding 0 274 | 275 | ttk::style element create Horizontal.Scale.slider \ 276 | image [list $I(scale-slider) \ 277 | disabled $I(scale-slider) \ 278 | pressed $I(scale-slider-hover) \ 279 | active $I(scale-slider-hover) \ 280 | ] -sticky news 281 | 282 | ttk::style element create Vertical.Scale.trough \ 283 | image [ list $I(scale-trough) \ 284 | disabled $I(scale-trough-disabled) 285 | ] -border 9 -padding 0 286 | 287 | ttk::style element create Vertical.Scale.slider \ 288 | image [list $I(scale-slider) \ 289 | disabled $I(scale-slider) \ 290 | pressed $I(scale-slider-hover) \ 291 | active $I(scale-slider-hover) \ 292 | ] -sticky news 293 | 294 | # Progressbar 295 | ttk::style element create Horizontal.Progressbar.trough image $I(progressbar-trough-hor) \ 296 | -border 2 -sticky ew 297 | 298 | ttk::style element create Horizontal.Progressbar.pbar image $I(progressbar-hor) \ 299 | -border 2 -sticky ew 300 | 301 | ttk::style element create Vertical.Progressbar.trough image $I(progressbar-trough-hor) \ 302 | -border 2 -sticky ns 303 | 304 | ttk::style element create Vertical.Progressbar.pbar image $I(progressbar-hor) \ 305 | -border 2 -sticky ns 306 | 307 | # Entry 308 | ttk::style element create Entry.field \ 309 | image [list $I(entry-basic) \ 310 | {focus hover} $I(entry-focus) \ 311 | invalid $I(entry-focus) \ 312 | disabled $I(entry-disabled) \ 313 | focus $I(entry-focus) \ 314 | hover $I(entry-basic) \ 315 | ] -border 4 -padding 8 -sticky news 316 | 317 | # Combobox 318 | ttk::style map TCombobox -selectbackground [list \ 319 | {!focus} $colors(-selectbg) \ 320 | {readonly hover} $colors(-selectbg) \ 321 | {readonly focus} $colors(-selectbg)] 322 | 323 | ttk::style map TCombobox -selectforeground [list \ 324 | {!focus} $colors(-selectfg) \ 325 | {readonly hover} $colors(-selectfg) \ 326 | {readonly focus} $colors(-selectfg)] 327 | 328 | ttk::style element create Combobox.field \ 329 | image [list $I(entry-basic) \ 330 | {readonly disabled} $I(button-disabled) \ 331 | {readonly pressed} $I(button-pressed) \ 332 | {readonly focus hover} $I(button-basic) \ 333 | {readonly focus} $I(button-basic) \ 334 | {readonly hover} $I(button-basic) \ 335 | {focus hover} $I(entry-focus) \ 336 | readonly $I(button-basic) \ 337 | disabled $I(entry-disabled) \ 338 | focus $I(entry-focus) \ 339 | hover $I(entry-basic) \ 340 | ] -border 4 -padding 8 341 | 342 | ttk::style element create Combobox.downarrow image $I(arrow-down-basic) \ 343 | -width 25 -sticky e 344 | 345 | # Spinbox 346 | ttk::style element create Spinbox.field \ 347 | image [list $I(entry-basic) \ 348 | disabled $I(entry-disabled) \ 349 | focus $I(entry-focus) \ 350 | hover $I(entry-basic) \ 351 | ] -border 4 -padding 8 -sticky news 352 | 353 | ttk::style element create Spinbox.uparrow \ 354 | image [list $I(arrow-up-basic) \ 355 | disabled $I(arrow-up-hover) \ 356 | pressed $I(arrow-up-hover) \ 357 | active $I(arrow-up-hover) \ 358 | ] -width 15 -sticky e 359 | 360 | ttk::style element create Spinbox.downarrow \ 361 | image [list $I(arrow-down-basic) \ 362 | disabled $I(arrow-down-hover) \ 363 | pressed $I(arrow-down-hover) \ 364 | active $I(arrow-down-hover) \ 365 | ] -width 15 -sticky e 366 | 367 | # Sizegrip 368 | ttk::style element create Sizegrip.sizegrip image $I(sizegrip) \ 369 | -sticky news 370 | 371 | # Separator 372 | ttk::style element create Horizontal.separator image $I(separator) 373 | 374 | ttk::style element create Vertical.separator image $I(separator) 375 | 376 | # Labelframe 377 | ttk::style element create Labelframe.border image $I(checkbox-basic) \ 378 | -border 4 -padding 4 -sticky news 379 | 380 | # Notebook 381 | ttk::style element create Notebook.client \ 382 | image $I(checkbox-basic) -border 4 383 | 384 | ttk::style element create Notebook.tab \ 385 | image [list $I(tab-basic) \ 386 | selected $I(tab-current) \ 387 | active $I(tab-hover) \ 388 | ] -border 6 -padding {14 10} -sticky news 389 | 390 | # Treeview 391 | ttk::style element create Treeview.field image $I(checkbox-basic) \ 392 | -border 4 393 | 394 | ttk::style element create Treeheading.cell \ 395 | image [list $I(tree-basic) \ 396 | pressed $I(tree-pressed) 397 | ] -border 10 -padding 4 -sticky news 398 | 399 | ttk::style element create Treeitem.indicator \ 400 | image [list $I(plus) \ 401 | user2 $I(empty) \ 402 | user1 $I(minus) \ 403 | ] -width 15 -sticky w 404 | 405 | ttk::style configure Treeview -background $colors(-bg) 406 | ttk::style configure Treeview.Item 407 | ttk::style map Treeview \ 408 | -background [list selected $colors(-selectbg)] \ 409 | -foreground [list selected $colors(-selectfg)] 410 | 411 | # Sashes 412 | ttk::style configure TPanedwindow \ 413 | -width 1 -padding 0 414 | ttk::style map TPanedwindow \ 415 | -background [list hover $colors(-bg)] 416 | } 417 | } 418 | -------------------------------------------------------------------------------- /Forest-ttk-theme/forest-light.tcl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 rdbende 2 | 3 | # The Forest theme is a beautiful and modern ttk theme inspired by Excel. 4 | 5 | package require Tk 8.6 6 | 7 | namespace eval ttk::theme::forest-light { 8 | 9 | variable version 1.0 10 | package provide ttk::theme::forest-light $version 11 | variable colors 12 | array set colors { 13 | -fg "#313131" 14 | -bg "#ffffff" 15 | -disabledfg "#595959" 16 | -disabledbg "#ffffff" 17 | -selectfg "#ffffff" 18 | -selectbg "#217346" 19 | } 20 | 21 | proc LoadImages {imgdir} { 22 | variable I 23 | foreach file [glob -directory $imgdir *.png] { 24 | set img [file tail [file rootname $file]] 25 | set I($img) [image create photo -file $file -format png] 26 | } 27 | } 28 | 29 | LoadImages [file join [file dirname [info script]] forest-light] 30 | 31 | # Settings 32 | ttk::style theme create forest-light -parent default -settings { 33 | ttk::style configure . \ 34 | -background $colors(-bg) \ 35 | -foreground $colors(-fg) \ 36 | -troughcolor $colors(-bg) \ 37 | -focuscolor $colors(-selectbg) \ 38 | -selectbackground $colors(-selectbg) \ 39 | -selectforeground $colors(-selectfg) \ 40 | -insertwidth 1 \ 41 | -insertcolor $colors(-fg) \ 42 | -fieldbackground $colors(-selectbg) \ 43 | -font {TkDefaultFont 10} \ 44 | -borderwidth 1 \ 45 | -relief flat 46 | 47 | ttk::style map . -foreground [list disabled $colors(-disabledfg)] 48 | 49 | tk_setPalette background [ttk::style lookup . -background] \ 50 | foreground [ttk::style lookup . -foreground] \ 51 | highlightColor [ttk::style lookup . -focuscolor] \ 52 | selectBackground [ttk::style lookup . -selectbackground] \ 53 | selectForeground [ttk::style lookup . -selectforeground] \ 54 | activeBackground [ttk::style lookup . -selectbackground] \ 55 | activeForeground [ttk::style lookup . -selectforeground] 56 | 57 | option add *font [ttk::style lookup . -font] 58 | 59 | 60 | # Layouts 61 | ttk::style layout TButton { 62 | Button.button -children { 63 | Button.padding -children { 64 | Button.label -side left -expand true 65 | } 66 | } 67 | } 68 | 69 | ttk::style layout Toolbutton { 70 | Toolbutton.button -children { 71 | Toolbutton.padding -children { 72 | Toolbutton.label -side left -expand true 73 | } 74 | } 75 | } 76 | 77 | ttk::style layout TMenubutton { 78 | Menubutton.button -children { 79 | Menubutton.padding -children { 80 | Menubutton.indicator -side right 81 | Menubutton.label -side right -expand true 82 | } 83 | } 84 | } 85 | 86 | ttk::style layout TOptionMenu { 87 | OptionMenu.button -children { 88 | OptionMenu.padding -children { 89 | OptionMenu.indicator -side right 90 | OptionMenu.label -side right -expand true 91 | } 92 | } 93 | } 94 | 95 | ttk::style layout Accent.TButton { 96 | AccentButton.button -children { 97 | AccentButton.padding -children { 98 | AccentButton.label -side left -expand true 99 | } 100 | } 101 | } 102 | 103 | ttk::style layout TCheckbutton { 104 | Checkbutton.button -children { 105 | Checkbutton.padding -children { 106 | Checkbutton.indicator -side left 107 | Checkbutton.label -side right -expand true 108 | } 109 | } 110 | } 111 | 112 | ttk::style layout Switch { 113 | Switch.button -children { 114 | Switch.padding -children { 115 | Switch.indicator -side left 116 | Switch.label -side right -expand true 117 | } 118 | } 119 | } 120 | 121 | ttk::style layout ToggleButton { 122 | ToggleButton.button -children { 123 | ToggleButton.padding -children { 124 | ToggleButton.label -side left -expand true 125 | } 126 | } 127 | } 128 | 129 | ttk::style layout TRadiobutton { 130 | Radiobutton.button -children { 131 | Radiobutton.padding -children { 132 | Radiobutton.indicator -side left 133 | Radiobutton.label -side right -expand true 134 | } 135 | } 136 | } 137 | 138 | ttk::style layout Vertical.TScrollbar { 139 | Vertical.Scrollbar.trough -sticky ns -children { 140 | Vertical.Scrollbar.thumb -expand true 141 | } 142 | } 143 | 144 | ttk::style layout Horizontal.TScrollbar { 145 | Horizontal.Scrollbar.trough -sticky ew -children { 146 | Horizontal.Scrollbar.thumb -expand true 147 | } 148 | } 149 | 150 | ttk::style layout TCombobox { 151 | Combobox.field -sticky nswe -children { 152 | Combobox.padding -expand true -sticky nswe -children { 153 | Combobox.textarea -sticky nswe 154 | } 155 | } 156 | Combobox.button -side right -sticky ns -children { 157 | Combobox.arrow -sticky nsew 158 | } 159 | } 160 | 161 | ttk::style layout TSpinbox { 162 | Spinbox.field -sticky nsew -children { 163 | Spinbox.padding -expand true -sticky nswe -children { 164 | Spinbox.textarea -sticky nsew 165 | } 166 | 167 | } 168 | null -side right -sticky nsew -children { 169 | Spinbox.uparrow -side right -sticky nsew -children { 170 | Spinbox.symuparrow 171 | } 172 | Spinbox.downarrow -side left -sticky nsew -children { 173 | Spinbox.symdownarrow 174 | } 175 | } 176 | } 177 | 178 | ttk::style layout Horizontal.TSeparator { 179 | Horizontal.separator -sticky nswe 180 | } 181 | 182 | ttk::style layout Vertical.TSeparator { 183 | Vertical.separator -sticky nswe 184 | } 185 | 186 | ttk::style layout Card { 187 | Card.field { 188 | Card.padding -expand 1 189 | } 190 | } 191 | 192 | ttk::style layout TLabelframe { 193 | Labelframe.border { 194 | Labelframe.padding -expand 1 -children { 195 | Labelframe.label -side left 196 | } 197 | } 198 | } 199 | 200 | ttk::style layout TNotebook { 201 | Notebook.border -children { 202 | TNotebook.Tab -expand 1 -side top 203 | Notebook.client -sticky nsew 204 | } 205 | } 206 | 207 | ttk::style layout TNotebook.Tab { 208 | Notebook.tab -children { 209 | Notebook.padding -side top -children { 210 | Notebook.label 211 | } 212 | } 213 | } 214 | 215 | ttk::style layout Treeview.Item { 216 | Treeitem.padding -sticky nswe -children { 217 | Treeitem.indicator -side left -sticky {} 218 | Treeitem.image -side left -sticky {} 219 | Treeitem.text -side left -sticky {} 220 | } 221 | } 222 | 223 | 224 | # Elements 225 | 226 | # Button 227 | ttk::style configure TButton -padding {8 4 8 4} -width -10 -anchor center 228 | 229 | ttk::style element create Button.button image \ 230 | [list $I(rect-basic) \ 231 | {selected disabled} $I(rect-basic) \ 232 | disabled $I(rect-basic) \ 233 | selected $I(rect-basic) \ 234 | pressed $I(rect-basic) \ 235 | active $I(rect-hover) \ 236 | ] -border 4 -sticky nsew 237 | 238 | # Toolbutton 239 | ttk::style configure Toolbutton -padding {8 4 8 4} -width -10 -anchor center 240 | 241 | ttk::style element create Toolbutton.button image \ 242 | [list $I(empty) \ 243 | {selected disabled} $I(empty) \ 244 | disabled $I(empty) \ 245 | selected $I(rect-basic) \ 246 | pressed $I(rect-basic) \ 247 | active $I(rect-basic) \ 248 | ] -border 4 -sticky nsew 249 | 250 | # Menubutton 251 | ttk::style configure TMenubutton -padding {8 4 4 4} 252 | 253 | ttk::style element create Menubutton.button image \ 254 | [list $I(rect-basic) \ 255 | disabled $I(rect-basic) \ 256 | pressed $I(rect-basic) \ 257 | active $I(rect-hover) \ 258 | ] -border 4 -sticky nsew 259 | 260 | ttk::style element create Menubutton.indicator image \ 261 | [list $I(down) \ 262 | active $I(down) \ 263 | pressed $I(down) \ 264 | disabled $I(down) \ 265 | ] -width 15 -sticky e 266 | 267 | # OptionMenu 268 | ttk::style configure TOptionMenu -padding {8 4 4 4} 269 | 270 | ttk::style element create OptionMenu.button image \ 271 | [list $I(rect-basic) \ 272 | disabled $I(rect-basic) \ 273 | pressed $I(rect-basic) \ 274 | active $I(rect-hover) \ 275 | ] -border 4 -sticky nsew 276 | 277 | ttk::style element create OptionMenu.indicator image \ 278 | [list $I(down) \ 279 | active $I(down) \ 280 | pressed $I(down) \ 281 | disabled $I(down) \ 282 | ] -width 15 -sticky e 283 | 284 | # AccentButton 285 | ttk::style configure Accent.TButton -padding {8 4 8 4} -width -10 -anchor center -foreground #eeeeee 286 | 287 | ttk::style element create AccentButton.button image \ 288 | [list $I(rect-accent) \ 289 | {selected disabled} $I(rect-accent-hover) \ 290 | disabled $I(rect-accent-hover) \ 291 | selected $I(rect-accent) \ 292 | pressed $I(rect-accent) \ 293 | active $I(rect-accent-hover) \ 294 | ] -border 4 -sticky nsew 295 | 296 | # Checkbutton 297 | ttk::style configure TCheckbutton -padding 4 298 | 299 | ttk::style element create Checkbutton.indicator image \ 300 | [list $I(check-unsel-accent) \ 301 | {alternate disabled} $I(check-tri-basic) \ 302 | {selected disabled} $I(check-basic) \ 303 | disabled $I(check-unsel-basic) \ 304 | {pressed alternate} $I(check-tri-hover) \ 305 | {active alternate} $I(check-tri-hover) \ 306 | alternate $I(check-tri-accent) \ 307 | {pressed selected} $I(check-hover) \ 308 | {active selected} $I(check-hover) \ 309 | selected $I(check-accent) \ 310 | {pressed !selected} $I(check-unsel-pressed) \ 311 | active $I(check-unsel-hover) \ 312 | ] -width 26 -sticky w 313 | 314 | # Switch 315 | ttk::style element create Switch.indicator image \ 316 | [list $I(off-accent) \ 317 | {selected disabled} $I(on-basic) \ 318 | disabled $I(off-basic) \ 319 | {pressed selected} $I(on-accent) \ 320 | {active selected} $I(on-hover) \ 321 | selected $I(on-accent) \ 322 | {pressed !selected} $I(off-accent) \ 323 | active $I(off-hover) \ 324 | ] -width 46 -sticky w 325 | 326 | # ToggleButton 327 | ttk::style configure ToggleButton -padding {8 4 8 4} -width -10 -anchor center -foregound $colors(-fg) 328 | 329 | ttk::style map ToggleButton -foreground \ 330 | [list {pressed selected} $colors(-fg) \ 331 | {pressed !selected} #ffffff \ 332 | selected #ffffff] 333 | 334 | ttk::style element create ToggleButton.button image \ 335 | [list $I(rect-basic) \ 336 | {selected disabled} $I(rect-accent-hover) \ 337 | disabled $I(rect-basic) \ 338 | {pressed selected} $I(rect-basic) \ 339 | {active selected} $I(rect-accent-hover) \ 340 | selected $I(rect-accent) \ 341 | {pressed !selected} $I(rect-accent) \ 342 | active $I(rect-hover) \ 343 | ] -border 4 -sticky nsew 344 | 345 | # Radiobutton 346 | ttk::style configure TRadiobutton -padding 4 347 | 348 | ttk::style element create Radiobutton.indicator image \ 349 | [list $I(radio-unsel-accent) \ 350 | {alternate disabled} $I(radio-tri-basic) \ 351 | {selected disabled} $I(radio-basic) \ 352 | disabled $I(radio-unsel-basic) \ 353 | {pressed alternate} $I(radio-tri-hover) \ 354 | {active alternate} $I(radio-tri-hover) \ 355 | alternate $I(radio-tri-accent) \ 356 | {pressed selected} $I(radio-hover) \ 357 | {active selected} $I(radio-hover) \ 358 | selected $I(radio-accent) \ 359 | {pressed !selected} $I(radio-unsel-pressed) \ 360 | active $I(radio-unsel-hover) \ 361 | ] -width 26 -sticky w 362 | 363 | # Scrollbar 364 | ttk::style element create Horizontal.Scrollbar.trough image $I(hor-basic) \ 365 | -sticky ew 366 | 367 | ttk::style element create Horizontal.Scrollbar.thumb image \ 368 | [list $I(hor-accent) \ 369 | disabled $I(hor-basic) \ 370 | pressed $I(hor-hover) \ 371 | active $I(hor-hover) \ 372 | ] -sticky ew 373 | 374 | ttk::style element create Vertical.Scrollbar.trough image $I(vert-basic) \ 375 | -sticky ns 376 | 377 | ttk::style element create Vertical.Scrollbar.thumb image \ 378 | [list $I(vert-accent) \ 379 | disabled $I(vert-basic) \ 380 | pressed $I(vert-hover) \ 381 | active $I(vert-hover) \ 382 | ] -sticky ns 383 | 384 | # Scale 385 | ttk::style element create Horizontal.Scale.trough image $I(scale-hor) \ 386 | -border 5 -padding 0 387 | 388 | ttk::style element create Horizontal.Scale.slider image \ 389 | [list $I(thumb-hor-accent) \ 390 | disabled $I(thumb-hor-basic) \ 391 | pressed $I(thumb-hor-hover) \ 392 | active $I(thumb-hor-hover) \ 393 | ] -sticky {} 394 | 395 | ttk::style element create Vertical.Scale.trough image $I(scale-vert) \ 396 | -border 5 -padding 0 397 | 398 | ttk::style element create Vertical.Scale.slider image \ 399 | [list $I(thumb-vert-accent) \ 400 | disabled $I(thumb-vert-basic) \ 401 | pressed $I(thumb-vert-hover) \ 402 | active $I(thumb-vert-hover) \ 403 | ] -sticky {} 404 | 405 | # Progressbar 406 | ttk::style element create Horizontal.Progressbar.trough image $I(hor-basic) \ 407 | -sticky ew 408 | 409 | ttk::style element create Horizontal.Progressbar.pbar image $I(hor-accent) \ 410 | -sticky ew 411 | 412 | ttk::style element create Vertical.Progressbar.trough image $I(vert-basic) \ 413 | -sticky ns 414 | 415 | ttk::style element create Vertical.Progressbar.pbar image $I(vert-accent) \ 416 | -sticky ns 417 | 418 | # Entry 419 | ttk::style element create Entry.field image \ 420 | [list $I(border-basic) \ 421 | {focus hover} $I(border-accent) \ 422 | invalid $I(border-invalid) \ 423 | disabled $I(border-basic) \ 424 | focus $I(border-accent) \ 425 | hover $I(border-hover) \ 426 | ] -border 5 -padding {8} -sticky nsew 427 | 428 | # Combobox 429 | ttk::style map TCombobox -selectbackground [list \ 430 | {!focus} $colors(-selectbg) \ 431 | {readonly hover} $colors(-selectbg) \ 432 | {readonly focus} $colors(-selectbg) \ 433 | ] 434 | 435 | ttk::style map TCombobox -selectforeground [list \ 436 | {!focus} $colors(-selectfg) \ 437 | {readonly hover} $colors(-selectfg) \ 438 | {readonly focus} $colors(-selectfg) \ 439 | ] 440 | 441 | ttk::style element create Combobox.field image \ 442 | [list $I(border-basic) \ 443 | {readonly disabled} $I(rect-basic) \ 444 | {readonly pressed} $I(rect-basic) \ 445 | {readonly focus hover} $I(rect-hover) \ 446 | {readonly focus} $I(rect-hover) \ 447 | {readonly hover} $I(rect-hover) \ 448 | {focus hover} $I(border-accent) \ 449 | readonly $I(rect-basic) \ 450 | invalid $I(border-invalid) \ 451 | disabled $I(border-basic) \ 452 | focus $I(border-accent) \ 453 | hover $I(border-hover) \ 454 | ] -border 5 -padding {8 8 28 8} 455 | 456 | ttk::style element create Combobox.button image \ 457 | [list $I(combo-button-basic) \ 458 | {!readonly focus} $I(combo-button-focus) \ 459 | {readonly focus} $I(combo-button-hover) \ 460 | {readonly hover} $I(combo-button-hover) 461 | ] -border 5 -padding {2 6 6 6} 462 | 463 | ttk::style element create Combobox.arrow image $I(down) -width 15 -sticky e 464 | 465 | # Spinbox 466 | ttk::style element create Spinbox.field image \ 467 | [list $I(border-basic) \ 468 | invalid $I(border-invalid) \ 469 | disabled $I(border-basic) \ 470 | focus $I(border-accent) \ 471 | hover $I(border-hover) \ 472 | ] -border 5 -padding {8 8 54 8} -sticky nsew 473 | 474 | ttk::style element create Spinbox.uparrow image $I(spin-button-up) -border 4 -sticky nsew 475 | 476 | ttk::style element create Spinbox.downarrow image \ 477 | [list $I(spin-button-down-basic) \ 478 | focus $I(spin-button-down-focus) \ 479 | ] -border 4 -sticky nsew 480 | 481 | ttk::style element create Spinbox.symuparrow image $I(up) -width 15 -sticky {} 482 | ttk::style element create Spinbox.symdownarrow image $I(down) -width 17 -sticky {} 483 | 484 | # Sizegrip 485 | ttk::style element create Sizegrip.sizegrip image $I(sizegrip) \ 486 | -sticky nsew 487 | 488 | # Separator 489 | ttk::style element create Horizontal.separator image $I(separator) 490 | 491 | ttk::style element create Vertical.separator image $I(separator) 492 | 493 | # Card 494 | ttk::style element create Card.field image $I(card) \ 495 | -border 10 -padding 4 -sticky nsew 496 | 497 | # Labelframe 498 | ttk::style element create Labelframe.border image $I(card) \ 499 | -border 5 -padding 4 -sticky nsew 500 | 501 | # Notebook 502 | ttk::style configure TNotebook -padding 2 503 | 504 | ttk::style element create Notebook.border image $I(card) -border 5 505 | 506 | ttk::style element create Notebook.client image $I(notebook) -border 5 507 | 508 | ttk::style element create Notebook.tab image \ 509 | [list $I(tab-basic) \ 510 | selected $I(tab-accent) \ 511 | active $I(tab-hover) \ 512 | ] -border 5 -padding {14 4} 513 | 514 | # Treeview 515 | ttk::style element create Treeview.field image $I(card) \ 516 | -border 5 517 | 518 | ttk::style element create Treeheading.cell image \ 519 | [list $I(tree-basic) \ 520 | pressed $I(tree-pressed) 521 | ] -border 5 -padding 6 -sticky nsew 522 | 523 | ttk::style element create Treeitem.indicator image \ 524 | [list $I(right) \ 525 | user2 $I(empty) \ 526 | {user1 focus} $I(down-focus) \ 527 | focus $I(right-focus) \ 528 | user1 $I(down) \ 529 | ] -width 17 -sticky {} 530 | 531 | ttk::style configure Treeview -background $colors(-bg) 532 | ttk::style configure Treeview.Item -padding {2 0 0 0} 533 | 534 | ttk::style map Treeview \ 535 | -background [list selected $colors(-selectbg)] \ 536 | -foreground [list selected $colors(-selectfg)] 537 | 538 | # Sashes 539 | #ttk::style map TPanedwindow -background [list hover $colors(-bg)] 540 | } 541 | } 542 | --------------------------------------------------------------------------------