From 5a9b9553246bfa1af65dfa948177e7f8d3426e60 Mon Sep 17 00:00:00 2001 From: csaba Date: Fri, 2 Aug 2024 13:11:08 +0000 Subject: [PATCH] Added focus element to Toolbutton style, as proposed by Emiliano Gavilan in ticket [0d48797195]. --- library/ttk/classicTheme.tcl | 12 +++++++++++- library/ttk/defaults.tcl | 7 ++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/library/ttk/classicTheme.tcl b/library/ttk/classicTheme.tcl index 609c5d78d..f1ebda80b 100644 --- a/library/ttk/classicTheme.tcl +++ b/library/ttk/classicTheme.tcl @@ -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 \ diff --git a/library/ttk/defaults.tcl b/library/ttk/defaults.tcl index 66706a311..06e29b23b 100644 --- a/library/ttk/defaults.tcl +++ b/library/ttk/defaults.tcl @@ -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 \