Bwidget Source Code
Check-in [28163b48cb]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Implemented incomplete patch of ticket [4b6a27c9b8] to make TitleFrame themed-aware
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | rfe-4b6a27c9b8
Files: files | file ages | folders
SHA1: 28163b48cb4d024cd3f3cb9cfee505ab7a192160
User & Date: oehhar 2016-10-31 14:45:24.030
References
2016-10-31
14:51 Ticket [4b6a27c9b8] Widget::theme 1 -> TitleFrame fails status still Open with 4 other changes artifact: 4ebf26626d user: oehhar
Context
2016-10-31
14:45
Implemented incomplete patch of ticket [4b6a27c9b8] to make TitleFrame themed-aware Leaf check-in: 28163b48cb user: oehhar tags: rfe-4b6a27c9b8
14:22
button.tcl: Reverted last change, Eric underlined to not use ttk widgets as a base due to the option data base. Did traditional fix to exclude all options known by button and not known by ttk::button. Ticket [845613e5590ae7cf] check-in: 702ef20c55 user: oehhar tags: bwidget
Changes
Unified Diff Ignore Whitespace Patch
Changes to titleframe.tcl.
45
46
47
48
49
50
51














52
53
54
55
56
57

58
59
60
61
62
63
64
65

66
67
68
69
70
71
72

# ------------------------------------------------------------------------------
#  Command TitleFrame::create
# ------------------------------------------------------------------------------
proc TitleFrame::create { path args } {
    Widget::init TitleFrame $path $args















    set frame  [eval [list frame $path] [Widget::subcget $path :cmd] \
	    -class TitleFrame -relief flat -bd 0 -highlightthickness 0]

    set padtop [eval [list frame $path.p] [Widget::subcget $path :cmd] \
	    -relief flat -borderwidth 0]
    set border [eval [list frame $path.b] [Widget::subcget $path .b] -highlightthickness 0]

    set label  [eval [list label $path.l] [Widget::subcget $path .l] \
                    -highlightthickness 0 \
                    -relief flat \
                    -bd     0 -padx 2 -pady 0]
    set padbot [eval [list frame $border.p] [Widget::subcget $path .p] \
	    -relief flat -bd 0 -highlightthickness 0]
    set frame  [eval [list frame $path.f] [Widget::subcget $path .f] \
	    -relief flat -bd 0 -highlightthickness 0]

    set height [winfo reqheight $label]

    switch [Widget::getoption $path -side] {
        left   { set relx 0.0; set x 5;  set anchor nw }
        center { set relx 0.5; set x 0;  set anchor n  }
        right  { set relx 1.0; set x -5; set anchor ne }
    }







>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
>







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

# ------------------------------------------------------------------------------
#  Command TitleFrame::create
# ------------------------------------------------------------------------------
proc TitleFrame::create { path args } {
    Widget::init TitleFrame $path $args

if {[Widget::theme]} {
      set frame [eval [list ttk::frame $path] [Widget::subcget $path :cmd] \
                -class TitleFrame -relief flat -borderwidth 0]

      set padtop [eval [list ttk::frame $path.p] [Widget::subcget $path :cmd] \
                -relief flat]
      set border [eval [list ttk::frame $path.b] [Widget::subcget $path .b]]
      set label  [eval [list ttk::label $path.l] [Widget::subcget $path .l] \
                -relief flat]
      set padbot [eval [list ttk::frame $border.p] [Widget::subcget $path .p]\
                -relief flat]
      set frame  [eval [list ttk::frame $path.f] [Widget::subcget $path .f]\
                -relief flat]
    } else {
        set frame  [eval [list frame $path] [Widget::subcget $path :cmd] \
                -class TitleFrame -relief flat -bd 0 -highlightthickness 0]
    
        set padtop [eval [list frame $path.p] [Widget::subcget $path :cmd] \
                -relief flat -borderwidth 0]
        set border [eval [list frame $path.b] [Widget::subcget $path .b] \
                -highlightthickness 0]
        set label  [eval [list label $path.l] [Widget::subcget $path .l] \
                -highlightthickness 0 \
                -relief flat \
                -bd     0 -padx 2 -pady 0]
        set padbot [eval [list frame $border.p] [Widget::subcget $path .p] \
                -relief flat -bd 0 -highlightthickness 0]
        set frame  [eval [list frame $path.f] [Widget::subcget $path .f] \
                -relief flat -bd 0 -highlightthickness 0]
    }
    set height [winfo reqheight $label]

    switch [Widget::getoption $path -side] {
        left   { set relx 0.0; set x 5;  set anchor nw }
        center { set relx 0.5; set x 0;  set anchor n  }
        right  { set relx 1.0; set x -5; set anchor ne }
    }