Changeset 2766


Ignore:
Timestamp:
Jan 18, 2012 5:42:20 PM (12 years ago)
Author:
mmc
Message:

Fixed the Balloon widget to support "-relief flat". Using a flat black
style may work better for Rapplicants and the new Rappture interface.
Default is still raised/gray.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/balloon.tcl

    r1929 r2766  
    321321
    322322            set bg $itk_option(-background)
    323             set light [Rappture::color::brightness $bg 0.4]
    324             set dark [Rappture::color::brightness $bg -0.4]
     323            set rgb [winfo rgb . $bg]
     324            set flatbg [format "#%03x%03x%03x" [lindex $rgb 0] [lindex $rgb 1] [lindex $rgb 2]]
     325            switch -- $itk_option(-relief) {
     326                raised {
     327                    set light [Rappture::color::brightness $bg 0.4]
     328                    set dark [Rappture::color::brightness $bg -0.4]
     329                    set bg $flatbg
     330                }
     331                flat - solid {
     332                    set light $flatbg
     333                    set dark $flatbg
     334                    set bg $flatbg
     335                }
     336                sunken {
     337                    set light [Rappture::color::brightness $bg -0.4]
     338                    set dark [Rappture::color::brightness $bg 0.4]
     339                    set bg $flatbg
     340                }
     341            }
    325342            set rgb [winfo rgb . $bg]
    326343            set bg [format "#%03x%03x%03x" [lindex $rgb 0] [lindex $rgb 1] [lindex $rgb 2]]
Note: See TracChangeset for help on using the changeset viewer.