Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added button-close-hover style variant #5

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion theme/dark.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ namespace eval ttk::theme::sun-valley-dark {
}
}

ttk::style layout Close.TButton {
CloseButton.button -children {
CloseButton.padding -children {
CloseButton.label -side left -expand 1
}
}
}

ttk::style layout TCheckbutton {
Checkbutton.button -children {
Checkbutton.padding -children {
Expand Down Expand Up @@ -146,7 +154,15 @@ namespace eval ttk::theme::sun-valley-dark {
Spinbox.uparrow -side left -sticky nsew
Spinbox.downarrow -side right -sticky nsew
}
}
}

ttk::style layout Close.TButton {
CloseButton.button -children {
CloseButton.padding -children {
CloseButton.label -side left -expand 1
}
}
}

ttk::style layout Card.TFrame {
Card.field {
Expand Down Expand Up @@ -202,6 +218,23 @@ namespace eval ttk::theme::sun-valley-dark {
active $images(button-hover) \
] -border 4 -sticky nsew

# Close Button
ttk::style configure Close.TButton -padding {8 4} -anchor center -foreground $colors(-fg)

ttk::style map Close.TButton -foreground \
[list disabled #a2a2a2 \
pressed #636363 \
active #ffffff]

ttk::style element create CloseButton.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-close-hover) \
] -border 4 -sticky nsew

# Toolbutton
ttk::style configure Toolbutton -padding {8 4} -anchor center

Expand Down
Binary file added theme/dark/button-close-hover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions theme/light.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ namespace eval ttk::theme::sun-valley-light {
}
}

ttk::style layout Close.TButton {
CloseButton.button -children {
CloseButton.padding -children {
CloseButton.label -side left -expand 1
}
}
}

ttk::style layout Toolbutton {
Toolbutton.button -children {
Toolbutton.padding -children {
Expand Down Expand Up @@ -203,6 +211,23 @@ namespace eval ttk::theme::sun-valley-light {
active $images(button-hover) \
] -border 4 -sticky nsew

# Close Button
ttk::style configure Close.TButton -padding {8 4} -anchor center -foreground $colors(-fg)

ttk::style map Close.TButton -foreground \
[list disabled #a2a2a2 \
pressed #636363 \
active #ffffff]

ttk::style element create CloseButton.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-close-hover) \
] -border 4 -sticky nsew

# Toolbutton
ttk::style configure Toolbutton -padding {8 4} -anchor center

Expand Down
Binary file added theme/light/button-close-hover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.