sun valley theme added as module

sun valley theme now added as pip module

added sv-ttk to setup.py

changes to code to load as module
This commit is contained in:
onyx-and-iris 2022-04-24 12:05:57 +01:00
parent abad689be4
commit c49d05e0f2
163 changed files with 18 additions and 1174 deletions

View File

@ -20,13 +20,11 @@ setuptools.setup(
package_data={ package_data={
"vmcompact": [ "vmcompact": [
"img/*", "img/*",
"sun-valley-theme/*",
"sun-valley-theme/theme/*",
"sun-valley-theme/theme/*/*",
], ],
}, },
install_requires=[ install_requires=[
"toml", "toml",
"sv-ttk",
"voicemeeter@git+https://github.com/onyx-and-iris/voicemeeter-api-python#egg=voicemeeter", "voicemeeter@git+https://github.com/onyx-and-iris/voicemeeter-api-python#egg=voicemeeter",
"vbancmd@git+https://github.com/onyx-and-iris/vban-cmd-python#egg=vbancmd", "vbancmd@git+https://github.com/onyx-and-iris/vban-cmd-python#egg=vbancmd",
], ],

View File

@ -2,6 +2,7 @@ import tkinter as tk
from tkinter import ttk from tkinter import ttk
from typing import NamedTuple from typing import NamedTuple
from pathlib import Path from pathlib import Path
import sv_ttk
from .errors import VMCompactErrors from .errors import VMCompactErrors
from .data import _base_vals, _kinds_all from .data import _base_vals, _kinds_all
@ -127,11 +128,7 @@ class App(tk.Tk):
def apply_theme(self): def apply_theme(self):
_base_vals.using_theme = True _base_vals.using_theme = True
self.tk.call( sv_ttk.set_theme(self.configuration["theme"]["mode"])
"source",
Path(__file__).parent.resolve() / "sun-valley-theme/sun-valley.tcl",
)
self.tk.call("set_theme", self.configuration["theme"]["mode"])
def _make_app(self, kind, vban=None): def _make_app(self, kind, vban=None):
self.title( self.title(

View File

@ -2,6 +2,7 @@ import tkinter as tk
from tkinter import ttk, messagebox from tkinter import ttk, messagebox
from functools import partial from functools import partial
import webbrowser import webbrowser
import sv_ttk
import vbancmd import vbancmd
@ -153,7 +154,7 @@ class Menus(tk.Menu):
[ [
self.menu_themes.add_command( self.menu_themes.add_command(
label=theme.capitalize(), label=theme.capitalize(),
command=partial(self.load_theme, theme), command=self.toggle_theme,
) )
for theme in tcl_themes for theme in tcl_themes
] ]
@ -236,26 +237,30 @@ class Menus(tk.Menu):
for j, var in enumerate(self._selected_bus): for j, var in enumerate(self._selected_bus):
var.set(True if i == j else False) var.set(True if i == j else False)
def load_theme(self, theme): def toggle_theme(self):
self.tk.call("set_theme", theme) sv_ttk.toggle_theme()
self.configuration_app["theme"]["mode"] = theme self.configuration_app["theme"]["mode"] = sv_ttk.get_theme()
self.menu_themes.entryconfig( self.menu_themes.entryconfig(
0, 0,
state=f"{'disabled' if theme == 'light' else 'normal'}", state=f"{'disabled' if sv_ttk.get_theme() == 'light' else 'normal'}",
) )
self.menu_themes.entryconfig( self.menu_themes.entryconfig(
1, 1,
state=f"{'disabled' if theme == 'dark' else 'normal'}", state=f"{'disabled' if sv_ttk.get_theme() == 'dark' else 'normal'}",
) )
[ [
menu.config(bg=f"{'black' if theme == 'dark' else 'white'}") menu.config(bg=f"{'black' if sv_ttk.get_theme() == 'dark' else 'white'}")
for menu in self.menubar.winfo_children() for menu in self.menubar.winfo_children()
if isinstance(menu, tk.Menu) if isinstance(menu, tk.Menu)
] ]
self.menu_lock.config(bg=f"{'black' if theme == 'dark' else 'white'}") self.menu_lock.config(
self.menu_profiles_load.config(bg=f"{'black' if theme == 'dark' else 'white'}") bg=f"{'black' if sv_ttk.get_theme() == 'dark' else 'white'}"
)
self.menu_profiles_load.config(
bg=f"{'black' if sv_ttk.get_theme() == 'dark' else 'white'}"
)
[ [
menu.config(bg=f"{'black' if theme == 'dark' else 'white'}") menu.config(bg=f"{'black' if sv_ttk.get_theme() == 'dark' else 'white'}")
for menu in self.menu_vban.winfo_children() for menu in self.menu_vban.winfo_children()
if isinstance(menu, tk.Menu) if isinstance(menu, tk.Menu)
] ]

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2021 rdbende
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,88 +0,0 @@
# Copyright © 2021 rdbende <rdbende@gmail.com>
source [file join [file dirname [info script]] theme light.tcl]
source [file join [file dirname [info script]] theme dark.tcl]
option add *tearOff 0
proc set_theme {mode} {
if {$mode == "dark"} {
ttk::style theme use "sun-valley-dark"
array set colors {
-fg "#ffffff"
-bg "#1c1c1c"
-disabledfg "#595959"
-selectfg "#ffffff"
-selectbg "#2f60d8"
}
ttk::style configure . \
-background $colors(-bg) \
-foreground $colors(-fg) \
-troughcolor $colors(-bg) \
-focuscolor $colors(-selectbg) \
-selectbackground $colors(-selectbg) \
-selectforeground $colors(-selectfg) \
-insertwidth 1 \
-insertcolor $colors(-fg) \
-fieldbackground $colors(-selectbg) \
-font {"Segoe UI" 10} \
-borderwidth 0 \
-relief flat
tk_setPalette \
background [ttk::style lookup . -background] \
foreground [ttk::style lookup . -foreground] \
highlightColor [ttk::style lookup . -focuscolor] \
selectBackground [ttk::style lookup . -selectbackground] \
selectForeground [ttk::style lookup . -selectforeground] \
activeBackground [ttk::style lookup . -selectbackground] \
activeForeground [ttk::style lookup . -selectforeground]
ttk::style map . -foreground [list disabled $colors(-disabledfg)]
option add *font [ttk::style lookup . -font]
option add *Menu.selectcolor $colors(-fg)
option add *Menu.background #2f2f2f
} elseif {$mode == "light"} {
ttk::style theme use "sun-valley-light"
array set colors {
-fg "#202020"
-bg "#fafafa"
-disabledfg "#a0a0a0"
-selectfg "#ffffff"
-selectbg "#2f60d8"
}
ttk::style configure . \
-background $colors(-bg) \
-foreground $colors(-fg) \
-troughcolor $colors(-bg) \
-focuscolor $colors(-selectbg) \
-selectbackground $colors(-selectbg) \
-selectforeground $colors(-selectfg) \
-insertwidth 1 \
-insertcolor $colors(-fg) \
-fieldbackground $colors(-selectbg) \
-font {"Segoe UI" 10} \
-borderwidth 0 \
-relief flat
tk_setPalette background [ttk::style lookup . -background] \
foreground [ttk::style lookup . -foreground] \
highlightColor [ttk::style lookup . -focuscolor] \
selectBackground [ttk::style lookup . -selectbackground] \
selectForeground [ttk::style lookup . -selectforeground] \
activeBackground [ttk::style lookup . -selectbackground] \
activeForeground [ttk::style lookup . -selectforeground]
ttk::style map . -foreground [list disabled $colors(-disabledfg)]
option add *font [ttk::style lookup . -font]
option add *Menu.selectcolor $colors(-fg)
option add *Menu.background #e7e7e7
}
}

View File

@ -1,521 +0,0 @@
# Copyright © 2021 rdbende <rdbende@gmail.com>
# A stunning dark theme for ttk based on Microsoft's Sun Valley visual style
package require Tk 8.6
namespace eval ttk::theme::sun-valley-dark {
variable version 1.0
package provide ttk::theme::sun-valley-dark $version
ttk::style theme create sun-valley-dark -parent clam -settings {
proc load_images {imgdir} {
variable images
foreach file [glob -directory $imgdir *.png] {
set images([file tail [file rootname $file]]) \
[image create photo -file $file -format png]
}
}
load_images [file join [file dirname [info script]] dark]
array set colors {
-fg "#ffffff"
-bg "#1c1c1c"
-disabledfg "#595959"
-selectfg "#ffffff"
-selectbg "#2f60d8"
}
ttk::style layout TButton {
Button.button -children {
Button.padding -children {
Button.label -side left -expand 1
}
}
}
ttk::style layout Toolbutton {
Toolbutton.button -children {
Toolbutton.padding -children {
Toolbutton.label -side left -expand 1
}
}
}
ttk::style layout TMenubutton {
Menubutton.button -children {
Menubutton.padding -children {
Menubutton.label -side left -expand 1
Menubutton.indicator -side right -sticky nsew
}
}
}
ttk::style layout TOptionMenu {
OptionMenu.button -children {
OptionMenu.padding -children {
OptionMenu.label -side left -expand 1
OptionMenu.indicator -side right -sticky nsew
}
}
}
ttk::style layout Accent.TButton {
AccentButton.button -children {
AccentButton.padding -children {
AccentButton.label -side left -expand 1
}
}
}
ttk::style layout Titlebar.TButton {
TitlebarButton.button -children {
TitlebarButton.padding -children {
TitlebarButton.label -side left -expand 1
}
}
}
ttk::style layout Close.Titlebar.TButton {
CloseButton.button -children {
CloseButton.padding -children {
CloseButton.label -side left -expand 1
}
}
}
ttk::style layout TCheckbutton {
Checkbutton.button -children {
Checkbutton.padding -children {
Checkbutton.indicator -side left
Checkbutton.label -side right -expand 1
}
}
}
ttk::style layout Switch.TCheckbutton {
Switch.button -children {
Switch.padding -children {
Switch.indicator -side left
Switch.label -side right -expand 1
}
}
}
ttk::style layout Toggle.TButton {
ToggleButton.button -children {
ToggleButton.padding -children {
ToggleButton.label -side left -expand 1
}
}
}
ttk::style layout TRadiobutton {
Radiobutton.button -children {
Radiobutton.padding -children {
Radiobutton.indicator -side left
Radiobutton.label -side right -expand 1
}
}
}
ttk::style layout Vertical.TScrollbar {
Vertical.Scrollbar.trough -sticky ns -children {
Vertical.Scrollbar.uparrow -side top
Vertical.Scrollbar.downarrow -side bottom
Vertical.Scrollbar.thumb -expand 1
}
}
ttk::style layout Horizontal.TScrollbar {
Horizontal.Scrollbar.trough -sticky ew -children {
Horizontal.Scrollbar.leftarrow -side left
Horizontal.Scrollbar.rightarrow -side right
Horizontal.Scrollbar.thumb -expand 1
}
}
ttk::style layout TSeparator {
TSeparator.separator -sticky nsew
}
ttk::style layout TCombobox {
Combobox.field -sticky nsew -children {
Combobox.padding -expand 1 -sticky nsew -children {
Combobox.textarea -sticky nsew
}
}
null -side right -sticky ns -children {
Combobox.arrow -sticky nsew
}
}
ttk::style layout TSpinbox {
Spinbox.field -sticky nsew -children {
Spinbox.padding -expand 1 -sticky nsew -children {
Spinbox.textarea -sticky nsew
}
}
null -side right -sticky nsew -children {
Spinbox.uparrow -side left -sticky nsew
Spinbox.downarrow -side right -sticky nsew
}
}
ttk::style layout Card.TFrame {
Card.field {
Card.padding -expand 1
}
}
ttk::style layout TLabelframe {
Labelframe.border {
Labelframe.padding -expand 1 -children {
Labelframe.label -side left
}
}
}
ttk::style layout TNotebook {
Notebook.border -children {
TNotebook.Tab -expand 1
Notebook.client -sticky nsew
}
}
ttk::style layout Treeview.Item {
Treeitem.padding -sticky nsew -children {
Treeitem.image -side left -sticky {}
Treeitem.indicator -side left -sticky {}
Treeitem.text -side left -sticky {}
}
}
# Button
ttk::style configure TButton -padding {8 4} -anchor center -foreground $colors(-fg)
ttk::style map TButton -foreground \
[list disabled #7a7a7a \
pressed #d0d0d0]
ttk::style element create Button.button image \
[list $images(button-rest) \
{selected disabled} $images(button-disabled) \
disabled $images(button-disabled) \
selected $images(button-rest) \
pressed $images(button-pressed) \
active $images(button-hover) \
] -border 4 -sticky nsew
# Toolbutton
ttk::style configure Toolbutton -padding {8 4} -anchor center
ttk::style element create Toolbutton.button image \
[list $images(empty) \
{selected disabled} $images(button-disabled) \
selected $images(button-rest) \
pressed $images(button-pressed) \
active $images(button-hover) \
] -border 4 -sticky nsew
# Menubutton
ttk::style configure TMenubutton -padding {8 4 0 4}
ttk::style element create Menubutton.button \
image [list $images(button-rest) \
disabled $images(button-disabled) \
pressed $images(button-pressed) \
active $images(button-hover) \
] -border 4 -sticky nsew
ttk::style element create Menubutton.indicator image $images(arrow-down) -width 28 -sticky {}
# OptionMenu
ttk::style configure TOptionMenu -padding {8 4 0 4}
ttk::style element create OptionMenu.button \
image [list $images(button-rest) \
disabled $images(button-disabled) \
pressed $images(button-pressed) \
active $images(button-hover) \
] -border 4 -sticky nsew
ttk::style element create OptionMenu.indicator image $images(arrow-down) -width 28 -sticky {}
# Accent.TButton
ttk::style configure Accent.TButton -padding {8 4} -anchor center -foreground #000000
ttk::style map Accent.TButton -foreground \
[list pressed #25536a \
disabled #a5a5a5]
ttk::style element create AccentButton.button image \
[list $images(button-accent-rest) \
{selected disabled} $images(button-accent-disabled) \
disabled $images(button-accent-disabled) \
selected $images(button-accent-rest) \
pressed $images(button-accent-pressed) \
active $images(button-accent-hover) \
] -border 4 -sticky nsew
# Titlebar.TButton
ttk::style configure Titlebar.TButton -padding {8 4} -anchor center -foreground #ffffff
ttk::style map Titlebar.TButton -foreground \
[list disabled #6f6f6f \
pressed #d1d1d1 \
active #ffffff]
ttk::style element create TitlebarButton.button image \
[list $images(empty) \
disabled $images(empty) \
pressed $images(button-titlebar-pressed) \
active $images(button-titlebar-hover) \
] -border 4 -sticky nsew
# Close.Titlebar.TButton
ttk::style configure Close.Titlebar.TButton -padding {8 4} -anchor center -foreground #ffffff
ttk::style map Close.Titlebar.TButton -foreground \
[list disabled #6f6f6f \
pressed #e8bfbb \
active #ffffff]
ttk::style element create CloseButton.button image \
[list $images(empty) \
disabled $images(empty) \
pressed $images(button-close-pressed) \
active $images(button-close-hover) \
] -border 4 -sticky nsew
# Checkbutton
ttk::style configure TCheckbutton -padding 4
ttk::style element create Checkbutton.indicator image \
[list $images(check-unsel-rest) \
{alternate disabled} $images(check-tri-disabled) \
{selected disabled} $images(check-disabled) \
disabled $images(check-unsel-disabled) \
{pressed alternate} $images(check-tri-hover) \
{active alternate} $images(check-tri-hover) \
alternate $images(check-tri-rest) \
{pressed selected} $images(check-hover) \
{active selected} $images(check-hover) \
selected $images(check-rest) \
{pressed !selected} $images(check-unsel-pressed) \
active $images(check-unsel-hover) \
] -width 26 -sticky w
# Switch.TCheckbutton
ttk::style element create Switch.indicator image \
[list $images(switch-off-rest) \
{selected disabled} $images(switch-on-disabled) \
disabled $images(switch-off-disabled) \
{pressed selected} $images(switch-on-pressed) \
{active selected} $images(switch-on-hover) \
selected $images(switch-on-rest) \
{pressed !selected} $images(switch-off-pressed) \
active $images(switch-off-hover) \
] -width 46 -sticky w
# Toggle.TButton
ttk::style configure Toggle.TButton -padding {8 4 8 4} -anchor center -foreground $colors(-fg)
ttk::style map Toggle.TButton -foreground \
[list {selected disabled} #a5a5a5 \
{selected pressed} #d0d0d0 \
selected #000000 \
pressed #25536a \
disabled #7a7a7a
]
ttk::style element create ToggleButton.button image \
[list $images(button-rest) \
{selected disabled} $images(button-accent-disabled) \
disabled $images(button-disabled) \
{pressed selected} $images(button-rest) \
{active selected} $images(button-accent-hover) \
selected $images(button-accent-rest) \
{pressed !selected} $images(button-accent-rest) \
active $images(button-hover) \
] -border 4 -sticky nsew
# Radiobutton
ttk::style configure TRadiobutton -padding 4
ttk::style element create Radiobutton.indicator image \
[list $images(radio-unsel-rest) \
{selected disabled} $images(radio-disabled) \
disabled $images(radio-unsel-disabled) \
{pressed selected} $images(radio-pressed) \
{active selected} $images(radio-hover) \
selected $images(radio-rest) \
{pressed !selected} $images(radio-unsel-pressed) \
active $images(radio-unsel-hover) \
] -width 26 -sticky w
# Scrollbar
ttk::style element create Horizontal.Scrollbar.trough image $images(scroll-hor-trough) -sticky ew -border 6
ttk::style element create Horizontal.Scrollbar.thumb image $images(scroll-hor-thumb) -sticky ew -border 3
ttk::style element create Horizontal.Scrollbar.rightarrow image $images(scroll-right) -sticky {} -width 12
ttk::style element create Horizontal.Scrollbar.leftarrow image $images(scroll-left) -sticky {} -width 12
ttk::style element create Vertical.Scrollbar.trough image $images(scroll-vert-trough) -sticky ns -border 6
ttk::style element create Vertical.Scrollbar.thumb image $images(scroll-vert-thumb) -sticky ns -border 3
ttk::style element create Vertical.Scrollbar.uparrow image $images(scroll-up) -sticky {} -height 12
ttk::style element create Vertical.Scrollbar.downarrow image $images(scroll-down) -sticky {} -height 12
# Scale
ttk::style element create Horizontal.Scale.trough image $images(scale-trough-hor) \
-border 5 -padding 0
ttk::style element create Vertical.Scale.trough image $images(scale-trough-vert) \
-border 5 -padding 0
ttk::style element create Scale.slider \
image [list $images(scale-thumb-rest) \
disabled $images(scale-thumb-disabled) \
pressed $images(scale-thumb-pressed) \
active $images(scale-thumb-hover) \
] -sticky {}
# Progressbar
ttk::style element create Horizontal.Progressbar.trough image $images(progress-trough-hor) \
-border 1 -sticky ew
ttk::style element create Horizontal.Progressbar.pbar image $images(progress-pbar-hor) \
-border 2 -sticky ew
ttk::style element create Vertical.Progressbar.trough image $images(progress-trough-vert) \
-border 1 -sticky ns
ttk::style element create Vertical.Progressbar.pbar image $images(progress-pbar-vert) \
-border 2 -sticky ns
# Entry
ttk::style configure TEntry -foreground $colors(-fg)
ttk::style map TEntry -foreground \
[list disabled #757575 \
pressed #cfcfcf
]
ttk::style element create Entry.field \
image [list $images(entry-rest) \
{focus hover !invalid} $images(entry-focus) \
invalid $images(entry-invalid) \
disabled $images(entry-disabled) \
{focus !invalid} $images(entry-focus) \
hover $images(entry-hover) \
] -border 5 -padding 8 -sticky nsew
# Combobox
ttk::style configure TCombobox -foreground $colors(-fg)
ttk::style map TCombobox -foreground \
[list disabled #757575 \
pressed #cfcfcf
]
ttk::style configure ComboboxPopdownFrame -borderwidth 1 -relief solid
ttk::style map TCombobox -selectbackground [list \
{readonly hover} $colors(-selectbg) \
{readonly focus} $colors(-selectbg) \
] -selectforeground [list \
{readonly hover} $colors(-selectfg) \
{readonly focus} $colors(-selectfg) \
]
ttk::style element create Combobox.field \
image [list $images(entry-rest) \
{readonly disabled} $images(button-disabled) \
{readonly pressed} $images(button-pressed) \
{readonly hover} $images(button-hover) \
readonly $images(button-rest) \
invalid $images(entry-invalid) \
disabled $images(entry-disabled) \
focus $images(entry-focus) \
hover $images(entry-hover) \
] -border 5 -padding {8 8 28 8}
ttk::style element create Combobox.arrow image $images(arrow-down) -width 35 -sticky {}
# Spinbox
ttk::style configure TSpinbox -foreground $colors(-fg)
ttk::style map TSpinbox -foreground \
[list disabled #757575 \
pressed #cfcfcf
]
ttk::style element create Spinbox.field \
image [list $images(entry-rest) \
invalid $images(entry-invalid) \
disabled $images(entry-disabled) \
focus $images(entry-focus) \
hover $images(entry-hover) \
] -border 5 -padding {8 8 54 8} -sticky nsew
ttk::style element create Spinbox.uparrow image $images(arrow-up) -width 35 -sticky {}
ttk::style element create Spinbox.downarrow image $images(arrow-down) -width 35 -sticky {}
# Sizegrip
ttk::style element create Sizegrip.sizegrip image $images(sizegrip) \
-sticky nsew
# Separator
ttk::style element create TSeparator.separator image $images(separator)
# Card
ttk::style element create Card.field image $images(card) \
-border 10 -padding 4 -sticky nsew
# Labelframe
ttk::style element create Labelframe.border image $images(card) \
-border 5 -padding 4 -sticky nsew
# Notebook
ttk::style configure TNotebook -padding 1
ttk::style element create Notebook.border \
image $images(notebook-border) -border 5 -padding 5
ttk::style element create Notebook.client image $images(notebook)
ttk::style element create Notebook.tab \
image [list $images(tab-rest) \
selected $images(tab-selected) \
active $images(tab-hover) \
] -border 13 -padding {16 14 16 6} -height 32
# Treeview
ttk::style element create Treeview.field image $images(card) \
-border 5
ttk::style element create Treeheading.cell \
image [list $images(treeheading-rest) \
pressed $images(treeheading-pressed) \
active $images(treeheading-hover)
] -border 5 -padding 15 -sticky nsew
ttk::style element create Treeitem.indicator \
image [list $images(arrow-right) \
user2 $images(empty) \
user1 $images(arrow-down) \
] -width 26 -sticky {}
ttk::style configure Treeview -background $colors(-bg) -rowheight [expr {[font metrics font -linespace] + 2}]
ttk::style map Treeview \
-background [list selected #292929] \
-foreground [list selected $colors(-selectfg)]
# Panedwindow
# Insane hack to remove clam's ugly sash
ttk::style configure Sash -gripcount 0
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 853 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 786 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 895 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 927 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

View File

@ -1,526 +0,0 @@
# Copyright © 2021 rdbende <rdbende@gmail.com>
# A stunning light theme for ttk based on Microsoft's Sun Valley visual style
package require Tk 8.6
namespace eval ttk::theme::sun-valley-light {
variable version 1.0
package provide ttk::theme::sun-valley-light $version
ttk::style theme create sun-valley-light -parent clam -settings {
proc load_images {imgdir} {
variable images
foreach file [glob -directory $imgdir *.png] {
set images([file tail [file rootname $file]]) \
[image create photo -file $file -format png]
}
}
load_images [file join [file dirname [info script]] light]
array set colors {
-fg "#202020"
-bg "#fafafa"
-disabledfg "#a0a0a0"
-selectfg "#ffffff"
-selectbg "#2f60d8"
}
ttk::style layout TButton {
Button.button -children {
Button.padding -children {
Button.label -side left -expand 1
}
}
}
ttk::style layout Toolbutton {
Toolbutton.button -children {
Toolbutton.padding -children {
Toolbutton.label -side left -expand 1
}
}
}
ttk::style layout TMenubutton {
Menubutton.button -children {
Menubutton.padding -children {
Menubutton.label -side left -expand 1
Menubutton.indicator -side right -sticky nsew
}
}
}
ttk::style layout TOptionMenu {
OptionMenu.button -children {
OptionMenu.padding -children {
OptionMenu.label -side left -expand 1
OptionMenu.indicator -side right -sticky nsew
}
}
}
ttk::style layout Accent.TButton {
AccentButton.button -children {
AccentButton.padding -children {
AccentButton.label -side left -expand 1
}
}
}
ttk::style layout Titlebar.TButton {
TitlebarButton.button -children {
TitlebarButton.padding -children {
TitlebarButton.label -side left -expand 1
}
}
}
ttk::style layout Close.Titlebar.TButton {
CloseButton.button -children {
CloseButton.padding -children {
CloseButton.label -side left -expand 1
}
}
}
ttk::style layout TCheckbutton {
Checkbutton.button -children {
Checkbutton.padding -children {
Checkbutton.indicator -side left
Checkbutton.label -side right -expand 1
}
}
}
ttk::style layout Switch.TCheckbutton {
Switch.button -children {
Switch.padding -children {
Switch.indicator -side left
Switch.label -side right -expand 1
}
}
}
ttk::style layout Toggle.TButton {
ToggleButton.button -children {
ToggleButton.padding -children {
ToggleButton.label -side left -expand 1
}
}
}
ttk::style layout TRadiobutton {
Radiobutton.button -children {
Radiobutton.padding -children {
Radiobutton.indicator -side left
Radiobutton.label -side right -expand 1
}
}
}
ttk::style layout Vertical.TScrollbar {
Vertical.Scrollbar.trough -sticky ns -children {
Vertical.Scrollbar.uparrow -side top
Vertical.Scrollbar.downarrow -side bottom
Vertical.Scrollbar.thumb -expand 1
}
}
ttk::style layout Horizontal.TScrollbar {
Horizontal.Scrollbar.trough -sticky ew -children {
Horizontal.Scrollbar.leftarrow -side left
Horizontal.Scrollbar.rightarrow -side right
Horizontal.Scrollbar.thumb -expand 1
}
}
ttk::style layout TSeparator {
TSeparator.separator -sticky nsew
}
ttk::style layout TCombobox {
Combobox.field -sticky nsew -children {
Combobox.padding -expand 1 -sticky nsew -children {
Combobox.textarea -sticky nsew
}
}
null -side right -sticky ns -children {
Combobox.arrow -sticky nsew
}
}
ttk::style layout TSpinbox {
Spinbox.field -sticky nsew -children {
Spinbox.padding -expand 1 -sticky nsew -children {
Spinbox.textarea -sticky nsew
}
}
null -side right -sticky nsew -children {
Spinbox.uparrow -side left -sticky nsew
Spinbox.downarrow -side right -sticky nsew
}
}
ttk::style layout Card.TFrame {
Card.field {
Card.padding -expand 1
}
}
ttk::style layout TLabelframe {
Labelframe.border {
Labelframe.padding -expand 1 -children {
Labelframe.label -side left
}
}
}
ttk::style layout TNotebook {
Notebook.border -children {
TNotebook.Tab -expand 1
Notebook.client -sticky nsew
}
}
ttk::style layout Treeview.Item {
Treeitem.padding -sticky nsew -children {
Treeitem.image -side left -sticky {}
Treeitem.indicator -side left -sticky {}
Treeitem.text -side left -sticky {}
}
}
# Button
ttk::style configure TButton -padding {8 4} -anchor center -foreground $colors(-fg)
ttk::style map TButton -foreground \
[list disabled #a2a2a2 \
pressed #636363 \
active #1a1a1a]
ttk::style element create Button.button image \
[list $images(button-rest) \
{selected disabled} $images(button-disabled) \
disabled $images(button-disabled) \
selected $images(button-rest) \
pressed $images(button-pressed) \
active $images(button-hover) \
] -border 4 -sticky nsew
# Toolbutton
ttk::style configure Toolbutton -padding {8 4} -anchor center
ttk::style element create Toolbutton.button image \
[list $images(empty) \
{selected disabled} $images(button-disabled) \
selected $images(button-rest) \
pressed $images(button-pressed) \
active $images(button-hover) \
] -border 4 -sticky nsew
# Menubutton
ttk::style configure TMenubutton -padding {8 4 0 4}
ttk::style element create Menubutton.button \
image [list $images(button-rest) \
disabled $images(button-disabled) \
pressed $images(button-pressed) \
active $images(button-hover) \
] -border 4 -sticky nsew
ttk::style element create Menubutton.indicator image $images(arrow-down) -width 28 -sticky {}
# OptionMenu
ttk::style configure TOptionMenu -padding {8 4 0 4}
ttk::style element create OptionMenu.button \
image [list $images(button-rest) \
disabled $images(button-disabled) \
pressed $images(button-pressed) \
active $images(button-hover) \
] -border 4 -sticky nsew
ttk::style element create OptionMenu.indicator image $images(arrow-down) -width 28 -sticky {}
# Accent.TButton
ttk::style configure Accent.TButton -padding {8 4} -anchor center -foreground #ffffff
ttk::style map Accent.TButton -foreground \
[list disabled #ffffff \
pressed #c1d8ee]
ttk::style element create AccentButton.button image \
[list $images(button-accent-rest) \
{selected disabled} $images(button-accent-disabled) \
disabled $images(button-accent-disabled) \
selected $images(button-accent-rest) \
pressed $images(button-accent-pressed) \
active $images(button-accent-hover) \
] -border 4 -sticky nsew
# Titlebar.TButton
ttk::style configure Titlebar.TButton -padding {8 4} -anchor center -foreground #1a1a1a
ttk::style map Titlebar.TButton -foreground \
[list disabled #a0a0a0 \
pressed #606060 \
active #191919]
ttk::style element create TitlebarButton.button image \
[list $images(empty) \
disabled $images(empty) \
pressed $images(button-titlebar-pressed) \
active $images(button-titlebar-hover) \
] -border 4 -sticky nsew
# Close.Titlebar.TButton
ttk::style configure Close.Titlebar.TButton -padding {8 4} -anchor center -foreground #1a1a1a
ttk::style map Close.Titlebar.TButton -foreground \
[list disabled #a0a0a0 \
pressed #efc6c2 \
active #ffffff]
ttk::style element create CloseButton.button image \
[list $images(empty) \
disabled $images(empty) \
pressed $images(button-close-pressed) \
active $images(button-close-hover) \
] -border 4 -sticky nsew
# Checkbutton
ttk::style configure TCheckbutton -padding 4
ttk::style element create Checkbutton.indicator image \
[list $images(check-unsel-rest) \
{alternate disabled} $images(check-tri-disabled) \
{selected disabled} $images(check-disabled) \
disabled $images(check-unsel-disabled) \
{pressed alternate} $images(check-tri-hover) \
{active alternate} $images(check-tri-hover) \
alternate $images(check-tri-rest) \
{pressed selected} $images(check-hover) \
{active selected} $images(check-hover) \
selected $images(check-rest) \
{pressed !selected} $images(check-unsel-pressed) \
active $images(check-unsel-hover) \
] -width 26 -sticky w
# Switch.TCheckbutton
ttk::style element create Switch.indicator image \
[list $images(switch-off-rest) \
{selected disabled} $images(switch-on-disabled) \
disabled $images(switch-off-disabled) \
{pressed selected} $images(switch-on-pressed) \
{active selected} $images(switch-on-hover) \
selected $images(switch-on-rest) \
{pressed !selected} $images(switch-off-pressed) \
active $images(switch-off-hover) \
] -width 46 -sticky w
# Toggle.TButton
ttk::style configure Toggle.TButton -padding {8 4 8 4} -anchor center -foreground $colors(-fg)
ttk::style map Toggle.TButton -foreground \
[list {selected disabled} #ffffff \
{selected pressed} #636363 \
selected #ffffff \
pressed #c1d8ee \
disabled #a2a2a2 \
active #1a1a1a
]
ttk::style element create ToggleButton.button image \
[list $images(button-rest) \
{selected disabled} $images(button-accent-disabled) \
disabled $images(button-disabled) \
{pressed selected} $images(button-rest) \
{active selected} $images(button-accent-hover) \
selected $images(button-accent-rest) \
{pressed !selected} $images(button-accent-rest) \
active $images(button-hover) \
] -border 4 -sticky nsew
# Radiobutton
ttk::style configure TRadiobutton -padding 4
ttk::style element create Radiobutton.indicator image \
[list $images(radio-unsel-rest) \
{selected disabled} $images(radio-disabled) \
disabled $images(radio-unsel-disabled) \
{pressed selected} $images(radio-pressed) \
{active selected} $images(radio-hover) \
selected $images(radio-rest) \
{pressed !selected} $images(radio-unsel-pressed) \
active $images(radio-unsel-hover) \
] -width 26 -sticky w
# Scrollbar
ttk::style element create Horizontal.Scrollbar.trough image $images(scroll-hor-trough) -sticky ew -border 6
ttk::style element create Horizontal.Scrollbar.thumb image $images(scroll-hor-thumb) -sticky ew -border 3
ttk::style element create Horizontal.Scrollbar.rightarrow image $images(scroll-right) -sticky {} -width 12
ttk::style element create Horizontal.Scrollbar.leftarrow image $images(scroll-left) -sticky {} -width 12
ttk::style element create Vertical.Scrollbar.trough image $images(scroll-vert-trough) -sticky ns -border 6
ttk::style element create Vertical.Scrollbar.thumb image $images(scroll-vert-thumb) -sticky ns -border 3
ttk::style element create Vertical.Scrollbar.uparrow image $images(scroll-up) -sticky {} -height 12
ttk::style element create Vertical.Scrollbar.downarrow image $images(scroll-down) -sticky {} -height 12
# Scale
ttk::style element create Horizontal.Scale.trough image $images(scale-trough-hor) \
-border 5 -padding 0
ttk::style element create Vertical.Scale.trough image $images(scale-trough-vert) \
-border 5 -padding 0
ttk::style element create Scale.slider \
image [list $images(scale-thumb-rest) \
disabled $images(scale-thumb-disabled) \
pressed $images(scale-thumb-pressed) \
active $images(scale-thumb-hover) \
] -sticky {}
# Progressbar
ttk::style element create Horizontal.Progressbar.trough image $images(progress-trough-hor) \
-border 1 -sticky ew
ttk::style element create Horizontal.Progressbar.pbar image $images(progress-pbar-hor) \
-border 2 -sticky ew
ttk::style element create Vertical.Progressbar.trough image $images(progress-trough-vert) \
-border 1 -sticky ns
ttk::style element create Vertical.Progressbar.pbar image $images(progress-pbar-vert) \
-border 2 -sticky ns
# Entry
ttk::style configure TEntry -foreground $colors(-fg)
ttk::style map TEntry -foreground \
[list disabled #0a0a0a \
pressed #636363 \
active #626262
]
ttk::style element create Entry.field \
image [list $images(entry-rest) \
{focus hover !invalid} $images(entry-focus) \
invalid $images(entry-invalid) \
disabled $images(entry-disabled) \
{focus !invalid} $images(entry-focus) \
hover $images(entry-hover) \
] -border 5 -padding 8 -sticky nsew
# Combobox
ttk::style configure TCombobox -foreground $colors(-fg)
ttk::style configure ComboboxPopdownFrame -borderwidth 1 -relief solid
ttk::style map TCombobox -foreground \
[list disabled #0a0a0a \
pressed #636363 \
active #626262
]
ttk::style map TCombobox -selectbackground [list \
{readonly hover} $colors(-selectbg) \
{readonly focus} $colors(-selectbg) \
] -selectforeground [list \
{readonly hover} $colors(-selectfg) \
{readonly focus} $colors(-selectfg) \
]
ttk::style element create Combobox.field \
image [list $images(entry-rest) \
{readonly disabled} $images(button-disabled) \
{readonly pressed} $images(button-pressed) \
{readonly hover} $images(button-hover) \
readonly $images(button-rest) \
invalid $images(entry-invalid) \
disabled $images(entry-disabled) \
focus $images(entry-focus) \
hover $images(entry-hover) \
] -border 5 -padding {8 8 28 8}
ttk::style element create Combobox.arrow image $images(arrow-down) -width 35 -sticky {}
# Spinbox
ttk::style configure TSpinbox -foreground $colors(-fg)
ttk::style map TSpinbox -foreground \
[list disabled #0a0a0a \
pressed #636363 \
active #626262
]
ttk::style element create Spinbox.field \
image [list $images(entry-rest) \
invalid $images(entry-invalid) \
disabled $images(entry-disabled) \
focus $images(entry-focus) \
hover $images(entry-hover) \
] -border 5 -padding {8 8 54 8} -sticky nsew
ttk::style element create Spinbox.uparrow image $images(arrow-up) -width 35 -sticky {}
ttk::style element create Spinbox.downarrow image $images(arrow-down) -width 35 -sticky {}
# Sizegrip
ttk::style element create Sizegrip.sizegrip image $images(sizegrip) \
-sticky nsew
# Separator
ttk::style element create TSeparator.separator image $images(separator)
# Card
ttk::style element create Card.field image $images(card) \
-border 10 -padding 4 -sticky nsew
# Labelframe
ttk::style element create Labelframe.border image $images(card) \
-border 5 -padding 4 -sticky nsew
# Notebook
ttk::style configure TNotebook -padding 1
ttk::style element create Notebook.border \
image $images(notebook-border) -border 5 -padding 5
ttk::style element create Notebook.client image $images(notebook)
ttk::style element create Notebook.tab \
image [list $images(tab-rest) \
selected $images(tab-selected) \
active $images(tab-hover) \
] -border 13 -padding {16 14 16 6} -height 32
# Treeview
ttk::style element create Treeview.field image $images(card) \
-border 5
ttk::style element create Treeheading.cell \
image [list $images(treeheading-rest) \
pressed $images(treeheading-pressed) \
active $images(treeheading-hover)
] -border 5 -padding 15 -sticky nsew
ttk::style element create Treeitem.indicator \
image [list $images(arrow-right) \
user2 $images(empty) \
user1 $images(arrow-down) \
] -width 26 -sticky {}
ttk::style configure Treeview -foregound #1a1a1a -background $colors(-bg) -rowheight [expr {[font metrics font -linespace] + 2}]
ttk::style map Treeview \
-background [list selected #f0f0f0] \
-foreground [list selected #191919]
# Panedwindow
# Insane hack to remove clam's ugly sash
ttk::style configure Sash -gripcount 0
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

Some files were not shown because too many files have changed in this diff Show More