Skip to content

Commit

Permalink
Eliminated code duplicates.
Browse files Browse the repository at this point in the history
  • Loading branch information
csaba committed Aug 24, 2024
1 parent 74b541d commit 4035773
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 62 deletions.
31 changes: 0 additions & 31 deletions library/ttk/altTheme.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -151,34 +151,3 @@ proc ttk::theme::alt::configureNotebookStyle {style} {
}
}
}

# ttk::theme::alt::configureNotebookStyle --
#
# Sets theme-specific option values for the ttk::notebook style $style and the
# style $style.Tab. Invoked by ::ttk::configureNotebookStyle.

proc ttk::theme::alt::configureNotebookStyle {style} {
set tabPos [ttk::style lookup $style -tabposition {} nw]
switch -- [string index $tabPos 0] {
n {
ttk::style configure $style -tabmargins {1.5p 1.5p 0.75p 0}
ttk::style map $style.Tab -expand {selected {1.5p 1.5p 0.75p 0}}
}
s {
ttk::style configure $style -tabmargins {1.5p 0 0.75p 1.5p}
ttk::style map $style.Tab -expand {selected {1.5p 0 0.75p 1.5p}}
}
w {
ttk::style configure $style -tabmargins {1.5p 1.5p 0 0.75p}
ttk::style map $style.Tab -expand {selected {1.5p 1.5p 0 0.75p}}
}
e {
ttk::style configure $style -tabmargins {0 1.5p 1.5p 0.75p}
ttk::style map $style.Tab -expand {selected {0 1.5p 1.5p 0.75p}}
}
default {
ttk::style configure $style -tabmargins {1.5p 1.5p 0.75p 0}
ttk::style map $style.Tab -expand {selected {1.5p 1.5p 0.75p 0}}
}
}
}
31 changes: 0 additions & 31 deletions library/ttk/clamTheme.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -188,34 +188,3 @@ proc ttk::theme::clam::configureNotebookStyle {style} {
}
}
}

# ttk::theme::clam::configureNotebookStyle --
#
# Sets theme-specific option values for the ttk::notebook tab style $style.Tab.
# Invoked by ::ttk::configureNotebookStyle.

proc ttk::theme::clam::configureNotebookStyle {style} {
set tabPos [ttk::style lookup $style -tabposition {} nw]
switch -- [string index $tabPos 0] {
n {
ttk::style configure $style.Tab -padding {4.5p 1.5p 4.5p 1.5p}
ttk::style map $style.Tab -padding {selected {4.5p 3p 4.5p 1.5p}}
}
s {
ttk::style configure $style.Tab -padding {4.5p 1.5p 4.5p 1.5p}
ttk::style map $style.Tab -padding {selected {4.5p 1.5p 4.5p 3p }}
}
w {
ttk::style configure $style.Tab -padding {1.5p 4.5p 1.5p 4.5p}
ttk::style map $style.Tab -padding {selected {3p 4.5p 1.5p 4.5p}}
}
e {
ttk::style configure $style.Tab -padding {1.5p 4.5p 1.5p 4.5p}
ttk::style map $style.Tab -padding {selected {1.5p 4.5p 3p 4.5p}}
}
default {
ttk::style configure $style.Tab -padding {4.5p 1.5p 4.5p 1.5p}
ttk::style map $style.Tab -padding {selected {4.5p 3p 4.5p 1.5p}}
}
}
}

0 comments on commit 4035773

Please sign in to comment.