Skip to content

Commit

Permalink
Added focus element to Toolbutton style, as proposed by Emiliano Gavi…
Browse files Browse the repository at this point in the history
…lan in ticket [0d48797195].
  • Loading branch information
csaba committed Aug 2, 2024
1 parent f0d3c91 commit 5a9b955
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
12 changes: 11 additions & 1 deletion library/ttk/classicTheme.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,17 @@ namespace eval ttk::theme::classic {
#
# Toolbar buttons:
#
ttk::style configure Toolbutton -padding 2 -relief flat -shiftrelief 2
ttk::style layout Toolbutton {
Toolbutton.focus -children {
Toolbutton.border -children {
Toolbutton.padding -children {
Toolbutton.label
}
}
}
}
ttk::style configure Toolbutton -padding 2 -relief flat \
-shiftrelief 2 -focussolid 1
ttk::style map Toolbutton -relief \
{disabled flat selected sunken pressed sunken active raised}
ttk::style map Toolbutton -background \
Expand Down
7 changes: 4 additions & 3 deletions library/ttk/defaults.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,13 @@ namespace eval ttk::theme::default {
#
ttk::style layout Toolbutton {
Toolbutton.border -children {
Toolbutton.padding -children {
Toolbutton.label
Toolbutton.focus -children {
Toolbutton.padding -children {
Toolbutton.label
}
}
}
}

ttk::style configure Toolbutton \
-padding 2 -relief flat
ttk::style map Toolbutton -relief \
Expand Down

0 comments on commit 5a9b955

Please sign in to comment.